Module pool transfer of data from one table control to another

Hi all,
I have been assigned to module pool object wherein i have to display table control on screen and that table control contains only 10 rows on screen for display. Now my internal table it_out has 15 rows
Describe table it_out
line v_l.     " v_l  = 15.
There is a pushbutton below table control and when i select multiple rows and click on that pushbutton it will navigate me to the next screen containing another table control on which i need to display those selected records.
Now the problem is that when i select first record and move cursor down to select last record then i am seeing only last record on next screen table control. why is it happening? please provide me with solution. For rest of cases it is working fine for example if i select first record and second record then i am seeing both these selected records on next screen table control . Only the problem arises when i tried to select first and lets say last record when scrolling down on table control.
I think the problem is with scrolling but when i loop on next screen with moved records i am seeing that 2 records are their but it is transferring only one record to next screen not the last one.
Your response is highly appreciated.
Thanks
Parag

Hi Parag,
Screen 8002 (with table control) --> select records --> press a button --> move to screen 8003 --> display selected records in screen 8002.
First problem that if you select first record in table control and scroll to end to select the last record, the first record in deselected.
Next problem, that if you select say 3 records in table control you want the to be displayed in another table control, the use this code.
Also take another internal table and work area same as the initial internal table and work area used in screen 8002.
On screen 8002, take a button with function code 'PROCESS', on which user clicks the screen 8003 should display selected records.
Now, use this code, its working:-
Take the names of the input/output fields as work_area-field_name and select column in table control as work_area-flag.
Also take a flag field of size 1 datatype character as the last field in the internal table and work area while declaration.
You must have passed a code in PBO of the screen for reading internal table into the table control.
So it reads the internal table into the table control whenever you perform any action on use command.
All you need to do is to write a code to modify the internal table form the table control while performing any user action.
Remember to change the LINE SEL option in attributes of table control as MULTIPLE.
At Screen Logic:-
PROCESS BEFORE OUTPUT.
  MODULE status_8002. "for pf-status
  LOOP WITH CONTROL po_tab. "po_tab is name of table control
    MODULE pass_data. "to pass data into table control from internal table
  ENDLOOP.
PROCESS AFTER INPUT.
  MODULE user_command_8002. "to handle other user commands (back and exit)
  LOOP WITH CONTROL po_tab. "po_tab is name of table control
    MODULE modify_data. "to modify data from table control into internal table
    MODULE process_data. "to display selected records on another screen
  ENDLOOP.
In PBO,
*&      Module  STATUS_8002 OUTPUT
MODULE status_8002 OUTPUT.
  SET pf-status 'ZAB_PFSTA'. " pf-status
  DATA : line_count TYPE i.
  DESCIRBE TABLE it_ekpo
  LINES line_count.
  po_tab-lines = line_count + 10.
  " to make table control scrollable
ENDMODULE.                 " STATUS_8002  OUTPUT
*&      Module  PASS_DATA  OUTPUT
MODULE pass_data OUTPUT.
  READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
ENDMODULE.                 " PASS_DATA  OUTPUT
"it_ekpo is internal table and wa_ekpo is the work area
In PAI,
*&      Module  MODIFY_DATA  INPUT
MODULE MODIFY_DATA INPUT.
  MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
  "modify records from table control into the internal table
ENDMODULE.                 " MODIFY_DATA  INPUT
*&      Module  PROCESS_DATA  INPUT
MODULE PROCESS_DATA INPUT.
  CASE sy-ucomm.
    WHEN 'PROCESS'.
      IF wa_ekpo-flag = 'X'.
        wa_ekpo1 = wa_ekpo.
        APPEND wa_ekpo1 TO it_ekpo1. "if record selected move to another internal table
      ENDIF.
  ENDCASE.
  "modify records from table control into the internal table
ENDMODULE.                 " PROCESS_DATA  INPUT
Now if you select some records in this table control the values will retain in internal table.
Screen 8003 with selected records to be displayed in another table control.
At Screen Logic:-
PROCESS BEFORE OUTPUT.
  MODULE status_8003. "for pf-status
  LOOP WITH CONTROL po_tb. "po_tb is name of table control
    MODULE pass_data1. "to pass data into table control from internal table
  ENDLOOP.
