Make entries in a table in webdynpro abap

Hi all,
We have a requirement to make multiple entries in a Table in webdynpro ABAP.
We have created a table and inserted inputfield as cellEditor
but at runtime it is being displayed in readonly mode we cannot enter anything in that inputfield.
inputfield is binded with a context and table is not in readonly mode.
Please help in this regards
thanks & regards.....
Gaurav Makin

Hi Gaurav,
Make sure the context node bound to the table has cardinality 0..N.
When the app starts you probably need to read the table contents from the database or some other source and populate the contect node.
The table will allow the user to edit values only for the rows that have a corresponding element in the context node.
If the initial content is empty, i.e. no elements in the context node then the user will not be able to edit.
You will need to either initialize the context node with a bunch of elements if the number of entries is fixed and known beforehand,  or provide a way for the user to create a new row.
You can do this by adding a toolbar to the table with a create button with a CREATE action and the following method:
method onactioncreate.
  data:
    lo_element type ref to if_wd_context_element,
    lo_node    type ref to if_wd_context_node.
  lo_node = wd_context->get_child_node( name = 'your node name here' ).
  lo_element = lo_node->create_element( ).
  lo_node->bind_element( new_item = lo_element set_initial_elements = abap_false ).
endmethod.
Regards... Lucio Menzel

