Starting existing workflow from web dynpro application (ABAP)

Hi experts,
    I am working on web dynpro application from which when I click on a button an existing workflow should trigger. This will be used in portal replacing existing iview with jsp. I did lot of reading on SDN maybe too much that I am confused how to get started. Here is what I have currently.
We have an existing workflow that sends an approval email to manager when ever some unit information changes. In current functionality, workflow is triggered by event which is linked to workflow in transaction "swetypv". We defined scenario in "qisrscenario" that contains all elements to populate workflow container. The methods to get data into workflow container, send email etc are all written in business object methods. We have a class that implements standard SAP BADI "IF_EX_QISR1"(IF_EX_QISR1~SCENARIO_PROCESS_USER_COMMAND method) that probably has all logic. In current functionality when the workflow gets created it sends notification number back to portal jsp page that triggered the workflow on button click. Users look at notification number in iqs23 for workflow log, PCR form data etc. and I need that functionality too. Now I am confused where I should start so that I can use ew web dynpro applciation instead of jsp iview but want all the functionality that we currently have. How can I start workflow and get notification number back to web dynpro so that I can display that to user? The approving manager goes to UWL to approve, reject the workitem and workflow then finishes.
Any help will be greatly appreciated.
Thanks.
Mithun

Hi.,
Using FM  SAP_WAPI_CREATE_EVENT  You can Achieve this., try the below piece of code.,
DATA: OBJECT_TYPE  TYPE  SWR_STRUCT-OBJECT_TYP VALUE 'ZBUS333',   " Enter Your Business Object here
OBJECT_KEY  TYPE  SWR_STRUCT-OBJECT_KEY,
EVENT TYPE  SWR_STRUCT-EVENT VALUE 'FIRE'.     " Enter Your Event here
   DATA: lt_cont TYPE STANDARD TABLE OF swr_cont,
         ls_cont TYPE swr_cont.
       ls_cont-element = 'NAME'.       " To Pass Values to business Object you append to container
       ls_cont-value   = lv_name.
       APPEND ls_cont to lt_cont.
       ls_cont-element = 'ID'.
       ls_cont-value   = lv_id.
       APPEND ls_cont to lt_cont.
      CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
        EXPORTING
          OBJECT_TYPE             = OBJECT_TYPE
          OBJECT_KEY              = OBJECT_KEY
          EVENT                        = EVENT
         COMMIT_WORK             = 'X'
         EVENT_LANGUAGE          = SY-LANGU
         LANGUAGE                = SY-LANGU
         USER                    = SY-UNAME
*         IFS_XML_CONTAINER       =
*       IMPORTING
*         RETURN_CODE             =
*         EVENT_ID                =
       TABLES
         INPUT_CONTAINER         = lt_cont
*         MESSAGE_LINES           =
*         MESSAGE_STRUCT          =
hope this helps u.,
Thanks & Regards,
Kiran

Similar Messages

  • Passing parameters to Transactions from Web dynpro Application through ITS

    Hi,
    i need to call a transaction from Web dynpro through ITS. On action from web dynpro application, i am concatenating the respective parameters mentioned below along with URL. The problem is one parameter(VARIANT) is being passed to the t-code CAT3 correctly. The next mandatory parameter(PERNR) is not passed to the respective field.Here is the URL Code:
    CONCATENATE 'http'
    '://' host ':' port
    '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=' 'CAT3'
    '%20TCATST-VARIANT=' lv_name2 '&CATSFIELDS-PERNR=' lv_name1 INTO url.
    Called T-Code CAT3
    Passing Parameters are:
    Data Profile TCATST-VARIANT
    Pernr: CATSFIELDS-PERNR

    Pradeep,
    iam trying to pass values from webdynpro application to SAP GUI Transaction
    here is the sample code which iam using
    CONCATENATE  'http://s0164dep01.adta.uae:50000/irj/portal/interop?NavigationTarget=pcd:portal_content/Testing/trn_iw33?'
    '%20CAUFVD-AUFNR='
                 'ApplicationParameter=CAUFVD-AUFNR='
                  lv_workorder';'
              'DYNP_OKCODE=SHOW'
             INTO lv_url.
    i could'nt able to succed as its displaying page not found exception.
    Help me on this to proceed further
    Regards
    Jaipal.E

  • Invoke Workflow from Web Dynpro for Java Application

    I am working on a custom web dynpro for java application and when the user clicks the submit button the SAP standard workflow (WS50000041) should be invoked. Does anyone have experience they can share with me on how to achieve this functionality? It should also be able to attach an adobe form or read data from the form and submit the data as xml.
    Thanks,
    Ashley

    Hi Ashley,
    Use following code in RFC to invoke your workflow -
    DATA : w_subrc TYPE sy-subrc,
                w_wi_id LIKE swwwihead-wi_id.
    CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
            EXPORTING
              task                      = ' WORKFLOW - WSxxxxxx '
              language                  = sy-langu
              do_commit                 = 'X'
            IMPORTING
              return_code               = w_subrc
              workitem_id               = w_wi_id
            TABLES
              input_container           = it_container
              message_lines             = lv_swr_messag
          COMMIT WORK.
    With this code your workflow will get start. But u have to use workflow id in next application also in which your request is getting navigated. In that application you have to take this workflow ID and have to pass again in workflow using - PortalNavigation statements.
    After that this workflow will get start to publish in your TaskList (My Task) in Portal. Remeber that your all task should be maintained in workflow table by using SWFVISU  transaction.
    After that go to Portal and Re-Register your UWL so that your new Workflow ID will get usable in portal.
    With this way you would be able to use workflow with Web Dynpro Java using UWL and Workflow.
    Regards,
    Roshan Gupta

  • How to call "compensation profile" iView in ECM from Web Dynpro for ABAP

    Hi Experts,
    I developed a compensation planning iView using web dynpro for ABAP using floor plan manager in ECM. I need to call the iView "compensation profile" but I don't know how to pass parameter to it, how to trigger it from my application. Is there anyone used to do this before?
    Thanks!
    - Anthony -

    I have to develop my own iView to replicate Java iView.

  • Trigger File Generation to a Server from Web Dynpro Application

    Hi Everybody! Hope you had a good new years eve
    Is it possible to generate a File on a Server outgoing from Web Dynpro?
    I tried to use GUI_DOWNLOAD. But as I couldn't use the GUI_DOWNLOAD from the Web Dynpro, I wrote a Report "ZCMI_EXPORT_FILE" that generates a Text-File. When I start the Report by myself, the file gets generated. All fine.
    To be able to generate the File from Web Dynpro, I created a Batch Input Function Module, that I call in the Web Dynpro. The File is not created and it does not show any errors.
    Do you have any idea how i can get this working? I'd also be happy with a different approach.
    Best Regards and Thanks,
    Steffen
    REPORT that is called with Batch Input from Web Dynpro:
    call function 'ZFM_GENERATE_EXPORT'
      exporting
        it_detail_record     = lt_records
        is_export            = gs_export
      importing
        ev_string            = gs_export-document
        et_dataset           = data_tab
      exceptions
        parameter_is_initial = 1
        others               = 2.
    if sy-subrc <> 0.
    endif.
    concatenate '\\SERVER\EXPORT\' gs_export-filename into lv_filename.
    call function 'GUI_DOWNLOAD'
      exporting
        filename                = lv_filename
      tables
        data_tab                = data_tab
      exceptions
        file_write_error        = 1
        no_batch                = 2
        gui_refuse_filetransfer = 3
        invalid_type            = 4
        others                  = 5.
    if sy-subrc <> 0.
      exit.
    endif.

    HI,
    GUI_DOWNLOAD does not get's executed in the Backgroud.
    there is no way to do it as a background job.. create the folder.. transfer the file to the application server in the backgorund using OPEN DATASET... use the tcode CG3Y to download the file from the app server to your folder..

  • Triggering workflow from Web Dynpro

    Hi,
    What is the best way to trigger a workflow from a web dynpro application?
    Is there a standard 'Netweaver' workflow component or only the classic workflow is available?
    I want to trigger some workflow activity after the user has made a new entry using the dynpro application.
    Also is there a way to view the users 'Inbox' in a web browser or the only way is to use iView in a Portal?
    Thanks for any feedback.
    Regards, Hari

    Thanks for the information Tomas & Anil.
    What part of the component is GP? Is it part of CAF?
    Anil you have mentioned I need to install it on the J2EE.
    We have currently Java stack for Web AS 6.4, what other components do I need to make this happen.
    Thanks, Hari

  • Call back-end report from Web Dynpro for ABAP

    Hi Experts,
    I have an web dynpro for abap application, I put it into an iView. I also have a report which have selection screen and ALV display in back-end. Now I would like to call the report from the web dynpro application and display it in the web.
    What steps need to be done to do it?
    Thanks,
    Anthony

    Anthony,
    you can create a custom transaction for your report "for example ZREPORT" and then create an IVIEW for ZREPORT.
    in your webdynpro you can create a button or link and in the action behind you can call OBN and pass the IVIEW parameters for the OBN call.
    OBN can be found in the webdynpro wizard tool.
    thanks!
    Jason PV

  • How to change the Portal Password using a link from Web dynpro application

    Hello Everybody,
    I have a requirement to change the user password from a web dynpro application which is available on a mobile device. Firstly User will log into the portal through a mobile device and after getting authenticated user will be redirected to the mobile application. Within this mobile application there will be a link to change the login password(Portal login). Can somebody tell me how can i change the portal login password from a link available within the mobile application. Looking forward for a suitable reply.
    Thanks to all,
    Regards,
    Saby.

    Hi Maksim,
    Thanks for your reply..but i would also like to know can we directly use the Change Password Iview "persoUserPassword" from the portal. Can i directly Pass the URL of this iview from the portal to a "Change Password" link in the web dynpro application, so that when the user click this link he should be able to see this Iview on his/her mobile device and should be able to change the password from there. But i dont know whether this iview will appear properly on the mobile device or we have to have a custom web dynpro application for this purpose...Please reply with a suitable answer.
    Thanks in advance.
    Regards,
    Sarabjeet Singh.

  • How to Call Transaction iView that calls RRMXP from Web Dynpro for ABAP

    Dear Experts,,
    I'm developing an application in Web Dynpro for ABAP wherein I'm supposed to give a link that should open an SAP Transaction iView that calls  tcode = 'RRMXP' and I pass the application parameter as QUERY/WBID = <BI query/Workbook ID>.
    I tried calling com.sap.portal.appintegrator.sap.bwc.Transaction iView, but it asks for system/application and GUI type parameters. How to pass through the URL?
    Any help would be highly appreciated
    Regds,
    Srini

    Hi Wolfgang,,
    My problem was that I was supposed to call the BeX Web Analyser ( a BI excel based tool - client installation) on click of a button in my WD-ABAP application. I solved it as follows :
    In the portal pcd, I cam across a folder content provided by SAP. Here, you'll find standard template iViews that can be used to call applications ( for which you make iViews). I had to call an SAP TCode : RRMXP so as to call a BI Workbook/Query.
    So, I called the standard iView template for sap_transaction_iView as follows :
    irj/servlet/prt/portal/prtmode/preview/prtroot/'
               'pcd!3aportal_content!2fcom.sap.pct!2ftemplates'
               '!2fiviews!2fcom.sap.portal.sap_transaction_iview?'
               'sap-config-mode=true&System=BWR3System&TCode=RRMXP'
               '&GuiType=WinGui&OkCode=y&ApplicationParameter='  <appnm>  into url.
          l_popup =
             l_window_manager->create_external_window( url = url
                                          has_menubar = ' '
                                         has_statusbar = ' '
                                          has_toolbar = ' '
                                          has_location = ' ').
          l_popup->open( ).
    And , it worked.
    Any more help pls feel free to revert.
    Regds,
    Srini

  • Show ObjectSelector from web dynpro application

    Hello, I´ve read in this  how to configure a ObjectSelector UI pattern in a web dynpro application but even looking at the code I havent found out how to show it in actions event handler code.
    In the caf tutorial center there is an example that implements the call for the ObjectBrowser, but the interface for ObjectSelector doesnt have the showView() method used for ObjectBrowser and even searching in the foruns I couldnt find a way to show the component.
    Does anyone know how to do that ?
    Thanks in advance,

    Hallow Experts,
    Please give me some clue; I hope you will give me some clue.
    Ok.
    Thanks' and Regards
    Tarapada Dan

  • Adding attachments to workflow from Web Dynpro ABAP Application program.

    Hi,
    workflow is supposed to start by a Web Dynpro ABAP Application.
    The user can attach files to it.
    A superior is supposed to review the files and either approve or reject the request.
    I tried the following in Web Ddynpro ABAP:
    CALL FUNCTION 'EWW_WORKFLOW_START'
    EXPORTING
    X_TASK = 'WS90000074'
    IMPORTING
    Y_WORKFLOW_ID = lv_WF_ID
    TABLES
    X_CONTAINER = lv_IT_CONTAINER
    EXCEPTIONS
    then followed by:
    CALL FUNCTION 'SAP_WAPI_ATTACHMENT_ADD'
    EXPORTING
    WORKITEM_ID = lv_wf_id
    ATT_HEADER = lv_swr_att_header
    ATT_BIN = Item_FILENAMEATTACHED
    DOCUMENT_OWNER = SY-UNAME
    LANGUAGE = SY-LANGU
    IMPORTING
    ATT_ID = lv_swr_att_id
    The Workflow has only one user decision step and one notification Step.
    In the user decision step, there is a binding from ATTACHOBJECTS to the task.
    But, in the log, you can see the attachment in the Workflow Container of the workflow instance, but you don't see it in the task (neither Inbox nor UWL)
    I have checked the binding it is correct. I am getting the attachment in workflow container in '_attach_objects' element. but this attachment has to go to the user decision step, so I am binding the '_attach_objects' of workflow container to '_attach_objects' of user decision step. But the attachment was not going to user decision step.
    Could you please let me know where am i doing wrong?
    Thanks,
    V.Nagaraju

    @Ruslim Chang 
       Sorry to point out but the FM will return the Workitem ID only so there is no problem with the LV_WF_ID variable.
    @vundralla nagaraju
    Instead of making binding between attachobjects make binding between
    WiGroup_ID <---- attachobjects
    and then on the next step you try to make biniding in the user decision step by using WiGroup_ID.I think it should work.

  • How to kick off workflow from Web Dynpro?

    Hi,
    I have abap experience but haven't used workflow before. I have to kick off a workflow from a java web dynpro.
    I think that I need to set up a business object and an event within this object, as step one. I then go to Status Management in the Business Workflow as I need to establish a relationship between the web dynpro and my event, step two.
    The question is, what Status Object type do I use in this Status Management? For example if I was releasing a production order I could set this to ORH.
    Any advice greatly appreciated.
    Regards,
    Warren.

    Hello Warrenabap,
    Do you know how to send (or modify) the container values from a workflow ??

  • How to store text field data from web dynpro application in pcd ?

    Hi Forum,
    I am new to web Dynpro.
    I want to store user specific data (a text field value) from a wd application in PCD and access it every time the user runs the application.How can I achieve this?
    Thanks,
    Mickey.

    Hi
    I created the "read" and "update" methods in my application service. How can I call them? I created and implemented the methods just like here: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/340fc0ea-0c01-0010-74bf-965b11031e77
    Operations:
    - readMyEntityService:
    - updateMyEntityService
    Implementation:
    retValue = getMyEntityService().read(key);
    getMyEntityService().update(dS0);
    In Web Dynpro there is this update method with the code above (in my original post).
    How can I call the update-method????????
    Kind regards
    Bettina

  • Navigate from Web Dynpro application to an iView URL using parameters

    Hi all,
    I have a problem navigating from a Wed Dynpro application to an iView URL. For the navigation, I use the WDPortalNavigation.navigateAbsolute() method. The navigation works fine, unfortunately any parameter that I pass to the iView URL is ignored.
    Here is the code I use:
    WDPortalNavigation.navigateAbsolute(
    "ROLES://portal_content/rack_visualization/RackView",
    WDPortalNavigationMode.SHOW_INPLACE,
    WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
    "space=1&style=3&rack=none");
    The RackView iView is based on the "iView URL" template. I expect that the navigation points to a URL like my_encapsulated_url?space=1&style=3&rack=none. Unfortunately the parameter passing doesn't seem to work.
    Any help would be greatly appreciated!
    Thanks,
    Christophe

    did u get this working ???
    I have a similar issue with the url iview.
    thanks
    venkat

  • Calling a new Browser Window from Web Dynpro Application - Empty Context

    Hello,
    I want to open a view in a new browser window, and followed the same way which is described in this thread:
    Open view in new browser window
    My first try was creating two applications, which refer to the same Component Controller. The opening of a new browser window is triggered by an action, which is called in the other application. As both applications have the same Component Controller, I thought, the context content has to be the same, but actually the context attributes are empty after opening of the new window.
    In my second try I created two applications with two different Component Controllers, mapped via embedded Interface Controller. The effect is the same - I have no context content in the view.
    Please, can anybody help me?
    Thank you in advance.
    Ilona Seifert

    I done something like this:
    [code]
    try {
    strURL =
         WDURLGenerator.getApplicationURL(
                        "$<b>PROJECT_PATH</b>$/$<b>PROJECT_NAME</b>$",
                                            "$<b>APPLIC_NAME</b>$");
    } catch (WDURLException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
    strURL += "?par1=";
    strURL +=  var1;
    strURL += "&par2=";
    strURL +=  var2;
    strURL += "&par3=";
    strURL +=  var3;
    [/code]
    and after i retrieve them:
    [code]
    Var1Value= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var1");
    [/code]

Maybe you are looking for