PROCESS AFTER INPUT.
  MODULE user_command_8003. "to handle other user commands (back and exit)
  LOOP WITH CONTROL po_tb. "po_tb is name of table control
    MODULE modify_data1. "to modify data from table control into internal table
  ENDLOOP.
In PBO,
*&      Module  STATUS_8003 OUTPUT
MODULE status_8003 OUTPUT.
  SET pf-status 'ZAB_PFSTA'. " pf-status
  DATA : line_count1 TYPE i.
  DESCIRBE TABLE it_ekpo1
  LINES line_count1.
  po_tb-lines = line_count1 + 10.
  " to make table control scrollable
ENDMODULE.                 " STATUS_8003  OUTPUT
*&      Module  PASS_DATA1  OUTPUT
MODULE pass_data1 OUTPUT.
  READ TABLE it_ekpo1 into wa_ekpo1 INDEX po_tb-current_line.
ENDMODULE.                 " PASS_DATA1  OUTPUT
"it_ekpo is internal table and wa_ekpo is the work area
In PAI,
*&      Module  MODIFY_DATA1  INPUT
MODULE MODIFY_DATA1 INPUT.
  MODIFY IT_EKPO1 INDEX PO_TB-CURRENT_LINE FROM WA_EKPO1.
  "modify records from table control into the internal table
ENDMODULE.                 " MODIFY_DATA1  INPUT
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir

