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

Get back dropdown list data.

Former Member
0 Likes
591

Hi all,

I am adding a new customer screen into transaction code ME21N. I managed to see the new tab Customer Data created, I have also created a dropdown list in the screen with data for example, Text 1, Text 2, Text 3.

My problem now is whenever I selected the dropdown list to Text2, I go tab Delivery/Invoice, and come back to tab Customer Data, the dropdown list data is blank. How could I set the dropdown list data and display the selected data whenever I come back to Customer Data?

Your answer is very much appreciated.

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Sandra_Rossi
Active Contributor
0 Likes
536

Dropdown listbox value (not the list of possible of values) is easy to initialize, it works like any other fields.

The problem is probably that the variable is cleared somewhere. Add a watchpoint on this variable and you'll see when it's cleared, and you'll then be able to fix the problem.

3 REPLIES 3
Read only

0 Likes
536

Hi ,

Define separate module for Drop down assignment. Using Fn Module VRM_SET_VALUES assign the values u want to do.

code{

MODULE list_def_code OUTPUT.

CLEAR: value,list , name , wa_defect.

REFRESH: list , it_sale , it_defect.

SELECT * FROM zcrm_defect INTO TABLE it_defect WHERE division = division.

LOOP AT it_defect INTO wa_defect.

value-key = wa_defect-def_code.

value-text = wa_defect-def_text.

APPEND value TO list.

CLEAR value.

ENDLOOP.

SORT LIST BY TEXT.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

id = 'DEFECT'

values = list[]

EXCEPTIONS

id_illegal_name = 1

OTHERS = 2.

} Try this

Read only

0 Likes
536

Hi VamShi,

Thanks for your reply. The code you provided is almost the same with my code. However my problem now is after I selected the value from the dropdown list in tab Customer Data, the value in the dropdown list will missing if I go to tab Text and back to tab Customer Data. My question is how can I save the dropdown list data in the system, and retrieve the value when back to tab Customer Data?

You may understand what I am trying to describe if you go to transaction code ME21N.

Thank you very much.

Read only

Sandra_Rossi
Active Contributor
0 Likes
537

Dropdown listbox value (not the list of possible of values) is easy to initialize, it works like any other fields.

The problem is probably that the variable is cleared somewhere. Add a watchpoint on this variable and you'll see when it's cleared, and you'll then be able to fix the problem.