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

Table control logic

Former Member
0 Likes
385

Dear Experts,

I have a table control on my screen. I just want ot enter data on the screen, but after I entered it is disapperaed.

PBO:

LOOP AT i_table

WITH CONTROL ctrl_old

CURSOR ctrl_old-current_line.

ENDLOOP.

PAI:

LOOP AT i_table.

MODULE m_modify_ctrl.

ENDLOOP.

In the modul m_modify ctrl I try this one.

Modify i_table INDEX ctrl_old-current line.

Could you help we?

Thanks in advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
345

Hi White,

IF you are entering values on an Empty Table control then use APPEND key word instead of MODIFY

in PAI
" Also Make sure your Structure on Table control matches with ITab used in program Else
" Explicit Transfer is required in PBO, Make sure or it
Loop at itab.
module modify.
endloop.
in program 
module modify input.
 DESCRIBE TABLE itab LINES lin.
  IF tc-current_line > lin. " For Empty Table Control
    APPEND itab.
  ELSE.
    MODIFY itab INDEX tc-current_line.
  ENDIF. " Table Control with some data
endif. " This is a tested code in my Program
endmodule

Cheerz

Ram

3 REPLIES 3
Read only

Former Member
0 Likes
345

Hello,

Write a module say read_data between the loop ..... endloop statement in PBO.

Inside the module write the following


Read table  i_table INDEX ctrl_old-current line.

.

make sure that i_table is not initial else no data will be displayed.

Regards,

Sachin

Read only

former_member217544
Active Contributor
0 Likes
345

Hi,

Check this link:

Regards,

Swarna Munukoti

Read only

Former Member
0 Likes
346

Hi White,

IF you are entering values on an Empty Table control then use APPEND key word instead of MODIFY

in PAI
" Also Make sure your Structure on Table control matches with ITab used in program Else
" Explicit Transfer is required in PBO, Make sure or it
Loop at itab.
module modify.
endloop.
in program 
module modify input.
 DESCRIBE TABLE itab LINES lin.
  IF tc-current_line > lin. " For Empty Table Control
    APPEND itab.
  ELSE.
    MODIFY itab INDEX tc-current_line.
  ENDIF. " Table Control with some data
endif. " This is a tested code in my Program
endmodule

Cheerz

Ram