Skip to Content
0
Mar 22, 2013 at 03:59 PM

RMWB Toggle fr Display to Change after Copy Rcp Template

42 Views

SAP System: ECC 6.0

Requirement: Programatically open the new recipe in Change mode after it is copied from a template recipe in Display mode.

Background: A template recipe may be copied to a target recipe only in Display mode for authorization restriction reason. This is implemented via Recipe Formula I/O tab screen custom button and called from fm FRML546_CALL_CONVERSION.

Problem: Error msg "System cannot open object" (RMSRCPDIA043)

Cause:

In Z copy of std fm RMXT201_COPY_RECIPE that is called by main fm assigned to the custom tab screen button mentioned above, we have added CALL METHOD lo_wb->set_active_object after CALL METHOD lo_wb->add_object. Then we have attempted to CALL METHOD lo_wb->toogle after CALL METHOD lo_wb->set_active_object in order to toggle from Display to Change mode.

During debugging, CL_RMWB_WB's MS_ACTIVE_OBJ gets the new/target recipe after CALL METHOD lo_wb->set_active_object. MS_ACTIVE still had the source recipe. I don't know how to set it to the new rcp. It seems it's only getting set by the system after Save is done. (Rcp Save is called in main fm.) Because of the error, the Save part seems not even reached. However, RMWB toggled from Display to Change mode. New rcp has focus on the left nav pane. Error is issued at CL_RCP_WBO_RCP METHOD IF_RMWB_WBO~FOCUS_GET.

Thanks in advance for your inputs/help.