PROGRAM:
REPORT YEAH_INT_MENU_PAINTER.
tables vbak.
tables vbap.
data it_vbak type TABLE OF vbak.
data wa_vbak TYPE vbak.
data it_vbap type TABLE OF vbap.
data wa_vbap type vbap.
SELECT-OPTIONS: s_vbeln for vbak-vbeln.
START-OF-SELECTION.
set PF-STATUS 'YEAH_MENU'.
REPORT YEAH_INT_MENU_PAINTER.
tables vbak.
tables vbap.
data it_vbak type TABLE OF vbak.
data wa_vbak TYPE vbak.
data it_vbap type TABLE OF vbap.
data wa_vbap type vbap.
SELECT-OPTIONS: s_vbeln for vbak-vbeln.
START-OF-SELECTION.
set PF-STATUS 'YEAH_MENU'.
(DOUBLE CLICK ON 'YEAH_MENU' TO CREATE THE OBJECT FOR THE MENU PAINTER.
YOU'LL NOTICE A POP WINDOW AS BELOW.)
select * FROM vbak into table it_vbak
where vbeln in s_vbeln.
end-of-SELECTION.
loop at it_vbak into wa_vbak.
write: / wa_vbak-vbeln, wa_vbak-ernam, wa_vbak-erdat.
ENDLOOP.
at USER-COMMAND.
case sy-ucomm.
when 'vbak'.
ENDCASE.
select * FROM vbap into table it_vbap
where vbeln in s_vbeln.
loop at it_vbap into wa_vbap.
write: / wa_vbap-vbeln, wa_vbap-posnr, wa_vbap-matnr.
ENDLOOP.
TOP-OF-PAGE DURING LINE-SELECTION.
if sy-lsind eq 1.
write: 'sales order'.
endif.
0 comments:
Post a Comment