12-19-2006 2:59 PM
Hello all,
can anyone forward the steps for creating a 'smartform' with snapshots.
plz it's very urgent.
Thanx in advance......
12-19-2006 3:33 PM
SMARTFORMS GENERATION: (calling internal table fields)
 Open a smartform using the tcode smartforms.
 Usually form attributes shows admn data.
 In the form interface declare import/export parameters if any. Else declare the tables in tables tab button.
 In the windows and pages expand and create a table. It automatically generates header, main area and footer for the table.
 In data tab button in the table we usually declare a work area to bring the data from se38. Like: ktab into wa. ( The purpose of declaring the wa is , to get the data of the ktab in to header from the body area of the internal table).
 And in the tablepainter pushbutton in table we can have any no of line types. Depending on the requirement. ( for ex: If we want to devide a row in to 4 columns, we can devide it as 4,4,4,4cm as line type 1, And usually for the footer we dont need no of columns, So, we declare it as one column with 16cm measure with the name line type 2.). We can use these line types in the tables.
 In the header right click>>create>>tableline. It asks for line type. Select one line type which is appropriate.
 Like same create a row2 in main area using right click. If we select the line type 1, it automatically generates 4 cells. We can create text in each cell as per requirement.
 We can generate general attributes using general attributes tab button in the text. Or in the other way. We can switch on the field list on/off button from the application tool bar. It displays all the attributes in the left down corner of the screen. We can drag and drop the required fields in the general attributes tab button of the text.
 We continue the same procedure for all the texts. The texts should be displayed in the gray color. Then only it can collects the data from the abap editor fields.
 If it wont turns gray, we can check the fields in the editor by changing it to the line editor. The best thing is to drag the fields from the list, rather than declaring like &wa-matnr&
 In the footer also we create a line type and in that table line we create text.
SE38 PROGRAM(method I):
REPORT Z_CALLING_SMARTFORM2 .
tables: mara.
select-options: S_MATNR for MARA-MATNR.
DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
data: FM_NAME TYPE RS38L_FNAM.
SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in
S_MATNR.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_MYFIRST_FORM2'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fm_name
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
ktab = ktab
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheers.
12-19-2006 3:07 PM
Hi
Please check these links
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sapgenie.com/abap/smartforms_detail.htm
http://www.sap-press.com/downloads/h955_preview.pdf
http://www.sap-basis-abap.com/sapsf001.htm
http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/8a/8c8a49def411d3969600a0c930660b/frameset.htm
SAP PRESS REFERENCE
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
12-19-2006 3:33 PM
SMARTFORMS GENERATION: (calling internal table fields)
 Open a smartform using the tcode smartforms.
 Usually form attributes shows admn data.
 In the form interface declare import/export parameters if any. Else declare the tables in tables tab button.
 In the windows and pages expand and create a table. It automatically generates header, main area and footer for the table.
 In data tab button in the table we usually declare a work area to bring the data from se38. Like: ktab into wa. ( The purpose of declaring the wa is , to get the data of the ktab in to header from the body area of the internal table).
 And in the tablepainter pushbutton in table we can have any no of line types. Depending on the requirement. ( for ex: If we want to devide a row in to 4 columns, we can devide it as 4,4,4,4cm as line type 1, And usually for the footer we dont need no of columns, So, we declare it as one column with 16cm measure with the name line type 2.). We can use these line types in the tables.
 In the header right click>>create>>tableline. It asks for line type. Select one line type which is appropriate.
 Like same create a row2 in main area using right click. If we select the line type 1, it automatically generates 4 cells. We can create text in each cell as per requirement.
 We can generate general attributes using general attributes tab button in the text. Or in the other way. We can switch on the field list on/off button from the application tool bar. It displays all the attributes in the left down corner of the screen. We can drag and drop the required fields in the general attributes tab button of the text.
 We continue the same procedure for all the texts. The texts should be displayed in the gray color. Then only it can collects the data from the abap editor fields.
 If it wont turns gray, we can check the fields in the editor by changing it to the line editor. The best thing is to drag the fields from the list, rather than declaring like &wa-matnr&
 In the footer also we create a line type and in that table line we create text.
SE38 PROGRAM(method I):
REPORT Z_CALLING_SMARTFORM2 .
tables: mara.
select-options: S_MATNR for MARA-MATNR.
DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
data: FM_NAME TYPE RS38L_FNAM.
SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in
S_MATNR.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Z_MYFIRST_FORM2'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION fm_name
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
ktab = ktab
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Cheers.