‎2008 Mar 27 4:34 PM
hi
I want to save the entries into a Ztable using Module pool programming.. I want the Module Pool Program to work like the SM30 table maintenance...
Right now.. I have 2 module pool screen on the screen... one which displays the entries of Ztable and the other which is an input enabled screen so that I can enter records into it..
When I save the records the Ztable should get updated and when the screen again comes to PBO the enetered records should be displayed in the first table control
Right now I am stuck here
PROCESS BEFORE OUTPUT.
* MODULE STATUS_0001.r45
MODULE FILL_TABLE.
LOOP AT TBL_ZTVM3 into wa_ztvm3 WITH CONTROL TC1 CURSOR TC1-TOP_LINE.
ENDLOOP.
LOOP AT TBL2_ZTVM3 into ztvm3 WITH CONTROL TC2 CURSOR TC2-TOP_LINE.
ENDLOOP.
*
PROCESS AFTER INPUT.
LOOP AT TBL_ZTVM3.
ENDLOOP.
LOOP AT TBL2_ZTVM3.
ENDLOOP.
MODULE USER_COMMAND_0001.user command goes like this
*&---------------------------------------------------------------------*
*& Include YENTRIES_ZTABLE_I01
*&---------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0001 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE USER_COMMAND_0001 INPUT.
CASE SY-ucomm.
when 'SAVE'.
modify tbl2_ztvm3 from wa2_ztvm3 INDEX TC2-CURRENT_LINE.
ENDCASE.
ENDMODULE. " USER_COMMAND_0001 INPUTSO quite a simple code.. but after 1 year I just lost touch with this.. I have defined the Selection Column check rows too for the table control
Can you please help me with this.. I <REMOVED BY MODERATOR>
Edited by: Alvaro Tejada Galindo on Mar 27, 2008 1:41 PM
‎2008 Mar 27 4:46 PM
Not sure if I get it, but you mean updating the Z table on the data dictionary from the data you've changed on the internal table?
If that's the point, you'll have to use the MODIFY this way, just after updating your internal table:
MODIFY <dtable> FROM TABLE <itable>.
‎2008 Mar 28 7:00 AM
hi
Question still open.. I mean to say how do I read the values which are entered into the Table Control 2...
Where are they stored... please post sample code if you have it
‎2008 Mar 28 7:07 AM
IN PAI of the Module flow logic
you need to modify the internal table with the modified content.
Like this
PROCESS AFTER INPUT.
MODULE EXIT AT EXIT-COMMAND.
MODULE CHECK_PAI.
LOOP WITH CONTROL TC.
MODULE MODIFY_DATA.
ENDLOOP.IN side the MODIFY_DATA
You need to update the Internal table with the modified content. then your internal table will have the latest Information.
You save the latest information.
‎2008 Mar 28 12:11 PM
Almost done, thanks for the code sample.. I searched for this command in forums and got the required help