‎2007 Dec 14 7:16 AM
Hi Gurus,
I am developing smartform. For that am calling the smartform in the loop. So while printing it is coming one page and when i press back it is showing another page. Instead of that can i get all the pages at one time? Is there any option for that? For that we can do by passing all the internal table into the smartform and we can check there. But i dont want to modify the smartform. Here am attaching my code.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZPAY'
IMPORTING
FM_NAME = V_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
***********CALLING THE FM TO DISPLAY PAYSLIP
LOOP AT IT_RT-ZPAY INTO ZPAYROLL1.
CALL FUNCTION V_FORM_NAME
EXPORTING
RT = ZPAYROLL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
Points will be awarded
Regards
Ravi
‎2007 Dec 14 7:21 AM
Hi Ravi,
you have to use function module SSF_OPEN and SSF_CLOSE also with the same.
For complete help you can check the code of standard example program for Smartforms "SF_EXAMPLE_03".
reward points, if helpful,
Sandeep Kaushik
‎2007 Dec 14 7:19 AM
Hi,
This is because you are calling the smartform in loop.There you are passing only record each time.
***********CALLING THE FM TO DISPLAY PAYSLIP
LOOP AT IT_RT-ZPAY INTO ZPAYROLL1.
CALL FUNCTION V_FORM_NAME
EXPORTING
RT = ZPAYROLL1
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDLOOP.
Instead of that pass the entire table and get the entire in smartform and then loop the table in smartform for display.
Check this link.
‎2007 Dec 14 7:21 AM
Hi Ravi,
you have to use function module SSF_OPEN and SSF_CLOSE also with the same.
For complete help you can check the code of standard example program for Smartforms "SF_EXAMPLE_03".
reward points, if helpful,
Sandeep Kaushik
‎2007 Dec 14 7:36 AM
Hi Sandeep,
Thanks a lot for your valuable answer. Until now i dont know there is option for smartform like START_FORM in scripts. Thanks for your valuable answer.
Thanks
Ravi