Enhancements to the Update button on the Delivery Note Change Conditions tab

1 After the demand delivery note meets certain conditions, the update button turns gray, and the price cannot be refreshed.

 First find the screen.

This screen does not contain the price update button below and is therefore a subscreen

Find this screen, add the event boxed in red (need to calculate KEY)

Add the following code to complete.

MODULE SET_BUTTONS_STATUS OUTPUT.

*DATA ld_mem(62) TYPE c.
DATA ls_xlikp TYPE likpvb .
  FIELD-SYMBOLS <FS_INFO> TYPE ANY .
  FIELD-SYMBOLS <FS_GO>   TYPE ANY .

  ASSIGN ('(SAPMV50A)XLIKP') TO <FS_INFO>.
  IF SY-SUBRC = 0.
    ASSIGN COMPONENT 'VBELN' OF STRUCTURE <FS_INFO> TO <FS_GO> .
    IF SY-SUBRC = 0 .
      SELECT COUNT(*) FROM LIKP WHERE VBELN = <FS_GO> AND ZHD2 <> '' and ZQYG <> '' AND ZDDG <> ''.
      IF SY-SUBRC <> 0 .
       LOOP AT  SCREEN.
        IF screen-name = 'BT_KONX' .
          screen-INPUT = '0'.
          MODIFY SCREEN .
        ENDIF.
       ENDLOOP.
      ENDIF.
    ENDIF.
  ENDIF.

*     IF screen-name = 'BT_KOAN' OR screen-name = 'BT_KOLO'.
*        IF vfprcs_viewkey-viewkey = '0001'.
*          screen-invisible = '0'.
*        ELSE.
*     screen-invisible = '1'.
ENDMODULE.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324516741&siteId=291194637