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

Re: BW Routine issue.

$
0
0

Yeah Demish .. ri8

 

 

Hello Sunil,

 

 

Please find below updated piece of code;

 

 

LOOP AT result_package ASSIGNING <result_fields>.

 

    IF <result_fields>-mattype = '1234                                                          '."scenario 1

           READ TABLE imat WITH KEY

       material     = <result_fields>-material

                      mattype    = '1324'

                      INTO wmat BINARY SEARCH.  (work area)

            IF SY-SUBRC = 0.

             <result_fields>-RESULT = wmat-zstype.

            ENDIF.

 

    ELSEIF <result_fields>-mattype = '3567'                                           .scenario 2 (A)

      IF <result_fields>-division = 'USET'.

           READ TABLE imat WITH KEY

       material     = <result_fields>-material

                      mattype    = '3567'

                      division   = 'USET'

                      INTO wmat  BINARY SEARCH.  (work area)

            IF SY-SUBRC = 0.

             <result_fields>-RESULT = wmat-zstype.

            ENDIF.

 

          ELSE.                                                                                                     "scenario 2 (B)

 

           READ TABLE imat1 WITH KEY

       material     = <result_fields>-material

                      mattype    = '3567'

                      INTO wmat  BINARY SEARCH.  (work area)

            IF SY-SUBRC = 0.

             <result_fields>-RESULT = wmat-zstype.

            ENDIF   .    

    ENDIF.

 

ENDLOOP.

 

Regards,

Hitesh


Viewing all articles
Browse latest Browse all 9091

Trending Articles



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