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: 

BAPI_CUSTOMER_GETDETAIL1 - why lastname = name

0 Kudos

In module BAPI_CUSTOMER_GETDETAIL1 in subroutine ASSIGN_ADDR1_TO_ADDR2 is assigned:

" P_P_I_BAPIADDR2_01-LASTNAME = P_P_I_BAPIADDR1_01-NAME.
  P_P_I_BAPIADDR2_01-FIRSTNAME = P_P_I_BAPIADDR1_01-NAME_2. "

This causes the swaps the name1 of the name2. Why is this and how this can be changed ?

Thanks.

4 REPLIES 4

kesavadas_thekkillath
Active Contributor
0 Kudos

Adjust it accordingly in your program or if required create an implicit enhancement in routine ASSIGN_ADDR1_TO_ADDR2 & move it as you wish.

0 Kudos

I change the program after reading:

   v_name = p_i_bapikna101_1-FIRSTNAME.
  p_i_bapikna101_1-FIRSTNAME = p_i_bapikna101_1-LASTNAME.
  p_i_bapikna101_1-LASTNAME  = v_name.

despite this after BAPI_CUSTOMER_CHANGEFROMDATA1, name1 changed.

In field NAME1 there is:  Name2 concatenate with NAME1

0 Kudos

It all depends upon the logic written inside the standard badi. Did you try passing as it is in the GET RFC ?

0 Kudos

How can I do ? Which function module ?

Maybe a good idea to copy the BAPI_CUSTOMER_CHANGEFROMDATA1 to ZBAPI_CUSTOMER_CHANGEFROMDATA1

and make changes ?