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

Operation Status Update in BAPI_ALM_ORDER_MAINTAIN

Former Member
0 Likes
4,156

Hi All,

I have done User Status Changes for the Particular Service Order using the BAPI 'BAPI_ALM_Order_maintain'.

But i can't change the status for the each and every Operation item.

In that bapi have table structure for the Operation. But i didnt find the status field in that strucutre. So I can't change the Operation Status using the BAPI.

Can you tell me how to fix the issue.

Thanks,

Dhina..

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,726

Hi Dhinathayalan,

Use the function STATUS_CHANGE_EXTERN to change the user status.

Example:

CALL FUNCTION 'STATUS_CHANGE_EXTERN'

             EXPORTING

               objnr               = ls_afvc-objnr

               user_status         = ls_tj30t-estat

             EXCEPTIONS

               object_not_found    = 1

               status_inconsistent = 2

               status_not_allowed  = 3

               OTHERS              = 4.

Regards,

Christian

10 REPLIES 10
Read only

former_member189779
Active Contributor
0 Likes
2,726

Check the BAPI documentation

Operation data

  • A change of the control key in the operation is not possible, if this leads to a change of the processing type (internal/external processing).
  • User status change not possible.
Read only

0 Likes
2,726

Thanks Vinit,

Is there any Function Module to cahnge the Operation Status?

Thanks,

Dhina..

Read only

0 Likes
2,726

You need to enter confimation for operation using

BAPI_ALM_GET_PROP

BAPI_ALM_CONF_CREATE

Read documentation on how to enter onfirmations using these BAPIs based on partial, final confiramtion operation status will change e.g PCNF CNF etc..

Read only

Former Member
0 Likes
2,727

Hi Dhinathayalan,

Use the function STATUS_CHANGE_EXTERN to change the user status.

Example:

CALL FUNCTION 'STATUS_CHANGE_EXTERN'

             EXPORTING

               objnr               = ls_afvc-objnr

               user_status         = ls_tj30t-estat

             EXCEPTIONS

               object_not_found    = 1

               status_inconsistent = 2

               status_not_allowed  = 3

               OTHERS              = 4.

Regards,

Christian

Read only

0 Likes
2,726

Hi  Christian,

If i use the 'STATUS_CHANGE_EXTERN' FM what could be the object number i can pass?

i have to pass the only service order number only in object number. how can i pass the operation line item number in that function module?

i want to change the status for all line item for the operation.

Thanks,

Dhina..

Read only

0 Likes
2,726

AFVC-OBJNR ("OV" + AUFPL + APLZL)

Regards,

Raymond

Read only

0 Likes
2,726

Hi raymond,

What is AUFPL and APLZL?

Thanks,

Dhina..

Read only

0 Likes
2,726

Hi,

There are two different things:

If you want to change User status then use STATUS_CHANGE_EXTERN. This is header status of Order

and secondly if you want to change operation status you need to confirm those opearations by entering confirmations against that operations.

Read only

0 Likes
2,726

You have to call the function for each operation you want to change.

The object number is the operation objnr.

To obtain the operations object numbers you have to:

1) Select AUFPL from AFKO where AUFNR = AUFK-AUFNR (your service order number)

2) Select aupfl aplzl objnr FROM AFVC where AUFPL = AFKO-AUFPL

Hope it helps,

Christian

Read only

0 Likes
2,726

Fields of AFVC "operation" table. AUFPL is also field of AFKO that you can read with AUFK-AUFNR.

Regards,

Raymond