Passing CDPOS to a workflow?

I'm trying to trigger a workflow when MARA-TMART and/or MARA-TEMPB are changed.  I created a 'Z' subtype to BUS1001, delegated the z subtype, and created a new event on the z subtype.  I created a single SWEC entry to trigger the new event when either MARA field is changed.  I also created the SWE2 entry to link to the workflow.  How do I pass the actual CDPOS entry to the workflow, so I can know which of the 2 fields was changed when I am in the workflow?  I want to send an email describing which field was changed, but I don't know how to tell which one was changed inside the workflow.
Thanks,
Susan

When you create a attribute - follow as given below
1. Create with ABAP Dictionary field proposals? --> No.
2. Give the attribute details - then in the block with   name "Source" - check the "Virtual" radiobutton will be selected.
3. Input it's type - table/field, reference.
Once you are done with it, Select the newely created attribute and Go to program on main screen. There you can write the "SELECT" from cdpos and get the required data, do the processing and finally set the value. You would need to use swc_set_element/table to achieve the purpose.
Check BO : EMPLOYEEI - Attribute: Aggregate.
Reward points if useful,
  Gautam

Similar Messages

  • Can we pass Internal tables to workflow container?

    workflow container has a size limitation, we need to pass any infotype to the workflow container, so can we pass internal tables to workflow container or is there any alternate solution?
    Thanks in Advance
    Hari

    Hi,
    Check the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/a6/9bac935f2c11d194a40000e82dec10/frameset.htm">Multiline Container Element Definition.</a>
    Regards
    <i><b>Raja Sekhar</b></i>

  • Passing rule arguments in workflow

    Hi,
    I am trying to change the email of a user through workflow by using a rule. I am passing rule arguments in workflow not in the rule. but the argument values are not populating. here is the trace of the activity.
    <set name='testview.global.email'>
    <rule name='sri'>
    <argument name='firstname'>
    <ref>global.firstname</ref> --> null
    </argument> --> null
    <argument name='lastname'>
    <ref>global.lastname</ref> --> null
    </argument> --> null
    <Rule name='sri'>
    <concat>
    <ref>firstname</ref> --> null
    <ref>lastname</ref> --> null
    <s>@waveset.com</s> --> @waveset.com
    </concat> --> @waveset.com
    </Rule> --> @waveset.com
    </rule> --> @waveset.com
    </set> --> null
    I don't understand why it is (letters in bold) returning null vlaue.
    any help
    thanks in advance
    Srinivas

    hi,
    Try testview.global.firstname in place of global.firstname and
    testview.global.lastname in place of global.lastname.
    bcz in workflow u can access to user attributes by its view.
    thanx
    shant

  • Pass values between two workflow steps.

    Hi,
    I have requirement to pass values from one workflow step to another workflow step .
    1. In workflow step 1 , we have created dynamic user group.
    2. I need to get user group name in another workflow step.
    Thanks
    Ravindra

    First of all if you want to pass custom property to next step then you have to customize the current and next step (if you can it as process step). As of now i can think of one approach by setting up value in meatdata of next route as below in your execute method (if there is only one next step not with "and" or "or" condition otherwise you have to use id or name to find out next step).
    first step
    List<Route> routes = session.getRoutes(item)
    Route route=routes.get(0);
    route.getDestinations().get(0).getMetaDataMap().put("key", value)
    session.complete(item,route);
    destination step
    MetaDataMap map=item.getWorkflowData().getMetaDataMap();
    map.get("key");
    You can try once to check if it works else check through session. Let me know if it doesnt' work for you.

  • Issue in passing payload from Human Workflow to ADF task flow

    Hi All,l
    I am facing one strange issue in Human Workflow -> ADF task form integration. I have 4 Data variables to pass to the task form for displaying and modifying the request payload. E.g
    1. request
    2. propertiesList
    3. input1
    4. input2
    request and properties list variables are in the same namespace. When the process is executed, I can see the data being passed in Initiate taskflow activity in BPEL. However I don't see the data in ADF form only for propertiesList variable. This is a custom schema element I added newly in the project. I don't get any error , but no data is getting displayed.
    Any help in this matter is greatly appreciated.
    Thanks
    Ashwini

    I have applied workaround for this. However the main issue still exist.
    When I pass hard-coded values in the list and drag and drop that list as selectOneChoice - I see the values in dropdown. Whereas, when the list is passed from program logic and I can see the values passed in initiateTask activity, and drag and drop the field as selectOneChoice, the values don't come up.
    I will replicate this issue in a smaller piece of code and paste here later.
    Thanks
    Ashwini

  • Not Able to Pass the Values to WorkFlow Container

    Hi All,
        Iam calling a WF from a BSP application by using the FM       
    EWW_WORKFLOW_START
    for this fucntion module iam passing a table  to the parameter
    X_CONATINER = t_values
    but I am a bit confused that how this table is assigned to the workflow conatiner.
    what I want to know is I need to assign the values of t_values to the WF conatiner elements .
    Thanks In Advance.
    Regards
    Pavan

    Pavan,
    try this code and include this in your corresponding include.
    Make sure that your workflow has a multiline import element with the same name as of the internal table. Here, WERKS.
    REPORT yh_sample.
    DATA : t_container TYPE TABLE OF swcont WITH HEADER LINE,
            wf_id TYPE swwwihead-wi_id.
    DATA: werks TYPE STANDARD TABLE OF werks_d WITH HEADER LINE.
    DEFINE swc_set_element.
      call function 'SWC_TABLE_SET'
        exporting
          element       = &2
        tables
          container     = &1
          table         = &3
        exceptions
          type_conflict = 1.
    END-OF-DEFINITION.
    werks = '1000'.
    APPEND werks.
    werks = '1003'.
    APPEND werks.
    werks = '1056'.
    APPEND werks.
    swc_set_element t_container  'WERKS' werks.
    CALL FUNCTION 'EWW_WORKFLOW_START'
      EXPORTING
        x_task          = 'WS99901222'
      IMPORTING
        y_workflow_id   = wf_id
      TABLES
        x_container     = t_container
      EXCEPTIONS
        invalid_task    = 1
        no_active_plvar = 2
        start_failed    = 3
        general_error   = 4.
    IF sy-subrc = 0.
      COMMIT WORK.
      MESSAGE 'success' TYPE 'S'.
      WRITE:/ wf_id.
    ELSE.
      MESSAGE 'Error' TYPE 'S'.
    ENDIF.
    Regards
    Indu.

  • Passing multiline element to workflow container ? how do i ?

    Hello Folks,
    I need to pass an internal table to the workflow container...In this container i had already created an Multiline element which the right table type assigned..
    I need to call this Workflow using FM SAP_WAPI_START_WORKFLOW.... Eg:
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
      EXPORTING
       TASK                      = WFNAME
       LANGUAGE                  = SY-LANGU
       DO_COMMIT                 = 'X'
       USER                      = SY-UNAME
       START_ASYNCHRONOUS        = 'X'
      DESIRED_START_DATE        =
      DESIRED_START_TIME        =
      DESIRED_START_ZONLO       = SY-ZONLO
      IFS_XML_CONTAINER         =
      IMPORTING
       RETURN_CODE               = lv_return_code
       WORKITEM_ID               = lv_workitem_id
      NEW_STATUS               =
    TABLES
       INPUT_CONTAINER           = lt_container_wf
       MESSAGE_STRUCT            = lt_message_struct
       MESSAGE_LINES             = lt_msg_lines.
    lt_container_wf values should have an internal table to be passed a multiline element.....
    I am unble to pass it this way and the error i get is that " Single Line element  <XXXX> is being passed several times...
    How do i tell the system the the element which is passed is a mulitple element..
    Regards,
    Anand

    check this code snippet
    include <cntn01>.
    DATA:
          lv_retcode   TYPE  sysubrc,
          lt_cont   TYPE TABLE OF swcont,
          ls_cont   TYPE          swcont,
          lt_kna1   TYPE TABLE OF kna1,
          ls_kna1   TYPE kna1.
    SELECT * FROM kna1 INTO TABLE lt_kna1 UP TO 10 ROWS.
    swc_create_container lt_cont.
    swc_set_table lt_cont 'CUSTOMER' lt_kna1.
    CALL FUNCTION 'EWW_WORKFLOW_START'
      EXPORTING
        x_task                = 'WSXXXXXXXX'
    TABLES
       X_CONTAINER           = lt_cont
    EXCEPTIONS
       INVALID_TASK          = 1
       NO_ACTIVE_PLVAR       = 2
       START_FAILED          = 3
       GENERAL_ERROR         = 4
       OTHERS                = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Passing a variable into workflow

    I know u can pass variables from a form into a workflow using processInputs.....but let's say I have a update workflow and there's some attribute that has changed on the user that requires the update workflow to trigger the disable workflow.....let's say I use the disableUser workflow service does anyone know if it's possible for to pass a variable from the update workflow to the disable workflow??

    you do it the same way you would in any other workflow. but if. In fact, I THINK that you dont even need to pass it. The external workflow should be available to all internal workflows.
    otherwise define it in the disable and pass it in. We do this all the time. should work fine.
    Dana Reed
    AegisUSA
    Denver, Co
    773.412.3728

  • How to Pass BAPIPWD from Export workflow in Web Services Connector MA

    Hello,
    I need to export users from FIM to SAP using web services connector. I have created Export Work flow and added the values like user name , first name, last name and etc. I couldnt set the value for password because the data type is BAPIPWD. Could you please
    tell me how to create a user in SAP from FIM using Export Workflow and how to pass the password parameter.
    Thanks,
    Nallasivan

    Hi you can add parameters to your FPM application and launch the aplication from POWL action.
    Insder FPM, using FPM parameters you can access these varaibles inside your local webdynpro component.
    Regards
    Ravi

  • Passing arguments to a WorkFlow launched from a Link field in a form

    Hi. Anybody knows if it's possible to pass some argument to a WF launching it from a form?
    In the form from which I call the WF, I have a var that contains a list. This list has to be passed as an argument to the WF.
    The code:
    <Field>
      <Display class='Link'>
        <Property name='name' value='Launch WF'/>
        <Property name='URL' value='user/processLaunch.jsp?id=My WorkFlow'/>
      </Display>
    </Field>Can I add something to the URL propriety to pass the var?
    Thanks,
    O

    add variables, prefixing them with 'op_', like the following:
    <Property name='URL' value='user/processLaunch.jsp?id=My WorkFlow&op_myVar=myvalue'/>

  • Passing Internal tables to Workflow

    Hello all,
    I learning workflow and have a small doubt related to passing internal table as parameter to workflow when it is triggered by a report program explicitely.
    I wrote a prog to upload data from flat file into internal table and by passing this ITAB to the workflow for futher processing. <b>Actually i succeeded in this with only one field in my flat file (lfa1-lifnr).</b>
    <b>what if my flat file contains more than one field? (i.e., lifnr, name1, city, county) how should i declare the parameters for my EVENT (triggering event) and same with my container declaration?</b>
    Any inputs in this regards are welcome.
    Thank you in advance,
    Lakshmi Narayana

    Hi Lakshmi,
    Create Workflow container
      swc_container        lt_container.
      swc_create_container lt_container.
    Fill internal table with data
    The container type and the internal table type should be same, U can use a structure to define both.
    Declare a structure with all the fields.
    Define a conatiner of same type of structure in worklow and set it in <b>wait for event</b> setp.
    swc_set_table lt_container '<container_name>' lit_int_data.
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = lc_objtyp
          objkey            = lv_objkey
          event             = lc_event
        IMPORTING
          event_id          = lv_eventid
        TABLES
          event_container   = lt_container
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
    Rgds,
    Prakash
    Message was edited by: Prakashsingh Mehra

  • How to pass  table contents to Workflow?

    hi all,
    my workflow accepts a table as input. when i execute the Workflow from SWUS i can enter the table contents.
    Now how to pass these <b>table contents to workflow through Function module</b>
    say the table has 3 columns and 5 rows.
    regards.
    Subba

    very Helpful answer.
    i referred to the below link.
    <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4b130453d11d189430000e829fbbd/frameset.htm">http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/e4b130453d11d189430000e829fbbd/frameset.htm</a>
    my workflow input container is a tableas below:
    table: ZEMPLOYEE
    Empid    empname     empaddress
    <b>0001     john        texas
    0002     jay         india
    0003     hassan      karachi</b>
    so how to declare the container and pass these values to the container through function module. Also what is object type and object key, i have not defined any object type and object key. just a direct table contents to be imported into Workflow.
    regards,
    Subba

  • Passing customized field to workflow

    Whenever I pass user USusername, the wfl returns a  value but whenever I passed BPobjid, the wfl encounters and error eventhough the rule test returns a value..
    the BPobjid if I may add is a customized field. And if shown at bbp_pd contains 10digit BP number.
    I'd made sure that the Function module called by the rule can handle BP0000000000, 0000000000, formats.. but then, theres no value being returned.
    Is there a way where I can see the value passed by the WFL to the rule container? I even tried to test hardcoding values from the WFL Binding with (BP0000000000, 0000000000, formats).
    Thank you
    Cindy Sy

    Hi Lakshmi,
    Create Workflow container
      swc_container        lt_container.
      swc_create_container lt_container.
    Fill internal table with data
    The container type and the internal table type should be same, U can use a structure to define both.
    Declare a structure with all the fields.
    Define a conatiner of same type of structure in worklow and set it in <b>wait for event</b> setp.
    swc_set_table lt_container '<container_name>' lit_int_data.
    CALL FUNCTION 'SWE_EVENT_CREATE'
        EXPORTING
          objtype           = lc_objtyp
          objkey            = lv_objkey
          event             = lc_event
        IMPORTING
          event_id          = lv_eventid
        TABLES
          event_container   = lt_container
        EXCEPTIONS
          objtype_not_found = 1
          OTHERS            = 2.
    Rgds,
    Prakash
    Message was edited by: Prakashsingh Mehra

  • Pass argument to anonymous workflow?

    I'm using Sun IdM 8.1 and want to pass an argument to a call to an anonymous workflow:
    Update profile
    The proccess is launched, but alternateAction is null.
    I have tried to define the variable alternateAction in the workflow as external, input and both but to no avail.
    Any suggestions?
    Best regards
    Stefan

    When you invokes the button, right before the action method.
    What exactly do you want to achieve? Now I think twice about it, the design may be somewhat odd. You just want to pass an argument to the rendered attribute regardless of action?
    If so:<h:someComponent binding="#{myBean.someComponent}" rendered="#{myBean.renderSomeComponent}">
        <f:attribute name="attributeName" value="attributeValue" />
    </h:someComponent>MyBeanprivate HtmlSomeComponent someComponent; // + getter + setter
    public boolean renderSomeComponent() {
        String attributeName = (String) someComponent.getAttributes().get("attributeName"); // "attributeValue"
        // Implement return.
    }

  • Resend Purchase Requisition created pass 2 week to workflow inbox

    Hi,
    We are using the PR release workflow WS00000038, no PR is send to Manager workflow inbox due to some setting in RFC config, we have resolved the RFC config.  Now we wanted to resend the PR created for the pass 2 weeks to the Manager Workflow Inbox, how to do it?
    Best Regards,

    Are the Workflow in error state. If they are in error state you can restart the Workflow from SWPR Tcode. If the Workflow is in Prcess state and it is stuck in the first step then I am afraid you have to trigger them either Through SWUS or through SWUE. If Wflow in error state you can catch the workitems in error from SWI2_DIAG.
    <b>Reward Points if useful and close thread if resolved</b>

Maybe you are looking for