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

Non-Editable table control

Former Member
0 Likes
449

  I have a table control req in which i have to do, when i press insert button it shud add a row in the table control at the same time above rowd shud be changed to non-edtable mode. 

Pls help me on dis..

Moderator message: please do more research before posting, do not write SMS style.

Message was edited by: Thomas Zloch

3 REPLIES 3
Read only

Former Member
0 Likes
420

Use this kind of logic inside your table control loop in pbo..

MODULE TC_2000_GET_LINES OUTPUT.

  G_TC_2000_LINES = SY-LOOPC.

  LOOP AT SCREEN.

    IF SCREEN-NAME = fieldname.

      IF sy-loopc <> the new_row_number.

        SCREEN-INPUT = '0'.

      ELSE

        SCREEN-INPUT = '1'.

      ENDIF.

      MODIFY SCREEN.

    ENDIF.

  ENDLOOP.

ENDMODULE.

try searching in SDN as there are lot of posts already been there..

thanks.

Read only

0 Likes
420

i tried everything it not happening..let me check wid dis code..

Read only

Former Member
0 Likes
420

Hi Kaushik,

Design the layout with function grp keys for buttons and follow write code as mentioned below.

In screen PBO and PAI.

************************************************************************* 

process before output.

module status_0100.

module desc_lines.

loop at git_final into gwa_final with control tab cursor

tab-top_line.

module modify_screen.              ---Refer below for module code

endloop.

 

process after input.

 

loop at git_final.

module modify_final_table.

endloop.

module user_command_0100.        ---Refer below for module code      

 

***********************

module modify_screen output.

if ok_code is initial.

loop at screen.

if screen-name = 'GWA_FINAL-TEST_CODE'

or screen-name = 'GWA_FINAL-FLD_CODE'

or screen-name = 'GWA_FINAL-ITM_NO'

or screen-name = 'GWA_FINAL-DESCRP'.

screen-input = 0.

modify screen.

endif.

endloop.

elseif okcode_temp = 'INSERT'.

if tab-current_line le g_existlines."g_addline.

loop at screen.

if screen-name = 'GWA_FINAL-TEST_CODE'

or screen-name = 'GWA_FINAL-FLD_CODE'

or screen-name = 'GWA_FINAL-ITM_NO'

or screen-name = 'GWA_FINAL-DESCRP'.

screen-input = 0.

modify screen.

endif.

endloop.

endif.

****************************************

Module user_comand_100 input.

case ok_code.

when 'INSERT'.

describe table git_final lines gt_rows.

tab-lines = gt_rows + 1.

g_addline = tab-lines.

append initial line to git_final.

clear ok_code.

**************************************

Regards,

Praveen Reddy M