12-12-2014 10:01 PM
HI Folks,
Here is my requirement:-
All fields of my table control are input enabled.
When I enter the field values and press enter I am generating the item no ()sequence no).
After executing pbo,field values along with item nos are displayed but the table control is getting disabled for the below empty rows.
I want to input enable them to enter values for second, third....rows,
I used the following code in a module inside PBO. It doesnot work.
This code works only for the first row. How do I make it work for the entire coloumns
DATA wa_tabctrl TYPE cxtab_column .
LOOP AT table_pp_cr-cols INTO wa_tabctrl.
IF wa_tabctrl-index = '2'.
wa_tabctrl-screen-input = '1'.
MODIFY table_pp_cr-cols
FROM wa_tabctrl.
ENDIF.
ENDLOOP.
Thanks and Regards,
Kawish
12-13-2014 4:47 AM
Hi,
You can try the following:
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL table_pp_cr.
MODULE show_data_(your internal table).
ENDLOOP.
MODULE show_data_(your internal table) OUTPUT.
READ TABLE (your internal table) INDEX table_pp_cr-current_line.
IF sy-subrc = 0.
(transfer your internal table field values to screen field here)
ELSE.
CLEAR your internal table.
ENDIF.
ENDMODULE.
Module PAI
MODULE modify_(your internal table) INPUT.
(transfer screen values to internal table)
MODIFY (your internal table) INDEX table_pp_cr-current_line.
IF sy-subrc <> 0.
CHECK (your internal table field) <> ' '.
APPEND (your internal table).
ENDIF.
ENDMODULE.
Hope this will help you to solve the issue. Please let us know.
Regards,
Anubhab
12-12-2014 10:22 PM
12-13-2014 4:47 AM
Hi,
You can try the following:
PROCESS BEFORE OUTPUT.
LOOP WITH CONTROL table_pp_cr.
MODULE show_data_(your internal table).
ENDLOOP.
MODULE show_data_(your internal table) OUTPUT.
READ TABLE (your internal table) INDEX table_pp_cr-current_line.
IF sy-subrc = 0.
(transfer your internal table field values to screen field here)
ELSE.
CLEAR your internal table.
ENDIF.
ENDMODULE.
Module PAI
MODULE modify_(your internal table) INPUT.
(transfer screen values to internal table)
MODIFY (your internal table) INDEX table_pp_cr-current_line.
IF sy-subrc <> 0.
CHECK (your internal table field) <> ' '.
APPEND (your internal table).
ENDIF.
ENDMODULE.
Hope this will help you to solve the issue. Please let us know.
Regards,
Anubhab