Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

loop within loop optimization

Dear friends,

LOOP AT i_po.

LOOP AT i_eban WHERE banfn = i_po-banfn

AND bnfpo = i_po-bnfpo.

i_prpo-matnr = i_eban-matnr.

i_prpo-txz01 = i_eban-txz01.

i_prpo-banfn = i_eban-banfn.

i_prpo-bnfpo = i_eban-bnfpo.

i_prpo-badat = i_eban-badat.

i_prpo-menger = i_eban-menge.

i_prpo-meinsr = i_eban-meins.

i_prpo-ebeln = i_po-ebeln.

i_prpo-ebelp = i_po-ebelp.

i_prpo-bedat = i_po-bedat.

i_prpo-menge = i_po-menge.

i_prpo-lifnr = i_po-lifnr.

APPEND i_prpo.

CLEAR i_prpo.

ENDLOOP.

IF sy-subrc <> 0.

  • only PO details

i_prpo-ebeln = i_po-ebeln.

i_prpo-ebelp = i_po-ebelp.

i_prpo-bedat = i_po-bedat.

i_prpo-menge = i_po-menge.

i_prpo-lifnr = i_po-lifnr.

APPEND i_prpo.

CLEAR i_prpo.

ENDIF.

ENDLOOP.

is there a way as 2 how i could remove loop within loop and still get the same o/p..

Please guide me.

Regards,

Essam

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question