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

Re: How to append records filtered be vbrp-pstyv & konv-kschl

$
0
0

Hi,

     In Second Loop U have used into Corresponding fields,So After a loop completion Ur IT_konv will have only Single Record,Every Time It Gets Refreshed , U may Use Appending Table instead of Corresponding.

     Also U are using Same Loop Two times + Fetching Records from Konv Multiple Times, It Will be time consuming.

 

  Inplace of loop FOR SELECTION RECORDS FROM KONV

      Simply Use Select Statement as

     SElect knumv kposn kschl kbetr into table it_konv from konv for all enteries in It_join where

          knumv eq It_join-knumv and

          Kposn eq it_join-posnr and

          Kschl in ('VPRS', 'EK02'.........).

 

In last Loop

          use case statement for pstyv and individual read statement FOR EACH PSTYV

          CASE WA_JOIN-PSTYV.

 

          WHEN  'ZTAC'.

 

               READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_JOIN-KNUMV

                                                                                        KPOSN  = WA_JOIN-POSNR

                                                                                         KSCHL = <UR CONDITION TYPE>

               IF SY-SUBRC EQ 0.

                    <ADD KPOSN,KNUMV , KBETR>

               ENDIF.

        

          WHEN 'ZTAN'.

         

  READ TABLE IT_KONV INTO WA_KONV WITH KEY KNUMV = WA_JOIN-KNUMV

                                                                                        KPOSN  = WA_JOIN-POSNR

                                                                                         KSCHL = <UR CONDITION TYPE>

               IF SY-SUBRC EQ 0.

                    <ADD KPOSN,KNUMV , KBETR>

               ENDIF.

 

Regards:


Viewing all articles
Browse latest Browse all 8950

Trending Articles



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