Application Development 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: 

Insert new row in table control

Former Member
0 Kudos

hi,

I have two screens. in first screen have tabstrips and second screen have table control. Now i want insert new row in table control. where i should write the code and in pbo or pai .

table control screen have subscreen is there.

12 REPLIES 12

Former Member
0 Kudos

write the code for inserting new row in pai of the subscreen.

0 Kudos

but i am trying write the code but it gives error.

0 Kudos

can any body tell the code .

0 Kudos

what's the error its giving?

write the code in pai of the screen which has table control..

0 Kudos

in sub screen is not possible.

former_member1245113
Active Contributor
0 Kudos

Hi Anitha,

Are you inserting a row in table control which is on a subscreen in second screen.

If this is correct.

in the subscreen where your table control is defined.

in PAI

loop at itab.

module modify_tab.

endloop.

in program

module modify_tab.

describe table itab lines tc-lines.

if tc-current_line > tc-lines.

append itab.

else.

modify itab index tc-current_line.

endmodule.

IF the requirement is not as the above said, do inform us.

Regards

Ramchander Rao.K

0 Kudos

hi,

i got error. error is 'A status cannot be set in a sub-screen'.

0 Kudos

Anitha,

Subscreen do not have their own PF-STATUS and OK_CODE they use the status and OK_CODE of the main screen on which they were placed.

You can use them. if you have any Function codes for the buttons on the subscreen or table control, the main screen will take care of it. you can get them in the program, and you can proceed in the normal way as you do with normal screens.

Regards

Ramchander Rao.K

0 Kudos

now i will write code in which screen . and pbo or pai.

0 Kudos

do u have any button for inserting a new row?

if so..use the function code of that in the case stmt..and write in pai..

0 Kudos

Hi,

Just go through my first post here in this thread.

you need to write it in the PAI only since you need to transfer the data from screen to program

if this is not there you might can write any where in the program either in PAI or In PBO

Regards

Ramchander Rao.K

Edited by: Ramchander Krishnamraju on Dec 26, 2008 10:17 AM

Former Member
0 Kudos

HI.

INITIAL LINE inserts an initialized blank line suitable for the type

INSERT INITIAL LINE INTO TABLE itab.

Regards.

Jay