Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I INSERT a INITIAL LINE to INDEX 1?

former_member194142
Participant
0 Kudos

Hello

I am writing my code in a user-exit, in this we have a internal table, say sap_itab, but its declared with a DDIC table type, say, DDIC_ITAB, which is a SORTED one, selected the UNIQUE radio button with 3 fields key components.

Now pl. let us know can we INSERT the INITIAL LINE at INDEX 1 to this sap_itab in user-exit? is it safe being a user-exit?

I mean, can we add a INITIAL LINE as INDEX 1 to a SORTED internal table, wherein UNIQUE is se3lcted with 3 fields as KEY COMPONENTS


Pl. check PLM's DDIC TABLE TYPE - 'EHCSMT_SPC_VALIDITY_AREA_DESC'


Thank you

1 ACCEPTED SOLUTION

former_member182466
Contributor
0 Kudos

Yes you can. BUT only if there is no entry with a blank key yet and the inserted value does not violate the sort order AND you do not need to change the key values.

If this is safe to do in a user exit is too broad a question, it totally depends on the user exit.

4 REPLIES 4

former_member182466
Contributor
0 Kudos

Yes you can. BUT only if there is no entry with a blank key yet and the inserted value does not violate the sort order AND you do not need to change the key values.

If this is safe to do in a user exit is too broad a question, it totally depends on the user exit.

former_member195402
Active Contributor
0 Kudos

Hi.

Yes, you can (as Gerrit wrote). But I don't think, that this makes any sense in a SORTED table.

Why do you want to do that?

Regards,

Klaus


0 Kudos

Thank you.

Std. SAP is filling the screen's drop down field with this internal table contents (records), as we knew the std. SAP will add a blank line by default in the drop down field's list box, but for some reason this is not happening (std. SAP's blank line is disappearing) hence user don't have a chance to select NONE/blank line in the drop down field, so we want to add explicitly a blank line to the drop down field's entries, now user can select this blank line as NONE value

Right, I need to investigate/fix 'for some reason', that's we tale care later, right now we need to fix the issue (NONE selection ability) it bcz its a production issue

Thank you

0 Kudos

Hi,

Check the field  Attributes-> program (in screen) , if input is selected as required option in list box.

you can't  have blank option in list box.

Hope it helpful,

Regards,

Venkat.