on 10-23-2008 6:14 PM
Hi Experts,
We have an production order in SAP-Plant maintenance.
The User statuses profile has already been defined in the SPRO/Config settings for thie order type of thisorder..
We need to add a user status(from the user status profile) by using any RFC OR BAPI.
we found one RFC 'I_CHANGE_STATUS' which is used for changing an user status of an order to another user status.
But we need exactly an RFC or BAPI(or logic) which could add only an user status to the order.
we need addition not a change!
Thanks,
Rohit
we found teh solution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We used BAPI_ISUSMORDER_USERSTATUSSET which Sets or deletes a user status for service/maintenance orders.
In the structure STATUS, you can enter the status either in the unique internal format or in the language-dependent external format.
pseudo code could be as below
data: wa_userstatus LIKE LINE OF l_it_userstatus,
wa_userstatus-intern = 'UTS' (it could be any userstatus of an order(UTS is unable to start))
wa_userstatus-extern = 'UTS'. (it could be any userstatus of an order)
wa_userstatus-langu = sy-langu.
wa_userstatus-langu_iso = 'EN'.
CALL FUNCTION 'BAPI_ISUSMORDER_USERSTATUSSET'
EXPORTING
number = order_id ( your 12 characrter order id)
status = wa_userstatus
inactive = ' '
IMPORTING
return = it_return.
(Note: set inactive = 'X' if you want to make user status(say UTS) deleted from user status of the order)
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Depends on the status profile you have, but normally it's a mix of:
a) Numbered statuses (you must have an initial status defined and only one numbered status can be assigned at any one time) so you are always "changing" the status.
b) Un-numbered statuses where you can freely add or remove any combination of statuses.
I expect the RFC for change status cannot cope with un-numbered statuses, unless you are adding a status where none previously existed, that should be able to handle it as a change of status.
As Pete is asking, need more detail to know exactly what you are trying to achieve.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We need to add a user status(from the user status profile) by using any RFC OR BAPI
Why must it be a RFC or BAPI?
What are you trying to do?
PeteA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check this BADI:
IQS0_STATUS_MAINTAIN Control of Changeability of User Status
Thanks,
Amit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.