cancel
Showing results for 
Search instead for 
Did you mean: 

Display either ( first and second page ) or only second page on smart form

mahesh_jagnani
Participant
0 Kudos

Hi All,

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
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.

OR:

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'.

Regards,

Gurpreet

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Write like,

If sfsy-page = sfsy-jobpages.

display.

endif.

sfsy-page = currentpage.

sfsy-jobpages = last page.

or you can check like

sfsy-page = 2.

I think this may help you.

Thanks and regards,

Venkat

Former Member
0 Kudos

Hi,

define a flag variable in the program, make it 'X' if it satifies the condition.

define Importing Paramter in smartform with same type as like flag variable in progarm.

now U Export Flag variable to Smartform..

now, in Smartform in Conditions tab of every window of 1st page & 2nd page give condition to print based on the Flag value.

Rgds,

Pavan