Dynamic DropDowns using Web Dynpro for ABAP

Hi,
I'm creating my first Web Dynpro for my new client.
The requirement is this:
There are three fields to be displayed on a screen - FieldA, FieldB, FieldC.
All three should appear as DropDowns on the screen.
FieldA determines the possible value list of FieldB.
Once Field B is selected, FieldA and FieldB determines the possible value list of FieldC.
Each of the fields have their own "master" and text tables.  (eg: like T005 and T005T).
There is also a "matrix" table that contains all three fields (as Primary Keys).  Note: There is also a "Disabled flag" field.
So basically we have 3 tables containing the master records.
We use these values to build a matrix of combinations:
FieldA   FieldB   FieldC   Disabled
A111     B111     C111     ' '
A111     B111     C222     ' '
A111     B111     C333     'X'
A222     B111     C111     ' '
A222     B111     C333     ' '
A222     B222     C111     ' '
Now, we want to display the three fields on a Web Dynpro View.
I've created View Context as follows:
CONTEXT
  +-- Header_Data (node)
      +-- FIELDA_NODE (node)
          +-- FIELDA_CODE (attribute)
          +-- FIELDA_TEXT (attribute)
FIELDA_NODE is based on the Disctionary Structore of FieldA's text table (which contains, the LANGU field, and the FieldA Code and Text fields)
Cardinality and Selection are both  0..1
FIELDA_CODE (attribute) has Input Value Mode of "Automatic".  When I chose this, SAP derived the Type of Input Help as "Search Help" and Determined Input Help as "ZFIELDA_SH" (which I created using the "master" and text tables).
(Note: FIELDB and FIELDC are defined the same way).
I then created the Layout:
For FEILDA_CODE, I created a DropDownByKey (using the context menu item "Create Container Form").  So now, FIELDA_CODE's property selectedKey is "...HEADER_DATA.FIELDA_NODE.FIELDA_CODE"  (as per above View Context).
Now when I run the Web Dynpro Application, I get the error:
Context Path HEADER_DATA.FIELDA_NODE.FIELDA_CODE Cannot Be Resolved (Last Node Is Empty) ?ꯀ ??
Can anybody help with this?
I have no idea why it's doing this.  I assume I've missed a step or done something completely wrong!
I've tried DropDownByIndex for FIELDA_CODE, and got the error message:
The ASSERT condition was violated.
(Note: One way that does work is to create a Supply Function (node property) for the FIELDA_NODE.  And create a DropDownByIndex for the FIELDA_TEXT field/attribute.)
But, I feel this should be un-necessary.  Since I have the master and text tables, I have the Search Help, I should be able to create a DropDownByKey field - without need for any coding.
Also, once FieldA is working.
How can I restrict FieldB and FieldC (based on the matrix table above)?
I created an OnSelect event for FIELDA, but in the EventHandler module I wasn't sure
(1) what was the easiest way to get the selected value of FIELDA, and
(2) how to the restrict the possible values of FIELDB.
Any help would of great value!
Thank you in advance.
Rajendra
PS:  Sorry for the long winded explanation, but it's the only way to describe what I've done so far.

Hi Rajendra,
In order to use a DropDownByIndex the needs to be set to multiple. Currently, the node is 0..1. Please set it to 0..N and it should work.
The reason why the DropDownByKey does not work is that the node has no element. Using 0..1 means that initially no element is present. You need to supply one.
In summary, a better design would be to decouple the places where the dropdownbykey and dropdownbyindex get their data from or to use two dropdownbyindex with a master/detail relationship.
Best regards,
Thomas

