SAP Workflow RFC WebDynPro

Hi,
I have to set the values of input_container of sap_wapi_start_workflow and then execute the RFC. This I have to do it through web dynpro. Please help me.
Regards,
Srinivas

Hi,
Thank you for your reply.....
as you said,
IPrivate<view_name>.IInput_ContainerElement ele = wdContext.createInput_ContainerElement();
this is not available, so I changed it to
IPublicCO_ESSCertReq.IInput_ContainerElement ele = wdContext.createInput_ContainerElement(new Swr_Cont());
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setElement("PersonnelNumber");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setValue(EmpId);
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().addElement(ele);
               IPublicCO_ESSCertReq.IInput_ContainerElement ele1 = wdContext.createInput_ContainerElement(new Swr_Cont());
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setElement("EForm");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setValue(CertCode);
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().addElement(ele1);
               wdComponentAPI.getMessageManager().reportSuccess("6");
My complete Code is :
Sap_Wapi_Start_Workflow_Input input=new Sap_Wapi_Start_Workflow_Input();
               wdComponentAPI.getMessageManager().reportSuccess("1");
               input.addInput_Container(new Swr_Cont());
                              wdComponentAPI.getMessageManager().reportSuccess("2");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().bind(input);
               wdComponentAPI.getMessageManager().reportSuccess("3");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().currentSap_Wapi_Start_Workflow_InputElement().setTask("WS90600006");
               wdComponentAPI.getMessageManager().reportSuccess("4");
               IPublicCO_ESSCertReq.IInput_ContainerElement ele = wdContext.createInput_ContainerElement(new Swr_Cont());
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setElement("PersonnelNumber");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setValue(EmpId);
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().addElement(ele);
               IPublicCO_ESSCertReq.IInput_ContainerElement ele1 = wdContext.createInput_ContainerElement(new Swr_Cont());
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setElement("EForm");
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().currentInput_ContainerElement().setValue(CertCode);
               wdContext.nodeSap_Wapi_Start_Workflow_Input().nodeInput_Container().addElement(ele1);
               wdComponentAPI.getMessageManager().reportSuccess("6");
               wdContext.currentSap_Wapi_Start_Workflow_InputElement().modelObject().execute();
               wdComponentAPI.getMessageManager().reportSuccess("Executed successfully, Request has been forwarded to your RM");
but when I execute, I am getting the below error...
com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: Access via NULL object reference not possible., error key: RFC_ERROR_SYSTEM_FAILURE
Please help me.....

