cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot find BP-from-BUT000 in CRMD_PARTNER but available in Tcode BP!

Former Member
0 Kudos

Hello Experts,

Scenario:

I have a selection screen with the following select-options:

---------------------------------------

Partner No

Partner function

Origin

Date of creation

---------------------------------------

(I have to retrieve partners, say, 99999 and 99998.  Both partners can be found on transaction BP with role PROSPECT)

NB: I leave Partner No blank!

I entered a partner function(AAA), Origin(BBBB) and date of creation(99.99.9999).  I use the data from the fields Origin and date of creation to get the partners from BUT000. I retrieve the PARTNER and PARTNER_GUID from BUT000.  Then i use BUT000-PARTNER_GUID and do a for all entries in CRMD_PARTNER-PARTNER_NO with an additional condition PARTNER_FUNCTION as "ZZZZ".

Suppose from BUT000 i get 1000 records.  Then from CRMD_PARTNER i get 3 lines. Now from CRMD_PARTNER I am getting partners 99999, 99997 and 99996. (The partner function i used is for prospects)

My problem is that 1st I am not getting 99998. Second when i check on the Transaction Tcode BP, 99996 and 99997 are NOT prospects. (They do not have the role Prospect)

I am confused.  Can you please help me establish the right link from BUT000 and CRMD_PARTNER (or otherwise) so that i get 99999 and 99998.

Thanks in advance,

Regards

Thyaga

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

if possible please post your code here once. then we will get a clear picture .

Former Member
0 Kudos

Here is the code:

SELECT PARTNER, PARTNER_GUID

FROM BUT000

INTO TABLE LT_BUT000

WHERE SOURCE IN S_SOURCE

AND CRDAT IN S_CRDAT.

IF SY-SUBRC EQ 0

     SELECT PARTNER_GUID, PARTNER_NO, PARTNER_FCT

     FROM CRMD_PARTNER

     INTO TABLE LT_CRMD_PARTNER

     FOR ALL ENTRIES IN LT_BUT000

     WHERE PARTNER_NO = LT_BUT000-PARTNER_GUID

     AND PARTNER_FCT EQ 'ZZZZ'.

ENDIF.

From table LT_BUT000 i get like 5000 records then from LT_CRMD_PARTNER i get 3.

I am supposed to get say 99999 and 99998 but I am getting 99999, 99996, 99997.

In transaction code, i get verify that 99999 and 99998 are prospects but for 99996 and 99997 i dont find the role prospect in their roles in tcode BP.

Please help

Regards,

Thyaga

Former Member
0 Kudos

For info:

I did a DELETE ADJACENT duplicates (comparing PARTNER_NO & PARTNER_FCT) after the SELECT statement on table CRMD_PARTNER.  Its then that i get 3 records.

Thyaga

Former Member
0 Kudos

check the entries in CRMD_PARTNER table first . open se16 and enter partner number as 99998 and click on execute here check the all the values whether all where condition values are matched or not .like partner_fct,Origin and Date. Check the date parameter some times it is initial by that time we are unable to get the value . so check all where condition parameters manually.