Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problem with selecting the Page

Former Member
0 Likes
555

I have a  requirement where I have to Asecreat two different page format for a single smartform.Based on the document type say if my Document type FKART = 'LR' then it has to trigger FIeRST page,else for any othr document types it has to trigger SECOND pag in my smartform.

I have tried using the COMMAND option of Flow logic in Smartforms.But it is not working fine.

Please suggest.

Regards,

Vineela.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
518

Hi Vineela,

You can control this by using the control_parameters. In this importing parameter you just have to set the start page. In your SE38 report based on the document type you can set this parameter.

Check for the below example code:

DATA:

       lv_document_type TYPE string,   "Holds the type of document

       control TYPE ssfctrlop.              "To set the page

IF lv_document_type = 'Type1'.

   control-startpage = '%PAGE1'.       "Name of the page that is in smartform

ELSEIF lv_document_type = 'Type2'.

   control-startpage = '%PAGE2'.       "Name of the page that is in smartform

ENDIF.

CALL FUNCTION '/1BCDWB/SF00000911'

   EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

    CONTROL_PARAMETERS         = control       "Pass the structure here

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

*   OUTPUT_OPTIONS             =

*   USER_SETTINGS              = 'X'

* IMPORTING

*   DOCUMENT_OUTPUT_INFO       =

*   JOB_OUTPUT_INFO            =

*   JOB_OUTPUT_OPTIONS         =

* EXCEPTIONS

*   FORMATTING_ERROR           = 1

*   INTERNAL_ERROR             = 2

*   SEND_ERROR                 = 3

*   USER_CANCELED              = 4

*   OTHERS                     = 5

           .

But all the pages should be main pages. You cannot control the display of pages in the smartforms which can be achieved using start_page.

Hi Vineela,

You can control this by using the control_parameters. In this importing parameter you just have to set the start page. In your SE38 report based on the document type you can set this parameter.

Check for the below example code:

DATA:

       lv_document_type TYPE string,   "Holds the type of document

       control TYPE ssfctrlop.              "To set the page

IF lv_document_type = 'Type1'.

   control-startpage = '%PAGE1'.       "Name of the page that is in smartform

ELSEIF lv_document_type = 'Type2'.

   control-startpage = '%PAGE2'.       "Name of the page that is in smartform

ENDIF.

CALL FUNCTION '/1BCDWB/SF00000911'

   EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

    CONTROL_PARAMETERS         = control       "Pass the structure here

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

*   OUTPUT_OPTIONS             =

*   USER_SETTINGS              = 'X'

* IMPORTING

*   DOCUMENT_OUTPUT_INFO       =

*   JOB_OUTPUT_INFO            =

*   JOB_OUTPUT_OPTIONS         =

* EXCEPTIONS

*   FORMATTING_ERROR           = 1

*   INTERNAL_ERROR             = 2

*   SEND_ERROR                 = 3

*   USER_CANCELED              = 4

*   OTHERS                     = 5

           .

But all the pages should be main pages. You cannot control the display of pages in the smartforms which can be achieved using start_page.

2 REPLIES 2
Read only

Former Member
0 Likes
519

Hi Vineela,

You can control this by using the control_parameters. In this importing parameter you just have to set the start page. In your SE38 report based on the document type you can set this parameter.

Check for the below example code:

DATA:

       lv_document_type TYPE string,   "Holds the type of document

       control TYPE ssfctrlop.              "To set the page

IF lv_document_type = 'Type1'.

   control-startpage = '%PAGE1'.       "Name of the page that is in smartform

ELSEIF lv_document_type = 'Type2'.

   control-startpage = '%PAGE2'.       "Name of the page that is in smartform

ENDIF.

CALL FUNCTION '/1BCDWB/SF00000911'

   EXPORTING

*   ARCHIVE_INDEX              =

*   ARCHIVE_INDEX_TAB          =

*   ARCHIVE_PARAMETERS         =

    CONTROL_PARAMETERS         = control       "Pass the structure here

*   MAIL_APPL_OBJ              =

*   MAIL_RECIPIENT             =

*   MAIL_SENDER                =

*   OUTPUT_OPTIONS             =

*   USER_SETTINGS              = 'X'

* IMPORTING

*   DOCUMENT_OUTPUT_INFO       =

*   JOB_OUTPUT_INFO            =

*   JOB_OUTPUT_OPTIONS         =

* EXCEPTIONS

*   FORMATTING_ERROR           = 1

*   INTERNAL_ERROR             = 2

*   SEND_ERROR                 = 3

*   USER_CANCELED              = 4

*   OTHERS                     = 5

           .

But all the pages should be main pages. You cannot control the display of pages in the smartforms which can be achieved using start_page.

Read only

0 Likes
518

Thanks for your reply.

It solved my issue.