REPORT ZATLINE1 .
*---------------TABLES-----------------------------
Tables : EKKO, " Purchase order header
LFA1. " Vendor Master
*------------INTERNAL TABLES------------------------
DATA : BEGIN OF IT_EKKO OCCURS 0,
EBELN LIKE EKKO-EBELN,
AEDAT LIKE EKKO-AEDAT,
LIFNR LIKE EKKO-LIFNR,
ZTERM LIKE EKKO-ZTERM,
END OF IT_EKKO.
*---------------VARIABLES----------------------------
DATA : NAME(20) TYPE C .
*--------SELECTION SCREENS---------------------------
select-options : pur for ekko-ebeln.
*--------SELECT DATA FROM TABLES --------------------
select EBELN AEDAT LIFNR ZTERM
from ekko into corresponding fields of Table It_ekko
where EBELN IN PUR.
*--------DISPLAY DATA --------------------------------
LOOP AT IT_EKKO.
WRITE :/
IT_EKKO-EBELN,
IT_EKKO-AEDAT,
IT_EKKO-LIFNR,
IT_EKKO-ZTERM.
HIDE: IT_EKKO-EBELN,IT_EKKO-LIFNR.
ENDLOOP.
*----AT LINE SELECTION EVENT-----------------------------
AT LINE-SELECTION.
SET PARAMETER ID 'BES' FIELD IT_EKKO-EBELN.
CALL TRANSACTION 'ME22N' AND SKIP FIRST SCREEN.
*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment