0

I populated my I/O dropdown sub-screen field in following code. When I choose an option, the screen refreshes and all my I/O fields lose their values. Any idea why does that happen? The provided code reprsents subscreen's before output event.

MODULE status_0110 OUTPUT.

TYPE-POOLS : VRM.

DATA : DROPDOWN_VALUES TYPE VRM_VALUES,

value LIKE LINE OF DROPDOWN_VALUES.

SELECT * FROM ZCUSTOMER INTO TABLE IT_CUSTOMER.

LOOP AT IT_CUSTOMER INTO CUSTOMER.
value-KEY = CUSTOMER-ID.
value-TEXT = CUSTOMER-NAME.
APPEND VALUE TO DROPDOWN_VALUES.
ENDLOOP.

CALL FUNCTION 'VRM_SET_VALUES'

EXPORTING
id = 'CUSTOMER_DROPDOWN'
values = DROPDOWN_VALUES.

ENDMODULE. " STATUS_0110 OUTPUT

Thank you

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • this is normal that every change of dropdown causes screen refresh (PBO), very likely you wrongly declared your screen fields. Consider [this answer](https://stackoverflow.com/a/62351014/911419) and `RSDEMO_DROPDOWN_LISTBOX` demo program which says it all – Suncatcher May 21 '21 at 13:51
  • It may not refresh the screen if you don't link the screen field to a Function Code. Keep the Function Code attribute empty, or post the details of your drop-down screen field if you need more help. – Sandra Rossi May 21 '21 at 14:27

0 Answers0