12-26-2007 1:17 AM
Hi All,
I created a screen with table control materilal and plant and 2 push buttons for save and all plants
when i hit all plants the table control is popultaing with 30 plants out of which only 19 plants are visible on screen we have to scroll down to see the remainig plants,
when i hit save in PAI it is validateing only 1st 19 records in chain and end chain it is not validating the remaing entries if i scroll down it is validating the fields which are visible,
can any one tell me how to validate all the records in table control.
Thanks
12-26-2007 2:13 AM
hi
do like this
MODULE validation_0100 INPUT.
PERFORM validation_tc.
*validation for Base Unit of Measure
IF jtab-meins IS NOT INITIAL.
SELECT SINGLE * FROM t006 WHERE msehi = jtab-meins.
IF sy-subrc NE 0.
MESSAGE e000(zm) WITH text-022." 'Please enter a valid Base Unit of Measure'.
ENDIF.
ENDMODULE. " VALIDATION_0100 INPUT
FORM validation_tc .
loop at jtab.
*validation for Base Unit of Measure
IF jtab-meins IS NOT INITIAL.
SELECT SINGLE * FROM t006 WHERE msehi = jtab-meins.
IF sy-subrc NE 0.
MESSAGE e000(zm) WITH text-022." 'Please enter a valid Base Unit of Measure'.
ENDIF.
ENDLOOP.
ENDFORM. " validation_tc
this will validate all the data's in the internal table.
12-26-2007 2:14 AM
Hi K K, it seems you are not passing the number of recrods to be filled in the table control. It is jst displaying the records in the visible table control length.
To show all the records , just add these lines in the PBO of the screen logic
" <tabctrlname> is the name of the table control placed on the screen.
" it_tabctrl is the internal table data that is being passed to the table control.
describe table it_tabctrl lines N.
<tabctrlname>-lines = N.
Regards
Gopi
12-26-2007 2:24 AM
Hi, Gopi
I am passing the value in PBO my problem is in PAI it is validating the records that are visible on screen only
Loop at itab.
chain
itab-matnr.
itab-werks.
module check values.
endloop.
in the above loop module check values is triggered only for 19times because on my screen only 19 rows were displayed my problem is with out scrolling the table control i should trigger module check values for 30 time ( entries in itab)
12-26-2007 2:26 AM
hi use my code here.
MODULE user_command_0100 INPUT.
PERFORM validation_tc.
endmodule.