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: 

Address fields in customer master

Former Member
0 Kudos
961

Hi all,

I want to perform a check on these fields in the customer master:

Street2 (ADDR1_DATA-STR_SUPPL1)                        
Street4 (ADDR1_DATA-STR_SUPPL3)                        
Street5 (ADDR1_DATA-LOCATION)

Can anyone provide any help on how to do this? User exits, etc.?

All helpful answers will be rewarded!

- Mari Virik

1 ACCEPTED SOLUTION

Former Member
0 Kudos
340

Hi,

EXIT_SAPMF02D_001 in SMOD SAPMF02D.

BADI to use is called CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS

<b>Reward points</b>

Regards

9 REPLIES 9

Former Member
0 Kudos
341

Hi,

EXIT_SAPMF02D_001 in SMOD SAPMF02D.

BADI to use is called CUSTOMER_ADD_DATA and CUSTOMER_ADD_DATA_CS

<b>Reward points</b>

Regards

0 Kudos
340

Hi and thanks for your reply.

I've checked out user exit EXIT_SAPMF02D_001, but I cannot find the fields Street2, Street4, or Street5 as part of the input here...?

I did take a look at CUSTOMER_ADD_DATA-CHECK_ALL_DATA too, but it seems to have more or less the same input as the user exit (fields missing).

Do you have any helpful hints here???

I will reward points

0 Kudos
340

Hi Mari,

did you already solved the problem. I nearly has the same problem.

Thx for answering.

Former Member
0 Kudos
340

Address data for customers is stored in Central Address Management since release 4.x, and this has a number of additional fields that are not on the KNA1 record. Not sure if these additional fields are available in the user exit. Possibly the CAM fields can be read using the relevant function module based on the address number on the KNA1 record. This would not allow change of the data but would allow it to be checked. This may not work if the new / changed details are not saved yet.

There may also be BADI / User Exits in the Central Address Management code which let you do what you want.

Andrew

0 Kudos
340

Thx a lot Andrew,

i checked already these Badi's you talking about.

My task is to determine the transportzone automatically. If the user gives pstlz or the countrykey and then hits the Enter Button (or pushes SAVE Icon), i call a Badi method to determine the tzone. It works fine. But my problem is.. i don't know how to bring the dtermined value (the zone) in the dynprofield back.

Does anybody know how to init dynprofields via badi?

In IF_EX_CUSTOMER_ADD_DATA_CS~SET_DATA there are only IMPORT Parameters....thats confusing me..

thx

0 Kudos
340

Timo,

A lot of newer BADI's have IMPORTING parameters that are defined as "TYPE REF TO" another object - and that object then has methods that allow data to be read and updated.

I don't have access to a system at the moment to look at your example, but it is possible this is the case. Check if SAP has supplied any sample code - in SE18 display the BAPI and then there is a menu option to go to sample code (perhaps on the GOTO menu?)

Andrew

0 Kudos
340

Hi Andrew, thx for posting.

I really tried to discover ALL customer BAdI's. With se18 and also I implemented and try to rise with breakpoints in nearly all methods.

There are unfortunately no "TYPE REF TO" Importparameters.

Also there is no Example Coding.

Most of the customer BAdI's are to ADD new functionality, new subscreens, to check, oder to add no screen components...

is it really so complicated to initilize a standard dynprofield (Transportzone: KNA1-LZONE).

F.e.: Coding:

DATA: lv_tzone TYPE lzone:
lv_lzone = xyz.

* now initialize dynprofield with lv_tzone

That's the only thing I want..

Thx a lot

0 Kudos
340

Use (classic) BADI ADDRESS_UPDATE. You can see it, and others, under package SZAD. I played with them for two minutes last week.

I'm in the process of developing them for customer master, but I imagine they're called any time central address management comes into play.

Off the top of my head I can't remember if it's called before or after CUSTMER_ADD_DATA->CHECK_ALL_DATA but it's definitely called before SAVE_DATA. An error message in either prevents the update from happening.

I imagine I'm going to have to communicate between the BADIs using global data in function groups (via the top include).

340

Hi all,

i solved the problem by using the address_check BAdI and he method postal_check. It's rised if you are hitting Enter and only if Data changed.

This method gots a change structure and you can adit it in method body. After leaving method the dynpro will be refreshed with updated data.

Notice: this method is filter-dependend. But it works great.