两个界面都是
一个screen 是1002 一个是1007 两个都要改
代码控制显示 输入
MODULE FRM_MDF_SCREEN OUTPUT.
DATA:lmblnr TYPE matdoc-MBLNR.
DATA:lmjahr TYPE matdoc-MJAHR.
FIELD-SYMBOLS:<FS_MBLNR> TYPE matdoc-MBLNR,
<FS_MJAHR> TYPE ANY,
<FS_action> TYPE any,
<FS_ZZPLUSL> TYPE ANY.
IF cobl-AWKEY is not INITIAL.
lmblnr = cobl-AWKEY+0(10).
lmblnr = cobl-AWKEY+10(4).
SELECT SINGLE zzplusl from matdoc
where mblnr = @lmblnr and mjahr = @lmjahr and zzplusl is not INITIAL
INTO @cobl-ZZPLUSL .
ASSIGN ('(SAPLKACB)COBL-ZZPLUSL') TO <FS_ZZPLUSL>.
if <FS_zzplusl> is ASSIGNED.
<FS_zzplusl> = cobl-ZZPLUSL.
endif.
endif.
IF sy-tcode = 'FB01' OR sy-tcode = 'FB02'.
LOOP AT SCREEN.
IF SCREEN-NAME+0(7) = 'COBL-ZZ'.
SCREEN-INPUT = 1.
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
elseIF sy-tcode = 'FB03'.
LOOP AT SCREEN.
IF SCREEN-NAME+0(7) = 'COBL-ZZ'.
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
elseif sy-tcode = 'MIGO' OR sy-tcode = 'ZMB1A'.
ASSIGN ('(SAPLMIGO)GODYNPRO-ACTION') TO <FS_ACTION>.
ASSIGN ('(SAPLMIGO)GODYNPRO-MAT_DOC') TO <FS_mblnr>.
ASSIGN ('(SAPLMIGO)GODYNPRO-DOC_YEAR') TO <FS_mjahr>.
* ASSIGN ('(SAPLMIGO)COBL-ZZPLUSL') TO <FS_ZZPLUSL>.
if <FS_ACTION> is ASSIGNED AND <FS_mblnr> is ASSIGNED AND <FS_mjahr> is ASSIGNED .
SELECT SINGLE zzplusl FROM matdoc
WHERE mblnr = @<FS_mblnr> AND mjahr = @<FS_mjahr> AND zzplusl IS NOT INITIAL
INTO @COBL-ZZPLUSL .
LOOP AT SCREEN.
IF SCREEN-NAME+0(7) = 'COBL-ZZ'.
if <FS_ACTION> = 'A04' .
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
else.
SCREEN-INPUT = 1.
SCREEN-OUTPUT = 1.
SCREEN-ACTIVE = 1.
SCREEN-INVISIBLE = 0.
MODIFY SCREEN.
ENDIF.
endif.
ENDLOOP.
ENDIF.
endif.