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

Re: how to read masterdata attributes in End routine ?

$
0
0

Hi Sandy,

 

you can write below logic in your end routine.

 

types: begin of ty_cust,

            /BIC/ZCUST  type /BIC/PZCUSTOMER-/BIC/ZCUST,       

          end of ty_cust.

data: lt_cust type table of ty_cust,

         wa_cust type ty_cust.

 

 

if result_package is not initial.

  select  /BIC/ZCUST

     FROM  /BIC/PZCUSTOMER

        INTO table lt_cust

     for all entries in RESULT_PACKAGE

        WHERE DIV = '02' and D_CHAN = '01' and /BIC/ZCUST = result_package-/BIC/ZCUST.

endif.

 

 

loop at result_package assigning <result_fields>.

  <result_fields>-DIV = '01'.

  read table lt_cust into wa_cust with key
               /BIC/ZCUST = <result_fields>-/BIC/ZCUST.

  if sy-subrc eq 0.

<result_fields>-DIV = '02'. " Only fill if customer is found

  endif.

endloop.

 

 

Hope this solves your problem.

 

/Srikanth.


Viewing all articles
Browse latest Browse all 8627

Trending Articles



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