‎2008 May 08 3:21 PM
Hi to All Experts,
i having a problem in table control.
that i m trying with table control in that i m trying to add records manulay in table control, but while i'm trying to enter the next record previous record get clear.
so please the solution that after entering one record and after i press the enter button cursore shuld go to the next blank row and when i press the save button then it will be save in database.
thank you in advanced,.
‎2008 May 08 3:41 PM
Hi,
You have to check if in tho PAI you are updating your internal table and in tho PBO you are movin internal table data to table control:
PROCESS BEFORE OUTPUT.
loop at TG_NWTNFITM with control tc_itens
cursor tc_itens-current_line.
MODULE: MOVE_INT_TAB_TO_TABLE_CONTROL.
ENDLOOP.
PROCESS AFTER INPUT.
LOOP at TG_NWTNFITM.
MODULE: MOVE_TABLE_CONTROL_TO_INT_TAB.
ENDLOOP.
Regards,
Fernando
‎2008 May 08 5:37 PM
but i want to add new record at runtime so please tell me the step by step procedure to solve the problem
thankx
‎2008 May 08 6:24 PM
Hi,
Access transaction ABAPDOCU --> ABAP USer Dialogs --> SCreens --> Complex Screen Elements --> Table controls with modifications.
There are examples.
Regrads,
Fernando
‎2008 May 08 5:30 PM
Hi Somanath,
Sample example for table control in our module pool programs
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP WITH CONTROL TCTRL_USERDATA.
MODULE DISPLAY_USERDATA.
ENDLOOP.
MODULE AFTER_LOOPING.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP WITH CONTROL TCTRL_USERDATA.
MODULE EXTRACT_USERDATA.
ENDLOOP.
MODULE USER_COMMAND_0100_AFTER_LOOP.
Refer to following link for complete program
http://members.aol.com/_ht_a/skarkada/sap/table_control/table_control.htm
Procedure
Defining a Table Control
1.Define the table control area.
2.Define the table control elements.
3.Add a title (optional).
4.Declare the table control in your module pool.
Procedure
The procedures described in this documentation are different if you are using the fullscreen editor in alphanumeric mode. For further information, see Creating a table control in alphanumeric mode.
Defining the Table Control Area
1.With the Screen Painter in change mode, choose the table control icon from the element palette.
2.The mouse pointer changes its shape.
3.Drag and drop the object onto the screen work area.
4.Resize or reposition the table control if necessary.
5.Assign an element name to the new table control.
Defining Elements
To define elements for your table control, you can use ABAP Dictionary fields, fields from the program, or completely new fields. If you are using ABAP Dictionary or program fields, follow the procedure described in Selecting Fields. If you want to create new fields, you use elements from the element palette as follows:
1.Choose an element from the element palette and place it in the definition line of the table control.
The system creates a new column.
2.Assign an element name to the element, and any necessary attributes.
3.Create a column header by dragging a text or entry element into the column heading.
4.Repeat steps 1-3 for each additional column.
Set the remaining table control attributes.
Adding a Title
1.In the table control attributes, select With title.
A dialog box appears, reminding you to create a title element.
2.Enter a text field or an input/output element in the title row.
3.Enter an element name, and the title in the Text field.
Declaring the Table Control in the Module Pool
Insert the following CONTROLS statement in the global data declaration of your transaction:
CONTROLS <tab_ctrl_name> TYPE TABLEVIEW USING SCREEN <screen_no>.
You can get more information from the following links
http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbac1d35c111d1829f0000e829fbfe/content.htm
‎2008 May 09 6:08 AM
Hi
I too worked the same thing myself.. what i found is...
When you enter some value in the Table control and press ENTER , its a user command so the PAI get process.. you can mention in the PAI if Others or the user command of ENTER. append the internal table of the table control and populate it in the PBO.. So that ur Problem will be absolutely solved.. This what the Logic about that to work with.. Hope you will solve it urself..
Reward Points