2013 Jun 03 2:35 PM
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.
2013 Jun 03 5:23 PM
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.
2013 Jun 03 5:23 PM
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.
2013 Jun 04 5:29 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |