Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

goods

Former Member
0 Likes
532

hi experts,

please explain this report with tables and fields.

 Developed an Interactive report, which displays the details of purchase order from table EKKO. It displays the fields like Purchase Doc No, Quantity, Posting date, Item details etc. After displaying the above details, if the user double clicks on any row the history details should be displayed corresponding to that particular purchasing document number

thanks in advace.

radhakrishna.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
499

Hi Radhakrishna,

The program needs to display the details of Purchase Order and Line item Details which can be picked from the table EKKO(Purchase Order Header) . After displaying this list on the event of click on any row the Line Item details which can be got from the table EKPO (I hope History details mean item details ) should be displayed .

Regards,

Sowmya.

4 REPLIES 4
Read only

Former Member
0 Likes
499

Hi,

In This report display the Header details from EKKO in the Basic List. On double clicking display the item level details from the EKPO table.

That's a simple report.

Regards,

George

    • plz reward points to all helpful tips

Read only

Former Member
0 Likes
500

Hi Radhakrishna,

The program needs to display the details of Purchase Order and Line item Details which can be picked from the table EKKO(Purchase Order Header) . After displaying this list on the event of click on any row the Line Item details which can be got from the table EKPO (I hope History details mean item details ) should be displayed .

Regards,

Sowmya.

Read only

former_member723628
Active Participant
0 Likes
499

Radhakrishna,

In the problem description the first statement refers to table EKKO (PO - Header Data) only but considering the second line "It displays the ......" it seems the basic list should contain data both from EKKO and EKPO (PO-Item Data).

In the second level of list you need to display the PO history data corresponding to the line selected on the basic list. The PO history data are saved in table EKBE. For this you can use the HIDE area concept to get the PO number for the user selection. In the event AT LINE-SELECTION you need to read the PO history data from EKBE and display it in the format required.

Hope this helps you.

Regards,

Gajendra

Read only

Former Member
0 Likes
499

hi Radha

recently i have written a code for my client object ,which is similar to your object,u can check this if u needed.

REPORT xxxxx.

&----


*& INITIALIZATION

&----


INITIALIZATION.

TABLES: EKKO, EKPO, MAKT.

DATA: BEGIN OF I_EKKO OCCURS 0,

EBELN LIKE EKKO-EBELN,

EKORG LIKE EKKO-EKORG,

EKGRP LIKE EKKO-EKGRP,

END OF I_EKKO.

DATA: BEGIN OF I_EKPO OCCURS 0,

ebeln like ekpo-ebeln,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

NETWR LIKE EKPO-NETWR,

MENGE LIKE EKPO-MENGE,

NETPR LIKE EKPO-NETPR,

END OF I_EKPO.

DATA: BEGIN OF I_MAKT OCCURS 0,

MAKTX LIKE MAKT-MAKTX,

MATNR LIKE MAKT-MATNR,

END OF I_MAKT.

DATA: BEGIN OF I_OUT OCCURS 0,

EBELN LIKE EKKO-EBELN,

EKORG LIKE EKKO-EKORG,

EKGRP LIKE EKKO-EKGRP,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

NETWR LIKE EKPO-NETWR,

MENGE LIKE EKPO-MENGE,

NETPR LIKE EKPO-NETPR,

MAKTX LIKE MAKT-MAKTX,

END OF I_OUT.

DATA: BEGIN OF JTAB OCCURS 0,

EBELN LIKE EKKO-EBELN,

EBELP LIKE EKPO-EBELP,

MATNR LIKE EKPO-MATNR,

MENGE LIKE EKPO-MENGE,

NETPR LIKE EKPO-NETPR,

MAKTX LIKE MAKT-MAKTX,

end of jtab.

&----


*& SELECTION-SCREEN BLOCK DECLARATION

&----


SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

SELECT-OPTIONS: S_EBELN FOR EKKO-EBELN OBLIGATORY.

SELECT-OPTIONS: S_EKORG FOR EKKO-EKORG OBLIGATORY.

SELECT-OPTIONS: S_EKGRP FOR EKKO-EKGRP.

SELECTION-SCREEN END OF BLOCK B1.

&----


*& AT SELECTION-SCREEN

&----


