11-07-2011 3:29 PM
Hi All,
I have a input field on the screen, I want it to accept multiple input values & store it into a internal table. Kindly guide me on how to accomplish this..
Thanks,
Deepak
11-07-2011 3:31 PM
Hi
You can use a select-option (perhaps with restrictions), it's just an internal table
Max
11-07-2011 4:22 PM
Hi Max,
Thanks for the suggestion, I tried to use the SELECT-OPTIONS in my program but I get the following error.
"SELECT-OPTIONS is only allowed between BEGIN/END OF SCREEN for programs with type other than 1".
Am not sure, why this error is coming, I tried putting SELECT-OPTIONS in the pbo module, pai module, top include also but it throws the same error. If I use BEGIN-OF SCREEN & END OF SCREEN, then i get screen generation error. Kindly help me with this.
Regards,
Deepak
11-07-2011 4:28 PM
So, how are you going to differentiate the values coming from the screen?
Rob
11-07-2011 4:36 PM
Hi Rob,
Sorry, I did not get you.. I access the field values through their names directly in my program & so far it is working for me.. But in this particular case I need to accept multiple values for an input field & then copy it to a internal table & pass it to a function module. Can you put a code snippet in here or give me some links which shows the proper usage of SELECT-OPTIONS.. the examples in the system do not properly show the implementation.
Thanks,
Deepak
11-07-2011 5:13 PM
Hi
SELECT-OPTIONS statament is allowed in a selection-screen only, so you can't place it directly in a dynpro.
You need to define a selection-screen as subscreen and call this subscreen in your dynpro
TABLES: T001.
SELECTION-SCREEN BEGIN OF SCREEN 0100 AS SUBSCREEN.
SELECT-OPTIONS: S_BUKRS FOR T001-BUKRS.
SELECTION-SCREEN END OF SCREEN 0100.
You can place the definition in the top-include, then in your screen you need to define an area for a subscreen and call it:
PROCESS PBO.
CALL SUBECREEN <subarea> INCLUDING SY-REPID '0100'.
PROCESS PAI.
CALL SUBECREEN <subarea>.
In this way the selection-screen will be included in your main screen, else you can use the command CALL SELECTION-SCREEN (sse the help) in order to call it separatly.
Max
03-16-2016 5:43 AM
Hi Max,
What if i want search help with multiple input values with that field?
How to assign search help to the field in sub-screen?
11-16-2011 12:01 PM
12-02-2022 11:22 AM
Hello can you please explain in brief how you are done with this query ..how you can able to add multiple entries.i have also same problem .