Re: Create dynamic widgets.

Hi Kang,
The attached pex contains a window class, which first adds a gridfield to the
window and then inserts 5 toggle fields into it. Clicks on the dynamically
created toggle fields are captured via the ChildClick event on the parent
gridfield.
The resulting window is not pretty (or even useful), but will, I hope,
provide you with some pointers.
At my site, we are working with version 3d. To my delight, I have found that
the widgets can be added to the window before it is opened. With previous
versions, the window had to be open prior to adding any widgets to it.
J. Bryan Johnson

Hi,
I've attached an example of creating datafield and textgraphic dynamically. You may use it as a reference to create toggle field at run time.
Cp wong.
-----Original Message-----
From: Kang Holmes [SMTP:[email protected]]
Sent: Tuesday, August 19, 1997 2:58 AM
To: [email protected]
Subject: Create dynamic widgets.
(436.3 7-23-1997)) id 852564F7.0068E2E0 ; Mon, 18 Aug 1997 15:05:38 -0400
X-Lotus-FromDomain: WORLDBANK
Hi,
Is there anyone can give me some help on how to create dynamic widgets? I
need to build a group of toggle field at runtime and put them in a window
that is generated by Express. I could not find any documents or samples on
how to do that. Do I need to create a gridfield first and insert the
widgets into that gridfield in the tool code?
I appreciate any suggestions and/or samples.
Kang

