Save data to a table (In the View method)

Hi,
   I am new to Webdynpro.We have a requirement in BW to update user config tables using webdynpro.I got the retrieve data part working.
  Now I am trying to save data back to the table.I got the following code in the save method which will be called when the save button is clicked.
method ONACTIONSAVEDATA .
data:
      TABLE_NODE type ref to IF_WD_CONTEXT_NODE,
      varTable    type standard table of ZUSRCONFIG.
      TABLE_NODE = WD_CONTEXT->GET_CHILD_NODE( 'TABLE_N1' ).
endmethod.
How can I get the data from the TABLE_NODE so that I can use a update command subsequently.TABLE_NODE in the context is bound to ZUSRCONFIG table.
Thanks

hi siva...
here is the code :
DATA lo_nd_node_table TYPE REF TO if_wd_context_node.
  DATA lo_el_node_table TYPE REF TO if_wd_context_element.
  DATA ls_node_table TYPE wd_this->element_node_table.
navigate from <CONTEXT> to <NODE_TABLE> via lead selection
  lo_nd_node_table = wd_context->get_child_node( name = wd_this->wdctx_node_table ).
@TODO handle not set lead selection
  IF lo_nd_node_table IS INITIAL.
  ENDIF.
get element via lead selection
  lo_el_node_table = lo_nd_node_table->get_element(  ).
@TODO handle not set lead selection
  IF lo_el_node_table IS INITIAL.
  ENDIF.
alternative access  via index
lo_el_node_table = lo_nd_node_table->get_element( index = 1 ).
@TODO handle non existant child
IF lo_el_node_table IS INITIAL.
ENDIF.
get all declared attributes
  lo_el_node_table->get_static_attributes(
    IMPORTING
      static_attributes = ls_node_table ).
ls_node_table will containe the values of your table.
---regards,
   alex b justin

