on 04-10-2012 7:21 AM
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
if possible please post your code here once. then we will get a clear picture .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
User | Count |
---|---|
5 | |
1 | |
1 | |
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.