cancel
Showing results for 
Search instead for 
Did you mean: 

JOIN CRMD_PARTNER-PARTNER_NO -> BUT000-PARTNER_GUID

Former Member
0 Kudos

Hi, I´m new creating infosets, the transactions and tools as sqvi are new to me but I have some knowledge about the tables in CRM, the thing is that I need I need to know the partner from but000 related to the orders, know I get this design and it retrieves me some data so it´s pefect.

CRMD_LINK-GUID_HI = CRMD_ORDERADM_H-GUID

CRMD_PARTNER-GUID = CRMD_LINK-GUID_SET

I get all the bp´s related in the orders, the thing is that I want to link CRMD_PARTNER through PARTNER_NO to BUT000-PARTNER_GUID but it marks that something is incorrect, I think the type is not equal but the data related, and the guids makes a perfect mach if I check it manually in se11, is there any way to link the CRMD_PARTNER-PARTNER_NO to the BUT000-PARTNER_GUID. !!?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

This join IS possible using the SQL HEX command.

The HEX function returns the hex value of a character string.

so something like this works.

select a.partner_no,a.partner_guid,b.partner_guid from sapccd.crmd_partner a,sapccd.but000 b where a.partner_no = hex(b.partner_guid)

robert_kunstelj
Active Contributor
0 Kudos

CRMD_PARTNER-PARTNER_NO is of type CRMT_PARTNER_NO that is defined as CHAR 32.

On other hand BUT000-PARTNER_GUID is of type BU_PARTNER_GUID which is defined as RAW 16.

On sql you can't make selection id datatypes are not equal. Sou in your case you must make one additional step to convert the guid to correct format. Something like...

DATA ZGUID TYPE BUT000-PARTNER_GUID.

ZGUID = CRMD_PARTNER-PARTNER_NO.

And then ZGUID to select from BUT000.

Regards.

Former Member
0 Kudos

Hi Robert,

which section of the infoset do you pass Zguid to select from BUT000..

will apreciate