Skip to Content
avatar image
Former Member

Obtain all Approvers in FM and store them in WF main container

Hi Experts,

I need a help to format a container via FM(abap code).

I already searched at forum but I am not able to solve this situation.

The steps below already works fine.

1 – I need to send Mail to all approvers stored in specific rule (OOCU_RESP). To do this I created a SendMail step. It is OK. I have a specific area(multiline container) to receive all approvers (import/export/multiline) is checked. Next step: To get all approvers.

2 – To get them, I created a dummy previous step and assigned a Z… Function Module. Inside FM I called the RH_GET_ACTORS FM that return the actor_tab table. It is OK.

3 -  I am not getting to transfer the actor_tab neither to main container nor container of actual rule. I used the SWC_SET_TABLE but no success yet.The approvers’s data are format OK in actor_tab and administrators tables. I just need to transfer them to a specific container.

4 - The specific step where I call the FM has a General Step property. The containers has the same ref structure (TSWHACTOR).

See my FM abap code below:


  CALL FUNCTION 'RH_GET_ACTORS'
EXPORTING
act_object                = object
TABLES
actor_container           = ac_container1
actor_tab                 = administrators
EXCEPTIONS
no_active_plvar           = 0
no_actor_found            = 0
exception_of_role_raised  = 0
no_valid_agent_determined = 0
no_container              = 0
OTHERS                    = 0.
actor_tab[] = administrators[].

SWC_SET_TABLE ac_container1 'Actor_tab_r'  administrators.

Thanks in advance for help.

Valter Miranda

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 05, 2015 at 09:34 PM

    Hello,

    Please see this thread:

    I think you have made things too complicated. There is no need to create an FM when a simple method will do.

    regards

    Rick Bakker

    Add comment
    10|10000 characters needed characters exceeded

    • That's not the swn_selsen program error log, it's the swwerre program (one of the programs run from SWU3), the program responsible for the workflow auto error handling I think. limit your search in SLG1 for the time period in which you run the extended notification job and for the swn_selsen job.

      errors in this program are usually caused by the user having a missing mail address in the user master record (SU01).

      and no SAPconnect is not relevant - the only time I remember using it is in the inbound mail processing.

  • avatar image
    Former Member
    Jan 25, 2015 at 05:56 PM

    I want to thank all for help to solve some question in my work flow.

    I activated the services below  in the SICF and the Emails from Extended Notification was gererated

    with success to SOST. The services were:

    • Path: default_host => sap => bc => bsp => sap => swn_message1

    • Path: default_host => sap => bc => bsp => sap => swn_wiexecute

    • Path: default_host => sap => bc => workflow => shortcut

    • Path: default_host => sap => public => bc => workflow => shortcut

    • Path: default_host => sap => public => bsp => sap => public => bc

    • Path: default_host => sap => public => bsp => sap => system

    Thanks for all,

    Regards,

    Valter Miranda

    Add comment
    10|10000 characters needed characters exceeded