‎2013 Oct 18 3:11 PM
Hi Experts,
For selection screen we can use select-options. When we use select-options , System automatically created a internal table for the select-option having field like SIGN, OPTIONS,LOW HIGH. Also system puts some default values to the internal table fields. like for Sign = default is I, for options = default is BT and keep the low value in low field and high value in high field.
My question is, If system created the itab automatically then must store the itab in a specific area. So where system exactly keep the internal table and how we can find that itab table and also if i want to change values in itab how to do ? Also if i change the defalut values or LOW/High values directly from the itab, then is it reflect on the selection screen field that i created before ?
But in Range we create the internal table manually. So from where also we can get that itab ?
Please solve my problem.
Kind Regards,
Ajit Sarangi
‎2013 Oct 18 3:26 PM
Hi Ajit,
If you are creating selection screen with select-option it will create the internal table with same name for example.
SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
NOW it will create the internal table with the same name S_VBELN[] with header line. If you want to append the records you can directly appen to selection screen field S_VBELN[].
Regards,
Rajesh.
‎2013 Oct 18 3:36 PM
Hi Rajesh,
As You said the itab name is same as Select-options. Then my question is how to find that itab means where exactly the itab will resides in the system.Then how i ll change the default data from that itab ?
Regards,
Ajit
‎2013 Oct 18 3:49 PM
‎2013 Oct 18 4:42 PM
Hi Ajit,
I don´t know if this is what you´re looking for but there is a function SELECT_OPTIONS_RESTRICT that allows you to change the select-options values.
This function can only be called once in a programm.
Regards,
Teresa Gonçalves
‎2013 Oct 18 5:29 PM
Hey Ajit,
you can change the select-option itab at screen event at selection-screen.
For example:
at selection-screen on s_num.
loop at s_num.
if s_num-low eq '123'.
s_num-low = '456'.
modify s_num.
endif.
endloop.
Regards,
Myriam Bail
‎2013 Oct 18 5:40 PM
Hi,
Internal table created for select options is temporary. It wont be in the system, only during the execution of the program values exist.
If you mean where the defaults are written, i think it has to be coming from base language of SAP which is JAVA.
‎2013 Oct 18 6:05 PM
Hi Ajit,
When you declare a SELECT-OPTIONS, SAP creates an internal table or rather a range with default values for SIGN and OPTION with 'I' and 'BT' respectively.
However, if you want to modify the values of sign and option, this can be done in AT SELECTION SCREEN OUTPUT, which is called just before the selection screen display.
Suppose the select options declared is SO_MATNR, then it behaves as an internal table with header line or a range.
Also, do let me know if you have any specific requirement and we can have a look at that as well.
Thanks,
Anupam
‎2013 Oct 18 6:26 PM