Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

outcomes of a method in business object workflow

Former Member
0 Kudos

Hi Gurus,

I am using the following code in method of my object type.

IF SY_SUBRC <> 0.

CASE SY_SUBRC.

WHEN 1.

EXIT_RETURN 9001 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 2.

EXIT_RETURN 9002 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 3.

EXIT_RETURN 9003 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 4.

EXIT_RETURN 9004 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 5.

EXIT_RETURN 9005 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 6.

EXIT_RETURN 9006 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 7.

EXIT_RETURN 9007 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 8.

EXIT_RETURN 9008 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

WHEN 9.

EXIT_RETURN 9009 W_SY-MSGV1 W_SY-MSGV2 W_SY-MSGV3 W_SY-MSGV4.

This results in a number of outcomes(which is what i want) if i use this method in my task and in turn use it in my workflow step.

I am required to define this exceptions in the method level can any body tell me how to define these exceptions at object method level ?

Can any of you gurus help me out on how to do this.

Regards

Narendiran Rathinavelu

2 REPLIES 2

Former Member
0 Kudos

Hi,

In the business object repository when u create method there are three tabs of which one of the tab is ABAP.Select tht tab there u find radiobuttons pointing to how the method in BOR is formulated. If u have selected radiobutton for FM u need to give the name of the function module.

In tcode se37 check the FM entered.If u have created this function module there is a tab names expection .Click on this tab and enter the names of the exception u want to raise.

In the source code u can check ur conditions.

if sy-subrc <> 0.

case sy-subrc .

when 1.

raise excep1.

when 2.

raise except2.

endcase.

Hope this is useful.

Reward useful answers.

Regards,

Shrita.

0 Kudos

Hi,

Thanks for the input i am implementing a n-step BADI workflow WS14000134, I am suppposed to get the list of approvers by writng the code inside the BADI BBP_WFL_APPROV_BADI

If anybody has any sample code for please help me out?

Regards

Narendiran Rathinvelu