Sie sind auf Seite 1von 9

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

An SAP Consultant
HOME

ABAP

ALV

SMART FORMS

ADOBE FORMS

HR ABAP

WORKFLOW

WEB DYNPRO ABAP

Wednesday, April 16, 2014

ABAP Step by step tutorial on Smart Forms Template Node


Smart Forms are used to design print forms. ABAP programs are used to call Smartforms and spools are printed.

HCM

Follow by Email
Emailaddress...

Step by step tutorial on Smart Forms

AnSAPConsultant
1,270likes

Step 1: Create Smart Form


Liked

Youlikethis

Followers
Jointhissite
withGoogleFriendConnect

Members(53) More

Alreadyamember?Signin

Popular Posts
1

ABAPALVReportexamplewithsteps

ExecuteABAPReportusingSUBMIT
statement

ABAPStepbysteptutorialonSmartForms
TemplateNode

ABAPSendingemailwithpdfattachment

WebDynproABAPALVON_CLICKevent

ABAPDynamicWHEREclause

ABAPDownloadreportoutputasPDFfile

ABAPALVDemoprograms

SAPABAPCL_ABAP_CHAR_UTILITIES
classusage

10

WebdynproabapError/Successmessage
sampleprogram

Step 2: Define Smart Form interface.


You can define Importing parameters, Exporting Parameters or Tables.

Websites I follow
HTML/CSS/Javscript Generator
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

1/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Easy CSS3 Generator


Digital Inspiration
Shout ME Loud
Twitter Feed

Web Dynpro ABAP Book

Step 3: Insert Template Node


Use node type Template to display a table whose layout and size (number of lines and columns) is
determined before the runtime of the print program.
Right click on Main Window and insert on Template node

Design template using Table Painter tool. Click on details button.

Define line type and number of columns for line and width of the columns

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

2/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Display separator lines by clicking on Select Pattern button.

Insert six text symbols

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

3/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

4/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Define variables to display data in text symbols

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

5/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Define Template output structure. We need to set it for each text symbol.

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

6/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Save and Activate Smartform.

Step 4: Develop ABAP Driver program to call Function module.


ABAP Program steps
When you activate, system generates one function module. Function module is not fixed.
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

7/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

Use SSF_FUNCTION_MODULE_NAME to get smartform function module name.

Call function module/1BCDWB/SF00000034.


ABAP Source code
REPORTzovh_simple_driver.
DATA:wa_p0001TYPEp0001.
PARAMETERS:p_pernrTYPEpernr_d.
PARAMETERS:p_printrTYPEssfcompoptddestDEFAULT'LP01'.
STARTOFSELECTION.
SELECTSINGLE*
FROMpa0001
INTOwa_p0001
WHEREpernrEQp_pernr
ANDbegdaLEsydatum
ANDenddaGEsydatum.
IFsydatumEQ0.
DATAformnameTYPEtdsfname.
DATAfm_nameTYPErs38l_fnam.
formname='ZOVH_SIMPLE_SMARTFORM'.
CALLFUNCTION'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname=formname
IMPORTING
fm_name=fm_name
EXCEPTIONS
no_form=1
no_function_module=2.
IFsysubrcEQ0.
DATAcontrol_parametersTYPEssfctrlop.
DATAoutput_optionsTYPEssfcompop.
control_parametersno_dialog='X'.
output_optionstddest=p_printr.
CALLFUNCTIONfm_name
EXPORTING
control_parameters=control_parameters
output_options=output_options
giw_p0001=wa_p0001
EXCEPTIONS
formatting_error=1
internal_error=2
send_error=3
user_canceled=4.
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

8/10

7/29/2015

AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode

ENDIF.
ENDIF.
Run the program.

Report Output

Recommend this on Google

0 comments:
Post a Comment

Your useful comments, suggestions are appreciated.Your comments are moderated.

Enteryourcomment...

Commentas:

Publish

mulayam(Google)

Signout

Notifyme

Preview

An SAP Consultant

Follow US

Contact US

http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html

Want to Contribute ?
If you are interested in writing about the new stuff
9/10

Das könnte Ihnen auch gefallen