‎2008 Feb 05 7:36 AM
i want procedure for creating a table control for adding records in module pool programming.
first we want to enter records in four lines or rows. if i click add push button one more row must disply to the existing four rows.
for this purpose,we want coding.
thanks and regards,
I.RAMESH
‎2008 Feb 05 7:43 AM
hi
use this
WHEN 'NEW'.
TEMP1 = TABLECONTROL-LINES.
TABLECONTROL-LINES = TEMP1 + 1.
TEMP1 = 0.
where new is the Fcode for pushbutton.
tell me if you still feel some problem
reward if helpful
kushagra
‎2008 Feb 05 7:46 AM
hi
check this out.
this screen is having table control onit with button to add new row .
.................................................................................
process before output.
module status_1011.
loop at it_line_items with control line_items.
endloop.
*
process after input.
loop at it_line_items.
module modify_it_line_items.
endloop.
module event_enter.
module poulate_it_lines_tab.
module selec_in_bet.
module user_command_1011.
.................................................................................................................
inside module user_command_1011 the code for add button is written.
.................................................................................................................
module user_command_1011 input.
*assigning the value of sy-comm to ok_code
clear ok_code_1011 .
ok_code_1011 = sy-ucomm.
*clearing the sy-ucomm
clear sy-ucomm.
case ok_code_1011.
when 'PB_ADD'.
clear it_line_items.
perform calc_autogen.
clear it_line_items.
it_line_items-ebelp = g_autogen.
it_line_items-waers1 = wa_porder-waers.
append it_line_items.
when 'PB_SELECT'.
loop at it_line_items.
it_line_items-sel_col = 'X'.
modify it_line_items.
endloop.
when 'PB_DESELECT'.
loop at it_line_items.
it_line_items-sel_col = ''.
modify it_line_items.
endloop.
when 'PB_DELETE'.
isydatar = sy-datar.
isydatar = 'X'.
clear it_line_items_deleted[].
loop at it_line_items .
if it_line_items-sel_col = 'X'.
if g_ok_code = 'PB_CHANGE'.
perform delete_line_items.
endif.
delete it_line_items.
endif.
endloop.
endcase.
endmodule. " USER_COMMAND_1011 INPUT
regards
vijay
reward points if helpful