HI,
I am facing one problem, Need your suggestions.
I am ding me5a customization, In Me5a Indent and Po details will come but there is no Grn qty received.
My goal is i need to get total grn qty Based on Purchase indent.
So, i used EKBE for getting the Grn quantity.
First getting the po list based on Indent number(Indent number is available In report )
SELECT EBELN EBELP FROM EKPO INTO TABLE IT_EKPO WHERE BANFN EQ WA_EBAN-BANFN AND BNFPO EQ WA_EBAN-BNFPO.
Po details will be stored in it_ekpo next getting grn qty.
SELECT BELNR GJAHR BUZEI MENGE EBELN EBELP FROM EKBE INTO TABLE IT_MSEG_101 FOR ALL ENTRIES IN IT_EKPO
WHERE EBELN EQ IT_EKPO-EBELN AND EBELP EQ IT_EKPO-EBELP AND BWART EQ '101'.
"Combine the qty movement type 101
LOOP AT IT_MSEG_101 INTO WA_MSEG_101.
TOT_MENGE_101 = TOT_MENGE_101 + WA_MSEG_101-MENGE.
ENDLOOP.
"Next getting the 102 qty reverse.
SELECT BELNR GJAHR BUZEI MENGE EBELN EBELP FROM EKBE INTO TABLE IT_MSEG_101 FOR ALL ENTRIES IN IT_EKPO
WHERE EBELN EQ IT_EKPO-EBELN AND EBELP EQ IT_EKPO-EBELP AND BWART EQ '101'.
"Combine the qty movement type 102
LOOP AT IT_MSEG_101 INTO WA_MSEG_101.
TOT_MENGE_101 = TOT_MENGE_101 + WA_MSEG_101-MENGE.
ENDLOOP.
tot_qty = 101-qty - 102_qty.
Here the problem up to 7000 records fetching, if the records are more than 7000 dump.Is there any other way to get the grn qty based on Purchase indet no And Line no.
Need your Valuable suggestions.