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: 

Updating search term 1 using 'BAPI_ADDRESSORG_CHANGE'

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

Have you called BAPI_TRANSACTION_COMMIT after the BAPI Call?

Regards

Vinod

0 Kudos

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

0 Kudos

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

0 Kudos

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.

Former Member
0 Kudos

_bapiad1vl-sort1 = 'TEST'.

x_bapiad1vl_x-sort1 = 'X'.

Updates the data in Table field ADRC-SORT1