Read table data from Adobe Form in WD method

Hello,
   Context is like this :
   ADOBE_DATA        --- Node
         POS                  -
Node   which has Dict. Stru : TABLE  card : o..n
               POSNR       --- Attribute
               MATNR       -
Attribute
Created Adobe Interactive Form through the template source of view layout.So xml schema generated automatically
and is all ok.
Method on action Submit :
DATA :
Node_zatodv_pos       type ref to If_Wd_Context_Node,
it_zatodv_pos TYPE STANDARD TABLE OF zatodv_tab_pos.
Node_pos =
             Node_Adobe_data->get_Child_Node( Name = If_MAIN=>wdctx_POS ).
  Node_pos->get_static_attributes_table( importing table = it_zatodv_pos ).
When I test the application,this method returns SY-SUBRC is 0 but internal table is "always empty".
I have also individual attributes in the context which are read correctly.Only get_static_attribute_table doesn't read the table content.Please could any one help me where would be the problem.
Thank you

Hi peter,
If you are trying to add data to a standard SAP table then you should use a FM or BAPI for that but if the table is not standard then you can use following steps but it would be better to do it using FM or BAPI.
Do the following(without FM/BAPI):
1. Crate a context in your view mapped to the fields of the database table.
2. Now use this context as the data source for the form.
3. Map the fields of the form with the attributes of the context.
4. Now create a button on the form or on your view which has a action event handler method.
5. In the method use code wizard to read the context attached to adobe form. By default it will create a structure containing data, which will be sufficient for adding one record at a time.
6. Now use this structure to add data to table using SQL queries.
Do the following for FM/BAPI integration:
1. Create a FM/BAPI which has the functionality to add data to your SAP table.
2. Now use service call to add the FM/BAPI fields as a context to your web dynpro component's context.
3. Now map it with the view where the adobe form is created.
4. Follow steps 2nd, 3rd and 4th as above.
5. Now in your Action method use code wizard to call the method created by service call to FM/BAPI.
This will work as required.
Please reward points if useful.
Regards,
Vaibhav Tiwari.

