Skip to Content
0
Former Member
Oct 26, 2007 at 05:57 AM

Interactive reporting

15 Views

Hi Experts,

I need to fetch the the purchasing document number (ekko-ebeln ) and vendor no ( lfa1-lifnr) , when i click the selection screen.

Pls correct the code below.

TABLES: LFA1, EKKO.

SELECT-OPTIONS: VENDOR FOR LFA1-LIFNR.

DATA: BEGIN OF ITAB OCCURS 0,

LIFNR LIKE LFA1-LIFNR,

EBELN LIKE EKKO-EBELN,

END OF ITAB.

START-OF-SELECTION.

SELECT LFA1LIFNR EKKOEBELN INTO TABLE ITAB

FROM LFA1 INNER JOIN EKKO

ON LFA1LIFNR = EKKOLIFNR

WHERE LFA1~LIFNR IN VENDOR.

LOOP AT ITAB.

WRITE:/ ITAB-LIFNR, ITAB-EBELN.

ENDLOOP.

Advance thanks.

nani