Beruflich Dokumente
Kultur Dokumente
SAPTech
Steps:
Step 1. GOTO Tcode SMARTFORMS and give your Smart form
name .
Step 3. Go to Form Interface -> table give internal table name. in my
bl h l
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 1/9
9/5/2018 SAPTech
previous blog ,i have explain
how to create structure and Table Type. for your reference click on
this .-> Structure and Table type
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 2/9
9/5/2018 SAPTech
Step 6. After creating table ,create line type . I have already discuss in
my previous Blog . For more you can go -> Basic smart forms
Step 7. Create 4 text in main Area also and give all eld name.
text5-> &gv_no&
text6-> &matnr&
text7-> &ersad&
text8-> &ernam&
Step 8. Right click on Main Window and copy and paste , to create
new page ,page2
Step 9 . Right click on main area create-> ow logic->loop
Step 10. Again right click on Loop-> create-> ow logic ->command
Step 11. On command go to General Attributes and give page name
as page 2
Step 12. On condition Window give condition like GV_FLAG = 'X'.
Step 13. Go on cell 5 in main area, right click and create command
and right there code for page break.
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 3/9
9/5/2018 SAPTech
gv_no = gv_no + 1.
DATA: lv_no type i.
lv_no = gv_no mod 10.
IF lv_no = 0.
gv_ aG = 'X'.
ELSE.
gv_ aG = ''.
ENDIF.
Step 14. Save & activate , get function module name , environment->
function module name.
*&---------------------------------------------------------------------*
*& Report ZDEMO_PAGEBREAK
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDEMO_PAGEBREAK.
TABLES MARA.
DATA: T_MARA TYPE ZTDEMO_STRUCT_MARA.
DATA: LV_FNAME TYPE TDSFNAME VALUE 'ZDEMO_PAGEBREAK',
LV_FMNAME TYPE RS38L_FNAM .
SELECT
MATNR
ERSDA
ERNAM
FROM MARA INTO TABLE T_MARA UP TO 40 ROWS.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 4/9
9/5/2018 SAPTech
FORMNAME = LV_FNAME
* VARIANT = ' '
* DIRECT_CALL = ' '
IMPORTING
FM_NAME = LV_FMNAME
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
CALL FUNCTION LV_FMNAME
* EXPORTING
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
* CONTROL_PARAMETERS =
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
* OUTPUT_OPTIONS =
* USER_SETTINGS = 'X'
* IMPORTING
* DOCUMENT_OUTPUT_INFO =
* JOB_OUTPUT_INFO =
* JOB_OUTPUT_OPTIONS =
TABLES
T_MARA = T_MARA
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
Step 16. For calling your function module go to pattern -> click on call
function and give your function module name
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 5/9
9/5/2018 SAPTech
function and give your function module name.
Step 17 . Save and activate and execute it.
Here i have added page number also so for this we need to create
extra window in page 1.
right click on page 1 and create new window . For window size give
length and width like this .
Step 18. In that window create text and in text put value
pages &sfsy-page& of &sfsy-formpages&
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 6/9
9/5/2018 SAPTech
Page 2.
In bottom of every pages page number will come ... like this.
Thank you
Please share your opinion :)
REPLY
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 7/9
9/5/2018 SAPTech
READ MORE
READ MORE
REPORT zdemo_repo_oops.
PARAMETERS: p_matnr TYPE mara-matnr.
TYPES: BEGIN OF type_mara, …
READ MORE
Powered by Blogger
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 8/9
9/5/2018 SAPTech
SUPRIYA SHAH
Follow 38
VISIT PROFILE
Archive
Report Abuse
https://mysapnuts.blogspot.com/2016/05/to-create-page-break-in-smart-form-page.html 9/9