<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Module Pool and Smart Form in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-and-smart-form/m-p/3507189#M843520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.&lt;/P&gt;&lt;P&gt;my email Id is bedayan@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Mar 2008 16:20:29 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-03-12T16:20:29Z</dc:date>
    <item>
      <title>Module Pool and Smart Form</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-and-smart-form/m-p/3507189#M843520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.&lt;/P&gt;&lt;P&gt;my email Id is bedayan@yahoo.com&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 16:20:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-and-smart-form/m-p/3507189#M843520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-12T16:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Module Pool and Smart Form</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-and-smart-form/m-p/3507190#M843521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;A module pool&lt;/STRONG&gt; is a collection of screens, flow logic, menu bars and ABAP code that you use to build an application. Typically the transaction code that calls the application will refer to the module pool and the initial screen number. &lt;/P&gt;&lt;P&gt;--&amp;gt;What are the requirements a dialog program must fulfill ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; A dialog program must fulfill the following requirements&lt;/P&gt;&lt;P&gt;. a user friendly user interface&lt;/P&gt;&lt;P&gt;. format and consistency checks for the data entered by the user&lt;/P&gt;&lt;P&gt;. easy correction of input errors&lt;/P&gt;&lt;P&gt;. access to data by storing it in the database.&lt;/P&gt;&lt;P&gt;What are the basic components of dialog program ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; Screens (Dynpros)&lt;/P&gt;&lt;P&gt;Each dialog in an SAP system is controlled by dynpros. A Dynpro consists of a screen and its flow logic and controls exactly one dialog step.&lt;/P&gt;&lt;P&gt;&amp;#149; ABAP/4 module pool&lt;/P&gt;&lt;P&gt;Each dynpro refers to exactly one ABAP/4 dialog program. Such a dialog program is also called a module pool, since it consists of interactive modules.&lt;/P&gt;&lt;P&gt;What is a dynpro ? What are its components ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;#149; A dynpro (DYnamic PROgram) consists of a screen and its flow logic and controls exactly&lt;/P&gt;&lt;P&gt;one dialog step.&lt;/P&gt;&lt;P&gt;- The different components of the dynpro are:&lt;/P&gt;&lt;P&gt;Flow logic: Calls of the ABAP/4 modules for a screen&lt;/P&gt;&lt;P&gt;Screen layout: Positions of the texts, fields, pushbuttons, and so on for a screen&lt;/P&gt;&lt;P&gt;Screen attributes: Number of the screen, number of the subsequent screen, and others&lt;/P&gt;&lt;P&gt;Field attributes: Definition of the attributes of the individual fields on a screen&lt;/P&gt;&lt;P&gt;What is screen flow logic? What are the selections in it? Explain PAI and PBO?&lt;/P&gt;&lt;P&gt;Ans - Screen flow logic contains the procedural part of a screen. The screen flow logic is like an ABAP program in that it serves as a container for processing blocks. There are four event blocks, each of which is introduced with the screen keyword PROCESS:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PROCESS ON HELP-REQUEST.&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;PROCESS ON VALUE-REQUEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selections are performed in PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS BEFORE OUTPUT (PBO) is automatically triggered after the PAI processing of the previous screen and before the current screen is displayed. You can program the PBO processing of the screen in this block. At the end of the PBO processing, the screen is displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS AFTER INPUT (PAI) is triggered when the user chooses a function on the screen. You can program the PAI processing of the screen in this block. At the end of the PAI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;processing, the system either calls the next screen or carries on processing at the point from which the screen was called.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROCESS ON HELP-REQUEST (POH) and PROCESS ON VALUE-REQUEST (POV) are triggered when the user requests field help (F1) or possible values help (F4) respectively. You can program the appropriate coding in the corresponding event blocks. At the end of processing, the system carries on processing the current screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;step by step process of dialog programing:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Firstly, you can go to Tcode SE80 and here create a package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On that package name right click and select program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then choose program type modulepool program.&lt;/P&gt;&lt;P&gt;Similarly, you can create screen and then select layout and drag and drop labels and pushbuttons as per your requirements.. Then double click on th push buttons.You will see property window and there we will find FCTCODE and there type the names e.g suppose you want to &lt;/P&gt;&lt;P&gt;display then typy on the fctcode Display or any name as you wish.&lt;/P&gt;&lt;P&gt;After that save and activate it. and then close the window.&lt;/P&gt;&lt;P&gt;And then go back to the intial screen . &lt;/P&gt;&lt;P&gt;And then click Flow logic button and then uncomment the statement &lt;/P&gt;&lt;P&gt;module status_1000 PBO block and then doible click on status_1000&lt;/P&gt;&lt;P&gt;save and activate and then go back and then PAI block uncomment the statement module status_1000 and the dobule click on status_1000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;step by step process of creating smartforms:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.        What is Smartforms?&lt;/P&gt;&lt;P&gt;Smartforms is a tool to create and maintain forms for mass printing in SAP Systems. Just like sapscripts, for Smart &lt;/P&gt;&lt;P&gt;forms print program is used to create the output internal table which in turn is thrown to the smart form where the &lt;/P&gt;&lt;P&gt;field values are displayed. The output medium for Smartforms support printer, fax, e-mail, or the Internet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Transaction Code: SMARTFORMS&lt;/P&gt;&lt;P&gt;To print a form the program for the data retrieval and a Smartform that contains the entire form logic is required. As &lt;/P&gt;&lt;P&gt;these two are separate one should adapt the Smartform if changes to the form logic are necessary. The application &lt;/P&gt;&lt;P&gt;program passes the data via a function module interface to the Smartform. When activating the Smartform the system &lt;/P&gt;&lt;P&gt;automatically generates the function module.&lt;/P&gt;&lt;P&gt;The architecture of the smart form is given below:&lt;/P&gt;&lt;P&gt;Creating Forms Using SAP Smart Forms&lt;/P&gt;&lt;P&gt;When creating a form one must:&lt;/P&gt;&lt;P&gt;1.      Retrieve the application data&lt;/P&gt;&lt;P&gt;2.      Describe the form&lt;/P&gt;&lt;P&gt;3.      Pass the application data to the form&lt;/P&gt;&lt;P&gt;Example: Create Smartform for printing Purchase order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Retrieving the application data (Purchase Order information):&lt;/P&gt;&lt;P&gt;Write an ABAP program (Print Program) to retrieve data or include a retrieval routine into the application. This &lt;/P&gt;&lt;P&gt;code consists of statements that select data from databases according to certain selection criteria. Store the &lt;/P&gt;&lt;P&gt;retrieved data in internal tables, structures or variables and transfer it to the form in one step.&lt;/P&gt;&lt;P&gt;SAP has already provided with the Print Program (/SMB40/FM06P) for Purchase Order. Based on the business &lt;/P&gt;&lt;P&gt;requirement, this Print Program can be copied and modified to get the required data and transfer to Smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Describing the Form:&lt;/P&gt;&lt;P&gt;The user defines the form using a Smartform. Use the tools of the form builder as listed below:&lt;/P&gt;&lt;P&gt;1.        Use the form painter to position the windows, graphics and addresses on a page.&lt;/P&gt;&lt;P&gt;2.        Use the PC editor to write the texts.&lt;/P&gt;&lt;P&gt;3.        Use the table painter to format the tables.&lt;/P&gt;&lt;P&gt;The flow control is used to print the pages and elements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form Logic (Introduction)&lt;/P&gt;&lt;P&gt;In the form builder one can describe a Smartform by a set of nodes. To do this, one can build up a tree structure on &lt;/P&gt;&lt;P&gt;the left side of the user interface.&lt;/P&gt;&lt;P&gt;The node global settings and its three successors form attributes, form interface and global definitions always exists &lt;/P&gt;&lt;P&gt;for any newly created forms.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To describe the form logic, create the hierarchy under the node pages and windows.&lt;/P&gt;&lt;P&gt;The following rules apply to control the flow of the form output.&lt;/P&gt;&lt;P&gt;1.        The nodes in the tree structure are processed from top to bottom.&lt;/P&gt;&lt;P&gt;2.        For each node there is a tab, this can be used to link the node to a condition. If the condition is true, the &lt;/P&gt;&lt;P&gt;system processes the node. If not, it skips the node and all its successors.&lt;/P&gt;&lt;P&gt;3.        One should define a next page for each page.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The SAP form builder of the smart form consists of:&lt;/P&gt;&lt;P&gt;1.        Form painter for creating the layout of the form&lt;/P&gt;&lt;P&gt;2.        PC Editor for entering texts and fields into output areas&lt;/P&gt;&lt;P&gt;3.        Navigation tree for maintaining the form logic&lt;/P&gt;&lt;P&gt;4.        Table painter for creating templates and tables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To define the text formats, one can use the Smart Styles.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Style builder:&lt;/P&gt;&lt;P&gt;On the left of the style builder screen consists of the predetermined nodes (header data, folder for paragraph &lt;/P&gt;&lt;P&gt;formats, and folder for character formats).&lt;/P&gt;&lt;P&gt;On the right one can see the maintenance screen with its tab pages. At the bottom the preview of the selected font &lt;/P&gt;&lt;P&gt;can be viewed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create Purchase Order Smartform&lt;/P&gt;&lt;P&gt;Create a Smartform, copy the existing SAP provided purchase order Smartform to ZSFM_PURCHASEORDER for &lt;/P&gt;&lt;P&gt;customizing as per business requirement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Form Settings under Global Settings node, set the parameters in Output Option:&lt;/P&gt;&lt;P&gt;Page Format: Letter&lt;/P&gt;&lt;P&gt;Character per Inch: 20&lt;/P&gt;&lt;P&gt;Line per Inch: 6&lt;/P&gt;&lt;P&gt;Style: ZSTM_SMB40_SF&lt;/P&gt;&lt;P&gt;Output Format: Standard Output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.        Form Interface&lt;/P&gt;&lt;P&gt;We can add parameters in the Import Parameters and tables in Tables tab of the form interface for the application &lt;/P&gt;&lt;P&gt;data to be available for the Smartform to print.&lt;/P&gt;&lt;P&gt;3. In Global definition we can define the all the global variables which can be used in Smartforms. Initialization &lt;/P&gt;&lt;P&gt;can be used for initializing the variables and even for retrieving the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating pages:&lt;/P&gt;&lt;P&gt;Each form consists of one or more pages. The first page in the tree structure is the start page and the &lt;/P&gt;&lt;P&gt;processing of the form starts with this page itself.&lt;/P&gt;&lt;P&gt;1.        Open the context menu for existing page node and choose create®page&lt;/P&gt;&lt;P&gt;2.        Enter a unique name (FIRST) for the node and a description (Page)&lt;/P&gt;&lt;P&gt;3.        Determine the format (1, 2, 3...)and the mode of the page counter (Increase counter) on the general &lt;/P&gt;&lt;P&gt;attributes tab&lt;/P&gt;&lt;P&gt;4.        Determine the print attributes (Portrait Format) of the page on the output options&lt;/P&gt;&lt;P&gt;5.        Determine a background graphic for the entire page on the background tab (Not used in PO).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Creating windows:&lt;/P&gt;&lt;P&gt;The size and position of the window can be graphically set in the form painter. There are main windows and &lt;/P&gt;&lt;P&gt;secondary windows. The difference between these two is that the output in a main window can cover several &lt;/P&gt;&lt;P&gt;pages.&lt;/P&gt;&lt;P&gt;1.        Open the context menu for an existing page node and choose®window&lt;/P&gt;&lt;P&gt;2.        Enter a name for the node (NAMEFORM) and a description (Title Window).&lt;/P&gt;&lt;P&gt;3.        On the general attributes indicate type of window. NAMEFORM is secondary window.&lt;/P&gt;&lt;P&gt;In similar fashion all the other windows are created and positioned as per the form design. Only one MAIN &lt;/P&gt;&lt;P&gt;window is created, it is used for line items which can cover several pages.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Positioning texts on the form&lt;/P&gt;&lt;P&gt;The texts are displayed in the form using text nodes. The only exceptions are addresses.&lt;/P&gt;&lt;P&gt;The predecessor node of the text node determines its use:&lt;/P&gt;&lt;P&gt;Predecessor node        Used to&lt;/P&gt;&lt;P&gt;Secondary window        Position text on one or more pages&lt;/P&gt;&lt;P&gt;Main window        Display text in relation to other nodes in the main window, it may cover several pages&lt;/P&gt;&lt;P&gt;Template         Displays texts for table cells of a static table&lt;/P&gt;&lt;P&gt;Table        Display table contents&lt;/P&gt;&lt;P&gt;There are three text types:&lt;/P&gt;&lt;P&gt;1.        Text element : to enter new text in the PC editor&lt;/P&gt;&lt;P&gt;2.        Text module : to include a text module&lt;/P&gt;&lt;P&gt;3.        Include text : to include an existing SAPscript text&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Entering texts in PC editor: (TITLE)&lt;/P&gt;&lt;P&gt;·        To create a text node call the context menu for that node in the tree structure that should receive the &lt;/P&gt;&lt;P&gt;text, then choose-&amp;gt;text&lt;/P&gt;&lt;P&gt;·        Enter a unique name (TITLE) for the node and the node description (TITLE)&lt;/P&gt;&lt;P&gt;·        On the general attributes tab choose text element as text type&lt;/P&gt;&lt;P&gt;·        In the text node box choose whether the text should be started with a new paragraph or only in a new &lt;/P&gt;&lt;P&gt;line&lt;/P&gt;&lt;P&gt;·        Enter the text in the PC editor. Text could be a program element like &amp;amp;Title&amp;amp; or &amp;#145;Purchase Order&amp;#146;. &amp;amp;Title&amp;amp; &lt;/P&gt;&lt;P&gt;is a variable for which the value is assigned in Program line before the text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Including text modules: (TERMSCONDITION)&lt;/P&gt;&lt;P&gt;Text module of the text node is used to refer to an existing text module in the system. The text modules can be &lt;/P&gt;&lt;P&gt;used in two ways:&lt;/P&gt;&lt;P&gt;·        To create a text node, call the context menu for that node in the tree structure that shall contain the text &lt;/P&gt;&lt;P&gt;and choose create-&amp;gt;text under the window TERMSCONDITION.&lt;/P&gt;&lt;P&gt;·        Enter a unique name for the node (TERMSCONDITION) and a description (Terms and Condition)&lt;/P&gt;&lt;P&gt;·        On the general attributes tab select the text type text module&lt;/P&gt;&lt;P&gt;·        Enter the name of the text module in the text name field (&amp;amp;G_TERMS_TEXT&amp;amp;). &amp;amp;G_TERMS_TEXT&amp;amp; is &lt;/P&gt;&lt;P&gt;used to determine the Text name dynamically in the program lines preceding the text module node.&lt;/P&gt;&lt;P&gt;·        Program Lines: GETTERMSCONDITION&lt;/P&gt;&lt;P&gt;Concatenate 'ZTMM_PO_TERMS_' ZXEKKO-BUKRS&lt;/P&gt;&lt;P&gt;                                  INTO G_TERMS_TEXT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Including SAPscript texts: (HD_TXT_F01 &amp;#150; Order Header Text)&lt;/P&gt;&lt;P&gt;The text type include text node to refer to a SAPscript text, which already exists in the system. To identify the &lt;/P&gt;&lt;P&gt;text the text name, object, id and the language is needed.&lt;/P&gt;&lt;P&gt;·        To create the text node, call the context menu for that node in the tree structure that shall receive the &lt;/P&gt;&lt;P&gt;text and choose create -&amp;gt; text under the main window.&lt;/P&gt;&lt;P&gt;·        Enter a unique name (HD_TXT_F01) for the node and the node description (Order Header Text).&lt;/P&gt;&lt;P&gt;·        On the general attributes tab choose include text as text type&lt;/P&gt;&lt;P&gt;·        Text Name - &amp;amp;ZEKKO-EBELN&amp;amp;, Text Object &amp;#150; EKKO, Text ID &amp;#150; F01, Language - &amp;amp;SY-LANGU&amp;amp;. Also check &lt;/P&gt;&lt;P&gt;mark &amp;#150; No error if no text exists.&lt;/P&gt;&lt;P&gt;Tip: Since the size of text is not known, its better to have the text in MAIN window, so that it can run to more &lt;/P&gt;&lt;P&gt;than one page if required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Inserting addresses: (SENDER):  &lt;/P&gt;&lt;P&gt;Address node is used to insert an address into the form. This guarantees that the address is formatted &lt;/P&gt;&lt;P&gt;according to the postal rules of the sender country.&lt;/P&gt;&lt;P&gt;·        To create an address node , call the context menu for that node in the tree structure that one wants to &lt;/P&gt;&lt;P&gt;contain the text and choose create-&amp;gt;Address&lt;/P&gt;&lt;P&gt;·        Enter a name for the node (COMPANY_CODE_ADDRESS)  and a description (Company Code Address)&lt;/P&gt;&lt;P&gt;·        Determine the address type (Organization Address) on the general attributes tab&lt;/P&gt;&lt;P&gt;·        For organizational addresses - specify the address number, for any other - specify the person number &lt;/P&gt;&lt;P&gt;and the address number. In this case we get the company code address into variable &amp;amp;ADDNR&amp;amp;, so we need &lt;/P&gt;&lt;P&gt;program lines (SENDER) preceding the address text.&lt;/P&gt;&lt;P&gt;·        In the box additional addresses, attributes to specify how to display the address are maintained.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Printing graphics: (LOGO):&lt;/P&gt;&lt;P&gt;Tcode SE78 is used to import graphics into the SAP system. The transaction imports the graphics and stores it &lt;/P&gt;&lt;P&gt;in the BDS (business transaction server) and then it can be displayed in the form.&lt;/P&gt;&lt;P&gt;·        To create the graphic node , call the context menu for that node in the tree structure and choose create-&lt;/P&gt;&lt;P&gt;&amp;gt;graphic&lt;/P&gt;&lt;P&gt;·        Enter a name (LOGO) for the node and the description (Logo Graphic)&lt;/P&gt;&lt;P&gt;·        On the general attributes determine whether a colored or a black and white&lt;/P&gt;&lt;P&gt;·        On General Attributes use the fields object - GRPAHIC, id &amp;#150; BMAP and name - &amp;amp;G_LOGO&amp;amp; to identify the &lt;/P&gt;&lt;P&gt;graphic. &amp;amp;G_LOGO&amp;amp; is variable and therefore we can print company code specific logo. Program line preceding &lt;/P&gt;&lt;P&gt;the graphic is required.&lt;/P&gt;&lt;P&gt;·        Program line COMP_LOGO is used to assign the value to G_LOGO. Concatenate 'ZCOMPANY_LOGO_' &lt;/P&gt;&lt;P&gt;ZXEKKO-BUKRS INTO G_LOGO. So, the name of graphic for example will be ZCOMPANY_LOGO_0202 for &lt;/P&gt;&lt;P&gt;company code 0202.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Displaying a static table (Window &amp;#150; INFO, Template - TEM_INFO)  &lt;/P&gt;&lt;P&gt;Use node type template to display a table whose layout and size is determined before the runtime of the print &lt;/P&gt;&lt;P&gt;program.&lt;/P&gt;&lt;P&gt;To create a template, define a table layout to determine the cell structure for each line. The cells are used to &lt;/P&gt;&lt;P&gt;display the cell structure for each line. The cells are used to display the contents of the successor nodes of the &lt;/P&gt;&lt;P&gt;template node.  &lt;/P&gt;&lt;P&gt;·        Create Template under the INFO window node. Create &amp;gt; Template.&lt;/P&gt;&lt;P&gt;The template layout is used to determine the following,&lt;/P&gt;&lt;P&gt;1.        The number of lines and cells&lt;/P&gt;&lt;P&gt;2.        The height of each cell&lt;/P&gt;&lt;P&gt;3.        The width of each cell&lt;/P&gt;&lt;P&gt;4.        The alignment of the table in the window&lt;/P&gt;&lt;P&gt;5.        Whether and where to display separator lines or frames&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the table control on the template tab to define the layout of the lines. Each line of the template must have &lt;/P&gt;&lt;P&gt;a definition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the pattern box to select the desired table pattern.&lt;/P&gt;&lt;P&gt;·       &lt;/P&gt;&lt;P&gt;Displaying contents in cells: (TLE_CONTACT)&lt;/P&gt;&lt;P&gt;The template node defines the table layout. The successor nodes of the template         determine the data to be &lt;/P&gt;&lt;P&gt;displayed in the table cells.&lt;/P&gt;&lt;P&gt;In General Attributes choose Text type &amp;#150; Text Element. In editor, type &amp;#145;DTE         Contact&amp;#146;.&lt;/P&gt;&lt;P&gt;In Output Options, define the output structure LINE &amp;#150; 5 and Column &amp;#150; 1.&lt;/P&gt;&lt;P&gt;Similarly all other information for each cell can be filed using the text module and         address module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Displaying Dynamic Table (ITEM_TABLE)&lt;/P&gt;&lt;P&gt;·        Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table. &lt;/P&gt;&lt;P&gt;L_XEKPO is the item table which has all the line item details.&lt;/P&gt;&lt;P&gt;Define the line types based on the positioning of the text in main window. For         example: TABLE_HEADER1 &lt;/P&gt;&lt;P&gt;is used for positioning Header texts in the table.&lt;/P&gt;&lt;P&gt;·        Table is divided into three parts: Header, Main Area and Footer.&lt;/P&gt;&lt;P&gt;·        Header is used for printing the Header Title of the table and it at the start of the table on every page.&lt;/P&gt;&lt;P&gt;·         Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type &lt;/P&gt;&lt;P&gt;TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout. &lt;/P&gt;&lt;P&gt;Name all the cells as per the usage. For each cell create the text node to display the information. For example: &lt;/P&gt;&lt;P&gt;Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.&lt;/P&gt;&lt;P&gt;·        Footer is used for printing the information after Main Area data is printed. This can be used for Total &lt;/P&gt;&lt;P&gt;printing or any other information which needs to be printed after all line items are printed. Create line &lt;/P&gt;&lt;P&gt;TLE_CONTR_STP for Contractual Stipulation of the line type &amp;#150; LINE which has only one column. Create the &lt;/P&gt;&lt;P&gt;text element to print the information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Special Requirement: Printing the Acknowledgement text if the order value is greater then USD 50,000.00 on &lt;/P&gt;&lt;P&gt;the second copy only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        This requirement needs the modification in the print program and the Smartform.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        Modification in Print Program to trigger the second copy if the order value is greater then 50K. Its &lt;/P&gt;&lt;P&gt;advisable to copy the standard print program to custom Z program (Z_SMB40_FM06P), and changes should &lt;/P&gt;&lt;P&gt;be made to Z program. Number of copies is passed from NAST to ls_composer_param-tdcopies in Smartforms. &lt;/P&gt;&lt;P&gt;The value ls_composer_param-tdcopies is modified in the print program to 2 if the order value is greater then &lt;/P&gt;&lt;P&gt;50K.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        The printing of Acknowledgement Text only on second copy is achieved using the COPIES WINDOW in &lt;/P&gt;&lt;P&gt;Smartforms. Define Window ACKN_COPY of the type COPIES WINDOW and Output to &amp;#150; Only Copies &amp;#150; Copies &lt;/P&gt;&lt;P&gt;Differ. Also set the condition in the Condition Tab of the window &amp;#150; SFSY-JOBPAGES = 1, so that it only print &lt;/P&gt;&lt;P&gt;on the first page of the copy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·        If user selects to print 2 copies and the order value is more then 50k, program needs to print 2 sets &lt;/P&gt;&lt;P&gt;meaning 4 copies. So number of copies is taken care of in Print program but again the printing of &lt;/P&gt;&lt;P&gt;Acknowledgement Text should be only the Even number copy meaning Copy# 2 and 4. This achieved by using &lt;/P&gt;&lt;P&gt;the program lines to determine the even copy.  SFSY-COPYCOUNT will tell us the current copy number being &lt;/P&gt;&lt;P&gt;printed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;vineela.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Radha Vineela Aepuru on Mar 13, 2008 11:12 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Mar 2008 10:09:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/module-pool-and-smart-form/m-p/3507190#M843521</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-03-13T10:09:59Z</dc:date>
    </item>
  </channel>
</rss>

