ABAP选择界面元素一行显示及隐藏

2022-01-11  本文已影响0人  JayDragon

呵呵,干了快4年的ABAP开发,每每遇到这种需求还是要网上搜一下,这里自己记录一下吧!


选择昆山库房.png 选择天津库房.png

选择界面单选元素同一行显示:

SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE TEXT-001.
  SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: p_ks RADIOBUTTON GROUP rg DEFAULT 'X' USER-COMMAND comd.
    SELECTION-SCREEN COMMENT (15) TEXT-002.
    PARAMETERS: p_tj RADIOBUTTON GROUP rg.
    SELECTION-SCREEN COMMENT (15) TEXT-003.
  SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK block1.
SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE TEXT-004.
  PARAMETERS: p_lgnum TYPE /scwm/lgnum OBLIGATORY.
  SELECT-OPTIONS:
                  s_lgtyp FOR /scwm/aqua-lgtyp,
                  s_lgpla FOR /scwm/aqua-lgpla,
                  s_pidoc FOR ztewm007-pidoc,
                  s_hu    FOR /scwm/aqua-huident,
                  s_matnr FOR /sapapo/matkey-matnr,
                  s_cat   FOR /scwm/aqua-cat,
                  s_docno FOR /scwm/aqua-stock_docno MODIF ID lol,
                  s_itmno FOR /scwm/aqua-stock_itmno MODIF ID lol.
SELECTION-SCREEN END OF BLOCK block2.

选择界面屏幕PBO:

AT SELECTION-SCREEN OUTPUT.
  IF p_ks = 'X'.
    p_lgnum = 'KS01'.
    LOOP AT SCREEN.    
      IF screen-group1 = 'LOL'.
        screen-active = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    p_lgnum = 'TJ11'.
    LOOP AT SCREEN.
      IF screen-group1 = 'LOL'.
        screen-active = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ENDIF.
上一篇 下一篇

猜你喜欢

热点阅读