01-05-2015 9:46 AM
Hello,
I have an action box in IW52 to create a PR by releasing a service order. I am using BAPI_ALM_ORDER_MAINTAIN to release the service order.
Once the action is complete and the control reaches back IW52,some of the data in IW52 screen get cleared.
Any help to get rid of the issue will be highly appreciated.
Best Regards,
Greg
01-05-2015 11:00 AM
Hi Gregory,
probably the BAPI_ALM_ORDER_MAINTAIN (or your triggering routine) clears the data. You may either save them before and restore after BAPI execution or just start the process in NEW TASK.
Regards
Clemens
01-05-2015 11:00 AM
Hi Gregory,
probably the BAPI_ALM_ORDER_MAINTAIN (or your triggering routine) clears the data. You may either save them before and restore after BAPI execution or just start the process in NEW TASK.
Regards
Clemens
01-05-2015 1:01 PM
Thanks for the reply Clemens.
Calling the Bapi in a NEW TASK serves the purpose of stopping the data from getting cleared but the Service order update doesnt happen. In other words, the Bapi call doesnt do the changes which it is supposed to do. Any help on this?
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
STARTING NEW TASK 'SERV_TASK'
DESTINATION 'NONE'
CALLING me->commit_work ON END OF TASK
TABLES
it_methods = lt_meth_set
it_header = lt_head_set
it_operation = lt_oper_set
it_operation_up = lt_oper_up
it_component = lt_comp_set
it_component_up = lt_comp_up
return = et_ret.
ET_RET doesnt return any message when called in new task.
01-05-2015 1:44 PM
Hi Gregory,
the Bapi function call needs a subsequent database commit (FM BAPI_TRANSACTION_COMMIT). For this you may create a wrapper function called in new or background task that will first call the BAPI and then the BAPI_TRANSACTION_COMMIT.
You may have a new task: If errors are reported in return parameter, you are not informed automatically. You mightsend an email, create a workflow item, force a dump or just ignore it.
Regards,
Clemens
01-05-2015 3:06 PM
Thanks Clemens!
The wrapper method worked. However facing another issue now. Trying to fetch the results(BAPIRETURN) of the wrapper FM using RECEIVE RESULTS FROM FUNCTION but it raises a short dump. Any idea on this?
RECEIVE RESULTS FROM FUNCTION 'Z_RWB_UPD_SERV_ORDER'
TABLES
it_ret = et_ret.
Short Dump:
Error when receiving answer to a Remote Function Call.
Error analysis
Internal error: Invalid RFC handle.