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

FM for partial GR

rangerlet_mesee
Participant
0 Likes
1,283

Hello,,

I have Multiple line item PO, and for every PO line item i can have multiple GR.

eg.PO no. 41000000

In PO there are 2 line items

1. Material A - 100 Qty

2. Materail B - 100 Qty.

Now for Material A and Material B I have done Partial GR.

GR for Material

1.Materail A  -  50 Qty (GR No 1)

                   -  50 Qty (GR No. 2)

2.Material B -  25 Qty (GR No. 3)

                   - 75  Qty (GR No. 4)

I need to identify which of the above 4 GRs have reached MIRO stage and which haven't.

How to use BAPI PO GET DETAILS to achieve the same?

Regards,

Madhukar

Hello,,

I have Multiple line item PO, and for every PO line item i can have multiple GR.

eg.PO no. 41000000

In PO there are 2 line items

1. Material A - 100 Qty

2. Materail B - 100 Qty.

Now for Material A and Material B I have done Partial GR.

GR for Material

1.Materail A  -  50 Qty (GR No 1)

                   -  50 Qty (GR No. 2)

2.Material B -  25 Qty (GR No. 3)

                   - 75  Qty (GR No. 4)

I need to identify which of the above 4 GRs have reached MIRO stage and which haven't.

How to use BAPI PO GET DETAILS to achieve the same?

Regards,

Madhukar

3 REPLIES 3
Read only

Former Member
0 Likes
1,060

Hi Madhukar

For a direct report check the T code and in that choose Purchasing view ME80FN

If you are trying to use in your code then you have to probably create a custom logic using below tables

For GR use the tables MSEG and MKPF .For invoice  BSEG ,  RBKP - Document header: incoming invoice and RSEG - Document item, incoming invoice

Also try some standard reports via T codes  :ME2N,ME2L,ME2M

Regards

Vinita

Read only

rangerlet_mesee
Participant
0 Likes
1,060

Hi,

I have used BAPI PO GET DETAIL and from each of the structures that are filled after passing EBELN, I am able to see the required fields data.

But for each PO item, partial GRs might happen.

So, do I need to loop PO history structure of the BAPI ?

The required fields as per requirement are available for me across the various structures of the BAPI.

Regards

Madhukar

Read only

0 Likes
1,060

What you have stated is correct.

When you pass the PO # to the BAPI, you need to loop thru the "PO_ITEM_HISTORY" and sum up the GR qty for every line. So even if there are multiple GRs against the same line, you will have the summed up qty.

Thanks,

Vikram.M