Hi Experts,
I have a requirement in workflow to automatically change the processing status of PR to Release - Refused when ever it is being rejected by the approver.
The problem is there is no such BAPI or any standard way available to do so. Hence, I had done a BDC of ME54N in a Function Module.
It is working fine when I am executing the FM in SE37. But it gives following error when I am trying to call the FM in side one of the methods of a step in WF.
Unable to initialise ABAP Control Framework ...
Runtime error RAISE_EXCEPTION has occurred
This I understand is going into dump. But my question is why it is going into dump when calling the FM in WF while working fine in normal SE37 - Test FM?
Also if there is any other way known to meet this requirement, please let me know.
Sample Code of BDC:
PERFORM sub_populate_bdc USING:
'X' 'SAPLMEGUI' '0014',
space 'BDC_OKCODE' '=MECHOB',
space 'BDC_CURSOR' 'MEREQ3328-AFNAM',
'X' 'SAPLMEGUI' '0002',
space 'BDC_OKCODE' '/EMEPOCHENGEBSTYP',
space 'BDC_CURSOR' 'MEPO_SELECT-BSTYP_B',
space 'MEPO_SELECT-BANFN' w_banfn,
space 'MEPO_SELECT-BSTYP_B' c_x,
'X' 'SAPLMEGUI' '0002',
space 'BDC_OKCODE' '=MEOK',
space 'BDC_CURSOR' 'MEPO_SELECT-BSTYP_B',
space 'MEPO_SELECT-BANFN' im_banfn,
space 'MEPO_SELECT-BSTYP_B' c_x,
'X' 'SAPLMEGUI' '0014',
space 'BDC_OKCODE' '=MEREJECT',
space 'BDC_CURSOR' 'DYN_6000-LIST',
'X' 'SAPLMEGUI' '0014',
space 'BDC_OKCODE' '=MESAVE'.
CALL TRANSACTION 'ME54N' USING i_bdcdata
MESSAGES INTO i_msg
MODE 'N' UPDATE 'S'.
* OPTIONS FROM params.
Thanks and Regards
Pradipta Kumar Mishra