Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exit for XD02

Former Member
0 Likes
1,657

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

11 REPLIES 11
Read only

former_member156446
Active Contributor
0 Likes
1,448

I am not sure if it works for this purpose but plz check

SAPMF02D User exits: Customer master data

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,448

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

Read only

Former Member
0 Likes
1,448

No can anyone give me a logic to write this thing.. i am confused.

Thanks,

satya

Read only

Former Member
0 Likes
1,448

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

Read only

former_member156446
Active Contributor
0 Likes
1,448
  • 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

Read only

Former Member
0 Likes
1,448

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

Read only

0 Likes
1,448

if KNB1-BUKRS = 1

case

-

-

endcase

if KNB1-BUKRS = 2.

case

-

-

endcase.

endif.

Read only

Former Member
0 Likes
1,448

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>

Read only

0 Likes
1,448

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

Read only

0 Likes
1,448

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

Read only

0 Likes
1,448

this exit will run at the end of the transaction (FD01 or XD01). If you want a field exit, that is a different story.