Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3510

Re: problem in report to display total quantity

$
0
0

Hi.

 

See if this works.

 

Define one internal table with lifnr and MENGE say it as it_menge.

 

 

 

 

 

loop at IT_EKPO INTO WA_EKPO.

  clear wa_ekko.

  read table it_ekko into wa_ekko with key ebeln - wa_ekpo-ebeln.

  if sy-subrc eq 0.

       wa_menge-lifnr = wa_ekko-lifnr.

       wa_menge-menge = wa_ekpo-menge.

       collect wa_menge into it_menge.

       clear wa_menge.

  endif.

  clear wa_ekpo.

endloop.

 

 

 

 


loop at it_ekpo into wa_ekpo.

  clear wa_ekko.

  read table it_ekko into wa_ekko with key ebeln = wa_ekpo-ebeln.

  if sy-subrc eq 0.

       clear wa_menge.

       read table it_menge into wa_menge with key lifnr = wa_ekko-lifnr.

       if sy-subrc eq 0.

            wa_final-ebeln = wa_ekpo-ebeln.

            wa_final-lifnr = wa_ekko-lifnr.

            wa_final-menge = wa_menge-menge.

            append wa_final into it_final.

            clear wa_final.

       endif.

  endif.

  clear wa_ekpo.

endloop.

 

Regards,

Sid


Viewing all articles
Browse latest Browse all 3510

Trending Articles