Display either ( first and second page ) or only second page on smart form
There is a requirement in which we get Program name and smart form name from table TNAPR.Now the smart form contains 2 pages.We have to check condition in the program and based on the condition we have to Display either ( first and second page ) or only second page of the smart form.
Can any one please tell how to solve this .
Tahnks in advance.
Gurpreet Singh replied
SSFCOMPOP-SPONUMIV-->Number range number SSFCOMPOP-TDPAGESLCT-->Pages selected for printing
Data: t_out type ssfcompop. If COndition. t_out-sponumiv = 'Number Range'. " 1-2 or 2 ESLE. t_out-sponumiv = 'Number Range'. ENDIF.
If COndition. t_out-TDPAGESLCT = '2'. " Else Bot pages will print ENDIF.
Pass T_out to the function module.
CALL FUNCTION 'FORM' EXPORTING * ARCHIVE_INDEX = * ARCHIVE_INDEX_TAB = * ARCHIVE_PARAMETERS = * CONTROL_PARAMETERS = * MAIL_APPL_OBJ = * MAIL_RECIPIENT = * MAIL_SENDER = OUTPUT_OPTIONS = t_out * USER_SETTINGS = 'X'.