Quantcast
Viewing all articles
Browse latest Browse all 10425

Re: reading multiple records

Hi M S Patil,

 

 

Please try the following sample logic.

 

 

 

*-sort both itabs by same key fields

SORT it_0008 BY pernr.

SORT it_0035 BY pernr.







LOOP AT it_0008 INTO wa_0008.

*-to set the tabix

  DATA : lv_index TYPE i.

  READ TABLE it_0035 WITH KEY pernr = wa_0008-pernr BINARY SEARCH.



  IF sy-subrc EQ 0"Does not enter the inner loop

    lv_index = sy-tabix.

    LOOP AT it_0035 INTO wa_0035 FROM lv_index. "Avoiding Where clause



      IF wa_0008-pernr <> wa_0008-pernr"This checks whether to exit out of loop

        EXIT.

      ENDIF.



**** your actual logic******



    ENDLOOP. "IT_0035 loop.

  ENDIF.

ENDLOOP. " it_0008 loop

 

 

and also check below link for your reference.

 

 

ABAP Code for Parallel Cursor - Loop Processing - Code Gallery - SCN Wiki

 

 

Regards,

Gurunath D


Viewing all articles
Browse latest Browse all 10425

Trending Articles



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