cancel
Showing results for 
Search instead for 
Did you mean: 

Agent Change

Former Member
0 Kudos

Hi ALL,

I have a Basic doubt. How many ways Agents can be maintained in Workflow? In My requirement One User is leaving Instead of that User I need to maintain another User.But In my requirement Not maintained by RULE and PD ORG (using PPOM)..

Regards

RKA

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I think you can either use Position Id or Organization Unit whatever is suitable for you.

Thanks

Arghadip

Former Member
0 Kudos

Hi Arghadip,

I am using Commissions Approval Workflow. When ever Packet is launched the workflow will trigger.Now one of the Approver(User) is leaving ,Inplace of that user need to assign another user. where i need to do this

we are using this FM

CALL FUNCTION 'Z_EWF_GET_COMM_APPROVER'

EXPORTING

lyear = object-key-packetyear

lmonth = object-key-packetmonth

lcompany = object-key-companycode

lrep = object-key-customer

lapprlevel = lapprovallevel

TABLES

actor_tab = agents

AGENT_LEVELS = levelstable

EXCEPTIONS

nobody_found = 1

OTHERS = 2.

Get approver for level

  • If 01 level, get 1C and 1R approvers also

if lapprlevel = '01'.

SELECT zapprover_name zapproval_level

FROM zew_comm_approve

INTO CORRESPONDING FIELDS

OF TABLE zappr

WHERE zpacket_year = lyear AND

zpacket_month = lmonth AND

zpacket_company = lcompany AND

zpacket_rep = lrep AND

( zapproval_level = '01' OR

zapproval_level = '1R' OR

zapproval_level = '1C' ) AND

zaction_code NE 'APPROVED'.

else. "Just get exact level passed in

SELECT zapprover_name zapproval_level

FROM zew_comm_approve

INTO CORRESPONDING FIELDS

OF TABLE zappr

WHERE zpacket_year = lyear AND

zpacket_month = lmonth AND

zpacket_company = lcompany AND

zpacket_rep = lrep AND

zapproval_level = lapprlevel AND

zaction_code NE 'APPROVED'.

endif.

IF sy-subrc = 0.

LOOP AT zappr.

actor_tab-otype = 'US'.

actor_tab-objid = zappr-zapprover_name.

APPEND actor_tab.

  • Fill up levels table to correspond to agents in agent table

agent_levels-zapproval_level = zappr-zapproval_level.

append agent_levels.

  • Validate username

SELECT SINGLE bname FROM usr02 INTO usr02-bname

WHERE bname = zappr-zapprover_name.

IF sy-subrc <> 0.

zinvalid-zusername = zappr-zapprover_name.

zinvalid-zlevel = zappr-zapproval_level.

APPEND zinvalid.

ENDIF.

ENDLOOP.

ENDIF.

Creating the enrty table zew_comm_approve ? is it correct?

Regards.

RKA

former_member598013
Active Contributor
0 Kudos

Hi Ravi,

You can set the Agent in hte Position ID or the Org level. It all depends on how you are configuring the data.

Thanks,

Chidanand

imthiaz_ahmed
Active Contributor
0 Kudos

Yes Ravi Kanth, as per your logic just modify that table with the current approver at that level.

Regards, IA