cancel
Showing results for 
Search instead for 
Did you mean: 

how can i create rule using function module?

Former Member
0 Kudos

my scenario is if credit value exceeds 5000 the one user, acording to value i have to select the user?

i am new to wf plz help me

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hi,

first create a fn in se37.

use the swcactor and swcont as refernce create a internal table.

using the abap coding select the appropiate user according to the range of value.

use the rh_get_sturcture

after creating go to transaction pfac.

Answers (3)

Answers (3)

Former Member
0 Kudos

if you want to use only rule means go for the transaction se37 and create function module and give all the conditions there

INCLUDE <CNTAIN>.

tables : XXXXX

data : Declaration Part

SWC_GET_ELEMENT AC_CONTAINER '<container name>' name of variable.

SWC_GET_ELEMENT AC_CONTAINER '<container name>' name of variable.

.

<Select query as per your scenario>

<conditions>

if temp le 5000.

actor_tab-otype = 'US'.

actor_tab-objid = 'KAAV04'.

elseif temp ge 101 and temp le 10000.

actor_tab-otype = 'US'.

actor_tab-objid = 'KAAV01'.

elseif temp ge 1001.

actor_tab-otype = 'US'.

actor_tab-objid = 'KAAV03'.

endif.

append actor_tab.

SWC_SET_ELEMENT AC_CONTAINER 'OTYPE' ACTOR_TAB-OTYPE.

SWC_SET_ELEMENT AC_CONTAINER 'OBJID' ACTOR_TAB-OBJID.

which is used in PFAC

or

you use the rule in responsibilities in which you direcly give the ci=onditions...

rewardpoints if helpful..

regards ,

velu...

Former Member
0 Kudos

In your case Value will be one parameter that is passed and you will retrieve the agent corresponding to it. Please check standard Rule 148 and 168 and code accordingly.

<b>Reward points if useful</b>

Former Member
0 Kudos

hi,

continuation

in pfac assign ur function module. and do the binding

assign a return value aagent through which the agent of thr rule is passed to the workflow..