Smart forms background logo

Hi
Please clarify me regarding smart forms background logo. I'm trying to migrate sap script into smart forms, for the background logo in smart form is it required to write ABAP code, please let me know?
2) Is it possible for background pictures in script? Is there any document regarding logo/pictures in sap script or smartforms? is there standard forms like purchase order etc., in smart forms? Please correct me If i'm wrong...
Regards
sree reddy

Hi
Background LOGOS are possible only in smartforms not in Scripts
see the logo printing for Scripts and Smartforms and the important smartforms and scripts with their programs
               SAP SCRIPT
To create a logo in SAP printouts just do the following
1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.
2. Run  program RSTXLDMC and enter the following parameters
   Enter file name                     C:\COMPLOGO.TIF
   UOM                           CM
    Line width for text                132
    Text name                     ZHEX-MACRO-COMPLOGO
    Text ID                          ST
    Text language = E
    Number of Tiff gray levels (2,4,9) 2
3.  Then Create a new window 'COMP' with attributes;
Window COMP description Company Logo
Left margin 7.00 CH window width 10.00 CH
Upper margin LN window height 8.00 LN
Finally in the text element, mention
        /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
Please note that if object name is not indicated as 'ZHEX...’ the logo may not be printed!
You will not be able to see the logo in a test print. The same will be printed in actual printout.
                      SMARTFORM
1)     In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
4) Select any picture and set its Resolution in DPI
5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and   position of the Logo
6) Set any other parameters if required, save and activate.
7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
8) Use  TCode SE78 to upload new pictures and logos.
look at Thread Dynamic Graph in smartforms
Refer the links also -
Re: Dinamic Graph in smartforms
How to get file perperties in Unix server
SD
SALES ORDER/ENQUIRY/QUOTATION
Output type         : BA00
ScriptForm Name     : RVORDER01
Driver Program Name : RVADOR01
smartform name
DELIVERY NOTE
Output type         : LD00
ScriptForm Name     : RVDELNOTE
Driver Program Name : RVADDN01
smartform name      : LE_SHP_DELNOTE
Smartform Driver Pgm: RLE_DELNOTE
INVOICE
Output type         : RD00
ScriptForm Name     : RVINVOICE01
Driver Program Name : RVADIN01
smartform name      : LB_BIL_INVOICE
Smartform Driver Pgm: RLB_INVOICE
MM
PUCHASE ORDER/RFQ/CONTRACT
Output type         : NEU
ScriptForm Name     : MEDRUCK
Driver Program Name : SAPMF06P
smartform name      : /SMB40/MMPO_L
smartform driver program: /SMB40/FM06P
GOODS RECEIPT
Output type         : WE01
ScriptForm Name     : WESCHEINVERS1
smartform name      : /SMB40/MMGR1_A
smartform driver program: /SMB40/M07DR
GOODS ISSUE
Output type         : WA01
ScriptForm Name     : WA_SCHEINVERS1
smartform name      : /SMB40/MMGI1_A
smartform driver program: /SMB40/M07DR
FI Forms
Account Statement   : F140_ACC_STAT_01
Cheque Printing     : F110_PRENUM_CHEK
Balance Confirmation: F130_confirm_01
Dunning Form:         F150_DUNN_01
check the link below it provides steps to convert sap scripts to smartforms
http://www.ficoexpertonline.com/downloads/Iyer_SmartForms.pdf
SMARTFORMS -Driver Program
PO: /SMB40/FM06P
SO: /SMB40/RVADOR01
GR: /SMB40/M07DR
Reward if useful
regards
Anji