Similar Messages

  • How to make entry in a table e.g. vbak table

    how make entries in a table.
    what is the procedure.
    can i do it in  production directly?

    >
    Vijay Babu Dudla wrote:
    > it is not possible to do it directly in production. if you do that you will loose your job, don't practice those on production.
    More than loosing you job you are violating the contractual terms with SAP. You will simply loose all Support from SAP.
    I wonder how an ABAPer got a uid in Proction Server. Its a strict no-no in our organization.
    pk

  • How can I change column name in ALV table in WebDynpro ABAP?

    Hi Everyone,
    I have created an ALV table in WebDynpro ABAP. I have created a context node and added the required attributes there - for the ALV display.
    Now I want to change one columnn name of the ALV table.... Currently it is showing the description of the data element, which I don't want to show. I cannot create a new DE only for this purpose.
    Please let me know how can I change the name of the column.
    Regards

    Hi,
    This may help you to define your own column text in the ALV Table of webdynpro.
    see the below code.
    Here 'STATUS_ICON' is the column of the the output display of the ALV Table of webdynpro.
    "change the label of the report.
    DATA: lr_weeknum TYPE REF TO cl_salv_wd_column.
    CALL METHOD l_value->if_salv_wd_column_settings~get_column
    EXPORTING
    id = 'STATUS_ICON'
    RECEIVING
    value = lr_weeknum.
    SET THE LABEL OF THE COLUMN
    DATA: hr_weeknum TYPE REF TO cl_salv_wd_column_header.
    CALL METHOD lr_weeknum->get_header
    RECEIVING
    value = hr_weeknum.
    CALL METHOD lr_weeknum->set_resizable
    EXPORTING
    value = abap_false.
    hr_weeknum->set_prop_ddic_binding_field(
    property = if_salv_wd_c_ddic_binding=>bind_prop_text
    value = if_salv_wd_c_ddic_binding=>ddic_bind_none ).
    set the text of the column
    CALL METHOD hr_weeknum->set_text
    EXPORTING
    value = 'C Form'.
    regarads,
    balu

  • How to refresh interal table in Webdynpro ABAP

    Hi all,
    I want to delete/free/refresh interal table in webdynpro abap.
    One of the form gave solution to pass blank internal table?
    I cleared node and itab in webdynpro, but internally SAP doesn't delete the context node and itab values.
    Please help me in how to refresh itab in webdynpro abap.
    Regards,
    Prasad

    Hi Srinivas,
    it doesn't work.
    I wrote like this in action list method.
    method lta_task.
    if not lcontext_node_task is intial.
    context_node_task->invalidate().
    endif.
    select.......
    populate data into internal table lt_task_output_table .
    if not lt_task_output_table  is inital.
        context_node_task = wd_context->get_child_node( name = 'TASK_PER').
        context_node_task->bind_table( wd_this->lt_task_output_table ).
    endif.
    endmethod.
    Starting of the mehod i have written to inavlidate, before upating the itab
    but donesn;t work. Where should I write the code
    Reagards,
    Prasad

  • How to access SQL tables from WebDynPro ABAP application ?

    Hi,
    I am trying a scenario, where I need to send an user ID to SQL server table (update/modify/delete) from webDynpro ABAP application.
    Basically ,I am trying to know:---
    a>How to write a SQL Connection from ABAP code within webdynpro ABAP application
    b>What are the ways to do it.(by code or any other API/mechanism)
    I appreciate if anybody knows this.
    Thanks
    Praveen

    Hi,
    The EXEC CONNECT ... is usually used in the procedural ABAP code. For this you can refer to the ABAPDOCU.
    I dont have any sample code on the classes I listed try to check out them for the parameters and the methods they have.
    In WD for Java, we have these connection classes to connect to any databsae server.
    Or try to create an RFC with DESTINATION for this
    Pls check out this link for this -
    Pull data from another r3 server using abap dynpro
    Regards
    Lekha

  • Best way for binding tables from webdynpro Abap with FlashIsland

    Hi,
    We've found several ways to access ArrayCollection columns in a Flex application embedded in an Abap Webdynpro.
    The SAP System is SAP Netweaver 7.01 SP7 and the flex application is compiled with SDK 3.0.
    1/ Syntax like MyArrayCollection[n][Column1]. In this case, the GACProperty's name of the GACDataSource must be "Column1" and it is case sensitive
    2/ Syntax like MyArrayCollection[n].COLUMN1 where COLUMN1 is the attribute's name in the webdynpro Abap context node. In this case, the GACProperty's name seems to not be important, and the column's names of the ArrayCollection must be upper case.
    Do you know which is the best way to do the binding and why?

    Check the Explan Plans for indexes, join orders
    and also check the link
    http://forums.oracle.com/forums/thread.jspa?messageID=2222015&#2222015
    Regards
    Singh

  • Make Invisible the table in webdynpro ABAP

    hello all,
    i have a requirement where i have two tables in a tray on one condition  i have to invisible the second table.
    can one suggest is it possible, if yes how?
    what i have done is in a tray i put 2 tables and the buttons.Is it the right way ??
    Please Help me.
    Thanks,
    BSREDDY

    Hi,
    Tray is used to have expand/collapse the data to be shown to utilise the space.
    Create a context attribute for visisbiity as WDUI_VISIBILITY and bind it to the visible property of the
    2nd table.
    based on the condition use the SET_ATTRIBUTE method of the if_wd_context_node and
    set it to 01(None) or Visible (02).
    lo_nd_previous->set_attribute(
        EXPORTING
          name =  'VISIBLE'
          value = 01 ).
    You can use the tabstrip inside the Tray, where each table is shown inside the tab.
    Do you want to show the 2tables at a time or only table to be shown.
    Where are the buttons placed.
    If you want to show the tables all the time to the user then use Tranparent containers otherwise you can
    use the Tray.
    Regards,
    Lekha.

  • How to upload XML file into the internal table in Webdynpro  ABAP ?

    Hi Friends,
    I am not able to upload the XML file into ABAP,can you please help me in solving this issue with the help of source code.
    Regards
    Dinesh

    Hi Dinesh,
    Try go through this program which I had developed earlier. It takes as input an XML file and then breaks it down into name-value pairs of an intrnal table. You need to pass an XML file as input to this program. (I had hard coded the path for my XML file in it. You need to replace it with 1 of your own or you can just delete it and use the browse button to selet the file on your PC)
    Regards,
    Uday
    REPORT  ZUDAY_XML no standard page heading.
    " Internal table to store the XML file in binary mode
    data: begin of it_xml occurs 1,
            c(255) type x,
          end of it_xml,
    " Name-value pairs table rturned by FM SMUM_XML_PARSE
          it_SMUM_XMLTB type SMUM_XMLTB occurs 0 with header line,
    " Table returned by FM SMUM_XML_PARSE for error handling
          it_bapiret2 type bapiret2 occurs 0 with header line.
    " XSTRING variable to be used by FM SCMS_BINARY_TO_XSTRING to hold the XML file in XSTRING format
    data: I_xstring type xstring, 
    " String variable to hold XML file path to pass to GUI_UPLOAD
          I_file_path type string,
    " Variable to store the size of the uploaded binary XML file
          I_LENGTH TYPE I VALUE 0.
    parameters: P_path type IBIPPARMS-PATH default 'C:\Documents and Settings\c5104398\Desktop\flights.xml'.
    " Get the XML file path from the user
    at selection-screen on value-request for P_path.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          FILE_NAME = P_PATH.

  • Use Internal table in WebDynpro ABAP.

    Hi,
        I am using a internal table, for calling a FM, which require Internal table as its parameter. Since Internal table with header line is not supported in ABAP OO. How to attain this.
    Thanq For Ur time.
    Cheers,
    Sam

    Hi Sam,
    If we want to use an internal table for the FM as input then we can declare a table and use it.
    But when we want use it as a workarea we need to define a work area (another attribute) of a internal table saparatly and use it.
    Best regards,
    Suresh

  • Inserting multiple records in to database table using webdynpro abap

    Hi all,
    I have created a username inputfield,a button and a table
    with one coloumn.
    If i enter  names in the input field then the values should be
    displayed in that table.
    Even i have got the answer i am not able to insert
    the values in to database(ztable) table.
    i.e. only one value(1st) was inserted the second value was
    not inserted ....
    so kindly send me the coding to insert multiple records
    into the database table......
    by,
    ranjith

    hi Ranjith,
    If you want to insert multiple records from the webdynpro view table to database table then try the following code.
    DATA lo_nd_tablenode TYPE REF TO if_wd_context_node.
      DATA lo_el_tablenode TYPE REF TO if_wd_context_element.
      DATA ls_tablenode TYPE wd_this->element_tablenode.
      DATA it_tablenode LIKE STANDARD TABLE OF ls_tablenode.
      navigate from <CONTEXT> to <tablenode> via lead selection
      lo_nd_tablenode = wd_context->get_child_node( name = wd_this->wdctx_tablenode ).
      get element via lead selection
      lo_el_tablenode = lo_nd_tablenode->get_element(  ).
      get all declared attributes
      lo_nd_tablenode->get_static_attributes_table(
      IMPORTING
        table = it_tablenode ).
    MODIFY databasetablename FROM TABLE  it_tablenode.
    here it_tablenode is the internal table which holds the value from webdynpro view..
    Regards,
    Shamila.

  • Dynamic Select of Row in a table in webdynpro Abap

    Hi,
      I have an requirement, I have an table  and a button, I need to select a row in a table based on button action.
    For example : in a table i have 3 rows. I am submiting a value in a button, I want to see that row highlighted for the value I am sending through button.
    Please let us know the code how to implement this.
    Thanks

    Hi,
    First you have to go to table and set its property "SELECTION MODE" to single or multi lead depending on ur need.
    Then in the ACTION of the button you can use the following code to get the values in the selected row.
    DATA:
         node to get table node for finding no. of rows
            lo_nd_one  TYPE REF TO if_wd_context_node,
         Get selected row for finding no. of rows
       it_table               TYPE        wdr_context_element_set,
         workarea to get selected row
            wa_table                LIKE LINE OF           it_table,
    To get the Selected line item into an internal table
      CALL METHOD lo_nd_one->get_selected_elements
        RECEIVING
          set = it_table.    " data in internal format
      IF it_table[] IS NOT INITIAL.
      type conversion for work area
        READ TABLE it_table INTO wa_table INDEX 1.
    if a row is present
        IF  sy-subrc IS INITIAL.
        Get the values of each attribute
          CALL METHOD wa_table->get_static_attributes
            IMPORTING
              static_attributes = wa_final.       "<Selected data in work area.>  ---> this will have your data
        ENDIF.
    Here wa_final is the work area which is of your table fields type.
    This wa_final will have the selected row.

  • Personalization(Settings) of Table in Webdynpro ABAP

    Hi,
    I have to implement Personalization for end user in my View.
    So i was checking the Demo Component  WDR_TEST_PERS_IMP_EXP
    when I was testing Settings option in this Application it show Pop Up saying Personalization not possible.
    So when i debugged this component it is showing the Restricted View of the Component WDR_P13N.
    Please do let me know, do i need to set any parameters to enable Personalization.
    Please do fine the attached screen shot.
    Thanks in Advance!
    Regards,
    Shashikanth

    Hi,
    Check the component WD_GLOBAL_SETTING and run to set  the Do Not Allow Personalization by the User option to false.
    also, please refer the below links.
    Personalization in Web Dynpro ABAP Applications
    https://help.sap.com/saphelp_nw04s/helpdata/en/46/98ce61f37d19ace10000000a11466f/content.htm
    hope this helps you.
    Regards,
    Rama

  • Visibility of a Table element  - WebDynpro ABAP

    hi all,
    I m trying to do the next  ...
    I have a select options with a button that trigger a method.  In this method I want to set on  the visibility of a table with the result of a SO .
    I see that I can put  'visible'  throgh  properties of the table . but I dont know how i can do visible again the table.
    any ideas?
    regards

    Hi,
    Check the code which give you idea about visability of fields, but bind table and change according to your requirement.
    DATA lo_nd_dctrl TYPE REF TO if_wd_context_node.     " Node of DCTRL structure
      DATA lo_el_dctrl TYPE REF TO if_wd_context_element.  " Element of DCTRL structure
      DATA ls_dctrl TYPE wd_this->element_dctrl.           " Structure for DCTRL
      DATA:lv_asn_ind TYPE wd_this->element_dctrl-asn_ind, " Variable of ASN fieldfor DCTRL
           lv_bool TYPE wdy_boolean.                       " Variable of boolean field for DCTRL structure
      DATA :wd_por_en TYPE REF TO cl_wd_checkbox.          " Workarea to declare check box
    navigate from <CONTEXT> to <DCTRL> via lead selection
      lo_nd_dctrl = wd_context->get_child_node( name = wd_this->wdctx_dctrl ).
    get element via lead selection
      lo_el_dctrl = lo_nd_dctrl->get_element( ).
    @TODO handle not set lead selection
      IF lo_el_dctrl IS INITIAL.
      ENDIF.
      lv_bool = abap_true..
      CALL METHOD lo_el_dctrl->set_attribute_property
        EXPORTING
          attribute_name = 'ASN_IND'
          property       = if_wd_context_element=>e_property-read_only"if_wd_context_element~e_property-read_only
          value          = lv_bool.
      wd_por_en ?= view->get_element('SN_CHKBOX').
      CALL METHOD wd_por_en->set_enabled
        EXPORTING
          value = abap_false.
    Regards,
    Goutam Kolluru.

  • To upload a excel file to dB table through webdynpro ABAP

    HI,
        I am unable to upload a excel file directly by using  func module   "HR_KR_XSTRING_TO_STRING".
        If file is in tab delimited then only, I am able to upload.
        Suggest me if there are any other options to upload a excel file.

    Hi,
    The below link gives you an explanation of how you can upload an excel file to web dynpro.
    http://www.****************/Tutorials/WebDynproABAP/Upload/Page1.htm
    Kindly read go through the below link, as this issue have been brought up before
    http://forums.sdn.sap.com/thread.jspa?threadID=1831838
    Thanks and regards.
    Edited by: Suraj Ravindran Nair on Feb 24, 2012 6:24 AM

  • How to display summation of a field in table displayed in Webdynpro ABAP

    Hi,
    I am displaying a table in Webdynpro ABAP. This consists of data for different PERNRs.
    I need to display the sum of a particular column for each PERNR, after the end of each PERNR data. (table sorted by PERNR).
    Is there any way to display this in the table? If so then please let me know.
    Regards
    Moderator message: wrong forum, please have a look in the "Web Dynpro ABAP" forum.
    Edited by: Thomas Zloch on Mar 7, 2011 9:20 AM

    Hello,
    I believe you have created the query in SQ00.
    Go to SQ00.
    Select your Query.
    Click on Change
    On the Top Left Hand Corner, you will find "BASIS MODE"
    Click on the Basis Mode Button
    Once you click on Basis Mode Button, you will get "Title"
    Change the title what you are intended to change.
    SAVE the entries.
    Execute the Query.
    You will be able to see new Heading on the Query.
    Hope this helps you.
    Regards,
    Ravi

Maybe you are looking for