‎2007 Dec 13 3:13 PM
Hi all,
I have to write an exit for the following requirement:
In XD02 , iahve to make reconcilation account 110000 mandatory only for company codes 1000 , 2000 ,3000 and 5000. other company codes should allow the user to enter different account numbers and the reconcilation account field should not be grayed out.
Frnds its very urgent requirement, can anyone help me what should be the approach.
Thanks,
satish
‎2007 Dec 13 3:15 PM
I am not sure if it works for this purpose but plz check
SAPMF02D User exits: Customer master data
‎2007 Dec 13 3:16 PM
hi Satish,
you can use enhancement SAPMF02D. You cannot change the recon. account, but you can issue error message (to stop the creation process) in certain cases.
ec
‎2007 Dec 13 3:19 PM
No can anyone give me a logic to write this thing.. i am confused.
Thanks,
satya
‎2007 Dec 13 3:20 PM
hi
you can use Enhancment SAPMF02D and exit EXIT_SAPMF02D_001. In this exit you can write the code.
Reward if it dose something.
Thanks
Siva kumar
‎2007 Dec 13 3:20 PM
Check to ensure correct customer price procedure is set.
If sy-tcode = 'XD01' or sy-tcode = 'VD01'.
If I_KNA1-LAND1 NE 'US' AND
I_KNVV-KALKS NE 'Z'.
Message E000(ZCUST).
Endif.
Endif.
perform f_get_partner_number on commit.
hi check if this might help you...
award points if its useful
‎2007 Dec 13 3:33 PM
Frnds i am looking for solutions in this way.
like..
<code>
DATA : COM_CODE LIKE KNB1-BUKRS.
CASE COM_CODE.
WHEN '1000'.
KNB1-AKONT = '121000'.
WHEN '2000'.
KNB1-AKONT = '121000'.
WHEN '3000'.
KNB1-AKONT = '121000'.
WHEN '5000'.
KNB1-AKONT = '121000'.
ENDCASE.
After that i m not getting how to go for code for other company codes other than the above company codes.
If i am wrong can anyone correct me and help me.
Thanks,
satish
‎2007 Dec 13 3:37 PM
if KNB1-BUKRS = 1
case
-
-
endcase
if KNB1-BUKRS = 2.
case
-
-
endcase.
endif.
‎2007 Dec 14 12:29 PM
Hi all ,
This is what i have done still i m confused am i correct or not i m facing this urgent issue.
<code>
TABLES : KNB1.
DATA : COM_CODE LIKE KNB1-BUKRS,
REC_ACC LIKE KNB1-AKONT.
CASE COM_CODE.
WHEN 1000.
KNB1-AKONT = 140000.
*KNB1-AKONT = I_KNB1-AKONT.
WHEN '2000'.
KNB1-AKONT = 140000.
WHEN '3000'.
KNB1-AKONT = 140000.
WHEN OTHERS.
IF REC_ACC CA '0123456789 '.
KNB1-AKONT = REC_ACC.
ENDIF.
ENDCASE.
</code>
‎2007 Dec 14 12:56 PM
hi Satish,
I think it is wrong. As I wrote already, you cannot change the recon. account in the exit. You can only check if the value is what it should be (and issue a message when it is not).
You have to code something like:
IF ( knb1-bukrs EQ ... OR " here you list all company codes where recon. account cannot be changed
knb1-bukrs EQ ... OR
knb1-bukrs EQ ... ) AND
knb1-akont NE ... " here you hardcode the recon. account
MESSAGE ... " error
ENDIF.hope this helps
ec
‎2007 Dec 14 1:24 PM
Hi Eric,
I have to do this thing in T-code XD02.
But when i am trying to trigger the exit its not triggering. Actually Field KNB1-AKONT is in the screen 7000, But i am unable to find the exit point for this particular field , I have written the exit code in Exit name(EXIT_SAPMF02D_001). So can anyone help me out how to get the enhancement point for the above screen.
Thanks,
satish
‎2007 Dec 14 1:31 PM
this exit will run at the end of the transaction (FD01 or XD01). If you want a field exit, that is a different story.