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.
Showing results for 
Search instead for 
Did you mean: 

Drop down list.

Former Member
0 Kudos

hi SDNers,

i have developed one drop down list in module programming.

After execute it, I will select any value in that drop down list,

I need that selected value in PAI. but its not coming into PAI.

how can i get the values in PAI?

for eg :

I have populated list box values in EBAN-MWSKZ using FM 'vrm_set_values'. but after selecting a particular value it is not being assigned to EBAN-MWSKZ, and hence it is not saving the value in database, when i m pressing save.

Thanks in advance.

Reward sure for helpful answers.


Former Member
0 Kudos

assign a function code to the dropdown list..

Selected value will then be available in PAI.


Edited by: Piyush Patil on Jul 25, 2008 9:07 AM

0 Kudos

thanks for ur prompt reply.

Yes, we assigned already. still it is not coming.

any other responses?

0 Kudos


this is my coding.

select mwskz from T007A into table it_mwskz.

loop at it_mwskz into wa_mwskz.

wa_value-key = sy-tabix.

wa_value-text = wa_mwskz-mwskz.

append wa_value to it_value.





VALUES = it_value[]



  • OTHERS = 2


Active Contributor
0 Kudos

show the code involved 'vrm_set_values'

that might be causing the issue

Former Member
0 Kudos

Hi Senthi,

You can create a function code to trigger a PAI event. So you need to make the Dropdown Function code in the user command module in the PAI event.

You can use the following logic to capture the selected value in the dropdown list. Use the following code to get the selected value.

You need to use the following function module.


Below is the code snippet about how to use the same.

 DATA: ltab_fields  LIKE dynpread OCCURS 0 WITH HEADER LINE.
  DATA: lc_dyname    LIKE sy-repid.
  DATA: lc_dynumb    LIKE sy-dynnr.
  DATA: ls_dynfields TYPE dynpread.

 ltab_fields-fieldname = 'IO_01'.
  APPEND ltab_fields.

  lc_dyname = sy-repid.
  lc_dynumb = sy-dynnr.

      dyname     = lc_dyname
      dynumb     = lc_dynumb
      dynpfields = ltab_fields
      OTHERS     = 01.

 READ TABLE ltab_fields INTO ls_dynfields INDEX 1.

Here in the fieldname give the name of the field of the dropdown. You will get the value of the selection. And then you can do the read table to get the value.

This will help.



0 Kudos


I am doing this drop down list in one standard program contains sub-screen.

so in element list tab of this subscreen it wont allow us to give 'ok_code'.

ur function module 'DYNP_READ_VALUES' also not retaining the values.

is there any other solution.?

0 Kudos


Have you mentioned the Screen Element name in the dynprofield Internal Table properly? It should return the values of the dropdown properly provided you have to mention the screen element name correctly.

I am also working in the same scenario where in I have a subscreen and a dropdown in the screen. I need to capture the present value of the dropdown. I used the same logic and its working fine.

Can you give some code related details? It will help us to resolve this problem.