2007 Nov 28 2:57 PM
Hi experts,
I m having a table control as a selection screen.When I enter a material number in the first field of the table control and press enter, then i m doing some validations for some fields and populating the data into the fields of the table control by using the material no.This is working fine.After that again if i press enter,again the process is starting and data in the 1st row is copied to 2nd row.If i press enter again the process is repeating and the rows are filled with the same data of 1st row.How can i prevent this?any suggestions please?
Thanks,
dp.
2007 Nov 28 3:02 PM
Check your PAI module for the table control.
Your APPEND ITAB must be triggering each and every time you are pressing enter.
So, do like this in that module:
MODULE loop_lines.
read table itab with index sy-stepl.
if sy-subrc = 0.
modify itab
else.
append itab.
endif.
ENDMODULE.Regards,
Naimesh Patel
Check your PAI module for the table control.
Your APPEND ITAB must be triggering each and every time you are pressing enter.
So, do like this in that module:
MODULE loop_lines.
read table itab with index sy-stepl.
if sy-subrc = 0.
modify itab
else.
append itab.
endif.
ENDMODULE.Regards,
Naimesh Patel
2007 Nov 28 3:02 PM
Check your PAI module for the table control.
Your APPEND ITAB must be triggering each and every time you are pressing enter.
So, do like this in that module:
MODULE loop_lines.
read table itab with index sy-stepl.
if sy-subrc = 0.
modify itab
else.
append itab.
endif.
ENDMODULE.Regards,
Naimesh Patel
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |