cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Launch SAP BW process chain from Fiori

aczeitnerBW
Explorer
0 Kudos
152

Hello Specs !

I've created a simple RAP Fiori report on BW4Hana side. 

What My goal would be is to launch process chains based on the values of the row selected.

Problem is I've stucked on the 0. th step. 


I've created the action button in the metadata extension and implemented the launchProcess method to just launch one specific processchain only as a first step.

 

 

CLASS lhc_ZS_DD_PLANNING_EV DEFINITION INHERITING FROM cl_abap_behavior_handler.

PRIVATE SECTION.

 

METHODS get_instance_authorizations FOR INSTANCE AUTHORIZATION

IMPORTING keys REQUEST requested_authorizations FOR zs_dd_planning_ev RESULT result.

 

METHODS create FOR MODIFY

IMPORTING entities FOR CREATE zs_dd_planning_ev.

 

 

METHODS update FOR MODIFY

IMPORTING entities FOR UPDATE zs_dd_planning_ev.

 

METHODS delete FOR MODIFY

IMPORTING keys FOR DELETE zs_dd_planning_ev.

 

METHODS read FOR READ

IMPORTING keys FOR READ zs_dd_planning_ev RESULT result.

 

METHODS lock FOR LOCK

IMPORTING keys FOR LOCK zs_dd_planning_ev.

 

METHODS launchProcess FOR MODIFY

IMPORTING keys FOR ACTION _Planning~launchProcess.

 

ENDCLASS.



METHOD launchProcess.

* LOOP AT keys ASSIGNING FIELD-SYMBOL(<lv_key>).

* UPDATE ZSPLANNING_MOD SET released = 'X' WHERE guid = <lv_key>-guid.

 

" Itt jön a folyamatlánc indítása

DATA: lv_chain TYPE rspc_chain.

 

lv_chain = 'APC_CREATE_NEW_DP'.

 

CALL FUNCTION 'RSPC_API_CHAIN_START'

EXPORTING

i_chain = lv_chain

i_synchronous = abap_true.

* EXCEPTIONS

* failed = 1

* OTHERS = 2.

 

IF sy-subrc <> 0.

" Hiba kezelése

ENDIF.

 

 

 

 

* ENDLOOP.

ENDMETHOD.

When I try to launch the process chain when I click on the launch button fiori sends back a message of "Behavior_ILLEGAL_STATEMENT"

I also receives this as a short dump in ST22.

Have you ever tried to experiment with something like this ?
I am a little afraid that it is caused because the RSPC_API_CHAIN function has a pop up where I need to set the priority but I am not sure ....
Have you tried to experiment with something like this or could you please give me some advice how to proceed ?F

 

Accepted Solutions (0)

Answers (0)