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: 

Change Production order priority fields in AFKO Header using BAPI.

former_member300568
Participant
0 Kudos

Hi,

I am using the Bapi BAPI_PRODORD_CREATE_FROM_PLORD

to convert the planned order to production order. My requirement is to update the priority of the production order AFKO-APRIO to a different value based on certain condition.

Is there a standard Bapi to update AFKO table.

I see CO_00_CAUFVDB_AFIH_TRANSFER bap, but is there anything to update AFKO?

I tried below code , but i dont see afko being updated.

 CALL FUNCTION 'CO_00_CAUFVDB_AAXXX_TRANSFER'
EXPORTING
caufvdb_imp = ls_caufvdb
IMPORTING
aafko_exp = ls_xafko
aaufk_exp = ls_xaufk.
APPEND ls_xafko TO lt_xafko.
APPEND ls_xaufk TO lt_xaufk.
* transfer data of order header to structure for change document
CALL FUNCTION 'CO_00_CAUFVDB_AAXXX_TRANSFER'
EXPORTING
caufvdb_imp = ls_caufvdb_old
IMPORTING
aafko_exp = ls_yafko
aaufk_exp = ls_yaufk.
ls_yafko-aprio = header_imp-aprio .
APPEND ls_yafko TO lt_yafko.
APPEND ls_yaufk TO lt_yaufk.
0 REPLIES 0