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: 

Accept multiple input values for a input field

0 Kudos

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

8 REPLIES 8

Former Member
0 Kudos

Hi

You can use a select-option (perhaps with restrictions), it's just an internal table

Max

0 Kudos

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

0 Kudos

So, how are you going to differentiate the values coming from the screen?

Rob

0 Kudos

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

0 Kudos

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

0 Kudos

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?

0 Kudos

Thanks to all, I was able to get the solution

0 Kudos

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 .