Dynamic Transparent Container

Hi,
I am new to Web Dynpro. I have the following problem.
How to set Streched horizontal property in Transparent Container dynamically?
Thanks,
Peter,

hi
hope it will be very helpful
IWDTransparentContainer transNew=(IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"TranName");
transNew.createLayout(IWDMatrixLayout.class);
transNew.destroyAllChildren();
IWDMatrixLayout gl=(IWDMatrixLayout)transNew.createLayout(IWDMatrixLayout.class);
gl.setStretchedHorizontally(false);
gl.setStretchedVertcally(false);
if you give gl.setStretchedVertcally(false);
it will be very compact structure in your view
Regards
Dhinakar J

Similar Messages

  • Generate a dynamic Transparent container in WD

    Hi all,
    i' ve created a Transparent conatiner in where i will write my text, i also created a Button (ADD)
    what i want now is, after clicking on the (Add) Button, a new Transparent container will appear, 
    how can' I do this dynamically??  i dont want to create 10 or 20 transparent container in my main view, i want to create  only one, and after clicking on the Add Button, an other one will appears,
    is there a way or any method to do this?
    thank you all for your help

    Hello Thomas,
    You could refer the below thread. [thread|Re: How to dynamically generate a transparent container ?]
    all the code required to do things dynamically has to be inside wddomodifyview method of that particular view.
    Since you want that on a click of a button you would like to add a new transparent container, you could create a varible of type wdy_boolean under attributes tab of the view and onaction associated with the button you change that value and you write the code for transparent container in wddomodifyview, and before that could you could have a if statement if variable value is true you would run the below code.
    Regards
    Anurag Chopra

  • Short dump while creating transparent container dynamically

    Hi experts!
    I want to create a transparent container dynamically, but I get a Short Dump (
    Note
    The following error text was processed in the system NSP : Access via 'NULL' object reference not possible.
    The error occurred on the application server Datatrain_NSP_00 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: CREATE_BY_VIEW_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP)
    while doing so. Below my code...
    Can somebody please advise I don't know what I did wrong....
    Thanks in advance!
    Points will be rewarded
    METHOD wddomodifyview .
    DATA: lr_container TYPE REF TO cl_wd_uielement_container,
            lr_matrix_head TYPE REF TO cl_wd_matrix_data,
            lv_hlp_str TYPE string VALUE 'DYNCONT_1',
            lr_trans_cont TYPE REF TO cl_wd_transparent_container.
        lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    CALL METHOD cl_wd_transparent_container=>new_transparent_container
      EXPORTING
        enabled                  = ABAP_TRUE
        id                       = lv_hlp_str
        is_layout_container      = ABAP_TRUE
      receiving
        control                  = lr_trans_cont
        lr_matrix_head = cl_wd_matrix_head_data=>new_matrix_head_data(
                            element = lr_trans_cont ).
        lr_trans_cont->set_layout_data( lr_matrix_head ).
        lr_container->add_child( lr_trans_cont ).

    Hi Felix,
    You need to set the layout first and then set the layout data. Use the method cl_wd_matrix_layout=>new_matrix_layout. Do a set_layout on the container and then do set_layout_data. That should solve your problem.
    Regards
    Nithya

  • Dynamic Programming: Adding Transparent Container to Root Element

    Hi,
    I simply am adding a Transparent Container to the Root Element dynamically and I am getting the error "The ASSERT condition was violated".
    Does anyone have an idea what the problem is.
    Below is my VERY MUCH simplified code:
    method WDDOMODIFYVIEW .
      DATA:
        LR_ROOT TYPE REF TO CL_WD_UIELEMENT_CONTAINER,
        LR_TCONTAINER TYPE REF TO CL_WD_TRANSPARENT_CONTAINER,
        LR_FLOW_DATA TYPE REF TO CL_WD_FLOW_DATA.
      LR_ROOT ?= VIEW->GET_ROOT_ELEMENT( ).
      LR_TCONTAINER = CL_WD_TRANSPARENT_CONTAINER=>NEW_TRANSPARENT_CONTAINER(
        id = 'TCONTAINER_01' ).
      LR_FLOW_DATA = CL_WD_FLOW_DATA=>NEW_FLOW_DATA( LR_TCONTAINER ).
      LR_TCONTAINER->SET_LAYOUT_DATA( LR_FLOW_DATA ).
      LR_ROOT->ADD_CHILD( LR_TCONTAINER ).
    endmethod.

    Found the answer on this link:
    Creating dynamic tranparent container

  • Add a Transparent Container dynamically in wddomodifyview

    Hi All,
    I have added UI Elements to views before. Now, I am trying to add a Transparent Container to a Group, which does not work. I am using the same procedure as I have used it for other UI Elements before, but I keep receiving the dump:
    The following error text was processed in the system JIL : Access via 'NULL' object reference not possible.
    The error occurred on the application server SV-SAP-2_JIL_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: CREATE_NW7_BY_VIEW_ELEMENT of program CL_NW7_VIEW_ELEMENT_ADAPTER===CP
    My code is as follows:
    lo_group ?= view->get_element( 'GROUP' ).
        lo_tc = cl_wd_transparent_container=>new_transparent_container( id = 'TC_SECOND_ELEMENT' ).
        cl_wd_matrix_head_data=>new_matrix_head_data( element = lo_tc ).
        lo_group->add_child( the_child = lo_tc ).
    Why does the coding above not work?? How is the proper coding to add a Transparent Container to my group?
    THANKS, Johannes

    Hi,
    Your coding seems to me fine. Though i am not sure if this line causes the error.
    cl_wd_matrix_head_data=>new_matrix_head_data( element = lo_tc ).
    I normally get this error when the UI element property is not binded correctly. How sure are you that this error is coming  because of this TransparentContainer ?.
    You can comment out the whole and check if this is working.
    Then enable one by one and see if you get it worked.

  • Dynamic programming: Add transparent container to root container

    Hi all,
    I'm trying to add a transparent container to the root container,
    but I´m getting this error: 'ASSERT condition was violated'
    METHOD WDDOMODIFYVIEW .
      DATA: LR_ROOT       TYPE REF TO CL_WD_UIELEMENT_CONTAINER,
            LR_TCONTAINER TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
      LR_ROOT ?= VIEW->GET_ROOT_ELEMENT( ).
      LR_TCONTAINER = CL_WD_TRANSPARENT_CONTAINER=>NEW_TRANSPARENT_CONTAINER( ).
      CL_WD_FLOW_DATA=>NEW_FLOW_DATA( LR_TCONTAINER ).
      LR_ROOT->ADD_CHILD( LR_TCONTAINER ).
    ENDMETHOD.
    Is something wrong with this code?
    Thank you.
    Regards,
    Thomas

    >
    Giscard Rous wrote:
    > I have the same problem.
    > I am getting the error "The ASSERT condition was violated".
    >
    > I have reduced my code to just simply add a transparent container to the rootuielement and I am getting the error.
    >
    > I could not figure out why.  Does anyone have info on this?  Thanks.
    >
    > Giscard
    My problem was the layout, after I added it, the problem was solved.
    METHOD WDDOMODIFYVIEW .
      DATA: LR_ROOT       TYPE REF TO CL_WD_UIELEMENT_CONTAINER,
                 LR_TCONTAINER TYPE REF TO CL_WD_TRANSPARENT_CONTAINER.
      LR_ROOT ?= VIEW->GET_ROOT_ELEMENT( ).
      LR_TCONTAINER = CL_WD_TRANSPARENT_CONTAINER=>NEW_TRANSPARENT_CONTAINER( ).
      CL_WD_FLOW_DATA=>NEW_FLOW_DATA( LR_TCONTAINER ).
      CL_WD_FLOW_LAYOUT=>NEW_FLOW_LAYOUT( LR_TCONTAINER ).
      LR_ROOT->ADD_CHILD( LR_TCONTAINER ).
    ENDMETHOD.
    Hope it helps you.
    Regards,
    Thomas

  • ABAP: Dynamic creation of transparent container

    Hello,
    I have this code and it fails (null pointer exception):
    transparent_container = cl_wd_transparent_container=>new_transparent_container( ).
      cl_wd_grid_data=>new_grid_data( element = transparent_container ).
      ui_container->add_child( transparent_container ).
    What is the problem? Do I need to create transparent container and pass some parameters?
    Thank you.

    Hello Armin,
    yes it is.
    I have some code like this:
      "create a transparent container
      transparent_container = cl_wd_transparent_container=>new_transparent_container( ).
      cl_wd_grid_data=>new_grid_data( element = transparent_container ).
      ui_container->add_child( transparent_container ).
      "create a dropDown with figures
      drop_down_figure = cl_wd_dropdown_by_key=>new_dropdown_by_key( bind_selected_key = 'REPOSITORY.FIGURES' on_select = 'GET_OPERATOR' ).
      cl_wd_grid_data=>new_grid_data( element = drop_down_figure ).
      ui_container->add_child( drop_down_figure ).
    If I comment out code where I create transparent container it works fine and creates dropDown.
    However, as soon as I add transparent container I get NullPointer exception.
    Thank you.

  • Transparent Container Cell Background design

    Hi All,
    I have a scenario where in on click of a link, I'm needed to highlight a transparent container. In Webdynpro JAVA i used to achieve this using Transparent Container -> cellBackGroundDesign -> WDCellBackgroundDesign.BORDER
    What is the equivalent of this in WD ABAP. I do not find any such attribute in particular.
    Any pointers on this will be of great help.
    Thanks & Regards,
    Gayathri Shanbhag

    Hi All
    On switching from flow to matrix layout I found the property cellBackGroundDesign, but it is not bindable to an attribute, in my scenario I'm needed to set the border/highlight dynamically. Please suggest if there is an alternative.
    Thanks & Regards,
    Gayathri Shanbhag

  • Move transparent container from tab to new view

    Hi
    I have a scenario where I wish to move the whole layout structure from a tab to a new view.
    Essentially I want to move from a tabstrip to a roadmap type of development.  My issue is that if I copy the transparent container that houses the whole structure, when I paste the structure all my elements have _CP. Is there any way to paste without have this suffix?
    Cheers
    Ian

    >
    Thomas Jung wrote:
    > I can't think of any offical way of doing this. 
    >
    > I have one suggestion - but it is totally not supported by SAP and if anyone asks you didn't get it from me.
    > You could use SAPLink to export the component to XML.  Once in XML on your desktop, use a text editor to do a mass find and replace.  Then reimport the same object back into your system via SAPLink.
    > [http://code.google.com/p/saplink/|http://code.google.com/p/saplink/]
    >
    > Just curious however - why worry about the _CP on the UI elements at all?  It is just that you don't like the prefix?  I agree it makes things look messy, but if you are correcting binding UI to your context instead of directly coding against the UI elements (with the rare exception of really dynamic stuff) the IDs of the element shouldn't break anything in your application.
    PS:  Obviously monkeying around with the component using find and replace on the XML and importing via SAPLink could be dangerous. I just thought after I posted I should stress the warning a little more.  You probably want to copy your entire component before attempting this - just incase it completely screws things up.

  • How to hide a transparent container and its fields in webdynpro abap

    Hello Friends,
    I am trying to create a view where i want to show some fields based on some other field.
    What i exactly need is When i enter some data in 1 input field .
    Corresponding to that input field few text fields wud be opened automatically in the same view.
    No Pop-ups allowed.
    What i am doing is !!
    i have created another Transparent container for my  text view fields.
    But i  am unable to hide this fields..
    Kindly help..
    At the runtime..
    After entering the value in the input field..
    This transparent container should become visible with the textview fields...
    Gaur Mayank

    Hi,
    Create A Context Attribute (Say  Visible_Hide )of Type WDUI_VISIBILITY with initial value as 01.
    Goto your Container, Bind the Visible Property with Above Created Attribute(Visible_Hide).
    In the Input Field,Use the OnEnter Event and Set the Value to Visible_Hide as 02.
    Then the Container will be Visible.
    Thaks.
    Uma

  • Creating dynamic tranparent container

    Hi,
    I have to create a dynamic tranparent container, i have added the following code , but it gives dump.
    Error : The following error text was processed in the system SCC : The ASSERT condition was violated in Screen.
    Kindly help.
    Code:
    *Create container
      DATA: lr_container1            TYPE REF TO cl_wd_uielement_container,
            lr_tranparent_container  TYPE REF TO cl_wd_transparent_container,
            lr_flow_data_tc          TYPE REF TO cl_wd_flow_data.
      lr_tranparent_container = cl_wd_transparent_container=>new_transparent_container(
           height                   = '10'
           width                    = '20'
           id                       = 'TEST'
      lr_flow_data_tc  =  cl_wd_flow_data=>new_flow_data( element = lr_tranparent_container  ).
      lr_container1 ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
      lr_container1->add_child( lr_tranparent_container ).

    Hi,
    I guess that you are getting the dump coz you have missed out on specifying 1 of the layout properties. If the UI element that you are adding on to your layout is a normal element then you need to just fill its LayoutData property. But however if the UI element is a container element (like a Group, TransparentContainer, Tray...) then you need to specify 2 properties:
    Layout & LayoutData
    The property which you specify for the Layout would be inherited by all UI elements that you would embed within your container element.
    Check the code fragment below in which I am dynamically creating a TransparentContainer & embedding a Caption within it. You can try paste it inside your WDDOMODIFYVIEW method & check the results.
    METHOD wddomodifyview .
      DATA: lr_root_container TYPE REF TO cl_wd_transparent_container,
            lr_trans_container TYPE REF TO cl_wd_transparent_container,
            lr_caption TYPE REF TO cl_wd_caption.
      lr_root_container ?= view->get_root_element( ).
      lr_trans_container ?= cl_wd_transparent_container=>new_transparent_container( ).
    "*** Since you are creating an element of type container. You need to specify 2 layout properties:
    "*** Layout & LayoutData. Layout specifies as to how the layout property which would be inherited by
    "*** any elements that are embedded within this container. Whereas LayoutData controls whether the element
    "*** should appear in the same line or next line. This is useful in layouts like Matrix layout.
      cl_wd_flow_layout=>new_flow_layout( container = lr_trans_container ).
      cl_wd_flow_data=>new_flow_data( element = lr_trans_container ).
      lr_caption ?= cl_wd_caption=>new_caption( text = 'This is my caption!' ).
      cl_wd_flow_data=>new_flow_data( element = lr_caption ).
    "*** Embed the created caption within our TransparentContainer
      lr_trans_container->add_child( the_child = lr_caption ).
    "*** Add the created TransparentContainer as a child of ROOTUIELEMENTCONTAINER
      lr_root_container->add_child( the_child = lr_trans_container ).
    ENDMETHOD.

  • Programatically hide a transparent container

    Hi Experts,
    i am using select options in my application.
    i have made two block for the selec options (transparent container 1 and transparent container 2) by using add_block method of select option.So i cant do the normal context binding as containers are created programatically.
    Now i have a requirement to hide one of the block on click of an event so that the select options inside is also hidden.
    DATA lo_ui_element      type ref to CL_WD_UIELEMENT.
          DATA lo_container       TYPE REF TO cl_wd_uielement_container.
          DATA lo_transc           TYPE REF TO cl_wd_view_element.
    " get root container
         lo_container ?= view->get_root_element( ).
    *" get button reference
         lo_transc ?= lo_container->get_child() // Get the tray which container the view container of select options.
    then inside this i have the transparent container which has the selec options.
    Please help
    Tashi

    Hi Tashi,
    1. Add your Select-Options screen elements(Your blocks) to UI View Container element and bind the context to WDUI_VISIBILITY. Set the visibility depends on your requirement.
    2. You have REMOVE_SELECTION_SCREEN_ITEM method from Interface IF_WD_SELECT_OPTIONS to remove the fields at runtime.
    Please follow the below link
    Creation and Deletion of selection screen elements based on user action
    Hope it helps you
    BR,
    RAM.

  • Dynamic Group containing maintenance mode devices

    Hi,
    I am using a scheduled script to put a large number of items in maintenance mode for periods of time where we do not which to receive alerts or cause DA state changes. For these objects, the time is overnight or weekends.
    The script adds all objects in a dynamic group into maintenance mode. This includes both windows and network devices.
    My issue is that when an engineer manually puts an item into maintenance mode for genuine maintenance purposes, it may be overridden. 
    So my idea is to have another dynamic group containing all objects in maintenance mode, and make it an exclusion in the original group. Is this possible or is there a better way?
    FYI The script I am using for the bulk maintenance mode is based from here:
    http://www.systemcentercentral.com/opsmgr-2012-group-maintenance-mode-via-powershell-the-way-it-should-be/

    Hi,
    We can use below command to get all members in a group:
    $Groups = Get-MonitoringObjectGroup  
    $Group = $Groups | where {$_.DisplayName -eq "Group Name"}   
    $Members = $Group.GetRelatedMonitoringObjects()   
    And with below command we could get all members that in maintenance mode:
    $Members | where{$_.inmaintenancemode -eq $true}
    With set-SCOMMaintenanceMode command we can update active maintenance mode entries.
    http://technet.microsoft.com/en-us/library/hh920197(v=sc.20).aspx
    Regards, Yan Li

  • Transparent Container UI Element

    Hi
    I am new to Web Dynpro for ABAP and have been tasked with the creation of a complex input screen with a tabbed strip of 12 tabs with 7 columns on each tab.  Each column also has multiple input fields on it. 
    My question is in the design of the screen.  I am currently equating the Transparent Container as an (X)HTML DIV tag for my screen formatting.
    Would this be a fair assumption?
    Are there any documents on screen design?
    Regards
    Ian

    Ian,
    For HTML client TransparentContainer is in fact rendered as DIV element. Though, it may be changed.
    Anyway, this is quite safe analogy.
    For your task you may use either:
    1. Matrix/Grid layout of Tab content and no Transparent containers at all. You may get columns effect using layout only.
    2. Matrix layout with 7 columns (one row) and transparent container in every cell. Use this only if [1] is not suitable, i.e. when layout in every column differs too much.
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • On-Enter action/ event on UI Elements Transparent Container/ Tray

    Dear Experts,
    Is there any way to implement the On-Enter action/ event on the UI Elements Transparent Container/ Tray?
    Thanks.
    Tee

    Hi Tee,
    As such there is no OnEnter event for either tray or transparent container but tray has some other events like onToggle associated with it.
    Refer this online help: http://help.sap.com/saphelp_nw70ehp1/helpdata/en/42/b6836382323122e10000000a1553f7/content.htm
    I hope it helps.
    Regards
    Arjun

Maybe you are looking for

  • While saving the output from Conc Prog it saves in .PCL instead of .XLS

    Hi, I have one concurrent program which gives Excel Output directly without using XML Publisher. Using following Link I have designed the same. [http://knoworacle.wordpress.com/2008/11/03/excel-output-directly-from-oracle-application-concurrent-reque

  • Not alphabetizing

    I have one song that is not alphabetizing itself in the Album column. I have tried changing the name of the album and still no go. It act's like it doesn't have an album name. If I sort by artist I find that song listed as the 1st one by that artist.

  • What settings to apply to imported audiobook cassettes

    How can I import mp3 files stored in folder on PC, that I have ripped from cassette tape, and transfer these to Ipod Classic so that they show as 'chapters' within a 'book' rather than separate entries under Audiobook menu as they currently are doing

  • Problem in posting Goods received( T-code:MIGO_GR-GR FOR P.O.)

    Hi All Experts, I am a self learner for SAP MM.Im haveing following problem when Im trying to do posting in MIGO T-CODE...first its was saying that posting is only allowed in 2007/02 & 2007/01..then I closed the periods in MMPV up to 12/2007 but now

  • Remote Attachment Store Install Procedure

    I installed our remote Attachment Store on the same physical server as the backend MySQL DB. The procedure I used was to install the CalDav component (v7.2-4.19) from CommsSuiteR7u2. I then ran configure-as, but no init-config. Is this the correct pr