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

User Exit in XD02

Former Member
0 Likes
4,195

Hi,

I need to do some validation for Customer Master.

We have some custom fields added to KNA1 table. (the field need to validate is ZFLAG in KNA1)

Depending upon the Contact Person Function, the value of KNA1-ZFLAG should be changed.

For example, when the Contact Person Function is ZZ, the KNA1-ZFLAG should be X else it should be initial.

Currently, when we remove the Contact Person function ZZ, the ZFLAG value remains X, I need to reset it.

Problem is,in user exit EXIT_SAPMF02D_001, the KNA1 structure is in IMPORT.

I am not able to change it in EXIT_SAPMF02D_001.

Please guide me.

Regards,

R

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,968

You can use BADI CUSTOMER_ADD_DATA

Hi,

I need to do some validation for Customer Master.

We have some custom fields added to KNA1 table. (the field need to validate is ZFLAG in KNA1)

Depending upon the Contact Person Function, the value of KNA1-ZFLAG should be changed.

For example, when the Contact Person Function is ZZ, the KNA1-ZFLAG should be X else it should be initial.

Currently, when we remove the Contact Person function ZZ, the ZFLAG value remains X, I need to reset it.

Problem is,in user exit EXIT_SAPMF02D_001, the KNA1 structure is in IMPORT.

I am not able to change it in EXIT_SAPMF02D_001.

Please guide me.

Regards,

R

6 REPLIES 6
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,969

You can use BADI CUSTOMER_ADD_DATA

Read only

0 Likes
1,968

Hi,

I am not able to see that BADI ? I am using version 4.6C

Regards,

R.

Read only

0 Likes
1,968

Check

CUSTOMER_ADD_DATA_CS

check object types

BUS1010

BUS3007

KNA1

in transaction SWO1

Read only

0 Likes
1,968

Hi Keshu,

Checked all.. but no luck.

Regards,

R.

Read only

0 Likes
1,968

Hi R,

Try this code in the user exit..

constants: fieldname(30) value '(SAPMF02D)KNA1-ZFLAG.

FIELD-SYMBOLS: <l_field>.

in the logic..

when contact person function is space.

assign (fieldname) to <l_field>.

<l_field> = ' '. (here KNA1-ZFLAG field is set to space when the above condition is met.)

Should Work.

Cheers

Read only

0 Likes
1,968

Excellent.. it worked.

Thanks.

R.