04-26-2010 8:18 AM
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.
04-26-2010 8:24 AM
Have you called BAPI_TRANSACTION_COMMIT after the BAPI Call?
Regards
Vinod
04-26-2010 8:33 AM
Thanks for th reply! I just tried adding 'BAPI_TRANSACTION_COMMIT' after the bapi call but still field sortl was not updated. But when I checked the search term 1 in tcode vd03 the search term was changed.
Edited by: Jami23 on Apr 26, 2010 9:35 AM
04-26-2010 8:46 AM
x_bapiad1vl-sort1 = 'TEST'.
x_bapiad1vl_x-sort1 = 'X'.
Updates the data in Table field ADRC-SORT1. There is not field relevant to KNA1-SORTL in this BAPI.
Regards
Vinod
04-26-2010 8:53 AM
I see so is there a way to update kna1-sortl? because when I search a customer number in vd03 using the updated search term in adrc, no values would comeout. Thank you very much Vinod for the very helpful answers.
04-26-2010 12:54 PM
_bapiad1vl-sort1 = 'TEST'.
x_bapiad1vl_x-sort1 = 'X'.
Updates the data in Table field ADRC-SORT1