Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9656

issue with BAPI: BAPI_ADDRESSCONTPART_CHANGE

$
0
0

Hi,

 

I'm trying to utilize BAPI BAPI_ADDRESSCONTPART_CHANGE to change first and last name of Contact Person associated with Customer. See below my ABAP code. Strange thing is that the BAPI call doesn't do any change. I do not see change to first and last name of Contact Person neither in XD03 or VAP3 t-codes.

 

DATA: lt_return      LIKE bapiret2 OCCURS 10  WITH HEADER LINE,

           lt_bapiad3vl   TYPE TABLE OF bapiad3vl  WITH HEADER LINE,

           lt_bapiad3vl_x TYPE TABLE OF bapiad3vlx WITH HEADER LINE,

          address_number LIKE adrc-addrnumber,

          person_number  LIKE adrp-persnumber.

 

PARAMETERS: p_first TYPE name1_gp DEFAULT 'firstname1',

                         p_last  TYPE name1_gp DEFAULT 'lastname1'.

 

lt_bapiad3vl-firstname = p_first.

lt_bapiad3vl-lastname  = p_last.

APPEND lt_bapiad3vl.

 

MOVE: 'X' TO lt_bapiad3vl_x-firstname,

       'X' TO lt_bapiad3vl_x-lastname,

       'U' TO lt_bapiad3vl_x-updateflag.

APPEND lt_bapiad3vl_x.

 

CALL FUNCTION 'BAPI_ADDRESSCONTPART_CHANGE'

   EXPORTING

     obj_type_p  = 'BUS1006001' "Person object BOR object type

     obj_id_p    = '0000152955'    "Person object BOR object key = KNVK-PARNR person no

     obj_type_c  = 'KNA1'           "Company address owner BOR object type

     obj_id_c    = '0000099009'   "BOR company address owner object key = KNA1-KUNNR customer no

     context     = '0005'

   IMPORTING

     address_number = address_number

     person_number  = person_number

   TABLES

     bapiad3vl   = lt_bapiad3vl

     bapiad3vl_x = lt_bapiad3vl_x

     return      = lt_return.

 

I tried to use a call of BAPI_TRANSACTION_COMMIT after my BAPI call however result is the same: no change to the data. Sy-subrc is always equal to zero. Return table lt_return has no rows. So there is no indication of what can be wrong.

I guess that there is maybe issue within export parameters:

obj_id_p

obj_id_c


However I'm using them as provided in the comments of my ABAP code. Any hints of what can be wrong? Thanks in advance.

 

m./


Viewing all articles
Browse latest Browse all 9656

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>