Similar Messages

  • Modify SAP data using Web Dynpro for ABAP

    Experts,
    I have a question. We all have working in web Dynpro to create report.
    I was trying to display the data in table and update the data.
    When I click on Save button the data should be saved in the SAP table.
    SAP table may be standard or user-defined table.
    Any idea of how to do it???
    Answers will b rewarded.
    Thanks in Advance
    Edited by: Router on Mar 11, 2008 12:06 PM

    Hi,
      The solution to this is very similar to the reports that we write.
    1. Create a context node from the dictionary element in the view of the webdynpro component.
    2. Now you may be displaying/editing this data in the form of a table in the view layout. For this create a table in the layout and bind the fields of the context to the node you created from the dictionary table in the context.
    3. In the layout you also want to have a button SAVE. on the event of this button. Write the code from code wizard where in
      a. Read the context of the dictionary table from the context.
      b. call method
    CALL METHOD lo_nd_group->get_elements
        RECEIVING
          set = lt_ddictable.
      c. update the database table using the internal table lt_ddictable.
    Hope you find this helpul.
    Regards,
    Kinshuk

  • Mulitple Line column headers for a column in ALV using Web Dynpro for ABAP

    Hi WD4A Gurus,
           I have requirement to display the header name in multiple lines for a single column using ALV. How to achieve this, do I need to do some custom code? Please help me with sample code.
    Example:
    existing column name :
                Name   |  Date (mm/dd/yyyy) | Amount
    required column name:
                Name   |    Date               | Amount
    (mm/dd/yyyy)
    Thanks
    Ketan

    Displaying header in multiple lines is not possible in alv
    Regards
    Tamil

  • 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.

  • Troubles with Windows 7 Enterprise and Web Dynpro for ABAP

    Hello together,
    we've installed Windows 7 Enterprise and IE 8 and are using Web Dynpro for ABAP.
    Since this installation on one Client, it is not possible to use the WD application - the sites seems to be frozen!
    I know the fact, that SAP will support Windows 7 in March 2010 but it would be very helpfull if someone could give me a hint to solve this problem before.
    Thanks in advance,
    Andreas

    >
    Andreas Damberger wrote:
    > Hello together,
    >
    > we've installed Windows 7 Enterprise and IE 8 and are using Web Dynpro for ABAP.
    > Since this installation on one Client, it is not possible to use the WD application - the sites seems to be frozen!
    >
    > I know the fact, that SAP will support Windows 7 in March 2010 but it would be very helpfull if someone could give me a hint to solve this problem before.
    >
    > Thanks in advance,
    > Andreas
    Hi,
    Go to internet explorer -> tools -> internet options -> Advanced
    There locate the check box "Enable memory protection to help migrate online attacks" and uncheck it.
    Let me know if that works.
    Regards
    Prasenjit

  • ESS framework in web dynpro for ABAP?

    Recently, I need to start an ESS project using web dynpro for ABAP. Unlike web dynpro for java, we have ESS framework in every track, like pcui/xx DCs and ess/per DCs in the track. And as there are existed projects in the DCs like ESS/JP/ADDRESS, we can just follow suit.
    My question is: are there ESS frameworks in web dynpro for ABAP? Or existed ESS projects based on web dynpro for abap?
    Thanks for your help!

    Hi,
    As far as i know, it would need really a huge amount of effort to develop ess on Webdynpro for ABAP. As you know that it is not a part of SAP standard delivery, you really have to start it from the scratch.
    It would be a custom developed application.
    Regards,
    Sharadha

  • Alternative for web dynpro for abap

    Ok,
    After a previous question we found out that if we want to use web dynpro for abap, we should upgrade to NW2004S.
    Now, are there alternatives for web dynpro for abap?
    currently (WAS 6.20 - R/3 4.7)
    Thanks in advance,
    Tom

    Hi Tom.
    On 6.20 you can use BSP. But this is not a real alternative to WD4A when lookin at the comfortable development. But a alternative as web application technology.
    Cheers,
    Sascha

  • Is Web Dynpro for ABAP accesible?

    Hello All,
    Our application in EP was developed using Web Dynpro for ABAP and POWL.
    I wanted to know if Web Dynpro for ABAP is accessible ?
    Awaiting your inputs,
    Thanks & Regards,
    Smitha

    Hello Smitha,
    The Answer would be YES.
    Webdynpro appliations are very well accessible In EP.
    Same applies to POWL also.
    Infact POWL is nothing more than webdynrpo application framework which is controlled through a feeder class.
    Regards,
    Kiran

  • New to web dynpro for abap

    HI Team.
    I am new to web dynpro for abap .
    I am trying to develop a sample application using web dynpro for abap
    for that I am making use of SAP ECC 6.0 system.
    I created the the application by following steps in pdf.
    It is a program which makes use of BAPI_FILGHT_GETLIST
    I have created city from and city to two input fields once i enter the data and click on serach flights
    it must display all the filght details in a table format
    Problem i am facing is that data is not coming into the table.once i click the button.
    Do I need to perfrom any settings like rfc destinations ?
    I do not think so because I am trying to make use of the bapi which in the ecc 6.0 system
    please help me out
    thanks in advance

    Hi,
    You posted your question in the wrong forum. This forum is for Business intelligence.
    Did you activate your Web dynpro component? You can do it in the transaction SICF.
    In this transaction, you can expand according to the below path..
    /default_host/sap/bc/webdynpro/sap/<your webdynpro component>.
    Here you right click and YourWdComponent and select Activate.
    Regards
    Nages

  • Using Native SQL in Web Dynpro for ABAP

    Hi folks,
    I am trying to access an oracle database in web dynpro for ABAP via Native SQL.
    I am able to read row by row from the database into a work area, but I am unable to read the whole table from the database into an internal table.
    Please advise as to how I can do this, and thanks for reading.
    PS: Thomas, I wasn't off-topic on the previous thread; I forgot to mention that I was trying to do this under Web Dynpro for ABAP.

    Hello,
    it doesn't matter if you try this with Web Dynpro ABAP, BSP or any other framework, this is a general ABAP question and not related to this forum.
    Regards,
    Rainer

  • N4S: Web Dynpro for ABAP layout editor not working

    Have problem in Layout editor in Web Dynpro for ABAP
    I have installed NW04S Testdrive on 64bit Linux and able to login.
    SE80 is working alright.
    Next I create a Web Dynpro Comp. / Intf. and create a component.
    I double click on the View name "V_Default" . The Layout editor opens on the right side. Change into Edit Mode.
    The "View Elements" panel on the left side of layout editor is missing. This is where we select the various elements like "Textview" etc.
    Even the right click on the "ROOTUIELEMENTCONTAINER" to insert elements using context menu does not work.
    In summary I am not able to add any element in WD4A Layout screen.
    Is there any special plugin required to be installed?
    How to solve this problem?

    you cannot develope Webdynpro for ABAP using ECC5
    This is available with netweaver 2004s (WAS7.0) for which ramp up is going on right now and the general availability is expected sometime around 1st quarter for 2006.
    Regards
    Raja

  • Can I Design a Forum with using web dynpro for java?

    Hi All:
        Can i design a forum with using web dynpro for java?
        I want to design an application like a simple forum which maybe has many replies.So if i use
    the UI technology "web dynpro for java", i will to create UI elements dynamically.How can i control this
    dynamical UI elements to keep layout ?

    Hi,
    yes you can do that....
    for exaple if you observe SDN...
    you can imagine like....
    A big Transparent Container(TC)....
    Inside that number of other TCs(depending upon the question nd its replies...)....
    In side each TC, again around 9 UIElements....
    one for menioning what is the question/reply?
    other for your description of question/reply...
    other for your name,
    displaing your fourm point... etc...
    So it will be
    for(loop till your (Question+No of replies))
    Create Transparent Container....
    Add Childs to the Container...
    Decide your layout....
    In case if you want to know how to create UIElements dynamically....
    http://help.sap.com/saphelp_nw04/helpdata/en/4f/07cf3dd28b5610e10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/dynamic%2bui%2bgeneration
    Regards,
    Srinivas.
    Regards,
    Srinivas.

  • Import Data from Office Control (Web Dynpro for ABAP) into internal-Table

    Hello,
    I have a question concerning the Office Control UI-Eelement in Web Dynpro for ABAP:
    How can I import spreadsheet data from the Office Control into  a internal-table?
    I have an Excel-sheet (without any data) which is shown initially in the Office Control. First the empty Excel-Sheet will be loaded and in the second step data from an alvxml-transformation will be loaded into the Excel-sheet with the method 'activatexmlsource'. This works so far. When I change the loaded data in the Office Control and save it it will be stored as XLS-File. The problem is that I'm not able to use existing Upload-FM because every function module I tried uses GUI-functions and WebDynpro has no GUI-functionality. I always get the error that data from clipboard cannot be imported.
    So now the question is:
    How can I import changed data from the Office control into a internal-table staying in Web Dynpro application?
    Please give some advice, if you have some useful code or ideas.
    Thanks
    ram
    Edited by: Ramakullay Challa on Sep 24, 2009 9:05 AM
    Edited by: Ramakullay Challa on Sep 24, 2009 9:07 AM

    Hi,
    Once you save to desktop again you have made some changes to that file, this file you want to upload it right.
    Then in that case you need to use the FILEUPLOAD UI element right.
    Regards,
    Lekha.

  • How to confirm program version in Web Dynpro for ABAP

    Hello expert
    I would like to know how to confirm the program version for Web Dynpro for ABAP.
    For ABAP we can confirm version using SE38.
    Best regards,
    Ichimura

    everything has a version
    View has a version.
    controllers have versions
    WD component also has version
    so double click on what you need and the follow the path

  • Issues with portal integration of Web dynpro for ABAP application

    Hi,
    I have the following issues when i integrate a Web Dynpro for ABAP application with portal.
    1. the iview does not contain some images, such as table scroll button images, maximize and close buttons of popups etc.
    2. the iview loads properly, but there is an error in the status bar that says "Access denied"
    3. is it possible to do absolute navigation from
       role1->folder1->iview1 to role1->folder2->iview2?
       when i fire this navigation from the webdynpro
       application, the navigation does not happen in the
       portal.
    thanks,
    Kavitha

    >
    sridhar vadaga wrote:
    > Hi Experts,
    >
    >
    > CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
    >   EXPORTING
    >     text           = url
    >  IMPORTING
    >    BUFFER         = content .
    >
    >
    > Thanks & Regards
    > Sridhar
    I think you are overestimating the power of the SCM_STRING_TO_XSTRING function module.  By supplying a URL as the value of the input text, it isn't going to magically go read the content from the remote location and convert that to a binary string.  It is going to take whatever value you supply in th importing TEXT parameter convert that to binary.  In other words it is literally converting the string http://xxx/test.xls to binary.  You will need some other mechanism to read the content from the remote location into ABAP memory before you can process it.  You will need to use the CL_HTTP_CLIENT class or call some sort of web service to retrive the content.

Maybe you are looking for