Similar Messages

  • Smart form background logo.

    Hi experts,
    i am facing a problem with smart form to view our company logo at back ground of my out put,
    i can do it as alogo in form but where as in background it was not getting and could u please help in this regard,
    i had done through OAER , but i think i need to configure in  SPRO so kindly help through this.

    Hi,
    Go to SE78 picture editor and upload a picture. Then go to window in smartform and select background picture tab and give the name of your logo or picture in object field which you defined in SE78.
    Your image should be of BMAP type
    Regards,
    Amit.
    Please reward any help
    Message was edited by: amit bhadauria

  • Smart form the logo reversed

    hi
    i bring logo to my smart form and its look o.k. and when i check the smart form in print preview the logo is o.k. the problem is when i print the page the logo is reversed what can be the problem
    regards

    hi,
    i had same problem. in some printers it will come correctly and in some printers its coming reverse.  i hope this is your problem right?
    for this, network admin person of the client is re installed the printer. then problem sloved. our SAP BASIS is not required for this. only client has to do this.
    reward points if its helpful.
    Regards,
    Balu

  • How to use Multiple Logos in One Smart Form?

    All,
    I have a client where they will have 2 logos for, e.g. "Invoicing" and want the form to decide which logo to print (based on plant code).
    We are using Smartforms.
    They want to use one form and based on the plant code - the form should determine which logo to print in the upper left corner of the invoice - how do you do this?
    This is not like having text to print on the form in the same place - my understanding is the logo is NOT some variable you can "clear" in the program and then use the logo you wish to show up on the printout.
    Does this have something to do with using multiple layouts within the same form?  You define a layout for each logo and then within the Smartform logic determine which layout to print?  And if that is true - does someone have sample code of how they determined which layout to use?
    Thanks - and as always - points rewarded where helpfull!
    Scott

    Hi Scott,
    Create two Graphics in Smartform window & place them wherver you want in the smart form.
    Now in Graphics node, you can find  'Conditions' tab, under this you can give the conditions.
    Hope this clue wil help you
    Regards,
    Sujatha

  • Background colout to text in Smart forms

    Hi Folks,
        I have a requirement to take colored print out from Smart forms. I have to assign background color to the text in Smart Forms. Is it is possible? If yes, then how it can be done?
    Thanks in Advance,
    Punit

    Hi Punit,
    Yes definitely it is possible to do so. Just follow few steps mentioned below
    1. Select the text node for which you want the background color.
    2. Click on the output tab.
    3. In the shading option, choose the color yuo want in background.
    4. save activate and thats all..........its done..
    Let me know if you ave any prob in this..
    Enjoy SAP.
    Pankaj Singh.

  • Can I include a logo into text module in smart forms

    Hi,
    I want to know whether I can include a logo into text module or not in smart forms.
    Pls some one assist me.
    Regards,
    Chandra

    Hi,
    No you cannot attach a logo in Text Module because it can store only text, and your logo is stored in presentation server so it cannot be used aywhere else.I hope your question is answered.
    Regards.

  • Dynamic Logos in Smart forms

    We have a business case to choose different logos based on a condition. This invloves significatn effort from Change mangement point of view.
    Is there any solution by which I don't need to change any thing in smart forms but able to derive the graphic dynamically.  
    any help in this regard is appreciated.
    regards,
    Sadam

    Hi Harpit,
    I did as follow in my requirement... i have to print logo based the company code.. for this
    i have created 1 graphic window, then given the name as<b> &V_LOGO& then press the Button right arrow (looks like ">").</b> so that system will understand the name will comes form vareiable V_LOGO(is type char20. rest is same.
    but some how we need to pass the logo name for this i have written code in GOBALDIFINATION-->INITIALIZATION tab...
    if xxx-BUKRS = 1008.
    V_LOGO = 'xxxxxxxx'.
    elseif xxx-BUKRS = 1011.
    V_LOGO = 'yyyyyy'.
    elseif xxx-BUKRS = 1152.
    V_LOGO = 'zzzzzzzz'.
    endif.
    Please Close this thread.. when u r problem is solved
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards
    Naresh Reddy K
    Edited by: Alvaro Tejada Galindo on Oct 1, 2008 3:25 PM

  • Smart Forms Logo Print

    Hi,
    There seems to be a problem with printing my Logos on Smart Forms. In the Print Preview it shows but when I print the same it does not show in the printout, but a dark band gets printed. Also I tried to see the same in SE78 The print preview comes but when I take a print out nothing gets printed but just a number gets printed. I think there has to be some printup setting which I havent looked up can anyone please tell me.
    Regards
    Yao Chhang

    hi yee,
    that''s not a problem with layout design or abap code,
    that's a problem with printer(some printers only can support for this functionality) or with printer setting.
    regards...
    seshu.

  • Search for texts and logos in smart forms

    Hi there,
    Does anyone know if there is a function module that can search for specific texts and logos in smart forms?
    Any response would be really appreciated.
    Thanks
    HW

    Hi
    I really doubt if there is any FM like that. But, you can always search the existing logos in the Appln Server, the tcode is SE78.
    Regards,
    Vishwa.

  • Logo in sap smart forms

    hi,
      i have one logo and i want to insert that logo into the smart forms
    so can u suggest me the steps to insert that logo in smart forms.
    regards,
    kamal

    Hi
                   SAP SCRIPT
    To create a logo in SAP printouts just do the following
    1. Save a Logo using Imaging, Paint shop Pro or Corel Draw as Tiff file.
    2. Run  program RSTXLDMC and enter the following parameters
       Enter file name                     C:\COMPLOGO.TIF
       UOM                           CM
        Line width for text                132
        Text name                     ZHEX-MACRO-COMPLOGO
        Text ID                          ST
        Text language = E
        Number of Tiff gray levels (2,4,9) 2
    3.  Then Create a new window 'COMP' with attributes;
    Window COMP description Company Logo
    Left margin 7.00 CH window width 10.00 CH
    Upper margin LN window height 8.00 LN
    Finally in the text element, mention
            /: INCLUDE 'ZHEX-MACRO-COMPLOGO' OBJECT TEXT ID ST LANGUAGE 'E'.
    Please note that if object name is not indicated as 'ZHEX...’ the logo may not be printed!
    You will not be able to see the logo in a test print. The same will be printed in actual printout.
                          SMARTFORM
    1)     In Smart Forms Editor, In left pane, right Click any Page (say Page1) and select Create -> Window, Give it a name and Description (Say Window1)
    2) Right Click on Window (Window 1) and select Create -> Graphics, Give it a name and description
    3) In general Attributes, Select Name, get search help (F4) , you will find a list of pictures
    4) Select any picture and set its Resolution in DPI
    5) Press F9 to open Smart Forms Builder, Select window (Window1) and In Output options window set, size and   position of the Logo
    6) Set any other parameters if required, save and activate.
    7) If there is only 1 Window in the forms, set it as Main Window in general attributes.
    8) Use  TCode SE78 to upload new pictures and logos.
    look at Thread Dynamic Graph in smartforms
    Refer the links also -
    Re: Dinamic Graph in smartforms
    How to get file perperties in Unix server
    Regards
    Anji

  • Regarding smart forms (really urgent)

    hi,
    i am new to smartforms and i got report to make changes in the smart forms,plzz help me out as i know nothing about the smart forms by providing me it in easiest & simplest form.
    if find useful help will be deifnately rewarded.
    Edited by: ric .s on Mar 6, 2008 5:16 AM

    Hi,
    This Smartform Information I read, really helped me out.
    I think it would be of some good help to you too..
    What is SAP Smart Forms?
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms. 
    SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can  configure forms with data from an SAP System for the relevant business processes.
    To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
    You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
    You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
    SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
    SAP Smart Forms also support postage optimizing.
    Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
    What Transaction to start SAP Smart Forms?
    Execute transaction SMARTFORMS to start SAP Smart Forms.
    Key Benefits of SAP Smart Forms:
    SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time. 
    You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
    To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
    These actions do not include writing of coding lines or using a Script language.
    Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one. 
    For Web publishing, the system provides a generated XML output of the processed form.
    Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
    Advantages of SAP Smart Forms
    1. The adaption of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
    A Simple Smartform Tutorial 
    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output). 
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions). 
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table 
              Pages and windows
    •     First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page) 
    •     Main windows -> TABLE -> DATA
    •     In the Loop section, tick Internal table and fill in
    •     ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
               Global settings :
               Form interface
               Variable name    Type assignment   Reference type
               ITAB1               TYPE                  Table Structure
               Global definitions
               Variable name    Type assignment   Reference type
               ITAB2               TYPE                  Table Structure 
    4. To display the data in the form 
        Make used of the Table Painter and declare the Line Type in Tabstrips Table
         e.g.  HD_GEN for printing header details,
                 IT_GEN  for printing data details. 
         You have to specify the Line Type in your Text elements in the Tabstrips Output options.
          Tick the New Line and specify the Line Type for outputting the data.
          Declare your output fields in Text elements 
          Tabstrips - Output Options
          For different fonts use this Style : IDWTCERTSTYLE
          For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP program 
    REPORT ZSMARTFORM. 
    Calling SMARTFORMS from your ABAP program.
    Collecting all the table data in your program, and pass once to SMARTFORMS
    SMARTFORMS
    Declare your table type in :-
    Global Settings -> Form Interface
    Global Definintions -> Global Data
    Main Window -> Table -> DATA
    Written by :  SAP Hints and Tips on Configuration and ABAP/4 Programming
                        http://sapr3.tripod.com
    TABLES: MKPF. 
    DATA: FM_NAME TYPE RS38L_FNAM. 
    DATA: BEGIN OF INT_MKPF OCCURS 0.
            INCLUDE STRUCTURE MKPF.
    DATA: END OF INT_MKPF. 
    SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001. 
    SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
       MOVE-CORRESPONDING MKPF TO INT_MKPF.
       APPEND INT_MKPF. 
    ENDSELECT. 
    At the end of your program.
    Passing data to SMARTFORMS 
    call function 'SSF_FUNCTION_MODULE_NAME'
      exporting
        formname                 = 'ZSMARTFORM'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
      IMPORTING
        FM_NAME                  = FM_NAME
      EXCEPTIONS
        NO_FORM                  = 1
        NO_FUNCTION_MODULE       = 2
        OTHERS                   = 3. 
    if sy-subrc <> 0.
       WRITE: / 'ERROR 1'.
    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
        GS_MKPF                    = INT_MKPF
      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.
    Additional Fonts for your SMARTFORMS 
    You can create additional fonts and style with transaction SMARTSTYLES
    This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form. 
    The character formats includes effects such as superscript, subscript, barcode and font attributes.
    Difference with SMARTFORMS vs. SapScript(SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk. 
    It was said that it was provided in CRM 3.0 version, but not available in R/3.  You can download smartforms into Local PC in a XML format.  In the same way you can upload this XML format into Smartform.  From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment. 
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk. 
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people.  What you can do is to create a Transport and then FTP down to your local harddisk.   When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server.  Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it.  Actually, there is something you can do about it.  By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected.
    FAQ on Migrating SAPscript to SmartForms
    Is it possible to migrate a SAPscript form to a Smart Form? 
    Smart Forms provides a migration tool for this purpose which migrates layout and texts of a SAPscript form to a Smart Form. It does not migrate SAPscript form logic of the print program. Using Smart Forms, this logic is described by the tree structure of the Form Builder. The effort involved in migrating it depends on the complexity of the print program. 
    Which Basis Release do I need to use SAP Smart Forms? 
    SAP Smart Forms is available as of R/3 Basis Release 4.6C. 
    I have heard that Smart Forms replaces SAPscript. What does "replace" mean? 
    It does not mean that SAPscript is removed from the Basis shipment. Even as of Basis Release 4.6C, SAPscript remains part of the SAP standard and there are no plans to remove it. Since Smart Forms is currently, and will continue to be, the tool for form maintenance for mySAP.com solutions, our further development efforts will focus on Smart Forms, not on SAPscript.
    Do we have to migrate all SAPscript forms to Smart Forms? 
    There is no point in migrating all SAPscript forms already in use. Since SAPscript can still be used and will be available in the future, there is no need to. If you plan to migrate a SAPscript form, it is recommended that you check whether benefit is worth the effort involved
    Conversion of SAPSCRIPT to SMARTFORMS
    SAP provides a conversion for SAPscript documents to SMARTforms.
    This is basically a function module, called FB_MIGRATE_FORM. You can  start this function module by hand (via SE37), or create a small ABAP which migrates all SAPscript forms automatically.
    You can also do this one-by-one in transaction SMARTFORMS, under 
    Utilities -> Migrate SAPscript form.
    You could also write a small batch program calling transaction SMARTFORMS and running the migration tool.
    SmartForms System Fields
    Within a form you can use the field string SFSY with its system fields. During form processing  the system replaces these fields with the corresponding values. The field values come from the  SAP System or are results of the processing.
    System fields of Smart Forms
    &SFSY-DATE& 
    Displays the date. You determine the display format in the user master record.
    &SFSY-TIME& 
    Displays the time of day in the form HH:MM:SS.
    &SFSY-PAGE& 
    Inserts the number of the current print page into the text. You determine the  format of the page number (for example, Arabic, numeric) in the page node. 
    &SFSY-FORMPAGES& 
    Displays the total number of pages for the currently processed form. This  allows you to include texts such as'Page x of y' into your output. 
    &SFSY-JOBPAGES& 
    Contains the total page number of all forms in the currently processed print  request. 
    &SFSY-WINDOWNAME& 
    Contains the name of the current window (string in the Window field)
    &SFSY-PAGENAME& 
    Contains the name of the current page (string in the Page field)
    &SFSY-PAGEBREAK& 
    Is set to 'X' after a page break (either automatic [Page 7] or  command-controlled [Page 46])
    &SFSY-MAINEND& 
    Is set as soon as processing of the main window on the current page ends
    &SFSY-EXCEPTION&
    Contains the name of the raised exception. You must trigger your own  exceptions, which you defined in the form interface, using the user_exception macro (syntax:  user_exception <exception name >).
    Example Forms Available in Standard SAP R/3
    SF_EXAMPLE_01 
    Simple example; invoice with table output of flight booking for one customer
    SF_EXAMPLE_02 
    Similar to SF_EXAMPLE_01 but with subtotals
    SF_EXAMPLE_03 
    Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the  form is called for each customer and all form outputs are included in an output request
    Smart forms Frequently Asked Questions
    Forcing a page break within table loop
    Create a loop around the table. Put a Command node before the table in the loop that forces a NEWPAGE on whatever condition you want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node. 
    Font style and Font size
    Goto Transaction SMARTSTYLES. 
    There you can create Paragraph formats etc just like in sapscript. 
    Then in your window under OUTPUT OPTIONS you include this SMARTSTYLE and use the Paragraph and character formats. 
    Line in Smartform
    Either you can use a window that takes up the width of your page and only has a height of 1 mm. 
    Then you put a frame around it (in window output options). 
    Thus you have drawn a box but it looks like a line. 
    Or you can just draw "__" accross the page and play with the fonts so that it joins each UNDER_SCORE. 
    Difference between 'forminterface' and 'global definitions' in global settings of smart forms
    The Difference is as follows. 
    To put it very simply: 
    Form Interface is where you declare what must be passed in and out of the smartform (in from the print program to the smartform and out from the smartform to the print program). 
    Global defs. is where you declare data to be used within the smartform on a global scope. 
    ie: anything you declare here can be used in any other node in the form. 
    Smartforms function module name 
    Once you have activated the smartform, go to the environment -> function module name. There you can get the name of funtion module name. 
    The key thing is the program that calls it. for instance, the invoice SMARTFORM LB_BIL_INVOICE is ran by the program RLB_INVOICE. 
    This program uses another FM to determine the name of the FM to use itself. The key thing is that when it calls this FM (using a variable to store the actual name), that the parameters match the paramters in your smartform.
    Another thing to note is that the FM name will change wherever the SF is transported to. 
    So you need to use the FM to determine the name of the SF. 
    Here is the code that can be use to determine the internal name of the function module: 
    Code: 
        if sf_label(1) <> '/'.    " need to resolve by name 
          move sf_label to externalname. 
          call function 'SSF_FUNCTION_MODULE_NAME' 
               exporting 
                    formname           = externalname 
               importing 
                    fm_name            = internalname 
               exceptions 
                    no_form            = 1 
                    no_function_module = 2 
                    others             = 3. 
          if sy-subrc <> 0. 
            message 'e427'. 
          endif. 
          move internalname to sf_label. 
        endif. 
    It checks to see if the sf_label starts with a '/', which is how the internal names start. if it does, the name has already been converted. If not, it calls the FM and converts the name. 
    You would then CALL FUNCTION sf_label.
    Smartforms FAQ Part Two
    Smartforms output difference
    Problem with Smartforms: in a certain form for two differently configured printers, there seem to be a difference in the output of characters per inch (the distance between characters which gives a layout problem - text in two lines instead of one.                                      It happens when the two printers having different Printer Controls' if you go to SPAD Menu (Spool Administrator Menu) you can see the difference in the Printer Control and if you make the Printer control setting for both the printers as same. then it will be ok. and also u have to check what is the device type used for both the output devices. 
      SmartForms Output to PDF
    There is a way to download smartform in PDF format.
    Please do the following:
    1. Print the smartform to the spool.
    2. Note the spool number.
    3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the noted spool number.
      SmartForm Doublesided printing question  Your customer wants your PO SmartForm to be able to print "Terms and Conditinos" on the back side of each page. They don't want to purchase pre-printed forms with the company's logo on the front and terms & conditions on the back. Now this presents an interesting problem. 
    Has anyone else ever had a request like this? If for example there was a 3 page PO to be printed,  they want 3 pieces of paper, the front side of each to containe the PO information (page 1, 2, and 3) and the back side of each piece of paper to containg the static "Terms & Conditions" information. 
    Anyone have a clue how to force this out? 
    Easy - page FRONT lists page CONTACTS as next page and CONTACTS lists FRONT as next page. Since CONTACTS does not contain a MAIN window, it will print the contacts info and then continue on to FRONT for the rest of the main items. Additionally, set print mode on FRONT to D (duplex) and set CONTACTS to 'blank' (for both resource name and print mode - this is the only way to get to the back of the page). 
      Transport Smart Forms
    How does one transport SMARTFORM? SE01?  
    How do you make sure that both, the SMARTFORM & it's function module gets transported? Or does the FM with same name gets generated automatically in the transported client? 
    A smartform is transported no differently than any other object. if it is assigned to a development class that is atteched to a transport layer, it will be transported. 
    The definition is transported, and when called, the function module is regenerated. 
    This leads to an interetsing situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the 'SSF_FUNCTION_MODULE_NAME' function module. 
    Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module. 
      Smartforms: protect lines in main window.
    How to protect lines in the main window from splitting between pages? 
    It was easy with SAPscript, but how to do it with SF's.   For 4.7 version if you are using tables, there are two options for protection against line break: 
    - You can protect a line type against page break.
    - You can protect several table lines against page break for output in the main area.
    Protection against page break for line types 
    - Double-click on your table node and choose the Table tab page. 
    - Switch to the detail view by choosing the Details pushbutton. 
    - Set the Protection against page break checkbox in the table for the relevant line type.  Table lines that use this line type are output on one page. 
    Protection against page break for several table lines 
    - Expand the main area of your table node in the navigation tree. 
    - Insert a file node for the table lines to be protected in the main area. 
    - If you have already created table lines in the main area, you can put the lines that you want to protect again page break under the file using Drag&Drop. Otherwise, create the table lines as subnodes of the file. 
    - Choose the Output Options tab page of the file node and set the Page Protection option.   All table lines that are in the file with the Page Protection option set are output on one page. 
    Regards,
    Rohini.

  • Module Pool and Smart Form

    Can anybody Provide me good step by step procedure for module pool and smart for programming with screenshot.
    my email Id is [email protected]

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

  • Regarding smart forms

    hi ,
          i am new to smart forms.i know how to create now smart forms ie creating new windows and inserting logo and text.i mean i know the basic things in creating a smart forms.i need some help on how to create po or invoice in realtime scenerio.i have gone thorugh some std forms available in sap.but could not know the exact reason n purpose they r defining the variables.kindly if any one have screen shots or soem documents pls help me..thanx in advance..

    hi rahul,
    check these links...
    http://help.sap.com/saphelp_nw04/helpdata/en/9b/e3b0d9c2a711d3b558006094192fe3/frameset.htm
    http://cma.zdnet.com/book/abap/index.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    hope these help,
    priya.

  • How to Printe Graphics in Smart-Forms

    Guys,
    Need your help…
    Is it possible to print graph in smart form???
    If yes, if you have any document, please pass it to me…
    Dhiraj

    Hi Ram,
    Go through this hope u can understand.
    How to Upload graphics (IMAGE) to your Sapscript?
    Command in your Sapscript
    /: INCLUDE Z_YOUR_LOGO OBJECT TEXT ID ST LANGUAGE E
    These are the steps to be followed for uploading graphics in R/3 system 
    1.   First save the file as BMP 
    2.   Open the BMP file in IMaging (Goto -> Programs -> Accessories -> Imaging) and 
          make it Zoom as 100% and save as *.TIFF 
    3.   Open SE38 and execute program RSTXLDMC
    4.   Give your TIFF file path name 
    5.   Select Bcol (for Color) 
    6.   TEXT ID will be ZHEX-MACRO-*. 
    7.   Inplace of * write your own logo name (ZCOMPANYLOGO) 
    8.   Execute the program 
    9.   Now Goto SE71 create your ZFORM 
    10. Create logo window 
    11. Goto text element of logo window 
    or
    In 4.6x :-
    1.  Goto SE71 Change the mode to GRAPHICAL 
    2.  Choose the Graph Tabstrips
    3.  Now type in some name for the LOGO WINDOW 
    4.  Press the IMPORT BUTTON (third button from left) and then IMPORT the BMP file from your DESKTOP 
    5.  The code will be written automatically. You just need to drag and drop wherever you want
         the graphics to be. 
    /:   INCLUDE Z_COMPANY_LOGO OBJECT GRAPHICS ID BMON LANGUAGE EN
    Reward points if help ful.
    http://www.sap-img.com/ts001.htm
    Sorry i think for Scripts ..
    better to go for above post . it definetly works
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen

  • Smart form assignment for fb60 document

    Hi Experts,
    I have one issue pertains to smart form, my client wants to take print with his logo at the time of FI invoice document.
    Once user post the invoice in FB60, the using the document number we need the details in a form.
    For this abaper developed a smart form, but i could not find where these form will be assigned for print, and requirement is that  in the FB60 transaction itself if user press the print button then taking this developed form to print.
    Please suggest that how to make these assignments?
    Regards,
    Raghav

    HI,
    I don't think you can call the form developed directly from FB60 after posting the document. 
    I would recommend to use the functionality of correspondence. 
    After posting the document in FB60 from Menu --> display document and from there you need to generate the correspondence request and then print the form from F.64.
    Regards,
    Kiran Yelamarthy

Maybe you are looking for