Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

tablecontrol

Former Member
0 Likes
795

Hello friends ,

I have a tablecontrol in some data is there through selecr query , now I have to insert some more data in that table control afetrwards the line of existing data .

hw to add , plz guide its an urjent.

joy.

5 REPLIES 5
Read only

Former Member
0 Likes
722

Hi!

Check out the following demo programs:

DEMO_DYNPRO_TABLE_CONTROL_1

DEMO_DYNPRO_TABLE_CONTROL_2

Regards

Tamá

Read only

Former Member
0 Likes
722

Joy,

TC_DATA = Your Table Control

IT_DATA = Your Internal Table used for Table Control.

In your MODULE USER_COMMAND INPUT, add this code:

IF OK_CODE = 'ADD'.

CLEAR: IT_DATA.

APPEND IT_DATA.

ENDIF.

Amit

Read only

0 Likes
722

MODULE user_command_0007 INPUT.

CASE sy-ucomm .

WHEN 'BACK' .

LEAVE TO SCREEN 0 .

WHEN 'EXIT' .

LEAVE TO SCREEN 0 .

WHEN 'CANCELL' .

LEAVE PROGRAM .

WHEN '' .

CLEAR itab .

APPEND itab .

ENDCASE .

I have written this way , its not working .

Read only

0 Likes
722

Joy,

MODULE user_command_0007 INPUT.

CASE sy-ucomm .

WHEN 'BACK' .

LEAVE TO SCREEN 0 .

WHEN 'EXIT' .

LEAVE TO SCREEN 0 .

WHEN 'CANCELL' .

LEAVE PROGRAM .

WHEN '' ."Where is your when quote??

CLEAR itab .

APPEND itab .

ENDCASE .

pls give function code with when.

Amit.

Read only

0 Likes
722

CASE sy-ucomm .

WHEN 'BACK' .

LEAVE TO SCREEN 0 .

WHEN 'EXIT' .

LEAVE TO SCREEN 0 .

WHEN 'CANCELL' .

LEAVE PROGRAM .

WHEN 'CMD1' .

CLEAR :itab .

APPEND itab .

ENDCASE .

plz check its not working , becz when I click into create button screen is refreshing and select query is executing into PBO and same data is comming into table control , but user want to write new data in table control with previous one and save the data with new one , is it possible or is there any alternate way .

Joy