Application Development 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: 

User exit for XD01/XD02 to update KNA1 field

bhakti2
Active Participant
0 Kudos
889

Hi

I have added a custom field using append structure in KNA1

I need to update it during the XD01 or XD02 transaction before it is saved

I am searching for BADIs and user exits but I am not able to update anything in KNA1

kindly help if u were having similar requirement

thanks

b

1 ACCEPTED SOLUTION

Former Member
0 Kudos
219

Hi

It can use the BADIs CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS

Max

8 REPLIES 8

Former Member
0 Kudos
220

Hi

It can use the BADIs CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS

Max

0 Kudos
219

Hi Max,

I have tried all of the following

BADI for XD01

-


CUSTOMER_ADD_DATA

BADI_LAYER

CUSTOMER_ADDRSCR_CHG

GOS_SRV_SELECT

ADDRESS_SUBSCREEN

save button:

ADDRESS_CHECK

ADDR_TXJCD_CHECK

ADDRESS_UPDATE

exits

EXIT_SAPMF02D_001.

BTEs

00001320

00001321

00001330

00001340

00001350

00001360

but nowhere I have found an interface for updating KNA1 fields.

I am not able to use CUSTOMER_ADD_DATA_CS and CUSTOMER_ADD_DATA_BI . I checked it using CL_EXITHANDLER

is there any way i can store the information I need . I just need one field against the customer number

thanks

b

0 Kudos
219

Hi

U can use those BADIs in order to open a new tabstrip where the user can manage the new field, its value will be transfer and saved in KNA1 automatically

But if you need to fill your field in ABAP only (so not to display it in a dynpro) you can try to use EXIT_SAPMF02D_001, but here you need to use the field-symbol (that exit doesn't allow to change the data)

Max

0 Kudos
219

hi Max,

I cannot put it on screen.

Kindly give more details about how can we use field symbols in the user exit EXIT_SAPMF02D_001

thank you

bhakti

0 Kudos
219

Hi

FIELD-SYMBOLS: <FS_KNA1> TYPE KNA1.

ASSIGN 'EXIT_SAPMF02D)KNA1' TO <FS_KNA1>.
IF SY-SUBRC = 0.
  <FS_KNA1>-zzfield = .....
ENDIF.

Max

0 Kudos
219

hi Max

thank you very much for all your help, it made me acheive my result.

thanks

b

0 Kudos
219

Sorry

I want to write:

FIELD-SYMBOLS: <FS_KNA1> TYPE KNA1.
 
ASSIGN '(SAPMF02D)KNA1' TO <FS_KNA1>.
IF SY-SUBRC = 0.
  <FS_KNA1>-zzfield = .....
ENDIF.

Max

0 Kudos
219

hi, a question where you implement this code? into the exit?

Please i have a problem whit update for Idoc DEBMAS helpme please.

Regards,