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: 

Accessing address in user exit EXIT_SAPMF02D_001 (create/change customer)

Mattias
Active Participant
0 Kudos
854

Hi,

I'm trying to access the address given for a new customer in user exit EXIT_SAPMF02D_001. I need Street4, which is not available on the i_kna1 object, and therefore I'm trying to play with the i_addrhandle parameter.

Can this be used with function module GET_ADDR to read addresses before the customer is saved, the following code gives me exception 1.


ls_addr1-addrhandle = i_addrhandle.

CALL FUNCTION 'ADDR_GET'
  EXPORTING
    address_selection             = ls_addr1
 IMPORTING
    address_value                 = ls_addr1_val
 EXCEPTIONS
   parameter_error               = 1
   address_not_exist             = 2
   version_not_exist             = 3
   internal_error                = 4
   OTHERS                        = 5

Regards

Mattias

1 REPLY 1

krishnendu_laha
Active Contributor
0 Kudos
100

Hello,

Address handle is used for internal communication in standard program..for the customer creation let's say it would store value like "KNA1 ADRNR" and for vendor "LFA1 ADRNR"

Please use address number in ADDR_GET function module

Thanks

Krish