AT SELECTION-SCREEN.

SELECT SINGLE * FROM EKKO WHERE EBELN IN S_EBELN.

IF SY-SUBRC <> 0.

MESSAGE E001 .

ENDIF.

&----


*& START OF SELECTION

&----


START-OF-SELECTION.

SELECT EBELN EKORG EKGRP FROM EKKO

INTO TABLE I_EKKO

WHERE EBELN IN S_EBELN AND EKORG IN S_EKORG AND EKGRP IN S_EKGRP.

SELECT EBELN EBELP MATNR NETWR MENGE NETPR FROM EKPO

INTO TABLE I_EKPO FOR ALL ENTRIES IN I_EKKO

WHERE EBELN = I_EKKO-EBELN.

SELECT MAKTX MATNR FROM MAKT

INTO TABLE I_MAKT FOR ALL ENTRIES IN I_EKPO

WHERE MATNR = I_EKPO-MATNR.

&----


*& END OF SELECTION

&----


END-OF-SELECTION.

LOOP AT I_EKKO.

MOVE: I_EKKO-EBELN TO I_OUT-EBELN,

I_EKKO-EKORG TO I_OUT-EKORG,

I_EKKO-EKGRP TO I_OUT-EKGRP.

READ TABLE I_EKPO WITH KEY EBELN = I_EKKO-EBELN.

MOVE: I_EKPO-EBELP TO I_OUT-EBELP,

I_EKPO-MATNR TO I_OUT-MATNR,

I_EKPO-NETWR TO I_OUT-NETWR,

I_EKPO-MENGE TO I_OUT-MENGE,

I_EKPO-NETPR TO I_OUT-NETPR.

READ TABLE I_MAKT WITH KEY MATNR = I_ekpo-matnr.

MOVE: I_MAKT-MAKTX TO I_OUT-MAKTX,

I_MAKT-MATNR TO I_OUT-MATNR.

APPEND I_OUT.

ENDLOOP.

LOOP AT I_OUT.

FORMAT HOTSPOT ON.

FORMAT COLOR 2 ON.

WRITE : / SY-VLINE,

2 I_OUT-EKORG,

9 SY-VLINE,

10 I_OUT-EKGRP,

24 SY-VLINE,

25 I_OUT-NETWR,

40 SY-VLINE.

FORMAT HOTSPOT OFF.

FORMAT COLOR 2 OFF.

HIDE: I_OUT-EBELN ,

I_OUT-MAKTX.

ENDLOOP.

&----


*& TOP OF PAGE

&----


TOP-OF-PAGE.

FORMAT COLOR 3 ON.

WRITE : / 'EKORG',

10 'EKGRP',

35 'NETWR'.

FORMAT COLOR 3 OFF.

&----


*& END OF PAGE

&----


END-OF-PAGE.

FORMAT COLOR 6 ON.

WRITE : /100 'PAGE NUMBER:',SY-PAGNO.

FORMAT COLOR 6 OFF.

&----


*& AT LINE SELECTION

&----


AT LINE-SELECTION.

SELECT EBELN EBELP MATNR MENGE NETPR

FROM EKPO

INTO corresponding fields of TABLE JTAB WHERE EBELN = I_OUT-EBELN.

LOOP AT JTAB.

WINDOW STARTING AT 45 10

ENDING AT 140 19.

format color 2 on.

WRITE : / SY-VLINE,

2 jtab-EBELN,

13 SY-VLINE,

15 jtab-EBELP,

28 SY-VLINE,

30 jtab-MATNR,

43 SY-VLINE,

45 jtab-MENGE,

49 SY-VLINE,

50 jtab-NETPR,

59 SY-VLINE,

60 I_OUT-MAKTX,

SY-VLINE.

format color 2 off.

ENDLOOP.

&----


*& TOP-OF-PAGE DURING LINE-SELECTION

&----


TOP-OF-PAGE DURING LINE-SELECTION.

FORMAT COLOR 3 ON.

WRITE: / 'EBELN',

15 'EBELP',

30 'MATNR',

45 'MENGE',

53 'NETPR',

90 'MAKTX'.

FORMAT COLOR off.

<b>reward points if it is usefull</b>