‎2008 Jul 25 8:03 AM
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.
‎2008 Jul 25 8:05 AM
assign a function code to the dropdown list..
Selected value will then be available in PAI.
~Piyush
Edited by: Piyush Patil on Jul 25, 2008 9:07 AM
‎2008 Jul 25 8:17 AM
thanks for ur prompt reply.
Yes, we assigned already. still it is not coming.
any other responses?
‎2008 Jul 25 8:23 AM
HI,
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.
endloop.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = 'EBAN-MWSKZ'
VALUES = it_value[]
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
.
‎2008 Jul 25 8:16 AM
show the code involved 'vrm_set_values'
that might be causing the issue
‎2008 Jul 25 8:29 AM
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.
DYNP_VALUES_READ.
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.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = lc_dyname
dynumb = lc_dynumb
TABLES
dynpfields = ltab_fields
EXCEPTIONS
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.
Thanks,
Samantak,.
‎2008 Jul 25 8:42 AM
FOLKS,
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.?
‎2008 Jul 25 8:47 AM
Hi,
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.
Thanks,
Samantak.