Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ABAP sample code required for extractor enhancement

Hi Gurus,

I need to enhance 0customer_attr extractor to pull business partner base on logic given below. Please provide me the sample code to jump start.

1.For each extracted record of customer attribute, we will first check if customer account group is equal to Z001 or not. If Account group is not equal to Z001 then Zbusinesspartner = null

2. If customer account group is equal to Z001 then we will check if there is any entry in BUT000 table for KNA1.customer id = BUT000. Business partner id. If we find any entry in BUT000 then Zbusinesspartner = customer id.

3. If we do not find any value in BUT000 for KNA1.customer id = BUT000.business partner id then Zbusinesspartner = null.

For KNA1.customerid = XXXX

If KNA1.account group NE Z001

Zbusinesspartner = null

End if

If account group EQ Z001

Check for entry in BUT000 table where KNA1.customer ID = BUT000. BusinessPartnerID.

If entry found in BUT000 then Zbusinesspartner = KNA1.customer id

If no entry found in BUT000 then Zbusinesspartner = Null.

End if.

Not what you were looking for? View more on this topic or Ask a question