Rereading values in ComboBox

Problem: in ERP transaction, values in ComboBox need to be refreshed, each time user enters the screen (with mentioned ComboBox). Standard SAP functionality loads data into ComboBox only first time field is shown.

Solution: To achieve value refresh each time ComboBox is shown standard SAP FM DD_SHLP_COMBOBOX_FILL needs to be changed. A sy-subrc needs to be set to 1 after call of VRM_GET_VALUES FM. To achieve this only for one field condition needs to be set, as presented below.

CALL FUNCTION 'VRM_GET_VALUES'
  EXPORTING
    ID           = VALUESET_ID
  EXCEPTIONS
    ID_NOT_FOUND = 1
    OTHERS       = 2.
*{ INSERT
* always re-read the order reasons
IF valueset_id = 'VBAK-AUGRU'.
  sy-subrc = 1.
ENDIF.
*} INSERT

Komentowanie jest zakończone.