Similar Messages

  • How to integrate SAP HR Workflows with Webdynpro ?

    Hello All,
    Could you please drop some hints for the below points please ?
    How do we trigger SAP workflow from Webdynpro DC? Usually if its a RFC we import RFC through Model and trigger the RFC. Can that be done only through Adobe forms? If yes,how do we trigger work flow through Adobe Forms?
    Many Thanks,
    Dhanya

    Hi, Dhanya
      Of course via RFC! Usually these workflow related RFMs are called WAPI
    (Workflow API).
      Please refer to this thread.
      Workflow and Trigger Event
      And Adobe forms is not relevant to SAP workflow at all. Usually, Adobe forms
    + workflow scenarios are achieved via the above workflow APIs.
      Best Regards.
      Sejoon

  • Integration of SAP Business Workflow and Webdynpro

    Hello colleague,
    Could you pls. provide any pointers in configuring the following scenario:
    There is a SAP workflow configured in R/3. When one of the steps of the workflow is executed I have to trigger a Web Dynpro (for ABAP) screen.
    Say its an approval workflow and when the manager clicks on the workitem in the inbox a webdynpro screen will pop up indicating the requisite information. The manager can approve or reject the based on information on the screen. The user action will be taken and the workflow will proceed based on that.
    Any pointers in this will be of great help.
    Regards,
    Gajendra.

    I would like to know as well about this, did you get an answer?
    Thanks for any pointers.

  • Calling a java webdynpro component inside a SAP Workflow

    Hi Experts ,
    Is it possible to call a java webdynpro component inside a SAP Workflow  from the task .
    If yes please let me the procedures .
    Regards
    Sarmistha

    Someone has posted this, Take a look if it helps you:
    "1. Activate your service in transaction SICF;
    2. Activate the WS_HANDLER in SICF (probably you have to do more in SICF, SAP notes will be given to you in your browser when you want to call the service);
    3. Make the correct settings in WF_HANDCUST;
    4. Do ofcourse SWU3 including webserver activities;
    5. Define how you want to call the service via WF_EXTSRV including parameters;
    6. Generate a task from your defined service in WF_EXTSRV;
    7. Incorporate this task in your workflow definition;
    8. Test your workflow. Here you probably get some errror messages that the service cannot be called by for instance inactive ICF services. Activate the correct paths in transaction SICF."
    Regards, IA
    <MODERATOR: For reference, that 'Someone' was Joost in [this thread|Re: Callback from WebDynpro to Workflow]>
    Edited by: Mike Pokraka on Jun 19, 2008 4:52 PM

  • Trigger an workflow from webdynpro abap.

    hai
    gurus!
        iam new to webdynpro.iam femilier with workflow . can anybody explain me with an clear example, how to trigger an workflow from webdynpro abap.
    regards
    rose

    Hi Rose
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/using%20web%20dynpro%20java%20and%20web%20dynpro%20abap%20applications%20in%20universal%20work%20list.pdf">Click</a> Here, to know the step by step procedure of using Webdynpro in Workflows
    Use SAP_WAPI_START_WORKFLOW RFC
    Regards
    Abhimanyu L
    Message was edited by:
            Abhimanyu Lagishetti

  • How to route the information to approver with out involving sap workflows.

    Hi Developers,
    i have a doubt regarding how the requester filled form information will be send to approver with out involving SAP workflows in the portal.
    Normally i know the procedure where users fills the form with the approver details, the filled information is routed to approver UWL by trigerring a function module thru webdynpro.
    But i need to know is there any procedure to route the information without involving any backends.
    Thanks in Advance.

    Michele is correct - sneep will help you get the serial from the running domain on the M3000 ,
    and it is a good idea to install STB on your machines.
    If that isn't possible for you, then sneep can be downloaded directly from [http://www.sun.com/sneep]
    I believe that on this platform, sneep gets the serial from the output of prtconf.
    There is a minor correction to be made :
    After installed SNEEP use "man sneep" for all technical details.The sneep man page is not linked into the shared man pages, so you need to use
    man -M /opt/SUNWsneep/man sneep
    with out going to OK prompt (Banner)It is worth noting that the serial shown in the OBP banner is not the product serial
    that you will find on the physical serial tag.
    The banner "serial" is the decimal equivalent of the host ID, which you normally get in hexadecimal from the "hostid" command.

  • Calling SAP scripts from WEBDYNPRO

    Hi
    We need to call SAP scripts from WebDynpro application.  As per my understanding we need to do following steps
    Create a new RFC function module and create sap script output in PDF format.For this
        - use OPEN_FORM , by assigning TDGETOTF='X' in the Options(Structure
          ITCPO). 
        - call function module CLOSE_FORM with option OTFDATA
        - convert OTF data to PDF by using function module CONVERT_OTF_2_PDF
    Now I would like to know how to display the PDF string from WebDynpro.
    Please help....
    Regards
    Sujith

    Hi,
    You can call by creating external window method.
    create LINK to URL or LINK TO ACTION according to requirement, for this. write code in onaction of that.
    data: iv_url type string value 'http://<server>:<port>/sap/bc/gui/sap/its/webgui?~transaction=*se38 RS38M-PROGRAMM=rsparam;DYNP_OKCODE=SHOP'.
      data: api_component  type ref to if_wd_component,
              window_manager type ref to if_wd_window_manager,
              window type ref to if_wd_window.
      api_component = wd_comp_controller->wd_get_api( ).
      window_manager = api_component->get_window_manager( ).
      window = window_manager->create_external_window(
                     url = iv_url
                     modal = abap_false ).
      window->open( ).
    Cheers,
    Kris.

  • Reg: MDM workflow in webdynpro

    Hi,
    I am using MDM java API (Version: 5.5 SP 06 Patch 2) for webdynpro. I am creating a record in MDM using MDM java API. Once the record gets created in MDM i need to call the MDM workflow. Is there any java API available to call the MDM workflow into webdynpro. If that is not possible, what is the alternative to call the MDM workflow into webdynpro.
    Kindly suggest.
    Thanks,
    Prasanthi.

    Hi
    Check the following doc for workflow
    1.[Workflow for SAP NetWeaver MDM|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60559952-ff62-2910-49a5-b4fb8e94f167]
    2. [Extending MDM 5.5 Business Package functionality with Web|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/12195312-0e01-0010-a392-debbd32e39d4]
    Best Regards
    Satish Kumar

  • Initiate Workflow within WebDynpro ABAP

    Hi,
    Can anyone list the steps to be followed in creating a new workflow and initiating the workflow from WebDynpro for ABAP ?
    Regards
    Ravikumar

    Check this elearning for creating a workflow,
    [Tutorial 1|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0bbdb3c-d640-2a10-d3b2-e4d9b90536a6]
    [Tutorial 2|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30488d68-8451-2a10-d993-bb36e56a1dc8]
    For calling a workflow from webdynpro, chek this thread
    [how to call workflow from webdynpro ?]
    For questions purely related to workflow, please post your queries in the Workflow forum
    Hope it helps!
    Regards,
    Radhika.
    Edited by: Radhika Vadher on May 23, 2009 11:40 AM

  • Binding Structure/Internal Table to Workflow from Webdynpro

    Hi Gurus,
    I have to trigger workflow from WEBDYNPRO application. For now I have two ways they are:
    1. Triggering WFLow using SAP_WAPI_START_WORKFLOW (Successfull):
    How could I bind Structure/Internal Table (DDIC referred structure) to workflow directly. Presently I am mapping indvidual fields which makes my code complex using FM SAP_WAPI_START_WORKFLOW.
    2. Triggering WFLow using SAP_WAPI_CREATE_EVENT (Bindind issues):
    Also When I try to submit using BOR event with SAP_WAPI_CREATE_EVENT workflow triggers successfully But I cannot able to bind the values. So are there any specific configuration need to be made.( like making task as General while triggering workflow using SAP_WAPI_START_WORKFLOW).
    <<text removed>>
    Edited by: Matt on Aug 5, 2011 7:49 PM

    Hi
    Please make use of the below code
    INCLUDE cntn01_swc.
    DATA lt_kna1    TYPE TABLE OF kna1.
    DATA lt_cont    TYPE TABLE OF swcont.
    DATA lv_wiid    TYPE          sww_wiid.
    swc0_create_container  lt_cont.
    SELECT * FROM kna1 INTO TABLE  lt_kna1 UP TO 10 ROWS.
    swc0_set_table lt_cont 'CUST' lt_kna1.
    CALL FUNCTION 'SWW_WI_START'
      EXPORTING
        creator                      = sy-uname
        task                         = 'WSXXXXXXXX'
        do_commit                    = 'X'
      IMPORTING
        wi_id                        = lv_wiid
      TABLES
        wi_container                 = lt_cont
      EXCEPTIONS
        id_not_created               = 1
        read_failed                  = 2
        immediate_start_not_possible = 3
        execution_failed             = 4
        invalid_status               = 5
        OTHERS                       = 6.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    The other way to do is you  can also make use of OO ABAP classes to trigger the workflow. If you want to create a rfc function module then create a wrapper function module .
    SAP_WAPI_START_WORKFLOW cannot transfer structures or tables which are more thatn 255 characters. So the work around is  either make use of  OO  container or SWCONT container.
    The above code snippet should be included in the assistance class of the webdynpro application and you need to include the define the include cntn01_swc in the class local types  under macros.
    and then you create a method ....... and include the above code in that method.   excluding the include statement.
    Regards
    Pavan

  • Kicking off workflow from webdynpro using events?

    I have abap experience but no workflow. Any advice will be appreciated.
    I have to kick off a workflow from webdynpro. I assume that I have to set up a business object (eg. ZOBJECT), create an event therein (eg. ZEVENT).
    Then when webdynpro runs I use a rfc function module to trigger this event.
    The questions I have are:
    1. How do I set up the workflow to be triggered by this event?
    2. Do I set up an event in Business object builder or in SM62?
    3. How do I trigger an event in a function module. I have found SWE_EVENT_CREATE but don't want to create an event just want to trigger the event and in turn set off the workflow?
    Thank you,
    Warren.

    try this below parameters are passed or not
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
               EXPORTING
                 object_type    = 'BUS2105'
                 object_key     = lv_objkey
                 event          = 'CREATED'
                 commit_work    = 'X'
                 event_language = sy-langu
                 language       = sy-langu
                 user           = sy-uname.

  • To configure sap workflow with EP

    HI,
    can we connect customizing made in  SAP workflow with EP may be with UWL through webdynpro...?
    Thanks in advance

    It is possible. You can mail me at [email protected] for further information on this.

  • CAF Java-Based COs with SAP Workflows as Runtime Environment?

    Hi Folks,
    we have a big CAF project hitting us at the moment.
    Due to the heavy load we expect we do want to have the traditional SAP workflows as the runtime environment for our GPs.
    As far as I know we can transfer WFs designed with CAF GP to the R/3 WF system, right?
    My question is know: Can we still develop in Java our CAF objects and use them as we would do that in a portal based GP??
    If this should be possible - is this creating an overhead killing the benefit we gain by shifting from portal to the ABAP stack?
    Any hint is appreciated!
    helge

    Hi Helge,
    Technically, there is no transfer from Guided Procedures to the R/3 Workflow since the process definitions still stay in the GP Design Time. The business logic still takes place on the Java Stack. Only the low-level workflow operations are delegated to the r/3 Workflow.
    That's a difficult dilemma that you are facing right now. As far as I know, the configuration to get Guided Procedures running against the Business Workflow (R/3 Workflow) is quite complex and time consuming. Main pain points are callbacks registrations for background steps, user mapping and endpoints configuration. These are the main tasks. But to reach the right configuration, you will have to be tricky and patient.
    Furthermore, there will be an overhead due the RFC Roundtrips between the Java Stack and the ABAP Stack.
    Hope this helps you.
    Best regards,
    David

  • Trigger MDM Workflow in Webdynpro

    Hello,
    I want to execute a MDM Workflow from Webdynpro using Java API's. I have the WorkflowId,session Id and the RecordId in the Webdynpro. Can somebody please send the code for the same.?
    Any help would be highly appreciated.
    Thanks.

    Hi,
      Check the pdf at the below link.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/600333e0-9bf7-2c10-1f99-bf5dcf661949?quicklink=index&overridelayout=true
    Try using this code for calling MDM workflow:
    RetrieveWorkflowTasksCommand task_command = new RetrieveWorkflowTasksCommand(connections);
    task_command.setSession(sessionId);
    task_command.setTableId(new TableId(1));
    try {
    task_command.execute();
    } catch (Exception e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    //Retrieving the tasks after execting the command
    WorkflowTask [] task = task_command.getWorkflowTasks();
    for(int i = 0 ; i < task.length ; i++)
    WorkflowJob job = task.getJob();
    job_id= job.getId();
    System.out.println(job_id.getIdValue());//This is will give the Job ID of all the workflows in MDM.
    Thanks
    Pawan

  • How to work with a workflow in Webdynpro

    Hi Team,
           I am new to webdynpro ABAP, i have a scenario
    I have a work flow id with me, i want to start this workflow from a webdynpro application,
    1. wedynpro application contains a list of inputs and user1 inputs this data that i have stored node, So node contains full data.
    2. Now i have a workflow id, i want to pass this node data to this workflow on a button click
        I have the button action, what code is required to pass this?
             (I sow few FMs in fourms but i dont know how exactly i can use it)
    3. When the approver gets the workitem, he should be able to approve,reject or send backToAuthor option he will get
         how to read this data back to approver screen for the approver to take correct action ?
    Please help me with some code sample, i sow few things but i am not sure about the parameters which required for this.
    Thanks,
       PP

    Hi,
    1)  In order to trigger the workflow from webdynpro and pass the list of inputs and your workitem id  , i will suggest you to go for    a   business object.
    2) If you have a business object than you can just trigger the workflow through the event (provided your workflow should be an event trigger workflow). As well as you can pass your parameters through it.
    3) In order to trigger the workflow through your business object event u can use the following function module.
    in the below code:-
    it_container- contains the parameter u want to pass like workitem id in your case.
    ZPOC_LEAVE- is my business object.
    OPTIONAL- is my event which will trigger the workflow.
    ty_object_key:- structure type of key fields of business object.
    Note:-you have to define these values as per your business object.
    * Trigger the event ZPOC_leave-CREATE to start the workflow
      DATA: it_container TYPE TABLE OF swr_cont,
                 is_container LIKE LINE OF it_container.
      DATA: g_return_code TYPE sy-subrc,
                 glf_event_id TYPE swr_struct-event_id.
      DATA : ls_objkey TYPE ty_objkey.
      DATA : ls_objtype TYPE swr_struct-object_typ VALUE 'ZPOC_LEAVE'.
      DATA : ls_objectkey TYPE swr_struct-object_key.
      DATA : ls_event TYPE swr_struct-event VALUE 'OPTIONAL'.
    CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          object_type             = ls_objtype
          object_key              = ls_objectkey
          event                   = ls_event
          commit_work             = 'X'
          event_language          = sy-langu
          language                = sy-langu
          user                    = sy-uname
    *   IFS_XML_CONTAINER       =
       IMPORTING
         return_code             = g_return_code
         event_id                = glf_event_id
       TABLES
         input_container         = it_container
    *   MESSAGE_LINES           =
    *   MESSAGE_STRUCT          =
    4) You also need to define the parameter(workitem id in your case) under the parameter option of your event in your business object. (you can use the transaction SWO1 for business objects).
    5) Now in swdd transaction in the basic data u can mention your start event.
    This should be enough to trigger your workflow  and pass your workitem id to it.
    Thanks and regards,
    Mayank Gupta
    Edited by: Mayank Gupta on Feb 4, 2011 5:52 AM

