Application Development and Automation 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: 
Read only

SELECTION SCREEN FIELD for multiple entries without table reference

jeff_broodwar
Active Participant
0 Likes
4,332

Hi Experts,

I have a requirement to input 10 document numbers of any table (mara, bseg) depending on the user. The challenge is that, is there a reference field I can use for select-options which will allow me to paste 10 documents without referencing it to a specific table (ex: bseg, mara). If there is other possible approach other than declaring 10 text fields in the selection screen as long as the user can paste 10 or 15 documents and click on execute will be acceptable..

Thank you,

Jeffrey

1 ACCEPTED SOLUTION
Read only

jeff_broodwar
Active Participant
0 Likes
3,647

I forgot the use of STXH table. Use this table as reference if no specific table (MARA, BSEG) is provided. Thanks for all the help.

9 REPLIES 9
Read only

former_member593648
Active Participant
0 Likes
3,647

Why don't you create your own dummy se11 table and field and refer that in your select-option. Based on your requirements you can then query whatever standard table you need in the program

Read only

0 Likes
3,647

Hi Piyush,

I tried creating a custom like suggested and ended up with dump:

Exception condition "INVALID_DYNPROFIELD" triggered

same thing when I use thead-tdname and click on multiple button of select options.

Thanks,

Jeffrey

Read only

0 Likes
3,647

This is pretty odd. I know this is a longshot but can you try making a select option for some regular table , maybe something like BSEG-BELNR and check what happens.

Also what version are you on ?

Read only

0 Likes
3,647

Hello Piyush,

No error when using normal table. Did you test the suggested below?

REPORT ztest_001.
TABLES thead.
SELECT-OPTIONS : doc FOR thead-tdname.

I tried this as well but it give me dump...

Thank you,

Jeffrey

Read only

Pankaj_Gupta
Product and Topic Expert
Product and Topic Expert
0 Likes
3,647

You can try below code:

DATA: doc TYPE char10.
SELECT-OPTIONS: s_doc FOR doc.
Read only

0 Likes
3,647

Thanks Pankaj, dump happens due to misplaced text symbol in the list box parameter. I corrected the text-symbol I used when calling VRM_SET_VALUES (id) and everything turned right, no more dumps.

Thanks,

Jeffrey

Read only

former_member1716
Active Contributor
3,647

jeff.broodwar,

Better Solution for your scenario would be define all the possible fields in selection screen and then dynamically Hide/Display the necessary fields based on the user and process accordingly.

Alternate Approach:

The declaration of the Selection field is purely dependent on the values that you enter. In case if you will enter values which will never cross 10 characters then you can simply define a variable with same and refer that for select option.

As a next step if you are about to Query MARA table for material field then all your Inputted values must pass through the respective conversion exit before querying the table. The same applies for fields in BSEG.

Regards!

Read only

BaerbelWinkler
SAP Champion
SAP Champion
3,647

jeff.broodwar

Hi Jeff,

judging from your other question you are looking for a field to use to then get long texts, right? Simply use STXH-TDNAME on the selection-screen. STXH is the header table for the long texts and TDNAME the corresponding field to what you try to use with structure THEAD.

Be aware however that depending on the texts you are looking for, the key to access them might be a composite, made up of different values. For some tables it can be a 1:1 where TDNAME just contains the document number or a material number (in the internal format!). But, it can also be a concatenation of for example the sales-org + document number or client + company code + document number. You'll have to verify what applies to your specific case.

As an aside trying to restrict a selection to e.g. 10 options is not a good idea, it should be up to the user to enter as many entries as s/he likes.

Hope this helps!

Cheers

Bärbel

Read only

jeff_broodwar
Active Participant
0 Likes
3,648

I forgot the use of STXH table. Use this table as reference if no specific table (MARA, BSEG) is provided. Thanks for all the help.