‎2012 Nov 19 11:41 AM
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..
‎2012 Nov 19 12:29 PM
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
‎2012 Nov 19 11:58 AM
Check the BAPI documentation
Operation data
‎2012 Nov 19 12:49 PM
Thanks Vinit,
Is there any Function Module to cahnge the Operation Status?
Thanks,
Dhina..
‎2012 Nov 19 1:00 PM
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..
‎2012 Nov 19 12:29 PM
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
‎2012 Nov 19 12:48 PM
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..
‎2012 Nov 19 1:05 PM
‎2012 Nov 19 1:21 PM
‎2012 Nov 19 1:28 PM
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.
‎2012 Nov 19 2:16 PM
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
‎2012 Nov 19 2:24 PM