Maybe you are looking for

  • 04 Inspection Lot Cancellation

    Dear QM Followers. I am not able to cancel the 04  LOT generated by production order.There are two scenarios. Scenario I ========= Prod Order created and confirmation done.Stock received by MB31.Subsequently IL generated and UD given in QA32 by mista

  • Truncated (incomplete) Page-Thumbnail View (6.03)

    On my Windows XP 64 machine that is running two 1920x1200 monitors via NVIDIA Quadro FX 4600 with the latest drivers I am having the following problem: in both Acrobat and InDesign the page thumbnail views do not show all of the thumbnail whatever th

  • XML  has data but PDF is not  displaying data

    Hi Gurus, I have one report  with excel and pdf out put . excel is working fine but pdf is not displaying data showing blank page  . both out puts are using same XML. Intresting thing is if I open  RTF  from  bi publisher desktop and load XML data th

  • Drawing with touchpad

    Hello, fellow friends! Moments ago, I first time tried to install Adobe Photoshop on MacBook (Mac OS X v10.6.6). I downloaded Photoshop CS5 trial, installed it, and everything worked almost okey, but I have a problem, which I don't get clear: When I

  • Crash when saving to second server

    Hello, This is a problem that is "recent" but I can NOT pin point when it started. I'm not aware of any specific update or newly added software that may have caused the problem. While at work, Ethernet plugged into system, I work in PhotoShop with jp