Similar Messages

  • How to bind data to table in the view

    Structure in  context:
    Result(0....n)
    |-----lmAcctbPK(1...1)
    |         |-----acctno
    |         |------retrieveDate (type: Calendar)
    |---closeBalance
    |----availableBalance
    How can I bind the list to a table in the view?
    Thanks in advance.
    Message was edited by:
            shen peng

    Thanks for your feedback.
    In a word, lmAcctbPK is a composite  primary key, just like closeBalance and availableBalance, is property of an object.
    Output like this:
    acctNo                                                |   closeAvailableBalance |  closeBalance
    YPp6QfwWepzm1h0q7EoCcJ8iEXL4k83u   |    125.0   |     1243.87
                                                                    |    125.0   |     1243.87
                                                                    |    2125.0  |        3000.0
                                                                    |    125.0    |        1243.87
                                                                    |     1111.0  |       43794.87

  • How to send data from internal table to the shared folder in ABAP

    Hi experts,
             My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is  "
    xxx\y\z....".
    I do not have any idea on how to send data from internal table to the shared folder path.
    can anybody please help me out how to do this?
    Thanks & Regards
    Sireesha.

    Where that folder is located, its on presentation server i.e. desktop or application server.
    If its on presentation server, use FM GUI_UPLOAD.
    If its on application server, then use DATASET functions. Have a look at below link.
    [File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
    I hope it helps.
    Thanks,
    Vibha
    Please mark all the useful answers

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • I want to get the data of a table inside the Form but it is not passed

    I want to get the data of a table inside the Form but it is not passed to the form by tables parameters.
    How can I do this.
    Regards

    If there is a problem with defining it globaly, you can define a field symbol globably and point to it. For example.  It would probably be better to define your table globably.
    report zrich_0003 .
    field-symbols: <imarc> type marc_upl_tt.
    start-of-selection.
      perform get_data.
    *       FORM get_data                                                 *
    form get_data.
      data: imarc type table of marc with header line.
      select * from marc into table imarc up to 10 rows.
      assign imarc[] to <imarc>.
      perform write_data.
    endform.
    *       FORM write_data                                               *
    form write_data.
      data: xmarc type marc.
      loop at <imarc> into xmarc.
        write: / xmarc-matnr, xmarc-werks.
      endloop.
    endform.
    Regards,
    Rich Heilman

  • How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single method ?

    How to encrypt column of some table with the single
    method ?How to encrypt column of some table with the single
    method ?
    using dbms_crypto package
    Assumption: TE is a user in oracle 10g
    we have a table need encrypt a column, this column SYSDBA can not look at, it's credit card number.
    tha table is
    SQL> desc TE.temp_sales
    Name Null? Type
    CUST_CREDIT_ID NOT NULL NUMBER
    CARD_TYPE VARCHAR2(10)
    CARD_NUMBER NUMBER
    EXPIRY_DATE DATE
    CUST_ID NUMBER
    1. grant execute on dbms_crypto to te;
    2. Create a table with a encrypted columns
    SQL> CREATE TABLE te.customer_credit_info(
    2 cust_credit_id number
    3      CONSTRAINT pk_te_cust_cred PRIMARY KEY
    4      USING INDEX TABLESPACE indx
    5      enable validate,
    6 card_type varchar2(10)
    7      constraint te_cust_cred_type_chk check ( upper(card_type) in ('DINERS','AMEX','VISA','MC') ),
    8 card_number blob,
    9 expiry_date date,
    10 cust_id number
    11      constraint fk_te_cust_credit_to_cust references te.customer(cust_id) deferrable
    12 )
    13 storage (initial 50k next 50k pctincrease 0 minextents 1 maxextents 50)
    14 tablespace userdata_Lm;
    Table created.
    SQL> CREATE SEQUENCE te.customers_cred_info_id
    2 START WITH 1
    3 INCREMENT BY 1
    4 NOCACHE
    5 NOCYCLE;
    Sequence created.
    Note: Credit card number is blob data type. It will be encrypted.
    3. Loading data encrypt the credit card number
    truncate table TE.customer_credit_info;
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    BEGIN
    for cred_record in (select upper(CREDIT_CARD) as CREDIT_CARD,
    CREDIT_CARD_EXP_DATE,
    to_char(CREDIT_CARD_NUMBER) as CREDIT_CARD_NUMBER,
    CUST_ID
    from TE.temp_sales) loop
    dbms_output.put_line('type:' || cred_record.credit_card || 'exp_date:' || cred_record.CREDIT_CARD_EXP_DATE);
    dbms_output.put_line('number:' || cred_record.CREDIT_CARD_NUMBER);
    input_string := cred_record.CREDIT_CARD_NUMBER;
    raw_input := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    dbms_output.put_line('> Input String: ' || CONVERT(UTL_RAW.CAST_TO_VARCHAR2(raw_input),'US7ASCII','AL32UTF8'));
    encrypted_raw := dbms_crypto.Encrypt(
    src => raw_input,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    encrypted_string := rawtohex(UTL_RAW.CAST_TO_RAW(encrypted_raw)) ;
    dbms_output.put_line('> Encrypted hex value : ' || encrypted_string );
    insert into TE.customer_credit_info values
    (TE.customers_cred_info_id.nextval,
    cred_record.credit_card,
    encrypted_raw,
    cred_record.CREDIT_CARD_EXP_DATE,
    cred_record.CUST_ID);
    end loop;
    commit;
    end;
    4. Check credit card number script
    DECLARE
    input_string VARCHAR2(16) := '';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(input_string,'AL32UTF8','US7ASCII'));
    key_string VARCHAR2(8) := 'AsDf!2#4';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(CONVERT(key_string,'AL32UTF8','US7ASCII'));
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    decrypted_raw RAW(2048);
    decrypted_string VARCHAR2(2048);
    cursor cursor_cust_cred is select CUST_CREDIT_ID, CARD_TYPE, CARD_NUMBER, EXPIRY_DATE, CUST_ID
    from TE.customer_credit_info order by CUST_CREDIT_ID;
    v_id customer_credit_info.CUST_CREDIT_ID%type;
    v_type customer_credit_info.CARD_TYPE%type;
    v_EXPIRY_DATE customer_credit_info.EXPIRY_DATE%type;
    v_CUST_ID customer_credit_info.CUST_ID%type;
    BEGIN
    dbms_output.put_line('ID Type Number Expiry_date cust_id');
    dbms_output.put_line('-----------------------------------------------------');
    open cursor_cust_cred;
    loop
         fetch cursor_cust_cred into v_id, v_type, encrypted_raw, v_expiry_date, v_cust_id;
    exit when cursor_cust_cred%notfound;
    decrypted_raw := dbms_crypto.Decrypt(
    src => encrypted_raw,
    typ => DBMS_CRYPTO.DES_CBC_PKCS5,
    key => raw_key);
    decrypted_string := CONVERT(UTL_RAW.CAST_TO_VARCHAR2(decrypted_raw),'US7ASCII','AL32UTF8');
    dbms_output.put_line(V_ID ||' ' ||
    V_TYPE ||' ' ||
    decrypted_string || ' ' ||
    v_EXPIRY_DATE || ' ' ||
    v_CUST_ID);
    end loop;
    close cursor_cust_cred;
    commit;
    end;
    /

  • How to encrypt column of some table with the single method  on oracle7/814?

    How to encrypt column of some table with the single method on oracle7/814?

    How to encrypt column of some table with the single method on oracle7/814?

  • Select data from a table and a view: field with same content and different type

    hi all,
    I need data from a table hrp1001 and a view V_USR_NAME. What they have in common are the content of the fields SOBID and BNAME .
    It will be easier if those fields add a same type but they dont.
    Any suggestions for a workaround?
    Thanks

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Save data into Z TABLE when save button is clicked on BPS web application

    Hi gurus,
    Recently i've been working with SEM-BPS and now i have an issue,
    I had to modify the BPS layout to show an input field where the user could write a comment, that was done modifying the layout in the transaction SE80 manipulating the BSP application, but now i have to save the content of those fields in a Z table when the SUBMIT event is triggered which save the content of all other standard fields. Before the saved is done i must send a pop up to confirm the action.
    The trouble is where and how i must modify the code to achieve that.
    Or if there's another way to solve my problem please let me know.
    Best regards.
    Tony Montes.

    Hi Andrey,
    Thanks for your time and response.
    Let me told you, i was traying to implement what you say in your last post but now i'm facing a new problem,
    The way i used to create the new field from HTML for the comment is not correct because the data in the GRIDLAYOUT are paged, so, when i change the page all data that i introduced in the field are ereased and i must save that values before change the page in a kind of buffer or something like that.
    so my new question is this, Do you know a right way to add that field to GRIDLAYOUT?  and then save this values in a Z table before save al plan data into the infocube.
    Sorry for all this questions but ive read a lot of articles and I can't find anything really helpful
    I've read some articles what talk about this issue but in IP, sincerely i'm NEW in this topic.
    Regards.
    Tony Montes.

  • Data from two tables in the same row in XML transformation

    Hi,
        I am using XML transformation for generating excel file which is to besent as email attachment.
        Here  I want to display the data from two internal tables in the same row in the excel. .I am using   <tt:loop ref=".<table name>"> ...  </tt:loop> for looping through the table. Can I loop two table simultaneously ? In that case how will I specify the fields in each table . Some of the fields in two tables are of same name and type.
    Please help...
    Thanks,
    Jissa

    Hello Brian,
    Thank you for your answer. It is approach I will use, I think. However let me ask: Would it be possible to have a Version in this layout, too? I mean to see, which value comes from Version A and which comes from Version B? Something like this:
    Calendar Month Version Sales Amount
    2011.01  B  200
    2011.02  B  300
    2011.03  A  260
    2011.04  A  230
    2011.05  A  200
    A

  • How to display data from internal table in the SELECTION-SCREEN

    Hello Experts,
    My requirement is to display the data's from an internal table in the selection screen. I tried using selection-screen comment. But it is working only for a single record. Can anyone please tell me how to do this?

    Hi Ritika,
    we cant use write statement inside selection-screen.
    see my coding.
    SELECTION-SCREEN BEGIN OF SCREEN 123 AS WINDOW TITLE TEXT-456.
      SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1
                                          NO INTERVALS.
        SELECT-OPTIONS SEL1 FOR SY-DATUM.
        PARAMETERS     PAR1(10).
    <b>** I WANT ALL RECORDS FROM AN INTERNAL TABLE HERE ONLY</b>
        SELECTION-SCREEN END OF BLOCK BL1.
      SELECTION-SCREEN PUSHBUTTON 2(10)  but1 USER-COMMAND cli1.
      SELECTION-SCREEN PUSHBUTTON 20(10)  but2 USER-COMMAND cli2.
    SELECTION-SCREEN END OF SCREEN 123.

  • Copying data from a table in the Database to an internal table.

    Hello,
    How do I copy data that is a table that is in the database and and then load the data to an internal table in the ABAP/4 Aditor.
    Please help.

    hi,,
    do this way ...
    tables : mara.
    parameters : p_matnr like mara-matnr,
    start-of-selection.
    select <fields>  from mara into table it_mara
         where matnr = p_matnr.
      if sy-subrc = 0.
    endif.

  • Error while loading  data into External table from the flat files

    HI ,
    We have a data load in our project which feeds the oracle external tables with the data from the Flat Files(.bcp files) in unix.
    While loading the data, we are encountering the following error.
    Error occured (Error Code : -29913 and Error Message : ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04063: un) while loading data into table_ext
    Please let us know what needs to be done in this case to solve this problem.
    Thanks,
    Kartheek

    Kartheek,
    I used Google (mine still works).... please check those links:
    http://oraclequirks.blogspot.com/2008/07/ora-29400-data-cartridge-error.html
    http://jonathanlewis.wordpress.com/2011/02/15/ora-29913/
    HTH,
    Thierry

  • How to save data in file by puting the data in different colomns ?

    I am compiling a program by using Labview, and I use the 5 loops. For every loop, I get 10 data. I want to save all data in a file. But I don't want put them in one colomn, and just want to put the data getting from one loop in a colomn, and thus in my file, there should be 5 colomns. i.e. for every data for one loop should be in one colomn. How can I do that ? Thanks.

    If you are going to save the data as text, e.g. a tab delimited spreadsheet, then you decide what data goes where by formatting the data; concatinating the different cell values with tab constants (to separate rows) and carriage return line feed to separate rows...
    See attached example.
    If you want to write the data as a binary file create a 2D array with the correct number of columns and rows and use the replace array element function to insert the values where they belong...then save the array.
    MTO
    Attachments:
    format_2_text.gif ‏15 KB

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi,
    Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
    I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
    In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
    I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
    but it did not help me.
    Thanks,
    Abhishek

    Hi Abhishek,
    Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
    Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
    After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
    I hope this helps.
    Jan.

Maybe you are looking for

  • Error message when iTunes looks up Gracenotes database for song info

    "CDDB error. HTTP processing error." is the message I now receive when i put a new cd in my computer to import it to my library. previously as soon as i put it in when connected to internet, the info would appear without error. I've read in help file

  • A little disapointed with applications

    As a new convert to mac, and with all the "out of the box" hype, I was a little disappointed that there wasn't a spreadsheet/word processing package included with this purchase. Esp with the purchase price being more than twice what I purchased my fo

  • How to Increase textarea size in HTML code in WM05

    Hi All, I am working on a project where we used JSP & HTML language for User Interfaces. My application running on WM2005. In one of the page is having text area with cols=30 and rows=15. Here I increased the number of cols to 50, and checked in PDA(

  • Ms Outlook

    Example can't send attachement of 30 pages can only send attachment of 10 pages at a time . I already check and the file isn't big at all. Would the 30page attachment happen to be a "scan to email" from a network printer/scanner at the office?  

  • Reg:Deploy objects to Cloud

    Hi !      I had reset the sftp user password . And using all the details " SFTP username , password & hostname " properly with port 22. But I am getting the error "unable to connect to sftp server with provided details. Ensure that the correct detail