‎2010 Jul 08 12:40 AM
Hi
I am looping into internal table and printing a smartform for every line.
When I do the preview, and press back button, it takes me through the preview of all the items.
Is there a way to come out of this preview.
I am trying to use the cancel button in at user-command, but the program doesnot seem to recognise it.
‎2010 Jul 13 10:20 AM
Hi,
Regarding your qusetion about the preview.: In case you are calling the smartform inside a loop, the preview is going to get called. Incase you want just the 1st form to be shown, you could hardcode it in the program. Your logic could be:
If its print preview, then exit in the 2nd pass of the internal table by checking the sy-tabix.
Let us know if this suits your need. If it doesnt then throww more light on your question so that we cud suggest better!
‎2010 Jul 13 10:20 AM
Hi,
Regarding your qusetion about the preview.: In case you are calling the smartform inside a loop, the preview is going to get called. Incase you want just the 1st form to be shown, you could hardcode it in the program. Your logic could be:
If its print preview, then exit in the 2nd pass of the internal table by checking the sy-tabix.
Let us know if this suits your need. If it doesnt then throww more light on your question so that we cud suggest better!
‎2010 Jul 15 3:59 AM
thanks for your response.
I am using a similar logic.
Within the loop i am reading sy-ucomm and exit if it is SCAN.
That is when users press cancel button then it exits from the loop.