Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

"At end of " is not working properly

$
0
0

Hi,

      Can anyone tell me why at end of matnr is not working in given below code.It is inserting all  reapeating matnr.

 

sort it_final1 by MATNR MONTH .

LOOP AT IT_FINAL1 INTO WA_FINAL1   WHERE NAME1 IN P_TRANS

                                 AND ERDAT IN S_DATE

                                 AND MATNR IN S_MATNR

                                 AND MTART IN S_MTYPE

                                 AND MATKL IN S_MGROUP

                                 AND LIKP_KUNNR IN S_SHIP.

 

      temp  = temp + WA_FINAL1-FKIMG.

      kemp  = kemp + WA_FINAL1-BRGEW.

      remp  = remp + WA_FINAL1-NETWR .

      WA_FINAL2-MONTH    = WA_FINAL1-MONTH.

       AT END OF MATNR.

       WA_FINAL2-MATNR    = WA_FINAL1-MATNR.

       WA_FINAL2-NETWR    = remp.

       WA_FINAL2-BRGEW = KEMP.

       WA_FINAL2-FKIMG = TEMP.

      APPEND WA_FINAL2 TO IT_FINAL2.

      ENDAT.

     ENDLOOP.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>