An SAP Consultant_ ABAP - Step by Step Tutorial on Smart Forms - Template Node
description
Transcript of An SAP Consultant_ ABAP - Step by Step Tutorial on Smart Forms - Template Node
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 1/10
Wednesday, April 16, 2014
Smart Forms are used to design print forms. ABAP programs are used to call Smartforms and spools are printed.
Step by step tutorial on Smart FormsStep 1: Create Smart Form
Step 2: Define Smart Form interface.
You can define Importing parameters, Exporting Parameters or Tables.
Follow by Email
Followers
JointhissitewithGoogleFriendConnect
Members(53) More
Alreadyamember?Signin
Popular Posts
Websites I follow
HTML/CSS/Javscript Generator
Emailaddress...
Youlikethis
AnSAPConsultant1,270likes
Liked
ABAPALVReportexamplewithsteps1
ExecuteABAPReportusingSUBMITstatement
2
ABAPStepbysteptutorialonSmartFormsTemplateNode3
ABAPSendingemailwithpdfattachment4
WebDynproABAPALVON_CLICKevent5
ABAPDynamicWHEREclause6
ABAPDownloadreportoutputasPDFfile7
ABAPALVDemoprograms8
SAPABAPCL_ABAP_CHAR_UTILITIESclassusage
9
WebdynproabapError/Successmessagesampleprogram
10
ABAP Step by step tutorial on Smart Forms Template Node
An SAP Consultant
HOME ABAP ALV SMART FORMS ADOBE FORMS HR ABAP WORKFLOW WEB DYNPRO ABAP HCM
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 2/10
Step 3: Insert Template Node
Use node type Template to display a table whose layout and size (number of lines and columns) isdetermined 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
Easy CSS3 Generator
Digital Inspiration
Shout ME Loud
Twitter Feed
Web Dynpro ABAP Book
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 3/10
Display separator lines by clicking on Select Pattern button.
Insert six text symbols
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 4/10
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 5/10
Define variables to display data in text symbols
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 6/10
Define Template output structure. We need to set it for each text symbol.
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 7/10
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.
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 8/10
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*FROMpa0001INTOwa_p0001WHEREpernrEQp_pernrANDbegdaLEsydatumANDenddaGEsydatum.IFsydatumEQ0.DATAformnameTYPEtdsfname.DATAfm_nameTYPErs38l_fnam.
formname='ZOVH_SIMPLE_SMARTFORM'.CALLFUNCTION'SSF_FUNCTION_MODULE_NAME'EXPORTINGformname=formnameIMPORTINGfm_name=fm_nameEXCEPTIONSno_form=1no_function_module=2.IFsysubrcEQ0.DATAcontrol_parametersTYPEssfctrlop.DATAoutput_optionsTYPEssfcompop.
control_parametersno_dialog='X'.output_optionstddest=p_printr.CALLFUNCTIONfm_nameEXPORTINGcontrol_parameters=control_parametersoutput_options=output_optionsgiw_p0001=wa_p0001EXCEPTIONSformatting_error=1internal_error=2send_error=3user_canceled=4.
-
7/29/2015 AnSAPConsultant:ABAPStepbysteptutorialonSmartFormsTemplateNode
http://www.ansapconsultant.com/2014/04/abapstepbysteptutorialonSmartformsTemplatenode.html 9/10
ENDIF.ENDIF.
Run the program.
Report Output
0 comments:
Post a CommentYour useful comments, suggestions are appreciated.Your comments are moderated.
Signout
Notifyme
Enteryourcomment...
Commentas: mulayam(Google)
Publish Preview
Recommend this on Google
An SAP ConsultantContact US
Follow US Want to Contribute ?If you are interested in writing about the new stuff