03-30-2009 7:03 AM
hai all,
in my layout one table control with two colums.
iam giving entries like this.
1 10000
2 20000
30000 this entry not accept, at that time raise message error not fill first column.
give me solution.
03-30-2009 7:06 AM
03-30-2009 7:06 AM
03-30-2009 7:06 AM
PAI.
Loop at ITAB.
Module table_ftest.
ENDLOOP.
Module table_ftest.
IF itab-field is initial.
Message 'XXX' type 'W'.
Endif.
ENDMODULE.
regards,
Gurpreet
03-30-2009 7:13 AM
03-30-2009 7:10 AM
Hi,
Refer:-
it_zekpo is my internal table w/o header line,
wa_zekpo is work area.
Name of input/output fields on screen are:-
wa_zekpo-field1,
wa_zekpo-field2, and so on...
At screen flow-logic
PROCESS BEFORE OUTPUT.
* MODULE status_8003.
LOOP WITH CONTROL po_tb.
MODULE read_data.
ENDLOOP.
PROCESS AFTER INPUT.
* MODULE user_command_8003.
LOOP WITH CONTROL po_tb.
MODULE modify_data.
ENDLOOP.
In PBO
*&---------------------------------------------------------------------*
*& Module READ_DATA OUTPUT
*&---------------------------------------------------------------------*
MODULE read_data OUTPUT.
READ TABLE it_zekpo INTO wa_zekpo INDEX po_tb-current_line. "po_tb is table control name
data : line_count type i.
describe it_zekpo
lines line_count.
po_tb-lines = line_count + 10.
"to increase the number of lines in table control dynamically
ENDMODULE. " READ_DATA OUTPUT
In PAI
*&---------------------------------------------------------------------*
*& Module MODIFY_DATA INPUT
*&---------------------------------------------------------------------*
MODULE MODIFY_DATA INPUT.
IF wa-zekpo-ebeln is initial. "<--if first field is empty
MESSAGE 'Fill first column entries' TYPE 'E'. "<--raise error message
ELSE. "<--else modify internal table from table control
MODIFY IT_ZEKPO FROM WA_ZEKPO INDEX po_tb-currentline.
"this will modify the contents of existing line into internal table
ENDIF.
ENDMODULE. " MODIFY_DATA INPUT
Hope this helps you.
Regards,
Tarun
03-30-2009 7:13 AM