Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Drop Down List with screen modifications

I have a program with a drop down list which shows the client number in it. I want to display details on the same screen for the client number selected from the drop down list.

AT SELECTION-SCREEN ON p_mandt works only by pressing ENTER. But I want to display the details whenever there is a change in the value p_mandt from the drop down list.

Here is the present code.

DATA: name TYPE vrm_id,

list TYPE vrm_values,

wa_list TYPE vrm_value,

c_mandt type t000-mandt.

DATA: it_usr02 type table of usr02 with header line.

parameters: p_mandt(3) AS LISTBOX VISIBLE LENGTH 10 obligatory.

AT SELECTION-SCREEN OUTPUT.

select MANDT

from t000

into c_mandt.

wa_list-key = c_mandt.

wa_list-text = c_mandt.

append wa_list to list.

endselect.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING

ID = 'P_MANDT'

VALUES = list

EXCEPTIONS

ID_ILLEGAL_NAME = 1

OTHERS = 2

.

IF SY-SUBRC <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Tags:
Former Member
replied

hi Gaurab,

pls. change your code:

parameters: p_mandt(3) AS LISTBOX VISIBLE LENGTH 10 obligatory USER-COMMAND uc01 .

hope this helps

ec

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question