on 09-12-2007 7:31 PM
hi Guys,
I want to join two tables BUT000 & CRMD_ORDERADM_H, to create INFOSETS.
How do i join these two tables in SQ02?
Thanks,
Krish
Hi
crmd_orderadm_h-guid --> crmd_link-guid_hi
crmd_link-guid_set --> crmd_partner-guid
crmd_partner-partner_no --> but000-partner_guid
Regards
Gregory
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Thanks for the quick response. i joined the tables with one change:
crmd_orderadm_h-guid --> crmd_link-guid_hi
crmd_link-guid_set --> crmd_partner-guid
crmd_partner-PARTNER_GUID--> but000-partner_guid
Now the Infoset is generated. But when i try to query the infoset the result is zero. I checke the table "crmd_orderadm_h" it has values.
Any idea/suggestion
Krish
Hi
Be careful when you access to the table crmd_link and crmd_partner.
In my case. i needed to use these fields: crmd_link-objtype_hi, crmd_link-objtype_set and crmd_partner-partner_fct
Check my search:
clear crmd_link.
select single *
from crmd_link
where guid_hi eq it_crmd_orderadm_h-guid
and objtype_hi eq '05'
and objtype_set eq '07'.
if sy-subrc eq 0.
clear crmd_partner.
select single *
from crmd_partner
where guid eq crmd_link-guid_set
and partner_fct eq 'ZHR00015'.
if sy-subrc eq 0.
select single *
from but000
where partner_guid eq crmd_partner-partner_no.
if sy-subrc eq 0.
move but000-partner to it_salida-emp_res.
concatenate but000-name_first but000-name_last
into it_salida-texto_emp_res separated by space.
endif.
endif.
Regards
Gregory
Hi Krish,
You need to join the tables in this manner only
crmd_orderadm_h-guid --> crmd_link-guid_hi
crmd_link-guid_set --> crmd_partner-guid
crmd_partner-partner_no --> but000-partner_guid
The change which you have made
crmd_partner-partner_guid --> but000-partner_guid
will not fetch you any record, as the partner_guid is just the primary key for the table crmd_partner has nothing to do with the partner_guid field in the table BUT000 table.
Hi,
Instead of joining two tables you can use CRMD_ORDER_INDEX table while you pass crm order header GUID and get the Partners involved in it.
Regards,
Abhishek R K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks very much to Joyca. We had exactly the same problem and was wondering why I could not join the 2 tables. But I was only able to link - CRMD_Partner - ADDR-NR with BUT000 - PERSNUMBER.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If your objective is to find partners in the transaction , you will get all the partners in table <b>CRMD_PARTNER</b> .
pl. use following tables and joins,
1)Join object guid of Table <b>CRMD_ORDERADM_H</b> to <b>CRMD_LINK</b> Hi guid
2) take set_guid of <b>CRMD_LINK</b> and join it to <b>CRMD_PARTNER</b>
You will get all the partners in the transactions ( object ID ) number.
regards,
PD
Reward points if it helps !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Joel,
I was wondering why the term 'workaround' is coming into picture when we have a straight way. If you go to CRMD_PARTNER table, the field PARTNER_GUID is of type CRMT_PARTNER_GUID. This guid you can pass to BUT000-PARTNER_GUID which is of type BU_PARTNER_GUID and both are of length 16. Why you insist to compare partner number with partner guid?. I don't understand. Again...it's not a work around. A straight way we usually do.
Thanks,
Faisal
It is quite clear why Joel insists to compare the partner number with the partner guid...
Because these are the fields that match, content-wise.
The content of CRMD_PARTNER-PARTNER_GUID and BUT000-PARTNER_GUID do not contain the same values, they will never match! See screenshot below.
I was having the same issue with illegal join conditions in SQVI on PARTNER_NO and PARTNER_GUID. However by making the below screenshot, I noticed that there is another field that matches AND allows to be joined upon!
ADDR_NP from CRMD_PARTNER can be linked to PERSNUMBER in BUT000. Now my quickview works.
I hope this info can still help someone
Hi Joyca,
Yes. My mistake. Content wise they are the right fields.
Joel Rotich:Sorry for misunderstanding your question.
Thanks,
Faisal
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.