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

exception handaling

Former Member
0 Likes
268

I want to call a zfunction module in my workflow shoud I raise my exception in the method where I call function module or should I create another task and create another method for xception??

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

You should raise exception from the method in which u are calling your custom function module. After raising the exception if you want to handle it make sure to activate the exception in the outcome tab of your workflow step. By this you will be able to do the needful from workflow when that exception is raised.

Regards,

Shaurya

Former Member
0 Likes

Hi,

Do as mentioned in the thread by shaurya jain.................and for example how to implement it go to saptechnical website in workflow section.There is very good example......for exception handling.

narin_nandivada3
Active Contributor
0 Likes

Hi Rajib Bali,

It would be better if you tell the scenario to guide you in a better way.

In general, It can be done like creating a method and calling that method in an activity step.

Now this activity step is called when exception raised or normally depends on the scenario.

If exception then create an exception block using Block Step and in that block create an activity step which would call that method.

Hope this would help you.

Regards

N.N

Former Member
0 Likes

hi,

actualy I have to call a Z function module. if the function module works properly then another task will be create. but if the function module fails to perform its desired activity then exception would be raised for manual intervention.

narin_nandivada3
Active Contributor
0 Likes

Hi Rajib,

Please find the steps that has to be implemented.

1. Create a method where the function module is called. Export and indicator from that method if it fails.

2. Create an activity step to call that method and buffer that indicator.

3. Create a condition step to check whether indicator is initial or not (not initial raise exception)

4. Create a local exception in Basic data of workflow.

Please refer this WIKI for further process [Handling Exceptions in Workflow |https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/exception%252bhandling%252bin%252bworkflows]

We have to use a [Process Control Step|http://help.sap.com/saphelp_nw70/helpdata/EN/8d/25f0d6454311d189430000e829fbbd/content.htm] to stop execution of Workflow

Hope this would help you, Revert if you have any issues.

Good luck

N.N

Former Member
0 Likes

thanks

Former Member
0 Likes

Hi,

Its better to create new method and task for creating exception.

Advantages

---> Method and task can be used multiple times

---> Exception raised is visible in workflow.