on 2025 Apr 08 12:51 PM
Hello,
i want ta execute some logic through Background Processing Framework in SAP RAP event or action. It is on public cloud. My code:
DATA lo_project TYPE REF TO z_test_bgpf.
DATA lo_process TYPE REF TO if_bgmc_process_single_op.
DATA lx_bgmc TYPE REF TO cx_bgmc.
TRY.
lo_project = NEW #( iv_batchKey = is_project-batchKey ).
lo_process = cl_bgmc_process_factory=>get_default( )->create( ).
* lo_process->set_name( 'bgPF Demo' )->set_operation( lo_project ).
lo_process->set_operation_tx_uncontrolled( lo_project ).
lo_process->save_for_execution( ).
CATCH cx_bgmc INTO lx_bgmc.
ENDTRY.
I receiving ABAP dump on this line: lo_process->save_for_execution( ).
| Short Text | Statement "CALL " is not allowed with this status. |
| Runtime Error | BEHAVIOR_ILLEGAL_STMT_IN_CALL |
how can i solve this?
Request clarification before answering.
When you are working with RAP, the set_operation method should be used instead of the set_operation_tx_uncontrolled method. Additionally, make sure to trigger BGPF in the save_modified method.
https://help.sap.com/docs/abap-cloud/abap-concepts/scenario-transcational-controlled
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.