Similar Messages

  • Can I transfer calendar data from one Apple ID to another?

    Just realized that my calendars and email were all sharing one Apple ID with my husband which is problematic because I want my own devices syncing up properly. I've set up my own Apple ID, but before I activate it on my devices I want to be sure I don't lose all the data. Can I transfer a calendar from one Apple ID to another and if so, can I do this from the devices themselves or do I need my desktop?
    I've read some earlier related posts and they don't seem to answer this question clearly for me.
    Thanks so much!

    You will probably need to do this on your Mac; I'm not sure it's possible on an iPhone. You have to deal with one calendar at a time.
    Select a calendar listed under your husbands iCloud login name.
    From the File menu choose Export...>Export. An .ics file will be saved at your designated destination.
    Repeat this for any other calendars.
    Sign out in System Preferences>iCloud and sign in with your own ID. Your calendars and other data will disappear from your Mac but not from the server.
    From the File menu choose 'New Calendar' then your iCloud login name in the sub menu.
    A new calendar called 'Untitled' will appear in your sidebar under your iCloud login name. Change its name to that of the calendar you exported.
    From the File menu choose 'Import...' then 'Import...' from the sub-menu. A navigation pane will open: navigate to and choose your exported .ics file.
    iCal will ask you where to import this to. Click the drop-down menu and select the iCloud version of your calendar (make sure not to choose the 'On My Mac' version). Import.
    Your calendar contents will appear in the iCloud version of the calendar but this may take some time. You need to leave iCal running until the rotating icon at the top of the sidebar disappears.
    Repeat 5-9 for other calendars.

  • Assigning data from one Table type to another structure

    Hi every one,
    I have a table type X sent from one function module to another Proxy generated method which has the parameter defined as a structure.
    I have declared a variable Y as a LINE TYPE OF X.
    Then I have this statement which fills up the data.
    READ TABLE X INTO Y INDEX 1.
    The data is transferred from X to Y.
    Now i need to send this to the proxy generated Function module which has a structure Z.
    Now when i say MOVE-CORRESPONDING Y to a variable of type Z, it says it cannot be converted.
    The structure in proxy generated FM has different data type but the same domain as that of standard one.
    Everywhere it is prefixed with YY.
    And also has one additional Controller tab inserted,
    Can you guys tell me how to move the data from this table type to the structure.
    - Venkat

    Hi,
    Declare a variable of line type Z.
    Move corresponding values from variable X to this variable.
    Append this variable to the table Z.
    Try this.
    Regards,
    R.Nagarajan.

  • Transfer of data from one iTunes account to another

    My son has been using my iTunes account for games. Got him a 5th gen iPod touch. Can I transfer his data from my iTunes acct to a brand new iTunes account ? He is so ovewhelmed that he will lose his data .

    Have you looked at the Family sharing program? 
    http://www.apple.com/ios/whats-new/family-sharing/

  • Data retrieve from one table control to another table control

    Hi all,
    I had an requirement like to create Two table controls.
    for first Table control i had an sel field defined as 'MARK'.
    when i check the row in the first table control think it  is header data for sales order .
    all the item details have to retrieve in the second table control.
    This is my requirement, i am not able to trigger when selecting the row in table control.
    will anybody had an experience like this.
    Regards,
    Madhavi

    Hi Madhavi,
    If  we need the case to display header and item as mentioned in 2 table controls....
    we can display in table control 2/item only (the line items of the one selected in the table control 1 or the header )...so ,at a time we need to display line items for only 1 header ....
    so ...first disable the selections/multiple selections to disable the row selector
    We have already declared a field type C to capture the value for the field selector...so we can convert this field to a radio button and then assign a function code to the radio button at screen level
    Whenever you click on the radio button ..immediately the function code is triggered..then in PAI ..we can check and find the header record with 'X' and populate the data for the table control 2
    Hope it helps
    Regards
    Byju

  • How can I transfer game data from one apple device to another?

    I have looked at multiple answers to try to find what I am looking for but I can't fine anything that can help me. I have a 4th gen iPod and I recently got an IPad Mini. I have already set up my iPad and have lots of games on it. Is there any way I can transfer my game data onto my iPad without going through iCloud?

    Click here and use the instructions to do it through iTunes.
    (108836)

  • Simple way to insert data from one table

    Hi,
    I need to know a simple way on how to transfer the data from one table to another....
    First table xx_inv_tab1 has three columns col1, col2, col3 and where as second table xx_inv_tab2 has five columns col1, col2, col3, col4, col5.
    Here col2, col3, col4 are the same columns as in table1 xx_inv_tab1...
    Now I want to transfer first table data in to second table .... first column of second table holds a sequence, followed by the first table three columns data and followed with col4 and col5 which will hold NULL values....
    In my scenario, I have 70 - 75 columns in my first table which I want to move to second table which three new columns (one is sequence and other two has null values)...
    Any ideas if we make it in a simplest way rather saying insert into xx_inv_tab2 (col1, col2, col3 ............................................. col75) values (seq, col1, col2..........................col75, null, null)
    Help Appreciated..
    Thanks

    Easy
    untested
    insert into xx_inv_tab2 t2 (col1,col2,col3,col4)
    select yourSequence.nextval, t1.col1, t1.col2, t1.col3
    from xx_inv_tab1 t1
    ;Note that col5 does not need to be used, since you want to fill it with NULL.
    USe excel or sql developer to write you a list of column names, if you are to lazy to write all 75 columns by yourself.
    What might also work:
    untested
    insert into xx_inv_tab2 t2
    select yourSequence.nextval, t1.*, null
    from xx_inv_tab1 t1
    ;Edited by: Sven W. on Aug 31, 2012 4:41 PM

  • Appending data from one table to another

    Hello
    How to append data from one table t1 to another table t2.
    t1 and t2 have the same structures .
    t2 contains already data so i don't want do delete it and create it as select * from t1.
    If there is a mean to add t1 content without altering t2 content.
    Thanks in advance

    insert into t2
      select * from t1

  • How do i transfer data from one internal tabe to another.

    Hi All,
             How do i transfer data from one internal tabe to another.
             Can i do it ebven if he tables are different in structure.
    Please Advice.
    Thanks in advance.

    Hi Saket Tiwari,
    I hope the earlier post by kashyap is good enough an answer. anywas in addition to it let me give a detailed
    explanation of how you can populate an internal table.
    1) Append data line by line.
         Syntax :  APPEND [<wa> TO / INITIAL LINE TO] <itab>.
    this appends new line to internal table <itab>.
    2) Using COLLECT statement.
                 COLLECT is another form of statement used for populating the internal tables.  Generally COLLECT is used while inserting lines into an internal table with unique standard key. The syntax for COLLECT statement is as shown
         Syntax : COLLECT [<wa> INTO] <itab>.
    3) Using INSERT statement
         Syntax  INSERT [<wa> INTO / INITIAL LINE INTO] <itab> [index <idx>].
    INSERT statement adds a line/work area to the internal table. You can specify the position at which the new line is to be added by using the INDEX clause with the INSERT statement.
    Now coming to your request..
    To append part or all of an internal table
         Syntax
                  APPEND LINES OF <itab1> [FROM <n1>] [TO <n2>] TO <itab2>.
    *     Note:
    Without the FROM and TO options, this statement appends the entire table <itab1> to <itab2>.*
    b) To insert part or all of an internal table into another internal table
         Syntax
              INSERT LINES OF <itab1> [FROM <n1>] [TO <n2>]
              INTO <itab2> [INDEX <idx>].
    c) Using Move statement.
    To copy entire contents of one table into another in one execution
         Syntax MOVE  <itab1> To <itab2>.
                   OR
              <itab1> = <itab2>.
    but u hav to be careful because he contents of itab2 will eb overwritten on the execution of this statement.
    These copy the contents of ITAB1 to ITAB2. Incase of internal tables with header line we have to use [] inorder to distinguish from work area. So, to copy contents of internal tables with header line  the syntax becomes,
    ITAB1[] = ITAB2[].
    Coming to the letter part of your question, Yes, we can copy values between tables having different structures.
    for this we use    
                                MOVE-CORRESPONDING <itab1> TO <itab2>
        this executes the statement for their header lines. Searches for the sub-fields which occur both in itab1 and itab2 and then generates, for all relevant field pairs which correspond to the
            sub-fields ni , statements of the form MOVE itab1-ni TO itab2-ni. The other fields remain unchanged.
    I hope the information provided has been of your help.
    Reward if useful.
    Regards,
    Jose

  • Can you transfer data from one numbers spreadsheet to another using conditional formatting?

    I have a tracker document set up for client payments and when I indicate payment received, it  flags green using conditional formatting. However I would like these to automatically transfer to another sheet - without having to cut and paste the associated data to the other sheet. Can I set up conditional formatting to do this? If not how could I get and automatic transfer?
    thanks forum.

    Hi Kangers,
    There are a number of ways to transfer data from one table to the next. It should not be hard to set up.
    Conditional formatting would not be involved it moving the data but you could set it up to flag the data in the new table.
    Without knowing what your tables and data look like it is hard to propose a solution.
    quinn

  • Approaches to transfer changed data from a table to another table

    Hello expert,
    will you please show me all approaches to automatically detect and transfer changed data from a table to another table ? I don't need detail information, but a little comment for those approaches are more welcome.
    Many Thanks,
    Edited by: 843178 on 19-Dec-2011 2:04 PM

    You will want to review information on replication and similar methods
    In a nutshell:
    Replication allowed data to exist at more than one site and take the Master / original table data and clone it at a different site
    As tranporting all of the table data to a remote / clone site got more and more expensive we developed a method
    to identify just the 'diffs' and only send those from the master to the clone which needed only the diffs to become a clone of the master table
    This has many methods and options, but looking under key words such as
    - distributed transations
    - materialized views
    - replication
    ... are a few categories that will get you started

  • How do I make data from one Table flow into a separate Table

    How do I make data from one Table flow into a separate Table in iworks numbers?

    Great stuff Yvan,
    KOENIG Yvan wrote:
    Here you may see the way to transfer the contents of a column of Table A in a column of Table B
    I used two kinds of formulas.
    In the cell A2 of Table B
    the formula is :
    =Table A :: $B2
    It may be :
    =Table A :: $B
    Apply Fill Down
    Copy paste it in cell A1 which is in a header row.
    This formula does its duty but it’s not robust enough and will not survive to a Sort.
    This is why in B2, I inserted a more robust formula :
    =OFFSET(Table A :: $A$1,ROW()-1,2)
    You will find details about the functions used in Numbers User Guide delivered with every copy of iWork ‘08
    Yvan KOENIG (VALLAURIS, France) samedi 6 août 2011 17:45:22
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !
    The first suggestion was the simple answer I needed,
    Thank you

  • How do I transfer data from one exterior harddrive to another?

    How do I transfer data from one exterior harddrive to another when they are both connected to our Imac Desktop?

    Depends what you want to transfer...
    A few more Details about what you are trying to achieve would be good.

  • Adding Data From One Table to Another

    Now, this doesn't strike me as a particularly complex problem, but I've either strayed outside the domain of Numbers or I'm just not looking at the problem from the right angle. In any case, I'm sure you guys can offer some insight.
    What I'm trying to do is, essentially, move data from one table to another. One table is a calendar, a simple two column 'date/task to be completed' affair, the other is a schedule of jogging workouts, i.e, times, distances. Basically, I'm trying to create a formula that copies data from the second table onto the first but only for odd days of the week, excepting Sundays (and assuming Monday as the start of the week). Now, this isn't the hard part, I can do that. The problem comes when I replicate the formula down the calendar. Even on the days when the 'if' statement identifies it as an 'even day', the cell reference to the appropriate workout on the second table is incremented, so when it comes to the next 'odd day', it has skipped a workout.
    I can't seem to see any way of getting it to specifically copy the NEXT line in the second table, and not the corresponding line.
    This began as a distraction to try and organise my running so I could see at a glance what I had to do that day and track my progress, but now it's turned into an obsession. SURELY there's a solution?
    Cheers.

    Hi Sealatron,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Several possible ways to move the data occur to me, but the devil's in the details of how the data is currently arranged.
    Is it
    • a list of three workouts, one for each of Monday, Wednesday and Friday, then the same three repeated the following week?
    • an open-ended list that does not repeat?
    • something else?
    Regards,
    Barry

  • Copying large amount of data from one table to another getting slower

    I have a process that copies data from one table (big_tbl) into a very big archive table (vb_archive_tbl - 30 mil recs - partitioned table). If there are less than 1 million records in the big_tbl the copy to the vb_archive_table is fast (-10 min), but more importantly - it's consistant. However, if the number of records is greater than 1 million records in the big_tbl copying the data into the vb_archive_tbl is very slow (+30 min - 4 hours), and very inconsistant. Every few days the time it takes to copy the same amount of data grows signicantly.
    Here's an example of the code I'm using, which uses BULK COLLECT and FORALL INSERST to copy the data.
    I occasionally change 'LIMIT 5000' to see performance differences.
    DECLARE
    TYPE t_rec_type IS RECORD (fact_id NUMBER(12,0),
    store_id VARCHAR2(10),
    product_id VARCHAR2(20));
    TYPE CFF_TYPE IS TABLE OF t_rec_type
    INDEX BY BINARY_INTEGER;
    T_CFF CFF_TYPE;
    CURSOR c_cff IS SELECT *
    FROM big_tbl;
    BEGIN
    OPEN c_cff;
    LOOP
    FETCH c_cff BULK COLLECT INTO T_CFF LIMIT 5000;
    FORALL i IN T_CFF.first..T_CFF.last
    INSERT INTO vb_archive_tbl
    VALUES T_CFF(i);
    COMMIT;
    EXIT WHEN c_cff%NOTFOUND;
    END LOOP;
    CLOSE c_cff;
    END;
    Thanks you very much for any advice
    Edited by: reid on Sep 11, 2008 5:23 PM

    Assuming that there is nothing else in the code that forces you to use PL/SQL for processing, I'll second Tubby's comment that this would be better done in SQL. Depending on the logic and partitioning approach for the archive table, you may be better off doing a direct-path load into a staging table and then doing a partition exchange to load the staging table into the partitioned table. Ideally, you could just move big_tbl into the vb_archive_tbl with a single partition exchange operation.
    That said, if there is a need for PL/SQL, have you traced the session to see what is causing the slowness? Is the query plan different? If the number of rows in the table is really a trigger, I would tend to suspect that the number of rows is causing the optimizer to choose a different plan (with your sample code, the plan is obvious, but perhaps you omitted some where clauses to simplify things down) which may be rather poor.
    Justin

Maybe you are looking for

  • I'd like to know a fair asking price for my macbook pro before i throw it up for sell.

    Hello everybody! if you dont mind i am asking for what you would ask for the macbook i have for sell! i opened it brand new december 23, 2012 with plans of taking an online course starting jan 7, 2013 on january 4th ,2013 i was admitted to the hospit

  • Adobe Reader 9.0 Internal Error

    Running Windows VISTA, downloaded Reader 9.0 and cannot launch application. Continue to get Internal Error message from Adobe Reader. Had older versions of Reader 7.0, 8.0 and were Uninstalled thru Windows. Any suggestions?

  • Why can't I scan from my pro8600

    Why can't I scan from my pro8600

  • File    copy       problem

    hi my program have a problem .in this .i cannot rename the exicting file .and cannot copy . please explain why abd please reply me as soon as possible . thanks

  • Question about crop

    Hello. When i use my crop tool to extend my canvas a bit - I got new areas in white colour. Sadly, but I can't find a way to make all new areas to be black or other colours. Can you please advice me how to manage crop "default" colour? Thank you for