Error creating dynamic context node in Webdynpro for ABAP. Plesae help!

Hi
   I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
Note
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
My code is like the following:
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 ).
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

Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
FOO_NODE (1-1)
     Widget (1-N)
          -Widget_info (1-1)
               *Name
               *Sku
               *Description
          -Widget_plant (1-M)
               *Plant_Code
               *Plant_State
               *Plant_City
          -Widget_pic (1-1)
               *Picture

Similar Messages

  • How to create an editable table in webdynpro for ABAP? Help!

    Hi Experts,
            I have a requirement where I have to create a webdynpro for ABAP table for new row/rows entry, delete row/rows and update row/rows data. This is something like table control in normal ABAP.
    how can I achieve this? Is there any such feature in ALV component?
    Any code sample will be really helpfull.
    Please help!
    Thanks
    Gopal

    Hi,
    yes, the ALV is integrated into WDA, have a look at this: http://help.sap.com/saphelp_nw2004s/helpdata/en/74/fd4142646ab46be10000000a155106/frameset.htm
    Regards, Heidi
    PS: look at the WDA Knowledge Center under https://www.sdn.sap.com/irj/sdn/developerareas/abap?rid=/library/uuid/02e1fa45-0801-0010-10a0-f1cf47e8c943, there you can find several ALV tutorials
    Message was edited by: Heidi von Geisau

  • Create dynamic context node

    Hi Experts,
    I have tried the given example for Dynamic Context Node in Webdynpro ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4c70444a-0801-0010-7688-9e4bd844b783
    But getting the Error when executing this application
    Note
    The following error text was processed in the system ISP : Adapter error in &VIEW_ELEMENT_TYPE& "TABLENAME" of view "ZWD_SACHIN_DYN_ALV.MAIN_VIEW": Context binding of property VALUE cannot be resolved: Node MAIN_VIEW.1.INPUT does not contain any elements
    The error occurred on the application server usirs254_ISP_01 and in the work process 0 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: RAISE_FOR of program CX_WDR_ADAPTER_EXCEPTION======CP
    Method: RAISE_BINDING_EXCEPTION of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Method: GET_BOUND_ELEMENT of program CL_WDR_VIEW_ELEMENT_ADAPTER===CP
    Please resolve this issue because when I am mapping the Attribute TableName in the InputGroup, it is throwing above Error.
    Thanks in advance
    Regards
    Sachin

    Hi Sachin,
    I am unable to understand why you are getting an error. I have tried the same tutorial myself and it works fine for me. Make sure that the TABLENAME attribute (which is of string type) is properly binded to the value property of the input field.
    Regards
    Arjun
    Edited by: Arjun Thakur on Mar 17, 2009 1:46 PM

  • How to create a long text in webdynpro for abap?

    Hi Experts,
                      I am new to Web Dynpro for ABAP, I have a requirement for Grievance workflow. For this we have developed a Webdynpro application which appears in portal. Here my issue is user wants to enter a long text on the screen and I have to save this text as standard text. Is it possible to create a text box which we can insert number of lines?
    If so can anybody please suggest me how to resolve this issue.
    Thank You.
    Ranganadh.

    hi ,
    u can use the TEXT EDIT UI element , procced like this :
    1 Right click on Root Element UI container , insert elemnt TEXT EDIT
    2 create a context attribute of type string or string_table
    3 bind value property of ur UI to this attribute
    4 u can get the values entered in the text UI by user , by get_attribute method
    press CNTRL + F7  , select the radio button read context node/attribute , select the corresponding attribute
    The attribute to be bound can be of type STRING or STRING_TABLE. With STRING_TABLE rows from TextEdit are stored as table rows. A line break is always stored as a line feed in a STRING (CL_ABAP_CHAR_UTILITIES=>NEWLINE, ASCII decimal 10). The Web Dynpro framework carries out the conversion for the client platform.
    Note that a string to be displayed in TextEdit, must only use a line feed as a line break.
    refer this online help :
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/06/45ee412e5e6324e10000000a1550b0/content.htm
    regards,
    amit

  • WebDynpro for ABAP F4-help for KAGRU like PERFORM f4_groups in KSB1

    Hello,
    I must realize a search-help in a WebDynpro-Component which looks like the F4-help in the transaction KSB1 for field KAGRU.
    In the report RKAEP000 it looks like this.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR koagr.
      PERFORM f4_groups USING    'KSTAR'
                                 gs_tka01-ktopl
                        CHANGING koagr.
    But in WebDynpro the Function   'K_GROUP_SELECT' wil generate a short dump.
    Has anybody an idea, how to make this in WebDynpro?
    Greetings

    How are you trying to use the search help?  You can set up value help in the component itself.  Go to the component controller context of your web dynpro component.  Select the context node attribute for which you would like to have value help.  Now go down to the properties.  Next to "Input Help Mode" select "Automatic".  If your node attributes were brought in from a table (SAP or custom), then if there is an existing search help it will automatically be brought up now next to "Determined Input Help".  Save your changes and activate.
    If a search help is not brought in when you change the input help mode to automatic, then you can still create your own method to provide the search help.  In this case you will need to create your method in the controller of the view where the user will be entering a value for the field.  The method type should be "Method".  Make sure to call your search help method within the method WDDOINIT of the view.  In the search help method you will need to navigate to your mode, select the values for the field, and then set the attribute value set using those values.  You will have to look into K_GROUP_SELECT to see where it is getting the values for KAGRU.  I don't think you can call K_GROUP_SELECT directly because it creates a pop-up.
    A third option is to use an OVS (object value selector) component.  Please see this document for help with OVS:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/cf40cf90-0201-0010-4a85-e5a207b900d8
    I hope this helps.
    - April King

  • How to create a node with attributes at runtime in webdynpro for ABAP?

    Hi Experts,
             How to create a node with attributes at runtime in webdynpro for ABAP? What classes or interfaces I should use? Please provide some sample code.
    I have checked IF_WD_CONTEXT_NODE_INFO and there is ADD_NEW_CHILD_NODE method. But this is not creating any node. I this this creates only a "node info" object.
    I even check IF_WD_CONTEXT_NODE but i could not find any method that creates a node with attribute.
    Please help!
    Thanks
    Gopal

    Hi
       I am getting the following error while creating a dynamic context node with 2 attributes. Please help me resolve this problem.
    Note
    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
    My code is like the following:
    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 ).
    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
    Message was edited by: gopalkrishna baliga

  • How to create interactive forms using Webdynpro for ABAP

    Hi All,
             I have worked on Webdynpro for ABAP, and now I want to start creating adobe interactive forms using Webdynpro for ABAP. Please provide me with basic examples to start.
    Also Please provide me introduction as how interactive forms are related to ISR senarios.
    Thanks in Advance.
    Phani

    Hi Varun!,
    Can you please send me also the above said step by step tutorial on [email protected]
    and can you please also guide me any configurations to be done on Sneak Preview SP12 before developing the interactive forms.
    Thank you in advance.
    regards
    Ravi

  • How can we Access RFC of R/3 in WEBDYNPRO FOR ABAP?

    Hi all,
    i wnat to access a Function Module(RFC) which has created in R/3 in WEBDYNPRO FOR ABAP.Can i access it through SERVICE CALL.or if any other process there.?And how can i map their context & how can i execute?
    Edited by: ravi k on Mar 27, 2008 1:07 PM

    Hi,
    you can find a [pdf document|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9cb5d345-0801-0010-6a8e-fc57c23fd600] here.
    grtz,
    Koen

  • Webdynpro for ABAP - Popup apearing for userid and pwd

    Hi Experts,
    We have implemented ESS and gone live. Now we have created one custom application in webdynpro for ABAP and attached with portal.
    Initially there was a problem, the application was not getting executed because of system configuration, then I have configured the host name, port number correctly. Then the iView is getting loaded in the portal.
    The problem is, when I am trying to access the iView, the popup apearing for the user id and password. This is happening only the webdynpro abap application, this is not happening for all sap standard iViews.
    Could anyone help me with this issue?
    Thanks
    Jay

    Hi Jayanthi,
    as you had mentioned this is not happening for sap standard iViews(do you mean simple transaction iViews for which you have used a system alias, which was the same you had used for ABAP web dynpro iview)?
    Of courese ESS iViews works with their own JCOs which is no way helpful or connected with wd ABAP.
    So I believe if your SAP id and Portal id are different(or if they are same but SAP Logon ticket is not configured properly) then only it woudl ask for the authentication again- for Wd ABAP to work fine, only the connector property  and WAS to tbe configured in the system object(aka system alias) used for ABAP iview. Now once you enter the login credentials, it is working fine right, then could you please test the user mapping under the user you are logged in, select the alias that you had used while creating the abap wd iView and provide userid/password here, then run the wd ABAP application, it definitely would work.
    N.B: if you had provided the credentials once, then it woud be stored in the browser cache, so if you perform the user mapping in user admin, log off from portal, close all your browser windows, then clear cache,(cookies etc). then login to portal, run the wdABAP application, I am sure this would work(it worked for me!!!).
    Thanks,
    Jakes.

  • Interactive Forms by WebDynpro for ABAP

    Hello,
    I'd like to create Adobe Interactive Forms by "WebDynpro for ABAP".
    Our business requirements are
    - to download offline PDF forms.
    - to upload PDF forms and display Forms online.
    Please let me know how to do this and the document or blogs.
    Best regards,
    Koji

    Hi,
    Downloading a form is as simple as when u enduser opens a form online, he just saves a copy of it, fills it up and uploading is just the next step.
    If u want to upload an offline PDF form:
    Here's the link that'll give a fair idea about this:
    /people/shruti.rathour/blog/2008/02/07/uploading-sap-interactive-form-on-the-abap-webdynpro-view
    If still not clear ask me..
    It's just that u've created a view in webdynpro ABAP and uploading an offline form from that.
    regards
    Amita

  • Dynamic form in Webdynpro for ABAP - Context Cardinality question

    Hello -
    I have an adobe form in a webdynpro for ABAP application which I want to be able to be dynamic. Basically I want to be able to use a Webdynpro context node with a cardinality of 1-N and the form will take each node of the context and create a page for each one. I am able to do a static form with a context node that has a 1-1 cardinality, but once I change my cardinality to 1-N on the node the static form no longer works (there is no data). Is what I want to do possible? I've looked through all the documentation I could find and could not get a definite answer. Any help would be appreciated.
    Widget (1-N)
         -Widget_info (1-1)
              *Name
              *Sku
              *Description
         -Widget_plant (1-M)
              *Plant_Code
              *Plant_State
              *Plant_City
         -Widget_pic (1-1)
              *Picture
    ... So I want to have a form which can print a page for each widget in the context (the number of which can vary). That form would have the Name, sku, description, plant_code, plant_state, plant city and the picture on it. (This is just a generic example of what I need to do)
    Regards,
    - Jason

    Ok, I think I found a bug... It seems for adobe forms in WD4A, the root context node must be 1-1 and you must nest the 1-n node within that... Not sure why, but it worked. So in my case my context would look like this:
    FOO_NODE (1-1)
         Widget (1-N)
              -Widget_info (1-1)
                   *Name
                   *Sku
                   *Description
              -Widget_plant (1-M)
                   *Plant_Code
                   *Plant_State
                   *Plant_City
              -Widget_pic (1-1)
                   *Picture

  • How to create a context node for "IBHeader" at the view "BuPaIBaseDetail"?

    hi, experts
    for the requirement, i have to get data from a root BO-IBHeader in the view of "BuPaIBaseDetail".But the view already has IBHeader's child object-"IBComponent", whose controller class is "CL_CRM_IC_BUPACONTROLLER_CN08", how can i create the context node for "IBHeader"?
    angerly wait for the answer. thanks a lot

    If you right click on an empty container or a container with an object in it, it has the same available choices to select. However, if you create a blank property node on the block diagram, and wire up the .net object to it, you will see a much different list of properties.
    So, the property node created from right clicking a .NET container will be for that container, even if there is an object inside. To create a property node for the object, you must wire the .NET object to an empty property node on the block diagram.
    Chris Van Horn
    Applications Engineer

  • ORA-27504: IPC error creating OSD context : Unable to start second node

    I have set the DB parameter CLUSTER_INTERCONNECT to point to the Inet addr.
    oifcfg getif
    bondeth0
    172.23.250.128  global  public
    bondib0  192.168.8.0  global
    cluster_interconnect
    When I try to restart the DB services, it is throwing below error while starting the second node.
    These are set of commands I have executed to change the DB Parameter
    alter system set cluster_interconnects =  '192.168.10.6' scope=spfile sid='RAC1' ;
    alter system set cluster_interconnects =  '192.168.10.7' scope=spfile sid='RAC2' ;
    alter system set cluster_interconnects =  '192.168.10.6' scope=spfile sid='ASM1' ;
    alter system set cluster_interconnects =  '192.168.10.7' scope=spfile sid='ASM2' ;
    On second node
    SQL> startup ;
    ORA-27504: IPC error creating OSD context
    ORA-27300: OS system dependent operation:if_not_found failed with status: 0
    ORA-27301: OS failure message: Error 0
    ORA-27302: failure occurred at: skgxpvaddr9
    ORA-27303: additional information: requested interface 192.168.10.6 not found. Check output from ifconfig command
    SQL>
    please let me know whether the proceedure I have followed is wrong
    Thanks

    Node 1:
    [oracle@prdat137db03 etc]$ /sbin/ifconfig bondib0
    bondib0   Link encap:InfiniBand  HWaddr 80:00:00:48:FE:80:00:00:00:00:00:00:00:00:00:00:00:00:00:00
              inet addr:192.168.10.6  Bcast:192.168.11.255  Mask:255.255.252.0
              inet6 addr: fe80::221:2800:1ef:bc4f/64 Scope:Link
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:65520  Metric:1
              RX packets:32550051 errors:0 dropped:0 overruns:0 frame:0
              TX packets:32395961 errors:0 dropped:42 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:19382043590 (18.0 GiB)  TX bytes:17164065360 (15.9 GiB)
    [oracle@prdat137db03 etc]$
    Node 2:
    [oracle@prdat137db04 ~]$ /sbin/ifconfig bondib0
    bondib0   Link encap:InfiniBand  HWaddr 80:00:00:48:FE:80:00:00:00:00:00:00:00:00:00:00:00:00:00:00
              inet addr:192.168.10.7  Bcast:192.168.11.255  Mask:255.255.252.0
              inet6 addr: fe80::221:2800:1ef:abdb/64 Scope:Link
              UP BROADCAST RUNNING MASTER MULTICAST  MTU:65520  Metric:1
              RX packets:29618287 errors:0 dropped:0 overruns:0 frame:0
              TX packets:30769233 errors:0 dropped:12 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:16453595058 (15.3 GiB)  TX bytes:18960175021 (17.6 GiB)
    [oracle@prdat137db04 ~]$

  • 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

  • Code to create dynamic context elements

    Dear Guys,
    I have create a dynamic text edit using the following code in abap webdynpro.
    I have created a transparent container named PREREPLY set to grid layout and created a context REPLY type string and in WDDOMODIFYVIEW view i have written the following 
    data : lr_container type ref to cl_wd_uielement_container,
             lr_comment type ref to cl_wd_text_edit.
    lr_container ?= view->get_element( 'PREREPLY' ).
    lr_comment = cl_wd_text_edit=>NEW_TEXT_EDIT( BIND_VALUE = 'REPLY'
                                                                                    COLS = 70
                                                                                    ID = 'PREREPLIES2'
                                                                                    STATE = 01 ).
    lr_comment->BIND_VALUE( 'REPLY' ).
    cl_wd_grid_data=>new_grid_data( element = lr_comment ).
    lr_container->ADD_CHILD( lr_comment ).
    i am able to see a new textedit when i run my application.
    Now I want to create the context also dynamically, because i will not know how many text edit will be there. Based on the number of lines in the internal table i want the create the context and textedits dynamically.
    Give me the code to create context dynamically in abap webdynpro.
    Regards,
    Shamila

    Hi Sharmila,
    Just go through this sample code snippet which does the following.
    1) It dynamically creates a context node named CHILD and then creates 4 attributes ATTR1, ATTR2,..
    2) Creates a GROUP UI element with a caption attached to it
    3) Create 4 textEdit UI elements bound to the 4 context attributes created earlier and embed them within the group
    METHOD wddomodifyview.
      DATA: lr_container TYPE REF TO cl_wd_uielement_container,
            lr_group TYPE REF TO cl_wd_group,
            lr_caption_group TYPE REF TO cl_wd_caption,
            lr_textedit TYPE REF TO cl_wd_text_edit,
            lr_node_info TYPE REF TO if_wd_context_node_info,
            lr_node TYPE REF TO if_wd_context_node,
            lr_element TYPE REF TO if_wd_context_element,
            lr_attribute_info TYPE wdr_context_attribute_info,
            content TYPE string,
            attribute_name TYPE string,
         lv_textview_id TYPE string.
      CHECK first_time = abap_true.
      lr_node_info = wd_context->get_node_info( ).
      CALL METHOD lr_node_info->add_new_child_node
        EXPORTING
          name                         = 'CHILD'
          is_mandatory                 = abap_false
          is_multiple                  = abap_true
          is_multiple_selection        = abap_true
          is_singleton                 = abap_false
          is_initialize_lead_selection = abap_true
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lr_node_info.
      lr_container ?= view->get_root_element( ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lr_container ).
      lr_group = cl_wd_group=>new_group( id = 'GROUP' ).
      lr_group->set_width( value = '50%' ).
      cl_wd_matrix_layout=>new_matrix_layout( container = lr_group ).
      cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_group ).
      lr_caption_group = cl_wd_caption=>new_caption( text = 'Group Header' ).
      lr_group->set_header( the_header = lr_caption_group ).
      DO 4 TIMES.
        MOVE sy-index TO attribute_name.
    ** Preparing the data to be displayed in the textEdit i.e, data for context attribute
        CONCATENATE 'This'
                    'is the'
                    'data for textEdit number: '
                     attribute_name  INTO content SEPARATED BY cl_abap_char_utilities=>newline.
        CONCATENATE 'ATTR'
                    attribute_name INTO attribute_name.
    ** Condense the ID to ensure that the format is consistent with SAP standard
        CONDENSE attribute_name NO-GAPS.
    ** Prepare properties of attribute & add to context node CHILD
        lr_attribute_info-name = attribute_name.
        lr_attribute_info-type_name = 'STRING'.
        lr_attribute_info-value_help_mode = '0'.
        lr_node_info->add_attribute( EXPORTING attribute_info = lr_attribute_info ).
        lr_node = wd_context->get_child_node( name = 'CHILD' ).
        lr_element = lr_node->create_element( ).
        lr_element->set_attribute( name  = attribute_name
                                   value = content ).
        lr_node->bind_element( new_item             = lr_element
                               set_initial_elements = abap_false ).
    ** Compute the attribute path dynamically i.e, like CHILD.ATTR1
        CONCATENATE 'CHILD.'
                    attribute_name INTO attribute_name.
        CONDENSE attribute_name NO-GAPS.
        lr_textedit = cl_wd_text_edit=>new_text_edit( cols  = 10
                                                      rows  = 5
                                                      width = '90%'
                                                      bind_value = attribute_name ).
        cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_textedit ).
        lr_group->add_child( the_child = lr_textedit ).
      ENDDO.
    lr_container->add_child( the_child = lr_group ).
    ENDMETHOD.
    Hope that you can manage to go through this & try change it to suit your requirement.
    Regards,
    Uday

Maybe you are looking for

  • Integration with FI and MM

    Hi, Under the Plant 6000, We had a valuation class 9634, Gl accounts were created assigned and moved to production. As per the Client requirement, they want to shutdown the previous plant and start the new one. They want to assign the same GL Account

  • Adobe Flash player keeps crashing, but it's up to date on my computer. So is Firefox. Help?

    For some reason, starting today, every page I visit on Firefox (no matter what) comes up with a notification that the Adobe Flash Player plugin has crashed. It started when I was trying to attach a word document to an email to one of my professors on

  • I can't export a PDF scanned file into WORD, help please.

    I can't export a PDF scanned file into Word, please help.

  • Flash files won't display when using DW CS3

    Anyone else have this problem? The source shows there's a flash file on my html page but it doesn't appear at all. When I made a new page using Dreamweaver MX, I added a flash file, uploaded it, and all was fine (except there was that annoying 'you m

  • Add New Music?

    My computer crashed and now I cant add new music to my ipod that I have on itunes on my new comp. Any ideas on how to do this? Thank you!