Reading Task Container in ABAP Webdynpro

Hi All,
I have to read the task container in ABAP Webdynpro to show the details on a ABAP interactive form which is embedded in WDA. For this I have approached in the following way.
1) Task is configured in SWFVISU with DYNPARM = WI_ID=${item.externalId}
2) Workitem is obtained in UWL and ABAPWebDynpro is launched when Task is executed from UWL
3) START is the "startup" plug that triggers the HANDLESTART method
     This method has WDEVENT as a standar parameter. Then the following code is for reading the URL parameters.
     wdevent->get_data(
    EXPORTING
      name =  if_wd_application=>all_url_parameters
    IMPORTING
      value = l_url_parameters  ).
  READ TABLE l_url_parameters WITH KEY name = 'WI_ID' INTO l_url_parameter.
4)  Set the WI_ID to a componentcontroller attribute
5) This attirbute is now binded to the WDDOMODIFYVIEW method of the View
6) Finally set the form elements attributes of the VIEW by reading the container based on the WI_ID
Problems:
1) I am not getting the form populated
2) The form is getting populated if I hardcode the WI_ID and execute the application directly from backend.
Please tell me where I might have gone wrong.
Thanks
Deb

solved by self

Similar Messages

  • Reading URL parameters in ABAP webdynpro

    I have a requirements to run my ABAP Webdynpro application view based on two parameters passed to it from portal. How can I read the parameters in ABAP webdynpro and use them to write my condition in the run time. I would appreciate it if someone has any code that would help me also.
    Again your help and support is highly appreciated.
    Lily

    Hi Lily,
    To read the URL parameters, you need to right the following code in the HANDLEDEFAULT method
    of the your default window controller.
    DATA : it_parameter TYPE tihttpnvp,
             wa_parameter  TYPE ihttpnvp.
      DATA lo_nd_url_param TYPE REF TO if_wd_context_node.
      DATA ls_url_param TYPE wd_this->element_url_param.
      " Get all URL parameters
      CALL METHOD wdevent->get_data
        EXPORTING
          name  = if_wd_application=>all_url_parameters
        IMPORTING
          value = it_parameter.
      " Get parameter values
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'PERNR' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-pernr = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'SUBTY' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-subty = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'BEGDA' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-begda = wa_parameter-value.
      ENDIF.
      CLEAR wa_parameter.
      READ TABLE it_parameter WITH KEY name = 'ZZPRNTOPT' INTO wa_parameter.
      IF sy-subrc EQ 0.
        ls_url_param-zzprntopt = wa_parameter-value.
      ENDIF.
      " Save URL parameter to context
      lo_nd_url_param = wd_context->get_child_node( name = wd_this->wdctx_url_param ).
      lo_nd_url_param->set_static_attributes(
         static_attributes = ls_url_param ).
    Regards,
    Vikrant

  • FM to read multiline WF container from abap webdynpro

    Hi Gurus,
    We are stuck in reading workflow multiline container in our ABAP webdynpro code. Hope some one can assist us.
    Let me brief you the issue.
    We need to read the workflow multiline container using our webdynpro program. we are using the FM SAP_WAPI_READ_CONTAINER to read the container elements of the workflow by passing workitem id as an input. But this FM is failing to pick the multiline container. Can any one of you advise the alternate way to proceed with this ?
    Merry Christmas to all.
    Cheers,
    BG Suseendran

    Hello Suseendran !
                   Thanks for your Christmas wishes.
                   You can use the following function modules :
                    SWI_READ_CONTAINER_OBJECT
                    SWW_WI_CONTAINER_READ
    Regards,
    S.Suresh

  • How to read URL Parameters in ABAP WebDynpro ?

    Hi,
    How and where (which class, method) in ABAP WebDynpro we can read URL Parameters ? I found answers for WebDynpro JAVA but nothing for ABAP.
    Thanks
    Meenal

    Hi Meenal,
    Please see a post by Sanjay Agarwal titled 'Sequencing Problem in Web Dynpro ABAP'. I believe you will find your answer there.
    Cheers,
    Rich

  • Java Portal Event not received correctly by ABAP Webdynpro

    We have a page that contains 2 iviews. 
    iView 1 contains the MSS Employee Search that raises portal event:
    Namespace: "urn:com.sap.mss.employeesearch"
    Name: "selection_changed"
    The second iview contains an ABAP Webdynpro program that subscribes to the Portal event. 
    The issue is that the event in the ABAP webdynpro is not being triggered.  It does get triggered if we first fire the event from the Java program, unsubscribe the event in the ABAP program them subscribe to the event in the ABAP program.  The event gets triggered at this time and the parameter can be retrieved. 
    If the event is fired a second time, nothing happens in the ABAP program. 
    The abap program works fine when another abap program triggers the same portal event.
    Also, the portal event is being picked up correctly by other SAP delivered JAVA programs.  I just cannot get a custom ABAP Webdynpro program to work...
    Any ideas, comments?
    Glenn

    Hi Glenn,
    Are you using https? Is your j2ee stack and abap stack in the same domain? In the past I have found that https can cause issues in the event communication between different applications.
    Cheers,
    Dion

  • ABAP -WebDynpro - Read URL Parameter

    Hi,
    We have a Custom 'Catalog' that needs to be called from SRM using OCI (Open Catalog Interface). We are developing this custom catalog using ABAP Web Dynpro. We have following issues because of which we are unable to communicate back to Shopping cart from the Custom Catalog:
    1. Unable to read the value of 'HOOK_URL' in WebDynpro application. We need this value so that it can be used as Exit URL. How and where do we read this URL parameter in ABAP WebDynpro ?
    2. How can we return the 'HTML Form' to SRM with the values from Custom Catalog to fill the shopping cart ?
    I would appreciate your help...
    Thanks
    Meenal

    Hi Menal,
    I had the same problem.
    Did you define the HOOK_URL parameter in your webservice ? If not, do this 1st.
    2nd
    In you Webdynpro read the HOOK_URL in your handledefault method your window. Store it e.g. as attrribute in you assistance class.
    method handledefault .
    *&- Add FOF and HOOK_URL to assistanceclass attributes
      wd_assist->hook_url = hook_url.
    endmethod.
    After this you can read your HOOK_URL e.g in a view via:
    concatenate 'HOOK_URL=' wd_assist->hook_url zlv_hook_url into zlv_hook_url
    I hope your question is answered.
    What I want to now is: How to controll the HOOK_URL so that the formfields of the extenal catalog is added to the shopping card. Do you now that ?
    John

  • Displaying both ABAP webdynpro and Java Webdynpro tasks in the UWL

    Hi,
    We have two an issue when trying to get the UWL to process two different types of workflow tasks : ABAP webdynpro and Java webdynpro. 
    Examples of these tasks are:
    TS12300097 u2013 LeaveRequestApprover u2013 Java Webdynpro
    TS17900100 - ASR_PROCESS_EXECUTE u2013 ABAP webdynpro
    We have two backend systems configured
    SAP_ECC_Financials u2013 This has the WAS host pointing to the java stack (xxx:50000)
    SAP_ECC_Workflow u2013 This has the WAS host pointing to the ABAP stack (xxx.80xx)
    In transaction SWFVISU all the tasks which use Java webdynpro have been configured to use the u2018Javau2019system (SAP_ECC_Financials) using the SYSTEM_ALIAS parameter
    In the UWL configuration the system SAP_ECC_Workflow has been registered
    In addition to this all u2018Javau2019 tasks have had an extra UWl config XML created to ensure that the SYSTEM_ALIAS is set to SAP_ECC_Financials
    The system SAP_ECC_Workflow has been re-registered
    The UWL cache has been cleared
    However when we try to launch the java webdynpro tasks the system is trying to access the ABAP stack (It is still trying to access the Web AS location for the system SAP_ECC_Workflow even though the system alias was specified as SAP_ECC_Financials )
    The ABAP webdynpro tasks (in this case a HCM process and form) are launched correctly
    If we try the reverse (i.e  register the Java system SAP_ECC_Financials and change the SYSTEM_ALIAS parameter for the ABAP webdynpro tasks to system SAP_ECC_Workflow)  then the reverse happens.  The java tasks can be launched and the ABAP tasks cannot.
    Does anyone have a solution to this problem.  Surely other people have implemented both ABAP and Java webdynpro workflows?
    Any help much appreciated
    Andrew

    Thanks  a lot for all your replies..
    The workitem type registration has been done already, but still it doesn't work..
    But here is the actual problem...
    There is a link 'Execute Workitem' in the inbox of the approver, or the second level manager...
    In the leave application, when we click on this link it is taking to the portal as the task is the Webdynpro Java application task. Whereas, when using ABAP webdynpro application task, it is taking to R/3 - which means that the user cannot access this link without R/3 access. The users are given only portal access, they don't have access to backend R/3.
    The requirement is that the link has to take the user to portal directly instead of R/3 - i.e it should ask only for the portal id and password.
    Since it was working fine with leave application, I changed the task to Java webdynpro task, but I think the Java Webdynpro application is not deployed in the server.
    Please can anybody suggest.
    Best Regards,
    Sushmitha

  • Problem in retriving workitem id from uwl in abap webdynpro

    Hello,
    Curently, I've a problem similar with this post : Problem in retriving workitem id from uwl in abap webdynpro
    But unfortunatelly there is no answer :/
    I've followed this tutorial : http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal
    And I have a problem in my WD Abap. The WI_ID field is empty (initial).
    Here is my XML :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE UWLConfiguration PUBLIC '-//SAP//UWL1.0//EN' 'uwl_configuration.dtd'
      >
    <UWLConfiguration version="1.0">
         <ItemTypes>
              <ItemType name="uwl.task.webflow.TS90000087.ED1CLNT100" connector="WebFlowConnector" defaultView="DefaultView" defaultAction="launchWebDynPro" executionMode="default">
                <ItemTypeCriteria systemId="ED1CLNT100" externalType="TS90000087" connector="WebFlowConnector"/>
                <Actions>
                   <Action name="launchWebDynPro" groupAction="" handler="SAPWebDynproABAPLauncher" returnToDetailViewAllowed="yes" launchInNewWindow="yes" launchNewWindowFeatures="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no">
                     <Properties>
                        <Property name="WebDynproApplication" value="zps_pnpi"/>
                        <Property name="newWindowFeatures" value="resizable=yes,scrollbars=yes,status=yes,toolbar=no,menubar=no,location=no,directories=no"/>
                        <Property name="DynamicParameter" value="WI_ID1=${item.externalId}"/>
                        <Property name="openInNewWindow" value="yes"/>
                        <Property name="WebDynproNamespace" value="sap"/>
                        <Property name="System" value="ED1CLNT100"/>
                        <Property name="display_order_priority" value="5"/>
                     </Properties>
                     <Descriptions default=""/>
                   </Action>
                </Actions>
              </ItemType>
         </ItemTypes>
    </UWLConfiguration>
    Here are the parameter defined in my application :
    WI_ID     000000000000     SWW_WIID
    WI_ID1     ${item.externalId}     STRING
    And, i've made the test with both the WI_ID and the WI_ID1 in the XML but everytime, no value at all.
    Could you please help me ? It's been three days I'm looking for a solution to get my Workitem ID in my Webdynpro ...

    In fact, it's quite strange, I added the menu and toolbar display and I can see that my url contains the data ...
    http://<begin_of_the_url>DynamicParameter=System%3DED1CLNT100%26wi_id%3D000000629442%26WI_ID%3D000000629442%26WI_ID1%3D000000629442<end_of_the_url>
    So ... how is it possible ?
    And the next question, how can I get the full url so I can parse it myself ?

  • How does ABAP webdynpro architecture works......

    Hi experts,
    I am new to Abap webdynpro and i have a task to finish.
    Basically i gone through many documents on WDA, but was able to understand very little.
    I have following questions --
    1. When u create component, what is the use of component controller?
    2.. What exactly context and context node difference? Do we need to create an attribute(input box, button etc), under one context?
    3. How can i read the date entered by user? where to read? If i want to read a particular iinput box data and save it to database table, how and where it has to be done?
    4. How can i read the table data, complete table of UI?
    5. What is an interface controller/component?
    I still have lot of doubts about understanding MVC architecture, but I am so so sorry as I have little scope OO abap, so fining difficult to understand.
    Kindly if someone explain me I would be greatfully thankfull to you.
    Thanks in advance,
    Niraja.

    Hi Niraja,
    I am replying to your questions 1 by 1.
    +When u create component, what is the use of component controller?
    +
    Ans A component controller contains the context,attributes, methods etc for a component. No component can exist without this.Even a view has its own controller having same contents.
    All the tabs which you see after clicking on COMPONENT  CONTROLLER constitute the controller.
    What exactly context and context node difference? Do we need to create an attribute(input box, button etc), under one context?
    Ans: Context itself is a context node, but the only difference is that its the root and has unchangeable properties.It has a fixed cardinality of 1..1 where as a node can have different properties.
    All nodes and attributes for different UIs are created in the context only.
    How can i read the date entered by user? where to read? If i want to read a particular iinput box data and save it to database table, how and where it has to be done?
    Ans: Data can be read in form of nodes and attributes. Every UI element for example an Input field will be bound to a attribute.
    You can read these values by code ( use CODE WIZARD).
    You can code in any methods given under method tabs.
    You can create your own methods like event handlers for buttons and different events. You can write all your queries in these methods
    +How can i read the table data, complete table of UI?
    +
    Ans: If u mean by reading the whole node data, I would suggest you to use code wizard and understand the code.
    5. What is an interface controller/component?
    Ans: If you want to share your component and make it available for use in other components you define your make your methods and context visible in this controller .
    Please see the link below for whole Web Dynpro ABAP help.
    [WD ABAP|http://help.sap.com/saphelp_nw04s/helpdata/en/43/1f6442a3d9e72ce10000000a1550b0/frameset.htm]
    I would suggest you to understand things and try them and then come with doubts.
    Regards,
    Sumit Oberoi

  • Whether Workflow Program Exit works in ABAP WebDynpro

    Hi,
    I have the custom  workflow in which in each task i have given a program exit to update the status into my custom tables.
    Now i'm in doing the change in workflow, that it should call the abap webdynpro screen, where the user decisions has to be made.
    I'm getting the Workitem id from the UWL and then it lauches the Web Dynpro to choose either Approve, Reject or Change etc along with some other travel expense information.
    Now once i complete the web dynpro by calling the method 'SAP_WAPI_WORKITEM_COMPLETE', the particular work item is completed.
    I want to ask whether before this FM is called,whether the Program Exit which i have written in the Class method and which is called in the Workflow, whether it triggers or not?
    Regards,

    It is calling the workflow program exit before the SAP_WAPI_WORKITEM_COMPLETE function module.
    So closing the thread.

  • How to Trigger a Workflow from ABAP Webdynpro

    Hi All Gurus,
    I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
    I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
    Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
    Regards,
    Pratima Jain

    Hi,
    If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
    But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
    There are 3 layers  1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
    2. Workflow
    3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
    for more documentation, please refer it on help.sap.com.
    http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
    hope this helps.
    Best Regards,
    Saujanya.

  • How to get workitem id in ABAP-Webdynpro application

    Hai All,
    When a user clicks on a work item in universal worklist, a ABAP-Webdynpro screen is called. I want to pass the workitem number to this ABAP-Webdynpro application. 
    Please let me know how to pass this.
    Thanks & Regards,
    H.K.Hayath Basha.

    Hai Kari,
    Thanks for the link, i am looking into it.
    Hai Naresh,
    Where should I give this link,
    http://abc.com:8001/sap/bc/webdynpro/sap/ztest? param1= Val
    What I have done is,
    In SWFVISU transaction I maintained the following entry,
    Task = TS99000208
    Visualization Type = WD_ABAP
    Visualization Parameter  Visualization Parameter value
    APPLICATION            =  ZWD_OFFICIAL_012
    NAMESPACE            =  SAP
    and registered this task in in universal worklist.
    Where the specify the code you mentioned. 
    Thanks & Regards,
    H.K.Hayath Basha.

  • ECatt - ABAP WebDynpro - Floorplan Manager

    Does anyone know how to create eCatt scripts for ABAP WebDynpro applications that contain Application Configurations using the Floorplan Manager.  We are using SRM 7.0 and all user transactions are WebDynpro based. In order to regression test changes to certain development objects we want to utilize eCatt.  However, the WebDynpro applications all use the Floorplan Manager concept in SRM.  So, there is one basic WebDynpro Application Component (FPM_OIF_COMPONENT).  There are multiple WebDynpro Applications defined (in our example, /sapsrm/wda_l_fpm_oif) for this one application component. Within this Application, there are multiple application configurations (in our example /SAPSRM/WDAC_I_FPM_OIF_SC_PROF). 
    Does anyone know if:
    A. eCatt supports WebDynpro ABAP (I have seen many old posts that indicate WebDynpro ABAP is not supported but nothing recent)
    B. How to create test scripts using Application components with multiple applications and multiple application configurations.
    Thanks!

    Thanks Thomas for your quick reply.
    Thomas Jung wrote:
    Testing is done via Web Dynpro Application.  So you would need to create an application (even if just temporary for testing) for each configuration set that has the application configuration built into the application parameters.
    A point of clarification:
    Within the WebDynpro Component (FPM_OIF_COMPONENT in my example), I would need to create a new Application and then a new Application Configuration that is an exact copy of the Application configuration used in the standard SAP ?  If yes, that is a significant undertaking for these new SRM applications. Since this Floorplan Manager concept seems to be the wave of the future is there any plan to allow eCatt to use the input of the Application Configuration rather than (or in addition to) the WD Application itself?
    Regardless, thanks again, I have been searching for this answer for a few days now.

  • Attachments from Workflow to ABAP Webdynpro launched from UWL

    Hi All,
    You might have seen a recent post from me for sending attachments from ABAP Webdynpro to Workflow.
    I could do that by just calling SAP_WAPI_ATTACHMENT_ADD. I didnt have to create an instance of the SOFM object
    by passing the ATT_ID from this function module.
    Now the next task of the workflow which is sent to UWL, automatically carries the attachements in the Workitem.
    I didnt do binding from workflow container to Task container. (I dont know how!!)
    But I need to get those attachments on my ABAP Webdynpro after it is launched from UWL.
    For this I am using SAP_WAPI_GET_ATTACHEMENTS. But this FM is giving me the BOR reference.
    How do use this to get the attachments displayed on my Webdynpro as links?
    Thanks
    Deb

    Hi Debabra,
    I have similar requirement where I want to add new attachment from Webdynpro abap to workflow and again next level want to view it in UWL in another Webdynpro abap from workflow.
    I am trying to attach the document from Webdynpro to Workflow I used FM SAP_WAPI_ATTACHMENT_ADD and looks like it attached in workflow.
    Can you please tell  how the second part was solved where I want to attach document from workflow to Webdynpro abap
    Thanks,
    ST

  • Is it possible to launch a Screen Personas screen from an ABAP WebDynpro application?

    I am running SAP EHSM Incident Management within SAP Portal. EHSM has an ABAP WebDynpro frontend based on BOPF/FPM
    In the same portal session for a single user, we want to be able be in an
    active record in EHSM and then launch a screen personas screen based on a
    SAPGUI transaction from either a button click or portal tab click. As part of
    the launch, we want to pass an HR PERNR ID to the Screen Personas/SAPGUI
    transaction from the active record in EHSM and run a search. Is it possible to
    do this? Project team is saying this is a technical limitation.
    I know that Screen Personas cannot be used for a WebDynpro screen, but we just want to launch a screen and pass a parameter. We assumed during blueprint this would be possible.
    Thanks

    This is definitely possible.
    Here is a link containing an example of building the URL to start a transaction via Personas and pass a variable plus a command in the URL. This could be enhanced with specifying the flavor as well.

Maybe you are looking for