Application Development and Automation 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: 
Read only

Error using CO_SE_PRODORD_CHANGE

Former Member
0 Likes
2,669

Hi Experts,

I am using CO_SE_PRODORD_CHANGE to update operation details of production order.

Given below is my code snippet.

CALL FUNCTION 'CO_SE_PRODORD_CHANGE'

     EXPORTING

       iv_order_number    = st_output-tprodord

*     is_header          =

*     IT_HDR_USER_STATUS =

*     IT_SEQUENCE        =

       it_operation       = lt_operations_new

*     IT_OPR_USER_STATUS =

*     IT_PRT             =

       iv_commit          = 'X'

     IMPORTING

       es_return          = lw_return.

The FM returns an error "No active nametab exists for CI_AUFK".

But when i execute the function module as stand alone in SE37, the production order gets updated correctly.

Please help me solve this issue.

Thanks,

Saritha.

Hi Experts,

I am using CO_SE_PRODORD_CHANGE to update operation details of production order.

Given below is my code snippet.

CALL FUNCTION 'CO_SE_PRODORD_CHANGE'

     EXPORTING

       iv_order_number    = st_output-tprodord

*     is_header          =

*     IT_HDR_USER_STATUS =

*     IT_SEQUENCE        =

       it_operation       = lt_operations_new

*     IT_OPR_USER_STATUS =

*     IT_PRT             =

       iv_commit          = 'X'

     IMPORTING

       es_return          = lw_return.

The FM returns an error "No active nametab exists for CI_AUFK".

But when i execute the function module as stand alone in SE37, the production order gets updated correctly.

Please help me solve this issue.

Thanks,

Saritha.

2 REPLIES 2
Read only

former_member585060
Active Contributor
0 Likes
1,640

Hi,

    First check on the below SAP Note

Note 922484 - System message when you change the order using a BAPI

Or

   

Just check on the AUFK table, any new fields must be added aor deleted to the table with custom include CI_AUFK and must not have activated correctly.

Try executing the Program 'RSNTABCONSISTENCY'

Select "Individual Objects", click F4, select "Search for Database Tables", and give AUFK table.

Thanks & Regards

Bala Krishna

Read only

0 Likes
1,640

The issue was occurring due to a subcontracting operation. I had missed out on paasing the purchasing group and material group. Found that these fields need to be passed for subcontarcting operations.

But now i have another issue. In case of subcontracting operations, Purchase organization is also a mandatory field. The FM does not have any parmeter to pass the purchase Organization.

Can someone please help with this? How do i create subcontracting operations using this FM? Is there any other FM/BAPI to do that?

Thanks,

Saritha