Application Development 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: 

Problem in IW52 - Action Box

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Clemenss
Active Contributor
0 Kudos

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

4 REPLIES 4

Clemenss
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

Clemenss
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.