文章目录
- 1 Introduction
- 2 code
1 Introduction
The passage is that how to hiden purchase type .
2 code
DATA: ls_shlp_selopt TYPE ddshselopt.
IF ( sy-tcode = 'ME21N' OR sy-tcode = 'ME22N' OR sy-tcode = 'ME23N' or sy-tcode = 'ME51N' OR sy-tcode = 'ME52N' OR sy-tcode = 'ME53N' ) AND shlp-shlpname = 'H_T161'.
IF sy-subrc = 0.
SELECT zmmt023~bsart FROM zmmt023
WHERE zmmt023~active = 'Y'
INTO TABLE @DATA(lt_zmmt023).
IF sy-subrc EQ 0.
LOOP AT lt_ZMMT023 INTO DATA(ls_ZMMT023).
ls_shlp_selopt-shlpname = 'H_T161'.
ls_shlp_selopt-shlpfield = 'BSART'.
ls_shlp_selopt-sign = 'I'.
ls_shlp_selopt-option = 'EQ'.
ls_shlp_selopt-low = ls_ZMMT023-bsart.
APPEND ls_shlp_selopt TO shlp-selopt.
CLEAR ls_shlp_selopt.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.