Skip to Content
0
Former Member
Dec 07, 2011 at 09:35 AM

Derivation of Business Partner as Customer

67 Views

Hi,

I am an abap developer and I have made changes to a smartform wherein I need to get the values of business partner from table BUT000. I used the select statement as below:

Select SINGLE * from BUT000 into WA_FS_BUT000

where partner = v_partner.

v_partner has been declared in the global definition as v_partner type CRMT_PARTNER_NO. However to get the value from BUT00 I have used the following piece of code:

SELECT SINGLE sobid FROM hrp1001 INTO v_partner WHERE otjid = is_orgman_h-sales_org

AND subty = 'B207'.

This works except for one problem. The type of business partner is wrong. I need to get the Business partner who is a customer. Is there any HRP* table where I can give the otjid and get the customer?