Reading data from table control

Hi,
Intially I have a table control and in that I am entering deliveries(manually), how to read them into internal table..plz advise
regards.

Hi,
Use the FM DYNP_VALUES_READ
Regards,
Vikranth

Similar Messages

  • Reading data from table control in an internal table

    Hello All,
    I want to read the data entered in the screen in an internal table,screen has header segment fields of an idoc and two item segment fields with multiple occurance in form of  two table control,have to read both the table control and have to pass it to idoc inbound function based on postion(posnr) of the order. can anyone provide me with the sample code for the same .
    Thanks and Regards,
    Gunjan

    hi gunjan
    refer to the folllowing code. it will work for u
    Creation of an IDoc generation program
    The following code extract contains everything needed to generate an IDoc from data contained in a table.
    FORM F_110_SEND_IDOC.
    CONSTANTS:
      C_MESTYP TYPE EDIDC-MESTYP VALUE 'ZVISTAPM',"message type
      C_DOCTYP TYPE EDIDC-IDOCTP VALUE 'ZVISTAPM01',"idoc type
      C_SEGNAM TYPE EDIDD-SEGNAM VALUE 'Z1VISTAPM'."segment name
    DATA:
      I_ZVISTA_PM TYPE ZVISTA_PM_T OCCURS 6000,
      I_EDIDC TYPE EDIDC OCCURS 0,
      I_EDIDD TYPE EDIDD OCCURS 0,
      WA_ZVISTA_PM TYPE ZVISTA_PM_T,
      WA_EDIDC TYPE EDIDC,
      WA_EDIDD TYPE EDIDD,
      WA_Z1VISTAPM TYPE Z1VISTAPM,
      V_OCCMAX TYPE IDOCSYN-OCCMAX,
      V_NBSEG TYPE I.
    CLEAR WA_ZVISTA_PM.
    CLEAR WA_EDIDC.
    * Save the message type and the basic IDoc type
    * in the control segment
    MOVE C_MESTYP TO WA_EDIDC-MESTYP.
    MOVE C_DOCTYP TO WA_EDIDC-IDOCTP.
    * Retrieve the maximum number of segments in the basic IDoc
    * type
    SELECT MIN( OCCMAX )
      FROM IDOCSYN
      INTO V_OCCMAX
      WHERE IDOCTYP EQ C_DOCTYP AND SEGTYP EQ C_SEGNAM.
    * Save the whole ZVISTA_PM_T table content
    * in the I_ZVISTA_PM internal table.
    SELECT *
    FROM ZVISTA_PM_T
    INTO CORRESPONDING FIELDS OF TABLE I_ZVISTA_PM.
    * Create a data segment for each line of I_ZVISTA_PM
    LOOP AT I_ZVISTA_PM INTO WA_ZVISTA_PM.
      MOVE-CORRESPONDING WA_ZVISTA_PM TO WA_Z1VISTAPM.
      CLEAR WA_EDIDD.
      MOVE C_SEGNAM TO WA_EDIDD-SEGNAM.
      MOVE WA_Z1VISTAPM TO WA_EDIDD-SDATA.
      APPEND WA_EDIDD TO I_EDIDD.
      CLEAR WA_ZVISTA_PM.
      CLEAR WA_Z1VISTAPM.
    ENDLOOP.
    * Count the number of data segments
    DESCRIBE TABLE I_EDIDD LINES V_NBSEG.
    * If the number of data segments exceeds the maximum
    * allowed number, then edit a message in the spool,
    * then display an error message (quit the program)
    IF V_NBSEG GT V_OCCMAX.
      WRITE:/ TEXT-003, V_OCCMAX.
      MESSAGE E751.
    ENDIF.
    * Call the IDoc creation function
    CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
      EXPORTING
        MASTER_IDOC_CONTROL = WA_EDIDC
      TABLES
        COMMUNICATION_IDOC_CONTROL = I_EDIDC
        MASTER_IDOC_DATA = I_EDIDD
      EXCEPTIONS
        ERROR_IN_IDOC_CONTROL = 1
        ERROR_WRITING_IDOC_STATUS = 2
        ERROR_IN_IDOC_DATA = 3
        SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
        OTHERS = 5.
    * If there was an error, display a message (quit the
    * program)
    IF SY-SUBRC NE 0.
      MESSAGE E746.
    ENDIF.
    ENDFORM.
    regards
    ravish
    <b>plz dont forget to reward points if useful</b>

  • Sample pgm for moving data from table control to internal table

    Hi Experts,
          I am newbi to ABAP. I don't have good material for Table control . Appreciate if you direct me to some good source of knowledge on Table control.
    The problem at hand : I am trying to move info/data from table control (in screen painter/ input and output mode ) to ITAB but couldn't . Sample pgm if possible.
    <b>Modify ITAB index TC-Current_Line .</b>
    The above statement is not inserting new lines to ITAB . Help me!
    Thanks for your time

    hi,
    do like this...
    <b>PROCESS AFTER INPUT.</b>
    *&SPWIZARD: PAI FLOW LOGIC FOR TABLECONTROL 'TAB1'
      LOOP AT itab_det.
        CHAIN.
         FIELD itab_det-comp_code.
          FIELD itab_det-bill_no.
          FIELD itab_det-bill_date.
          FIELD itab_det-vend_cust_code.
          FIELD itab_det-bill_amt.
          MODULE <b>tab1_modify</b> ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD itab_det-mark
          MODULE tab1_mark ON REQUEST.
      ENDLOOP.
    <b>MODULE tab1_modify INPUT.</b>
      APPEND itab_det.
    <b>ENDMODULE.                    "TAB1_MODIFY INPUT</b>

  • How to read data from table GLFUNCA quickly?

    Hello everybody!
         Recently,my colleague has programmed a report about reading data from table GLFUNCA,and its speed is very slowly and exceeded limited time sometimes .
    Excuse me?
    how to use INDEX and VIEW TO accelerate it?
    pls supply my helpful solutions.
    Thanks!
    Best wishes!

    Hi,
    Please check your SELECT statement to find out what are the columns being used in the WHERE clause. Then go to SE11 and find out if there are indexes on those columns.
    If Indexes don't exist then you can create indexes on those columns, which might improve the performance.
    However, there might be other areas also, where the performance can be improved. Do a run time analysis / trace and figure which part of the program is taking maximum time.
    Regards,
    Ravi
    Note : Please mark the helpful answers

  • Read data from Table at XI during Mapping

    Hi experts
    How we can pick data from one database table during Mapping, the table is at XI system.
    when we are picking data from table at R/3, we are using RFC Function Module/ BPM, can we pick data from XI database table during mapping ?
    what will be the steps to pick it ?
    Please Help.
    Regards,
    Study SAP

    hi Study Sap
    You may use RFC lookup
    kindly follow these links for RFC lookup
    RFC Lookup.
    Look ups.
    /people/francesco.bersani/blog/2007/03/05/data-lookup-optimized
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    /people/bhavesh.kantilal/blog/2006/07/25/triggering-xi-alerts-from-a-user-defined-function
    Use this crazy piece for any RFC Mapping Lookups!
    /people/sravya.talanki2/blog/2005/12/21/use-this-crazy-piece-for-any-rfc-mapping-lookups
    SAP XI Lookup API
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    Lookup’s in XI made simpler
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler
    regards
    Sandeep Sharma
    PS if helpful kindly reward points

  • Reading data from Table type from Badi /sapapo/curto_create

    Hi,
    I have been trying to read data from badi /sapapo/curto_create . In this badi there is method CS_PPDS_RTO.
    which has nested structure upto 8 level. I have been trying to read data but i am not suceesfull in reading data from the stsructre
    which is present at lowest level.
    The  nested structure of the BEFORE_SAVE is following way.
    BEFORE_SAVE-CS_PPDS_RTO-HIRARCHY-ADD_APPLICTN_DATA-MODES-BODY-CAP_REQS-RESUID.
    I have to read the value of reusid bt i am not sure whow to read this value can you please help me by giving some Bapi or method
    to read the value of Reusid .
    Thanks

    Hi!
    DATA: lv_resuid TYPE resuid.
    LOOP AT CS_PPDS_RTO-HIRARCHY-ADD_APPLICTN_DATA-MODES-BODY-CAP_REQS-RESUID
    INTO lv_resuid.
    ENDLOOP. 

  • Reading the data from table control and write log.

    Hi all,
       In va01 trasaction i have table control 'All item'.
       I want to write value of some columns,( Article no, Order, plant ) so on into ecatt Log file after saving the trasction, for all rows which is having article no.
       Is there any possibility in eCATT with going to GETGUI function which is static to spacefic field.
    Regards,
    Sree

    Hi Sreedhar,
    There are two types of variable values you find in transactions, one system generated(generally the unique values) and then the static field values..
    When you want to go for the static field values you can use GETGUI. You can use the same GETGUI n number of times according to the situation(like in loops etc) and for the system generated messages we can handle them from the message blocks.
    MESSAGE.
    ENDMESSAGE.
    In the message block make a rule for the message that you are expecting like
    'E' MSGNR(the message number) and give a variable in the fields MSGV1/MSGV2 where ever you are getting the unique generated value(according to the log) and you can use that variable for LOG purpose..
    Confirm me whether you were looking for this or something else.
    Best regards,
    Harsha

  • Update internal table data from table control

    Hi GURUS,
    I need help regarding one of my requirement.
    I need to display data from the internal table on the screen and when the user selects a record/multiple records from screen and clicks on approve button i need to update one of the field from N to Y in the corresponding Ztable. Once the record is updated from Ztable , that should no longer be visible for the user on the screen.
    I am using table control wizard to display data. I am able to update the Ztable, but that record is not refreshing from the user screen. Any suggestions would be approved.
    Also please let me know if table control is the best way to do this/ alv grid control??

    hi
       REFRESH CONTROL Control-Name FROM SCREEN '0100'  -> use this command to refresh the table control
    to know more, read into
    https://forums.sdn.sap.com/click.jspa?searchID=2934287&messageID=673474
    Re: URGENT HELP REQ IN TABLE CONTROL WIZARD
    if helpful, reward
    Sathish. R

  • How to clear data from Table-Control

    Hi all,
    I am working on table control. I have some data on the table control.
    When I press the 'Cancel' button, I require that the table-control should be cleared.
    I tried using REFRESH CONTROL TC01 USING SCREEN 1001. But, the data doesn't get cleared.
    Please advise.
    Regards,
    Saurabh Buksh.

    hi
    good
    try this example
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
          lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
          TABLES demo_conn.
    SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES lines.
      flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols
                                  WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.
    thanks
    mrutyun^

  • Reading data from tables SXMSCLUP and SXMSCLUR

    Hello!
    In BI 7.0, there is no Delta Q for loading XML data. We are using a functional module in ABAP proxy, to push data from XI directly into BI PSA.So in the PSA, we get the records which have successfully reached.
    But for the failed records, we can see them in XML format in the tcode :SXMB_MONI.
    Now, my requirement is to extract the primary key of the data in the payload and create a csv file, saying that this records have failed.
    For that, i found that the data is stored in tables SXMSCLUP and SXMSCLUR, but in Hexadecimal format, i.e. kind of encrypted.
    I was wondering how to extract and read this data... that too, only 1 field in the data?
    In SDN there is a post which gives some Java classes, but i was hoping if there is an easier way out, maybe in ABAP??
    Any help in this would be appreciated.

    HI,
    Please try to see the below links
    /people/kamaljeet.kharbanda/blog/2005/09/16/xi-bi-integration
    /people/sergio.locatelli2/blog/2006/10/15/integration-sap-bi-and-xi-a-critical-point-of-view
    /people/marian.harris/blog/2005/06/23/need-to-get-a-sap-netweaver-component-implemented-quickly-try-sap-best-practices
    /people/sravya.talanki2/blog/2006/12/08/business-case-integration-need-of-bi-and-sap-xi-episode1
    /people/ginger.gatling/blog/2005/12/02/innovative-ways-to-use-alerts
    /people/community.user/blog/2007/01/08/access-netweaver-how-to-guides-from-one-consolidated-page
    /people/sravya.talanki2/blog/2006/12/14/business-case-integration-need-of-bi-and-sap-xi-episode2
    See the michal's reply and other reply also how to see the blob fields data.
    In Which Database Table the Messages are Stored in XI
    Regards
    Chilla

  • How to retrieve data from Table Control

    Hi,
    I am a Beginner to ABAP. I want to know how to fetch the selected rows from Screen table control.
    Here is my scenario:
    I am having one table control with selection field. Once i select some rows means the selected rows are going to be stored in one Internal Table.
    If any body knows the thing means please reply me the logic as well as giving me some code sample.
    Thankyou.

    Hi Mithun,
    Try to implement this code in your requirement.
    There will be some button on your screen and after selecting some or all the records from the table control you must be pressing some button for collecting the selected rows from the table control too your internal table.
    Put Fcode of that button in WHEN condition in this CASE.
    CONSTANTS: kc_sel_flag TYPE char01    VALUE 'X'.
      CASE sy-ucomm.
        WHEN kc_sel.
          PERFORM f_sel_desel USING kc_sel_flag.
      ENDCASE.
    FORM f_sel_desel
         USING    p_sel_desel TYPE c.
    Set the value
      wa_cond_type-z_sel = p_sel_desel.
    Update the Itab.
      MODIFY it_cond_type
             FROM wa_cond_type
             TRANSPORTING z_sel
             WHERE mandt EQ sy-mandt. "Where cond is only to specify all
    ENDFORM.                    " f_sel_desel
    After that all the selected records will be having 'X' in the internal table.
    Regards,
    Mueksh Kumar

  • Accessing data from Table control

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi gautham,
    1. While designing set the table control as input field.
    2. In ur program create an internal table, with the same structure as your table control.
    3. Whenever an entry is made in the table control, modify your internal table.
    4. While saving use the internal table data to update the custom table.
    If internal table name is same in both screen painter(table control) and in the program then the values will automatically come into the internal table in the program with out programming.
    Otherwise we have programtically transfer the values.
    In the PAI event using move or move-corresponding statement.
    Check the program *RSDEMO02*
    check the links
    http://help.sap.com/saphelp_nw04/helpdata/EN/9f/dbac9f35c111d1829f0000e829fbfe/content.htm
    Yogesh N

  • Getting data from table control to the report program.

    Hi,
    I created a table control using report program and i am trying to enter data in the table control which i want to update in the DB table. How can i get the data entered in table control to the report program, so that i can update the DB table.
    Please help me finding out which variable will hold the data entered in table control(dynamically).

    hi,
    in your table control you give some name to that table control say it_cntrl.
    this only serves as the internal table to process the table control data.
    like u can write like this.
    loop at it_cntrl into wa_cntrl.   "wa_cntrl is work area of type it_cntrl table type
    .........        "do your functining
    end loop.
    any clarification get in touch
    thnks

  • Reading data from table on screen .

    Hi
    i have a 'Z' screen which contains table - i want to read the content of the table from screen beacuse some times the user fill the table fileds but doesnt press the ENTER key and the data he filled in the table on screen doesnt enter the internal table, is there a way to read table contant from screen ?
    thanks
    Elad

    hi eladush,
    below is the master table contol program, hope its help you
    <removed by moderator>
    Moderator message: please post only relevant code parts, your posts must contain less than 5000 characters to preserve formatting.
    Edited by: Thomas Zloch on May 31, 2011 9:41 AM

  • Method to transfer data from Table control to Internal table

    hi,
    Hi,
    I´m working with CL_GUI_ALV_GRID and use the following methods:
    - CALL METHOD grid->set_table_for_first_display, to display my ALV;
    - CALL METHOD grid->get_selected_rows, to select the rows.
    But i have some fields that can suffer alterarions in the values...
    How can i recoup this values from the screen? Is there any method to do this?
    thnks.

    HI,
    You neeed to handle the change event.
    Example below...
    Definition.
    Code:
    CLASS lcl_event_handler DEFINITION.
      PUBLIC SECTION.
        METHODS:
              handle_data_changed
            FOR EVENT data_changed
            OF cl_gui_alv_grid
            IMPORTING er_data_changed.
    ENDCLASS.                    "lcl_event_handler DEFINITION
    Implement
    Code:
        CLASS lcl_event_handler IMPLEMENTATION.
      METHOD  handle_data_changed.
        CONSTANTS:
          lc_wa(11) TYPE c VALUE '<LW_SDITM>-'.
        DATA:
          l_subrc TYPE sy-subrc,
          l_variable TYPE string,
          lw_good TYPE lvc_s_modi.
        FIELD-SYMBOLS:
          <lw_sditm> TYPE /powercor/sditm,
          <lw> TYPE ANY. "Generic field symbol
        LOOP AT er_data_changed->mt_good_cells INTO lw_good.
        Update the internal table
          READ TABLE t_item_sel ASSIGNING <lw_sditm> INDEX lw_good-row_id.
          IF sy-subrc EQ 0.
            CONCATENATE lc_wa lw_good-fieldname INTO l_variable.
            ASSIGN (l_variable) TO <lw>.
            IF sy-subrc EQ 0.
              <lw> = lw_good-value.
            ENDIF.
         ENDIF.
         ENDLOOP.
      ENDMETHOD.                    "handle_data_changed
    ENDCLASS.                    "lcl_event_handler IMPLEMENTATION
    Set for your grid.
    Code:
      SET HANDLER g_handler->handle_data_changed FOR my_grid.
    Cheers,
    Chandra Sekhar.

Maybe you are looking for

  • Create Planned order based on qty in APO or SCM

    Hi All, I am working product view in APO or SCM system . Requirement is create new planned order with sales order individual length and planned order pegged to sales order in APO system. Example Sales order has  factor 4 and individual length 1000( 4

  • Sorting Pick Transfer Orders

    Dear colleagues, I am running across the following and would like to hear your thoughts. My the movement type of my outbound Transfer Orders is linked to a Sort profile for TO splitting that uses field REIHF (sort field of the bin) as the first crite

  • Limiting the number of threads that are created

    I am trying to write a web crawler as a way of learning about multi-threading and I have hit a stumbling block (probably my design). The way the application I have started works is that I provide a single URL, which is passed to a thread and that thr

  • Adding to an output file

    Hi, I am looking to add lines to an output text file without over writing whats already there? do I need the outfile.newline() command somewhere? BufferedWriter outFile; try outFile = new BufferedWriter(new FileWriter("D:/members.txt", true)); outFil

  • New condition price depending on bill-to-party counrty

    Hi everybody, We are trying to create a new sales condition price that depends on the bill-to-party country. But we can't get it. The only country we can use is the Ship-to party country. Every country we select in the table for the condition refers