You are on page 1of 2

*&---------------------------------------------------------------------* *& Report ZCLASSREPORT *& *&---------------------------------------------------------------------* *& *& *&---------------------------------------------------------------------* REPORT ZCLASSREPORT NO STANDARD PAGE HEADING LINE-COUNT

20(3). TYPES: BEGIN OF TY_POS, EBELN TYPE EBELN, LIFNR TYPE ELIFN, BUKRS TYPE BUKRS, EKORG TYPE EKORG, EBELP TYPE EBELP, MATNR TYPE MATNR, MENGE TYPE BSTMG, NETPR TYPE BPREI, END OF TY_POS. TABLES EKPO . TABLES EKKO. DATA WA_POS TYPE TY_POS. DATA IT_POS TYPE TABLE OF TY_POS. DATA: V_BUKRS TYPE BUKRS. DATA: V_EKORG TYPE EKORG. SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME . SELECT-OPTIONS S_BUKRS FOR V_BUKRS."COMPANY CODE" SELECT-OPTIONS S_EKORG FOR V_EKORG."PURCHASING ORGANIZATION" SELECTION-SCREEN END OF BLOCK B2. TOP-OF-PAGE. write:/5'comp code', 17'vendor', 28'pur. org', 40'doc no', 52'tem', 60'mat no', 80'price'. uline. INITIALIZATION . S_BUKRS-LOW = '1000'. S_BUKRS-HIGH = '5000'. S_BUKRS-SIGN = 'I'. S_BUKRS-OPTION = 'BT'. * CONFUSION IN AAPEND *

AT SELECTION-SCREEN ON S_BUKRS . SELECT BUKRS INTO V_BUKRS FROM T001 WHERE BUKRS IN S_BUKRS. ENDSELECT. IF SY-SUBRC <> 0. WRITE :/ 'NVALID COMPANY CODE'.

ENDIF. AT SELECTION-SCREEN ON S_EKORG . SELECT EKORG INTO V_EKORG FROM EKKO WHERE EKORG IN S_EKORG. ENDSELECT. IF SY-SUBRC <> 0. WRITE :/ 'NVALID purchasing information'. ENDIF. START-OF-SELECTION . SELECT EKKO~EBELN EKKO~LIFNR EKKO~BUKRS EKKO~EKORG EKPO~EBELP EKPO~MATNR EKPO~MENGE EKPO~NETPR INTO TABLE IT_POS FROM EKKO INNER JOIN EKPO ON EKKO~EBELN = EKPO~EBELN WHERE EKKO~BUKRS IN S_BUKRS AND EKKO~EKORG IN S_EKORG. END-OF-SELECTION. LOOP AT IT_POS INTO WA_POS. WRITE:/5 WA_POS-BUKRS, 17 WA_POS-LIFNR, 28 WA_POS-EKORG, 40 WA_POS-EBELN, 52 WA_POS-EBELP, 60 WA_POS-MATNR, 80 WA_POS-NETPR. CLEAR WA_POS. ENDLOOP. END-OF-PAGE. WRITE:/'THIS IS SHABIHS TEST PROGRAM'. ULINE.