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: 

How to update or modify user1 field of aufk table

Former Member
0 Kudos
2,538

Hi Friends,

My requirement is that i want to update user1 field of aufk table.

I am trying to use *'BAPI_ALM_ORDER_MAINTAIN' . but its netiher in any of the tables strucutres nor in

the 'BAPI_TE_AUFK' aufk customer enhancement so that i can sue it with the EXTENSION_IN tables parameter.

Please suggest what to do.

Regards,

Hariom

1 ACCEPTED SOLUTION

andreas_mann3
Active Contributor
0 Kudos
544

Hi,

try fm KAUF_ORDER_CHANGE_BAPIFIELDS

or create a bdc to tcode KO02

grx

A.

4 REPLIES 4

andreas_mann3
Active Contributor
0 Kudos
545

Hi,

try fm KAUF_ORDER_CHANGE_BAPIFIELDS

or create a bdc to tcode KO02

grx

A.

Former Member
0 Kudos
544

Hi Andreas,

Thanks a lot for quick reply.

I want to update user1(Applicant's telephone number) field of aufk table with -1 and 1 value based on some conditions as I cannot use the bdc as you have suggested,

Can you provide me a template or example of this fm on how to proceed.

thanks againg for your kind response.

Regards,

Hariom.

0 Kudos
544

Hello,

Continuation to Andreas suggestion..

1) Check method 'CHANGE_INTERNAL_ORDER' of 'CL_FCOM_QISR_SMO1' class as your template as how to make use of

FM 'KAUF_ORDER_CHANGE_BAPIFIELDS'.

2) Use can also check FM 'KAUF_ORDER_CHANGE_OREXT' as how it's using FM 'KAUF_ORDER_CHANGE_BAPIFIELDS'.

Since you need to read Order master data first before updating, use FM 'K_AUFK_READ' to read AUFK data.

Good Luck.

Regards,

Vivek

Former Member
0 Kudos
544

Hi friends ,

thanking you for your quick response.

But still i am not able to update the aufk table field user1with my required value.

My code is as follows

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'

EXPORTING

INPUT = LV_AUFNR

IMPORTING

OUTPUT = LV_AUFNR.

CALL FUNCTION 'K_ORDER_READ'

EXPORTING

AUFNR = LV_AUFNR

IMPORTING

I_AUFKV = LS_AUFK.

REFRESH LT_CHANGED_FIELDS.

LT_CHANGED_FIELDS-NAME = 'USER1'.

LS_AUFK-USER1 = 'TEST123456789'.

*ls_aufk-veraa_user = sy-uname.

CALL FUNCTION 'KAUF_ORDER_CHANGE_BAPIFIELDS'

EXPORTING

I_ORDER = LS_AUFK-AUFNR

I_AUFK_NEW = LS_AUFK

I_FLAG_TESTRUN = SPACE

I_CHANGE_MODE = 'C'

I_FLAG_SAVE = 'X'

IMPORTING

E_MASTER_DATA = LS_MASTERDATA

E_SAVE_INDEX = LD_SAVED

TABLES

FIELDS_TO_CHANGE = LT_CHANGED_FIELDS

RETURN = LT_RETURN

EXCEPTIONS

OTHERS = 1.

No change is happening to the field even though the fm is saying that the order has been changed.

Please suggest .

Regards,

Hariom