Similar Messages

  • Creating dynamic widgets

    We have a question on how to create something similar to a dynamic arrayfield
    without mapping to an array.
    We would like the similar behavior of an HTML table with ability to add rows
    and columns with values.
    We have looked at using ActiveX but are not happy with the way Forte interacts
    with these widgets, so we are looking for a Tool
    solution. Any help or ideas would be appreciated.

    I've been trying for a while to get the ArrayField working, but it seems to
    be designed for mapping onto objects that exist at runtime. Dynamic
    adjustment of the number of colums in the ArrayField just doesn't seem to
    work. So far the only solution i've found is creating a GridField and
    filling it with DataFields. You'd have to add you're own code for the
    scrollbar and implement the scrolling. As far as i've found out there is no
    other usable Tool solution. I can't give you any examples cause this is
    where i stopped looking into it. Good luck.
    Hedzer van Dijk
    KPN Software Huis
    Tel: (050 58)54149
    E-mail: h.j.vdijkkpn.com <mailto:h.j.vdijkkpn.com>
    -----Original Message-----
    From: Stanley.L.Yeebankofamerica.com
    [mailto:Stanley.L.Yeebankofamerica.com]
    Sent: Tuesday, August 22, 2000 12:04 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Creating dynamic widgets
    We have a question on how to create something similar to a dynamic
    arrayfield
    without mapping to an array.
    We would like the similar behavior of an HTML table with ability to add
    rows
    and columns with values.
    We have looked at using ActiveX but are not happy with the way Forte
    interacts
    with these widgets, so we are looking for a Tool
    solution. Any help or ideas would be appreciated.
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Create dynamic widgets.

    (436.3 7-23-1997)) id 852564F7.0068E2E0 ; Mon, 18 Aug 1997 15:05:38 -0400
    X-Lotus-FromDomain: WORLDBANK
    Hi,
    Is there anyone can give me some help on how to create dynamic widgets? I
    need to build a group of toggle field at runtime and put them in a window
    that is generated by Express. I could not find any documents or samples on
    how to do that. Do I need to create a gridfield first and insert the
    widgets into that gridfield in the tool code?
    I appreciate any suggestions and/or samples.
    Kang

    Hi,
    I've attached an example of creating datafield and textgraphic dynamically. You may use it as a reference to create toggle field at run time.
    Cp wong.
    -----Original Message-----
    From: Kang Holmes [SMTP:[email protected]]
    Sent: Tuesday, August 19, 1997 2:58 AM
    To: [email protected]
    Subject: Create dynamic widgets.
    (436.3 7-23-1997)) id 852564F7.0068E2E0 ; Mon, 18 Aug 1997 15:05:38 -0400
    X-Lotus-FromDomain: WORLDBANK
    Hi,
    Is there anyone can give me some help on how to create dynamic widgets? I
    need to build a group of toggle field at runtime and put them in a window
    that is generated by Express. I could not find any documents or samples on
    how to do that. Do I need to create a gridfield first and insert the
    widgets into that gridfield in the tool code?
    I appreciate any suggestions and/or samples.
    Kang

  • Dynamic Widgets

    Hi all,
    I have been doing something with Dynamic Widgets whereby I have a Dynamic
    SQL that retrieves data from a table in my database. Because of the
    dynamic nature of the SQL, I wanted to create dynamic widgets to
    display the retrieved data. I have managed to create a list of
    dynamic widgets on a window that displays all the data retrieved. But I
    do have certain problems that I have come into. Here's the list :
    1.) After dynamically generating some datafields, which I have set
    the WidthPolicy to SP_NATURAL, I still find that certain datafields
    (the address datafield) too short. It is still not accomodating the
    full length of my data. Any other way to set that?
    2.) According to the Adv. App. Dev. course, we can place the dynamic
    widgets into a gridfield so that they align automatically. I have
    done that... but I also find that if my retrieve results go to about
    50 rows, the gridfield would be enlarged,thus enlarging my window to
    a size that is larger than my monitor. I was hoping that there's a
    way that Forte could automatically create horizontal bars and
    vertical bars on the window form so that we could scroll through the
    results. Is that possible? Any workarounds if that's not possible?
    Thanks,
    Steven Wong,
    Distributed Objects Sdn Bhd
    Suite 5.04,
    Level 5, Wisma Inai,
    Jalan Tun Razak,
    Kuala Lumpur.
    Tel : 603 466 0372
    Fax : 603 466 0373
    Email : [email protected]
    [email protected]

    I've been trying for a while to get the ArrayField working, but it seems to
    be designed for mapping onto objects that exist at runtime. Dynamic
    adjustment of the number of colums in the ArrayField just doesn't seem to
    work. So far the only solution i've found is creating a GridField and
    filling it with DataFields. You'd have to add you're own code for the
    scrollbar and implement the scrolling. As far as i've found out there is no
    other usable Tool solution. I can't give you any examples cause this is
    where i stopped looking into it. Good luck.
    Hedzer van Dijk
    KPN Software Huis
    Tel: (050 58)54149
    E-mail: h.j.vdijkkpn.com <mailto:h.j.vdijkkpn.com>
    -----Original Message-----
    From: Stanley.L.Yeebankofamerica.com
    [mailto:Stanley.L.Yeebankofamerica.com]
    Sent: Tuesday, August 22, 2000 12:04 AM
    To: forte-userslists.xpedior.com
    Subject: (forte-users) Creating dynamic widgets
    We have a question on how to create something similar to a dynamic
    arrayfield
    without mapping to an array.
    We would like the similar behavior of an HTML table with ability to add
    rows
    and columns with values.
    We have looked at using ActiveX but are not happy with the way Forte
    interacts
    with these widgets, so we are looking for a Tool
    solution. Any help or ideas would be appreciated.
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • How to create dynamic panel tree view?

    Hello,
         I can create dynamic pallete panel without any problems (from sdk/paneltreeview) , but i can't when it's a panel tree view (from sdk/paneltreeview). I don't know how to initialize it.  Can i call IID_ITREEVIEWWIDGETMGR's impl directly in ActionComponent to create panel widget? and how?
    Thanks in advance.

    solved by self

  • How to mention numbers in array while creating dynamic sql

    Hi,
    I am creating a dynamic sql and in that I am selecting some rows from the table and storing it into the array.
    I am firing this sql statement within trigger.
    But i got the error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I took the same sql statement (the one which was created dynamically) in the procedure and tried to run it but it gave me the same error.
    =========================================================
    Begin
    type NewValueArray is table of varchar2(4000);
    nVal_Array NewValueArray;
    Begin
    Select
    DISCOVERYHOSTNAME,
    DISCOVERYMACPRIMARYPHYSICAL,
    DISCOVERYSERIALNUMBER
    into
    nVal_Array(1),
    nVal_Array(2),
    nVal_Array(3)
    from ALT_42_Consolidated
    where rowid = 'AAEWNEABXAAAAkxAAA';
    EXCEPTION
    WHEN others THEN
    Raise;
    End;
    =========================================================
    I tried using to_number but still the same error.
    Can some body please inform me where I am goofing.
    Thanks!

    I got a different error, but you need to initialise your nval_array and make sure it can hold three values. The following should work:
    declare
      type NewValueArray is table of varchar2(4000);
      nVal_Array NewValueArray := NewValueArray();
    Begin
      nval_array.extend(3);
      Select col1, col2, col3
      into nVal_Array(1), nVal_Array(2), nVal_Array(3)
      from tab1
      where rowid = 'AAAGJZAAGAAAAAWAAV';
    EXCEPTION
      WHEN others THEN
        Raise;
    End;
    /

  • How to create dynamic Invoice report based on Tax calculations

    Hi Ppl,
    I have an invoice report requirement. There are multiple line items in invoice and each line item will have a tax % and discount associated with it. Discount has to be applied at line item level. Tax will be applicable on resultant amount which respect to tax share on total amount. Below is example
    Part# Tax     Qty     UnitPrice Amount     Discount     Net Value
    1     12.5%     40     10          400          100          300
    2     12.5%     50     20          1000          200          800
    3     4%     10     30          300          50          250
                             SubTotal                    1350
                             VAT 12.5% on 1100(300+800)     137.50
                             VAT 4% on 250               10
                             Total Amount               1497.5
    I have created a static rtf which does all calculations correctly. I have hardcoded 12.5 and 4 % tax values for calculations. But issue is that taxes are changeable in future so I want to create dynamic template which takes care for tax calculations. I thought of to create an array to store distinct tax values from XML data and then to perform calculation but don’t know how to do that.
    Can some body help me out as this is very critical and urgent?
    Note: Tax calculation can be done at line item level itself but there are some scenarios where additional discounts are there so tax calculation can not be done at line item level.
    Below is the sample XML data
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ListOfBipActionTest>
    - <Action>
    <AccountId>1</AccountId>
    <PartName>17211KCC900LS</PartName>
    <TAX>12.5</TAX>
    <QTY>40</QTY>
    <UNITPRICE>47.06</UNITPRICE>
    <DIS>15.00</DIS>
    <TaxType>CST</TaxType>
    </Action>
    - <Action>
    <AccountId>2</AccountId>
    <PartName>17213KCC900LS</PartName>
    <TAX>12.5</TAX>
    <QTY>50</QTY>
    <UNITPRICE>19.53</UNITPRICE>
    <DIS>8.00</DIS>
    <TaxType>CST</TaxType>
    </Action>
    - <Action>
    <AccountId>3</AccountId>
    <PartName>28302KAG900S</PartName>
    <TAX>12.5</TAX>
    <QTY>50</QTY>
    <UNITPRICE>59.49</UNITPRICE>
    <DIS>15.00</DIS>
    <TaxType>CST</TaxType>
    </Action>
    - <Action>
    <AccountId>4</AccountId>
    <PartName>2830AKAG900S</PartName>
    <TAX>12.5</TAX>
    <QTY>10</QTY>
    <UNITPRICE>168.7</UNITPRICE>
    <DIS>15.00</DIS>
    <TaxType>CST</TaxType>
    </Action>
    - <Action>
    <AccountId>4</AccountId>
    <PartName>91001GF6000S</PartName>
    <TAX>4.00</TAX>
    <QTY>60</QTY>
    <UNITPRICE>115.34</UNITPRICE>
    <DIS>17.00</DIS>
    <TaxType>CST</TaxType>
    </Action>
    </ListOfBipActionTest>
    Thanks
    Ashish

    Dear Efstratios Kara,
    I installed SAP Integration Kit 3.1. Yes I installed the integration kit after installing CR.
    I have uninstalled the earlier version and i have reinstalled CR with (12.3.0.601) version.
    But still i cant view the SAP connectivity. can u tell me from which version they have included this connectivity option in CR.
    If CR going to support SAP Table connectivity on specific version, what is that version.
    Waiting for your reply.
    Regards,
    Suman

  • How to create Dynamic internal table with columns also created dynamically.

    Hi All,
    Any info on how to create a dynamic internal table along with columns(fields) also to be created dynamically.
    My requirement is ..On the selection screen I enter the number of fields to be in the internal table which gets created dynamically.
    I had gone thru some posts on dynamic table creation,but could'nt find any on the dynamic field creation.
    Any suggestions pls?
    Thanks
    Nara

    I don't understand ...
    something like that ?
    *   Form P_MODIFY_HEADER.                                              *
    form p_modify_header.
      data : is_fieldcatalog type lvc_s_fcat ,
             v_count(2)      type n ,
             v_date          type d ,
             v_buff(30).
    * Update the fieldcatalog.
      loop at it_fieldcatalog into is_fieldcatalog.
        check is_fieldcatalog-fieldname+0(3) eq 'ABS' or
              is_fieldcatalog-fieldname+0(3) eq 'VAL' .
        move : is_fieldcatalog-fieldname+3(2) to v_count ,
               p_perb2+5(2)                   to v_date+4(2) ,
               p_perb2+0(4)                   to v_date+0(4) ,
               '01'                           to v_date+6(2) .
        v_count = v_count - 1.
        call function 'RE_ADD_MONTH_TO_DATE'
            exporting
              months        = v_count
              olddate       = v_date
            importing
              newdate       = v_date.
        if is_fieldcatalog-fieldname+0(3) eq 'ABS'.
          concatenate 'Quantité 0'
                      v_date+4(2)
                      v_date+0(4)
                      into v_buff.
        else.
          concatenate 'Montant 0'
                      v_date+4(2)
                      v_date+0(4)
                      into v_buff.
        endif.
        move : v_buff to is_fieldcatalog-scrtext_s ,
               v_buff to is_fieldcatalog-scrtext_m ,
               v_buff to is_fieldcatalog-scrtext_l ,
               v_buff to is_fieldcatalog-reptext .
        modify it_fieldcatalog from is_fieldcatalog.
      endloop.
    * Modify the fieldcatalog.
      call method obj_grid->set_frontend_fieldcatalog
           exporting it_fieldcatalog = it_fieldcatalog.
    * Refresh the display of the grid.
      call method obj_grid->refresh_table_display.
    endform.                     " P_MODIFY_HEADER

  • Is there a way to link or create a widget that links back to the iTunes U app on your iPad from your iBook?

    Is there a way to link or create a widget that links back to the iTunes U app on your iPad from your iBook?
    I have already found the Apple Widget Builder (http://widgets.itunes.apple.com/builder/) and that works fine if you want to link to the "App Store", but I want to know if there is a way to "open an app" that is already installed on the iPad instead of double tapping the home button to switch between apps. (I know using the home button is very simple, but I am trying to find an even easier way to just "tap a widget" or "link" that will open iTunes U right up) I am only asking if this is possible for people who may have a hard time running an iPad at the beginning.
    I appreciate any help, thanks!

    I appreciate your help, but I had already looked at LinkMaker and I thought that was my answer, but as far as I could tell that still only links to an app in the app store. Yes it will link to iTunes U in the app store and you can then hit Open, but that is too drawn out of a process. We would like to know a way to just open the app directly.
    Thank you!

  • How to create dynamic elements in action of a view?

    hi all,
    I created 2 buttons dynamically in WdDoModifyView(). I created  action1, and parameter for that action i.e, id of type string.
    when i click on button1, some ui elements must be displayed.....
    can anyone tell me how to dynamically add UI elements in onAction() of view.....
    i wrote the following code to create & map dynamically in WdDoModifyView()........
    if(firstTime)
        IWDButton b1=(IWDButton)view.createElement(IWDButton.class,"button1");
        b1.setText("Button1");
        IWDButton b2=(IWDButton)view.createElement(IWDButton.class,"button2");
        b2.setText("Button2");
        IWDTransparentContainer tc=(IWDTransparentContainer)view.getElement("RootUIElementContainer");
        tc.addChild(b1);
        tc.addChild(b2);
         IWDButton butt1 = (IWDButton)view.getElement("button1");
         IWDParameterMapping pm1a = butt1.mappingOfOnAction();
         pm1a.addParameter("id1","link1a");
         IWDButton butt2 = (IWDButton)view.getElement("button2");
         IWDParameterMapping pm1b = butt2.mappingOfOnAction();
         pm1b.addParameter("id1","link1b");
    after writing this..... in onAction().........of view... i wrote like this...
    if (id1.equals("link1a"))
    else{
    in the if & else condition, i have to create UI elements dynamically.
    when i am trying to create Ui elements dynamically, but i am unable to create dynamically here.
    pls give me suggestion how to proceed this
    regards,
    vila

    Hi Vila,
    Are you trying to create UI elements dynamically in the action? If yes then you won't be able to do so because you can only create UI elements dynamically in WDDoModifyView().
    Always WDDoModifyView() would be called after your action. So, you can handle it as you want in your WDDoModifyView() itself.
    But if you want that those elements should be created everytime when you fire an event then don't write it within if(firstTime) clause as this would be true only when WDDoModifyView() is called for the first time when the page intially loads.
    Regards,
    Murtuza

  • How to create Dynamic Window in Smartforms

    Hi all,
    Could you please help me out on how to create Dynamic Window in smartforms excluding Main Window.
    Thanks in Advance.
    Vinay.

    hi,
    Hi,
    1.If you are creating the Different windows for the Countries,then In conditions tab of window specify the Condition i.e.
    company -code = '2201'.
    2.Then that window can trigger ofr that condition.
    3.Other wise, if you are using the different layouts ,then write the condition in Print program and call that form .
    reward me if helpful.

  • Error while creating dynamic Table

    Hi All,
    I have a node 'SEG' with 3 attributes, ATTR1.2.3, I am tring to crate dynamic table using this context node. Initialy i am displaying view with button, when click on this button i want to create table dynamically.. if click again one more table i have to create.. its giving dump... here is the code... How to do this???
    data: wd_node_info type ref to if_wd_context_node_info,
            wd_node type ref to if_wd_context_node,
            lr_container type ref to cl_wd_uielement_container,
            lv_tablename type string,
            lt_db_data type ref to data,
            lr_table type ref to cl_wd_table.
      field-symbols: <lt_data> type any table.
      wd_node_info = wd_context->get_node_info( ).
      wd_node = wd_context->get_child_node( name = 'SEG' ).
    lr_container ?= view->get_root_element( ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
    " Creating internal table with the same structure as our dynamic
      context node
      CALL METHOD CL_WD_DYNAMIC_TOOL=>CREATE_TABLE_FROM_NODE
        EXPORTING
          UI_PARENT = lr_container
          TABLE_ID  = 'MY_TABLE'
          NODE      = wd_node
        RECEIVING
          TABLE     = lr_table.
      cl_wd_matrix_data=>new_matrix_data( element = lr_table ).
      lr_table->bind_data_source( path = 'SEG' ).
    Thanks'
    Madhan.

    Hi Sarbjeet,
    The code is working fine, when i use in wddomodify view method without button click on first time.( I checked this by creating another component). But I am creating dynamic table when click on button(view contains one button initially), for this i created two attributes FLAG OF TYPE wdy_boolean and count of type int1. and in button action i write this code :
      DATA lo_el_context TYPE REF TO if_wd_context_element.
        DATA ls_context TYPE wd_this->element_context.
        DATA lv_flag LIKE ls_context-flag.
      get element via lead selection
        lo_el_context = wd_context->get_element( ).
      get single attribute
        lo_el_context->set_attribute(
            name =  `FLAG`
            value = abap_true ).
      DATA lv_count LIKE ls_context-count.
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `COUNT`
        IMPORTING
          value = lv_count ).
    lv_count = lv_count + 1.
    lo_el_context->set_attribute(
        EXPORTING
          name =  `COUNT`
          value = lv_count ).
    and in wddomodify view method following code..
    Method WDDOMODIFYVIEW
    DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_flag LIKE ls_context-flag.
      get element via lead selection
        lo_el_context = wd_context->get_element(  ).
      get single attribute
        lo_el_context->get_attribute(
          EXPORTING
            name =  `FLAG`
          IMPORTING
            value = lv_flag ).
      DATA lv_count LIKE ls_context-count.
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->get_attribute(
        EXPORTING
          name =  `COUNT`
        IMPORTING
          value = lv_count ).
    if lv_flag = abap_true. ......
    Remaining code same post previously************8
    get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    get single attribute
      lo_el_context->set_attribute(
        EXPORTING
          name =  `FLAG`
          value = abap_false ).
    endif.
    endmethod...
    I created like this i am not getting other UI elements(input, ddbykey,button).
    And if i click view button again it going to dump..
    Thanks,
    Madhan.

  • Error while creating dynamic internal table.

    Hello Expert,
    While creating a dynamic internal table, it throw an run time error as :
    " LOAD PROGRAM NOT FOUND
      CX_SY_PROGRAM_NOT_FOUND"
    i tried to debug the program, it found this error comes while calling
    CALL METHOD cl_alv_table_create=>create_dynamic_table
    please anyone help me out to resolve this problem.
    what could be the reason of error? and how to avoid it?
    <REMOVED BY MODERATOR>
    thanks in advance.
    ~ shweta.
    Edited by: Alvaro Tejada Galindo on Feb 28, 2008 2:41 PM

    Hi,
    Go through this program.
    Report z_dynamic.
    type-pools : abap.
    field-symbols: <dyn_table> type standard table,
    <dyn_wa>,
    <dyn_field>.
    data: dy_table type ref to data,
    dy_line type ref to data,
    xfc type lvc_s_fcat,
    ifc type lvc_t_fcat.
    selection-screen begin of block b1 with frame.
    parameters: p_table(30) type c default 'T001'.
    selection-screen end of block b1.
    start-of-selection.
    perform get_structure.
    perform create_dynamic_itab.
    perform get_data.
    perform write_out.
    form create_dynamic_itab.
    Create dynamic internal table and assign to FS
    call method cl_alv_table_create=>create_dynamic_table
    exporting
    it_fieldcatalog = ifc
    importing
    ep_table = dy_table.
    assign dy_table->* to <dyn_table>.
    Create dynamic work area and assign to FS
    create data dy_line like line of <dyn_table>.
    assign dy_line->* to <dyn_wa>.
    endform.
    Regards,

  • How to create dynamic context based on a structure defined in the program?

    Hi Experts,
             I need to create a dynamic context based on a structure wa_struc which i have define programatically.
    When I pass wa_struc to structure_name parameter of create_nodeinfo_from_struc, i get a runtime error:
    "Parameter STRUCTURE_NAME contains an invalid value wa_struc."
    How to create dynamic context based on a structure defined in the program?
    I have written the code like this:
    TYPES: BEGIN OF t_type,
                v_carrid TYPE sflight-carrid,
                v_connid TYPE sflight-connid,
             END OF t_type.
      Data:  i_struc type table of t_type,
             wa_struc type t_type.
      data: dyn_node   type ref to if_wd_context_node.
      data: rootnode_info   type ref to if_wd_context_node_info.
      rootnode_info = wd_context->get_node_info( ).
      clear i_struc. refresh i_struc.
      select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
      parent_info = rootnode_info
      node_name = 'dynflight'
      structure_name = 'wa_struc'
      is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( name = 'dynflight' ).
    dyn_node->bind_table( i_struc ).
    Thanks
    Gopal
    Message was edited by: gopalkrishna baliga

    Hi Michelle,
              First of all Special thanks for your informative answers to my other forum questions. I really appreciate your help.
    Coming back to this question I am still waiting for an answer. Please help. Note that my structure is not in a dictionary.
    I am trying to create a new node. That is
    CONTEXT
    - DYNFLIGHT
    CARRID
    CONNID
    As you see above I am trying to create 'DYNFLIGHT' along with the 2 attributes which are inside this node. The structure of the node that is, no.of attributes may vary based on some condition. Thats why I am trying to create a node dynamically.
    Also I cannot define the structure in the ABAP dictionary because it changes based on condition
    I have updated my code like the following and I am getting error:
    TYPES: BEGIN OF t_type,
    CARRID TYPE sflight-carrid,
    CONNID TYPE sflight-connid,
    END OF t_type.
    Data: i_struc type table of t_type,
    dyn_node type ref to if_wd_context_node,
    rootnode_info type ref to if_wd_context_node_info,
    i_node_att type wdr_context_attr_info_map,
    wa_node_att type line of wdr_context_attr_info_map.
    wa_node_att-name = 'CARRID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CARRID'.
    insert wa_node_att into table i_node_att.
    wa_node_att-name = 'CONNID'.
    wa_node_att-TYPE_NAME = 'SFLIGHT-CONNID'.
    insert wa_node_att into table i_node_att.
    clear i_struc. refresh i_struc.
    select carrid connid into corresponding fields of table i_struc from sflight where carrid = 'AA'.
    rootnode_info = wd_context->get_node_info( ).
    rootnode_info->add_new_child_node( name = 'DYNFLIGHT'
    attributes = i_node_att
    is_multiple = abap_true ).
    dyn_node = wd_context->get_child_node( 'DYNFLIGHT' ).
    dyn_node->bind_table( i_struc ).
    l_ref_interfacecontroller->set_data( dyn_node ).
    But now I am getting the following error :
    The following error text was processed in the system PET : Line types of an internal table and a work area not compatible.
    The error occurred on the application server FMSAP995_PET_02 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: IF_WD_CONTEXT_NODE~GET_STATIC_ATTRIBUTES_TABLE of program CL_WDR_CONTEXT_NODE_VAL=======CP
    Method: GET_REF_TO_TABLE of program CL_SALV_WD_DATA_TABLE=========CP
    Method: EXECUTE of program CL_SALV_WD_SERVICE_MANAGER====CP
    Method: APPLY_SERVICES of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: REFRESH of program CL_SALV_BS_RESULT_DATA_TABLE==CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE_DATA of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~MAP_FROM_SOURCE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMP_TABLE_DATA~UPDATE of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_VIEW~MODIFY of program CL_SALV_WD_C_TABLE_V_TABLE====CP
    Method: IF_SALV_WD_COMPONENT~VIEW_MODIFY of program CL_SALV_WD_A_COMPONENT========CP
    -Gopal
    Message was edited by: gopalkrishna baliga

  • How to create dynamic connection in business view manager.

    Hi Sir,
    Can u explain how to create dynamic connection in business view manager.
    Thanks
    Vishali Raghava Raju

    HI Vaishali,
       Can you please elaborate your requirement ?
    -Regards
    B

Maybe you are looking for