Similar Messages

  • Retreival of Dynamic Table Datas from Adobe to WebDynpro- ABAP

    Dear Friends,
    I have Developed an application in Webdynpro-ABAP, where i have integrated Adobe form in the webdynpro.
    In the adobe form, dynamic table is there where we can add and delete the rows at runtime.
    I am trying to retreive the table datas at runtime from the adobe.
    I can able to retreive only the first record from the table, even if the table contain more than one rows.
    As per the below code i have retreived the count, where it is showing the count as 1.
    using the method get_static_attributes_table i am trying to fetch all the records, but i can able to retreive only the first record.
    lo_nd_zsm_fm_transport_tra = wd_context->get_child_node( name = wd_this->wdctx_zsm_fm_transport_tra ).
      lo_nd_tr_details_i = lo_nd_zsm_fm_transport_tra->get_child_node( name = wd_this->wdctx_tr_details_i ).
    count = lo_nd_tr_details_i->GET_ELEMENT_COUNT( ).
    elems_bank_table = lo_nd_tr_details_i->get_elements( ).
    lo_nd_tr_details_i->get_static_attributes_table(
      importing
        table = ls_tr_details_i ).
    Even Cardinality i have maintained as 1.N for the node.
    Kindly provide me the solution.
    Thanks and Regards,
    Sathish,,

    Hi, I have solution for read data from dynamic table and add these added row to WD4A context (and then save them to DB) (in ONACTIONPROCESS_SUBMIT event):
    DATA: l_fp TYPE REF TO if_fp.
    l_fp = cl_fp=>get_reference( ).
    DATA: l_pdfobj TYPE REF TO if_fp_pdf_object.
    l_pdfobj = l_fp->create_pdf_object( ).
    l_pdfobj->set_document( pdfdata = lv_pdfsource ).
    l_pdfobj->set_extractdata( ).
    l_pdfobj->execute( ).
    DATA: pdf_form_data TYPE xstring.
    l_pdfobj->get_data( IMPORTING formdata = pdf_form_data ).
    DATA: converter TYPE REF TO cl_abap_conv_in_ce, formxml TYPE string.
    Converter = cl_abap_conv_in_ce=>create( input = pdf_form_data ).
    Converter->read( IMPORTING data = formxml ).
    TYPE-POOLS: ixml.
    DATA: l_ixml TYPE REF TO if_ixml.
    l_ixml = cl_ixml=>create( ).
    DATA: streamfactory TYPE REF TO if_ixml_stream_factory,
    istream TYPE REF TO if_ixml_istream.
    streamfactory = l_ixml->create_stream_factory( ).
    istream = streamfactory->create_istream_string( formxml ).
    DATA: document TYPE REF TO if_ixml_document.
    Document = l_ixml->create_document( ).
    DATA: parser TYPE REF TO if_ixml_parser.
    parser = l_ixml->create_parser( stream_factory = streamfactory
                                               istream = istream
                                               document = document ).
    Parser->parse( ).
    the code above allows you to read xml data from pdf file, then you need only to read xml and adding rows to your context:
    data : item type string.  DATA: nodechild TYPE REF TO if_ixml_node,
            Childschild TYPE REF TO if_ixml_node.
        data: num_of_children type i,
              x type i,
              y type i,
              num_of_attribute.
    node = document->find_from_name('ZAM_PROTSTROJF').
    num_of_children = node->num_children( ).
    nodechild = node->get_first_child( ).
    data: wa_strojdetail type ZAM_PROTSTROJF,
          wa_strojdetail_tab TYPE TABLE OF ZAM_PROTSTROJF.
    wa_strojdetail-docnum = ls_zam_protstroj-docnum.
    wa_strojdetail-bukrs = 'VVS'.
    wa_strojdetail-mandt = sy-mandt.
    y = 1.
    do Num_of_children times.
           num_of_attribute = nodechild->num_children( ).  " Childschild->num_children( )." Getting the number of attributes
           Childschild = nodechild->get_first_child( ).
           wa_strojdetail-itemnum  = y.
           x = 1.
           do num_of_attribute times.
              item = Childschild->GET_value( ).
              CASE x.
                WHEN 4.
                  wa_strojdetail-anln1 = item.
                WHEN 5.
                  wa_strojdetail-anln2 = item.
                WHEN 6.
                  wa_strojdetail-bubtr = item.
                WHEN 7.
                  wa_strojdetail-belnr = item.
              ENDCASE.
              Childschild = Childschild->get_next( ).
              x = x + 1.
          enddo.
          y = y + 1.
          APPEND wa_strojdetail to wa_strojdetail_tab.
          nodechild = nodechild->get_next( ).
    enddo.
    This is complete solution for adding rows in interactive forms and working with them in WD4A!
    Regards Jiri
    Edited by: Jiri Neuzil on Jun 10, 2009 8:13 AM
    Sorry for formatting, but I don't know, how to format text correctly on this site in plain text I have all text correctly formatted, but in preview....

  • Pl/sql block reading reading table data from single point in time

    I am trying to figure out whether several cursors within a PL/SQL block are executed from within a Single Point In Time, and thus do not see any updates to tables made by other processes or procedures running at the same time.
    The reason I am asking is since I have a block of code making some data extraction, with some initial Sanity Checks before the code executes. However, if some other procedure would be modifying the data in between, then the Sanity Check is invalid. So I am basically trying to figure out if there is some read consistency within a PL/SQL, preventing updates from other processes to be seen.
    Anyone having an idea?.
    BR,
    Cenk

    "Transaction-Level Read Consistency
    Oracle also offers the option of enforcing transaction-level read consistency. When a transaction runs in serializable mode, all data accesses reflect the state of the database as of the time the transaction began. *This means that the data seen by all queries within the same transaction is consistent with respect to a single point in time, except that queries made by a serializable transaction do see changes made by the transaction itself*. Transaction-level read consistency produces repeatable reads and does not expose a query to phantoms."
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=read+consistency&tab_id=&format=ranked

  • Pass the data from a form in workflow to z table

    Hi all,
    How can I pass the data from a form in workflow to z table?

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • Populate a table reading the data from a TXT file

    how can I populate a table reading the data from a TXT file?
    thanks

    Hey Kevin!
    Using FORMS.TEXT_IO to bulk load data from a file strikes me as re-inventing the wheel. It is just about justifiable in a self-service environment, but I regard the EXTERNAL TABLE is a better solution for that situation as well.
    The same applies to UTL_FILE. I think the ability to read text with UTL_FILE is primarily intended for read file-based configuration or file manipulation/processing rather than data loading.
    Re-writing a text file into SQL statements is too much like hard work (even with an editor that supports macro definition and regular expressions) for no real benefit. You lose all the bulk load peformance you would get from SQL*Loader. But for QAD I'd probably let you off with it.
    You missed out one obvious alternative: using Java to turn the contents of an XML file into a CLOB and inserting it into a table which is read by a PL/SQL procedure that parses the XML records and insert the retrieved data into a table.
    Stay lucky, APC

  • Inserting data from jsp form to multiple tables !

    Hi,
    I want to insert data from jsp form to two tables
    tables are
    (1) Form
    formId (PK)
    deptName
    (2) Data
    formId (FK)
    sNo
    description
    itemCode
    and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
    so how do i insert data from a jsp form to multiple tables.

    You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
    Unless there is something else I am not catching, this seems pretty straight forward.

  • How to read the data from excel file and store into the table?

    Hi All,
    I have table with BLOB datatype contains a excel file. I have to read that data from excel and store into one table with all the fields in excel.
    All the excel fields and my table columns are same.
    Can you share with me how can acheive this using LOB's?
    Thanks

    Hi OraSuirya,
    you can try with external tables .
    syntax as follows
    create table ext_table_csv (
    i Number,
    n Varchar2(20),
    m Varchar2(20)
    organization external (
    type oracle_loader
    default directory ext_dir
    access parameters (
    records delimited by newline
    fields terminated by ','
    missing field values are null
    location ('file.csv')
    reject limit unlimited;
    For this you need to create directory
    Directory Creation syntax:
    create or replace directory ext_dir as 'D:\oracle\user_dir\ext_dir';
    grant read, write on directory ext_dir to <User>;
    please paste the excel file in the particular directory .
    I hope this will help you.
    Please correct me if I am wrong anywhere .
    Thanks,
    Tippu.

  • Extract the Attachment data from Adobe Reader 8

    Hi,
      We have a requirement to read the attachment data from adobe pdf. We are designing the PDF's in Adobe Live Cycle Designer ES. From the discussion i understand we can get the name and size of the attachment using dataobjects. But i need the content of the attachment. Let me know if there is any code to extract the attachment data.
    Thanks in advance.

    You can read the contents of an attached file using the doc.getDataObjectContents method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.475.html
    You'll just have to parse the contents correctly using JavaScript.

  • How to transfer Internal table to a Adobe form? ....urgent...

    Hi Experts,
    I am not able to get the data in the adobe form from an internal table.
    I need to put the data in individual fields in the adobe form.
    I'm working on Adobe Interactive form developed in WDP ABAP.( I have successfully config the ADS in my server.)
    Action:
    1. There are 1 table in the Adobe Interactive form((Adobeform)created by the 'sfp' t-code.
    a) create a interface with a structure(A_STRU).
    b) create a form with the interface.
    c) In the layout of the form, drag a table to the form.
    d) Binding the table to the A_STRU.
    e) Binding the fields of the table to the fields of the structure.
    2. Create a view -
    first_view in the WDP ABAP.
    3. In the first_view, there is a Interactiveform ( named "adobe_form" ) to be binding the Adobe Interactive form (Adobeform).
    4. Type the code in the wddoinit of the first_view for bindding the internal table to context of the adobe interface.
    DATA lo_nd_z_php_form_pay TYPE REF TO if_wd_context_node.
    DATA lo_nd_g_context TYPE REF TO if_wd_context_node.
    DATA lo_el_g_context TYPE REF TO if_wd_context_element.
    DATA ls_g_context TYPE wd_this->element_g_context.
    navigate from <CONTEXT> to <Z_PHP_FORM_PAY> via lead selection
    lo_nd_z_php_form_pay = wd_context->get_child_node( name = wd_this->wdctx_z_php_form_pay ).
    g_context is the context interface of the adobe form.
    navigate from <Z_PHP_FORM_PAY> to <G_CONTAIN> via lead selection
    lo_nd_g_context = lo_nd_z_php_form_pay->get_child_node( name = wd_this->wdctx_g_context ).
    binding the g_context to the form context.
    lo_nd_g_context->bind_table( result_payslip ).
    through the debug the program, I found 50 records in the result_payslip internal * * table .
    5. run the wda, I find the nothing data to be displayed in the adobe form.
    6. But I can transfer a string parameter from wda to adobe form. I don't know how to transfer data in the table?
    I don't know how to config the table in the adobe form?
    I hope to get the guide for step by step to solve the problem. Thanks a lot .
    I hope to get some hints. Thanks a lot .
    Pls help me out.
    Thanks & Regards,
    Tao

    hi ,
    I have similar difficulty.....
    I Am putting data from internal table into Adobe form using ABAP web dynapro.
    I am not able to see data in Adobe form though inernal table contains 14 records.
    Also, i have been thr' WDR_TEST_ADOBE
    but still not able to solve problem .
    Can you help me?

  • Interactive table control in Adobe forms

    Dear gurus,
      I am trying to create an interactive table control with header. The table control will have 10 rows, and I want the users to be able to enter values into the table.
    I created a new node with cardinality 0...n; and added attributes under it. The I dragged that onto my design view and made duplicate entries of the rows to get 10 rows under the header.
    Now the issues I am having are
    1) The table is not visible in preview Pdf; I tried to save and activate the form, but still appears to be invisible
    2) For some strange reason the table control in adobe forms is not as flexible as the one in webdynpro, where it is easier to bind the fields and send / recieve data from the interface.
    ~thanks and appreciate any comments.

    when your cardinality is 0..n you won't see it in preview mode.. you need to launch it from your dynpro & you will see it.
    Also, if you know you're going to have 10 rows all the time, why not make the cardinality 1...n?
    Nevertheless, I personallly wouldn't create the table in this method.
    I would create the table in Web dynpro, add a column called "SeqNo" or whatever and pre-populate that field with 1 - 10. When you drag/drop your table from your Data View, just rt-click that column and hide it so your users won't see that field.
    You'll have 10 rows displayed to the user each time and you won't worry about having to bind anything since it'll be done automagically.

  • TABLE DATA in PDF FORM  Through ABAP WEBDYNPRO

    Hi Friends,
    I have to Populate  SAP TABLE like MARA,VBRK table into PDF form throught ABAP Webdynpro.
    Can you send STEP by STEP Example Doc.
    Thanks In Advance.
    Gautam.

    Hi,
    To display the Table in the Adobe Form you must create a WebDynpro Context.
    In WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes FIELD1 and FIELD2 and so on.
    Now goto method and in that method using code wizard read the node A1.
    And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
    *Declare the TYPES
    TYPES : BEGIN OF TY_TABLE,
    FIELD1 TYPE SOMETYPE,
    FIELD2 TYPE SOMETYPE,
    END OF TY_TABLE.
    *Define Internal Table and work area.
    DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0.
    SELECT FIELD1 FIELD2 FROM TABLENAME INTO TABLE IT_TABLE.
    lr_node_info->bind_table( IT_TABLE ).
    And now goto Layout and give the TemplateSource and after that it asks for the interface name fill on that and select the relevant context. Now the LiveCycle Designer opens. There goto DataView pallette, there you can see the context of the webdynpro, now you simply drag and drop that table, a table is being created in the Layout Designer.
    Regards
    Pradeep Goli

  • Getting data in Adobe forms

    Hi,
    what are the ways to get the custom field data into adobe forms. I want to use in WD application.I made the zpdf form with standard and added some custom fields in that. But how to get the data from table .
    Thanks

    hi,
    ->For getting data from table into Adobe Forms, you need to add code in your WD application only.
    -> You create an UI Element (Interactive Form) for the adobe forms in the Layout.
    -> Give the name of your form (Zpdf) in the Template Source property.
    -> A pop up will appear asking you to make contexts in your application by its own.
    -> Click on Ok and then context will also appear in your Wd application.
    -> Now you can use the context and write the code for getting values in Wddoinit or anywhere you want.
    -> Write select/query or call a FM to fetch the data into an internal table.
    ->Finally bind the internal table with the Contexts created.
    Check out this link :
    /people/bhawanidutt.dabral/blog/2007/11/15/how-to133-integrate-adobe-form-on-webdynpro-for-abap-and-deploy-it-on-portal
    I hope it helps.

  • How to access internal table data from webdynpro to Flex application.

    Hi Connoisseur
    The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and  Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
    There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
    i tried to do pass internal table value  to flex-datagrid.but its not work.
    i would like to know
    1.how to access internal table data from webdynpro to Flex application.
    2.how to pass the internal table to flex-datagrid.
    2.how to pass dynamically in ADOBE flex.
    3. how to do Flex is receiving the wd context data?
    4. how can we update WD context with FLEX data.
    Ple give me sample example and step by step procedure.
    Regards
    laxmikanth

    Hi Laxmikanth,
    Please refer this...
    Flash island: update complex type from flex
    Cheers..
    kris.

  • Offline scenario - post data from saved form to SQLServer

    This is the scenario am struggling to develop. User downloads the interactive form.  Goes offline. I mean no connection to the Web Application Server. But he will have access to a SQLServer database (it may be on his machine or in his intranet). He will fill the form and save it on his local hard disk. Now, I want his saved form data to be posted to the SQLServer.  I thought about a couple of ways to do this.
    1) Is it possible to change the control type of 'Submit' button to submit and then in the URL field, call some ASP page (this page is deployed on a local IIS) and then submit the form fields to that ASP page which takes care of database connection, posting etc. So user downloads form only once. But fills it with different data each time and clicks submit. First of all, will submit button work when the form is not opened in web browser? I mean when it is saved on a local hard disk opened in a standalone Adobe Reader?
    2) Is it possible to write some java program using any APIs and extract the data from the form saved on local hard disk? It may be possible because I have the .xdp file for the form. But I dont know if there are some APIs available to do the same.
    Any inputs whether these ideas are feasible? Any other new ideas are also welcome. Thanks in advance.

    Hi Narayana,
    if you want to export xml data from Reader to local disk you can use a command:
    xfa.host.exportData("",0);
    It works like from menu Export data from Forms.
    To your second post:
    Yes, you can save form in Adobe Live cycle designer as pdf and you can open it in Adobe Reader and test it. It will work.
    In tab Submit for your button set these properties:
    Submit Format: XML Data (XML)
    Submit to URL: url of your page
    Encoding: UTF8
    Here is a sample code in c# for asp.net. Insert method save to your asp.net page and call it from method Page_Load.
              using System;
              using System.IO;
              using System.Web;
              private void save()
                   const int coniBufferLen=1024;
                   string lsTmpFile;
                   try
                        lsTmpFile="c:\adobe\body.pdf.xml.txt";  // File on local disk where to save xml data sent by Reader. IIS needs rights to write here.
                        FileStream loFS=null;
                        try {loFS=File.Create(lsTmpFile);}
                        catch (Exception e1)
                             // TODO
                             return;
                        int liCelkem=Request.ContentLength;
                        int liNacteno=0;
                        byte[] laResponse=null;
                        int liLen=Math.Min(coniBufferLen,liCelkem-liNacteno);
                        while (liLen>0)
                             try
                                  laResponse=Request.BinaryRead(liLen);
                                  loFS.Write(laResponse,0,liLen);
                             catch (Exception e1)
                                  try {loFS.Close();}
                                  catch {}
                                  try {File.Delete(lsTmpFile);}
                                  catch {}
                                  // TODO
                                  return;
                             liNacteno+=liLen;
                             liLen=Math.Min(coniBufferLen,liCelkem-liNacteno);
                        loFS.Close();
                   catch (Exception e2)
                        // TODO
                        return;
    Michal

  • Cannot Read user input on Adobe Form .

    Hi team,
    Can you please go through the issue -
    Developed Interactive Adobe form. Called by webdynpro application.
    Interactive properties enable, display type - native, with pdfsource, template source and data source cleanly populated.
    Submit button is webdynpro native with option CLICK and corresponding code selected in ADOBE FORM.
    All the elements in adobe forms cleanly binded and checked more than 10 times to avoid any mistakes or wrong bindings.
    Event handler code is written for submit button to read the data eneted by user on adobe form.
      lo_el_zleaver_form->get_static_attributes(
        IMPORTING
          static_attributes = ls_zleaver_form ).
    User is able to enter data on adobe form and control is comming to Submit button code but i am not able to read the user input with above code.
    BASIS has check and confirmed that license is installed properly. I am using adobe reader 9 and adobe designer 8.2 and will ECC version 6.0 . Basis has confirmed the ADS configuration, Java stack and ABAP stack are compatible.
    We are using the ADS from SAP NetWeaver 7.01 (EhP1, Java Stack) in
    combination with SAP NetWeaver 7.00 SP15 (ABAP stack).
    Mohan.

    Hi Guys,
    I also created one more Adobe interactive form to test and again USER INPUT CANNOT BE READ. After user click on SUBMIT button the below code is written in SUBMIT button. I am not able to read department details below enteted by user. Is there any othe method you want me to call. I also tried GET_ATTRIBUTE
    Will there be any problem with above version of ADS or ALD etc..
          DATA lo_nd_zdept TYPE REF TO if_wd_context_node.
          DATA lo_el_zdept TYPE REF TO if_wd_context_element.
          DATA ls_zdept TYPE wd_this->element_zdept.
        navigate from <CONTEXT> to <ZDEPT> via lead selection
          lo_nd_zdept = wd_context->path_get_node( path = `ADOBE.ZDEPT` ).
        @TODO handle non existant child
        IF lo_nd_zdept IS INITIAL.
        ENDIF.
        get element via lead selection
          lo_el_zdept = lo_nd_zdept->get_element( ).
        @TODO handle not set lead selection
          IF lo_el_zdept IS INITIAL.
          ENDIF.
        get all declared attributes
          lo_el_zdept->get_static_attributes(
            IMPORTING
              static_attributes = ls_zdept ).
    This is other interactive form where i also tried GET_ATTRIBUTE
    USING GET_ATTRIBUTE***************
      node_info = lo_nd_zleaver_form->get_node_info( ).
    I tried both GET_ATTRIBUTE and GET_ATTRIBUTES but failed.
      node_info->GET_ATTRIBUTES(
      RECEIVING
      ATTRIBUTES = stru_zleaver_Forms ) .
    OR
    lo_nd_zleaver_form = WD_CONTEXT->GET_CHILD_NODE( NAME = WD_THIS->WDCTX_ZLEAVER_FORM ).
      lo_EL_zleaver_form->GET_ATTRIBUTE( EXPORTING NAME  = 'LEAVES_TAKEN'
                               IMPORTING VALUE = LW_LEAVES_TAKEN ).

Maybe you are looking for