Go on link..

link us with ...

Monday, December 13, 2010

inner join programming of report

*&---------------------------------------------------------------------*
*& Report ZINC_TR_DEMO_REPORT15 *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*

REPORT ZINC_TR_DEMO_REPORT15 .


TYPES : BEGIN OF ST_LINE,

EBELN TYPE EKET-EBELN,
WERKS TYPE EKPO-WERKS,
LGORT TYPE EKPO-LGORT,
IDNLF TYPE EKPO-IDNLF,
STATU TYPE EKKO-STATU,
INFNR TYPE EINA-INFNR,

END OF ST_LINE.

TABLES : EKPO , EINA .

DATA : WA TYPE ST_LINE .
DATA : ITAB LIKE STANDARD TABLE OF WA .


SELECT EK~EBELN

EO~WERKS
EO~LGORT
EO~IDNLF

KK~STATU

EI~INFNR

INTO TABLE ITAB

FROM EKET AS EK INNER JOIN EKPO AS EO
ON EK~EBELN EQ EO~EBELN
AND EK~EBELP EQ EO~EBELP
INNER JOIN EKKO AS KK
ON KK~EBELN EQ EO~EBELN
INNER JOIN EINA AS EI
ON EI~MATNR EQ EO~MATNR.

LOOP AT ITAB INTO WA.

WRITE : /5 WA-EBELN ,
10 WA-WERKS,
20 WA-LGORT ,
30 WA-IDNLF,
40 WA-STATU,
50 WA-INFNR.

ENDLOOP.

No comments:

link us...

For Visitors

if you want to publish or Add something on ERP, SAP , SAP FUNCTIONAL, SAP ABAP then mail us along with your email-id. contain must be yours

email-id :- avinashkr_raj@yahoo.com(any email)

email-id :- avinaskr_raj.abap@blogger.com ( use only gmail)