Skip to Content
0
Former Member
Apr 26, 2010 at 07:18 AM

Updating search term 1 using 'BAPI_ADDRESSORG_CHANGE'

185 Views

I tried using BAPI_ADDRESSORG_CHANGE, but it seems that it is not updating table kna1 field SORTL which is the field for SORT1 (if im not mistaken). Below is my code please advice if there are inconsistencies. Thank you! This is only a test program for the use of this FM that's why the customer number is hardcoded.

x_bapiad1vl-sort1 = p_newst.

x_bapiad1vl_x-sort1 = 'X'.

x_bapiad1vl_x-updateflag = 'U'.

append x_bapiad1vl TO t_bapiad1vl.

append x_bapiad1vl_x TO t_bapiad1vl_x.

CALL FUNCTION 'BAPI_ADDRESSORG_CHANGE'

EXPORTING

OBJ_TYPE = 'KNA1'

OBJ_ID = '0008005843'

CONTEXT = '0001'

SAVE_ADDRESS = 'X'

TABLES

BAPIAD1VL = t_bapiad1vl

BAPIAD1VL_X = t_bapiad1vl_x

RETURN = x_return.