cancel
Showing results for 
Search instead for 
Did you mean: 

RMWB Toggle fr Display to Change after Copy Rcp Template

LN1
Participant
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

LN1
Participant
0 Kudos

After call to function Z RMXT201_COPY_RECIPE and no error, call RCP301_RECIPES_SAVE. Do the Switch Between Display <-> Change by:

CALL FUNCTION 'RMWB100_GET_WB_INSTANCE'

CALL METHOD lo_wb_as_cl_ref->exec_active_object_queue

CALL METHOD lo_wb->get_runtime_info

CALL METHOD lo_wb->toogle

(lo_wb TYPE REF TO if_rmwb_wb, lo_wb_as_cl_ref TYPE REF TO cl_rmwb_wb)

Answers (0)