Currency Field in Smart Form

Hi,
How to Display Currency Field in SmartForm  and how to declare

You can display a field in GLOBAL data of TYPE I (v_menge).
then in the related window of that Quantity field create PROGRAM LINES and in that write a small code such that
MOVE ITAB-MENGE to v_menge.
Now display this field v_menge in the smartform
Regards
Anbu B

Similar Messages

  • Problem with currency  field in smart form

    hi
    friends ..
    i had problem with currency field in smartform iam printing 5 currecny
    fields after the main window .But not getting printed on right way gets printed down from the given mesaurement and i get lot of gap betwen the
    each fields for ex.
    33,260.00
    120.00
    0.00
    0.00
    0.00
    i thought the the problem is with space .so iwanted to condense it but cannot as it is currency field so move into character fields .but the user want out put in currency format like 22,60.20 if i  get the value in char variable i get 2260.20 which i dont want .
    so pls help me how to condense or shift left and print the currency field on right place.
    regards
    answers will be rewarded points.

    hi,
    this is a normal problem u can avoid this by moveing these currencu value to a character field then print the char field us ing condece... &var(C)&..
    eve if not solve the problem use the TEMPLATE node..
    Please Close this thread.. when u r problem is solved. Reward all Helpful answers
    Regards
    Naresh Reddy K

  • How  can i print currency symbol in smart form?

    how  can i print currency symbol in smart form?
    i want to print the currency symbol with grant total based on the vendor currency.
    pls hepl............

    Hi,
    think You can't print the symbols for currency like $ and Pound etc
    see this doc if needed
    A variable in SAPscript is called a symbol. There are the following types.
    • System symbol (e.g. the number of the current page)
    • Standard symbol (usable in any document)
    • Program symbol (value from the print program)
    • Text symbol (“local variable”)
    The value of a symbol is text for using within SAPscript code and is represented by the symbol-name enclosed by ampersands. On seeing the tell-tale ampersands in SAPscript code, you sometimes need to figure out the symbol type.
    goto any PAGEWINDOW's Text elements in Script (SE71)
    from the Menu-> INSERT-> Symbols
    you find all symbols here
    System symbols
    System symbols in a SAPscript form are comparable to system fields like SY-UZEIT in an ABAP program, and include these. The graphical editor offers three types of system symbol.
    1. General system symbols
    See the table TTSXY. PAGE is the most widely used. The list given in our BC460 training manuals is out of date.
    2. SAPscript system symbols
    See the dictionary structure SAPSCRIPT. SAPSCRIPT-FORMPAGES is the most widely used.
    3. ABAP system symbols
    For the ABAP system field SY-UNAME, say, the symbol is SYST-UNAME. http://SYST is the dictionary structure for ABAP system fields.
    Sample code:
    User: &SYST-UNAME&
    Page &PAGE& of &SAPSCRIPT-FORMPAGES(C3)&
    Standard symbols
    Standard symbols are maintained centrally (in the table TTDTG via transaction SE75) for use in any document. Menu path:
    Tools
    Form Printout
    Administration
    Settings
    Some standard symbols are SAP-standard and others are custom. Curiously, table TTDTG is cross-client although SAPscript forms are not.
    The value of a standard symbol has to be defined for each language used. This gives a way to make a single SAPscript form multi-lingual.
    We can take advantage to an extent of the central maintenance, though there is no guarantee that the available standard symbols will used in every appropriate context.
    Standard symbols complicate searching a SAPscript form, since text like ‘Charity registration 211581’ may be hiding in a standard symbol.
    Text symbols
    A text symbol is declared and assigned to within the SAPscript code, and so obviously applies only to the current document. The command DEFINE is used, requiring /: in the tag column, as in the following examples.
    /: DEFINE &COMP_NAME& = ‘University of Warwick’
    /: DEFINE &WS_RATE& = &TAX_SUMM_C&
    Reward points for useful Answers
    Regards
    Shiva Kumar

  • How to add New field in SMART forms.

    How to add new field in the SMART FORMS. Please know me the step.
    Please help me soon.
    Moderator message: Welcome to SCN!
    Moderator message: please search for available information/documentation, do not use a priority higher than normal (no "soon", "ASAP", "earliest" etc.).
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Jun 17, 2011 12:31 PM

    How to add new field in the SMART FORMS. Please know me the step.
    Please help me soon.
    Moderator message: Welcome to SCN!
    Moderator message: please search for available information/documentation, do not use a priority higher than normal (no "soon", "ASAP", "earliest" etc.).
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    Edited by: Thomas Zloch on Jun 17, 2011 12:31 PM

  • Dispalying different field at SMART FORM report

    hi,
    i have created a code for displaying GRTXT i-e(Reason for Movement) in smart from from table T157E.This is the code:
    SELECT SINGLE GRTXT FROM T157E
      INTO GV_GRTXT
      WHERE GRUND eq '1'
      or    grund eq '2'
      or    grund eq '3'
      AND   SPRAS eq 'E'.
    where GV_GRTXT is a Global Definations at smart form.when i execute it,it gives me filed in GERMAN even tough i restricted it with SPRAS field and given me wrong REASON FOR MOVEMNT.for example at MIGO application it shows me INCOMPLETE
    with GRUND(Reason for Movement) 2 and at my report it shows me Qualität mangelhaft with GRUND(Reason for Movement)  2.
    Kindly tell me in the coding what is the mistake which had been made by me.
    Thanks.
    sappk25

    hi Suhas Saha,
    If i have to display GRUND (1,2,3) in my coding how can i display it because when i use AND conidition in coding it gives null values:
    SELECT SINGLE GRTXT FROM T157E
      INTO GV_GRTXT
      WHERE bwart eq '122'
      AND GRUND eq 001
      AND GRUND eq 002
      AND GRUND eq 003
      AND SPRAS eq 'E''.
    and if i used OR condition it gives me result in GERMAN i-e:
    SELECT SINGLE GRTXT FROM T157E
      INTO GV_GRTXT
      WHERE bwart eq '122'
      AND GRUND eq 001
      or GRUND eq 002
      or GRUND eq 003
      AND SPRAS eq 'E'
    and in the last if i used IN condition it gives the result of wrong REASON OF MOVEMENT at smart form which i verify from MIGO.i-e:
    SELECT SINGLE GRTXT FROM T157E
      INTO GV_GRTXT
      WHERE bwart eq '122'
      AND GRUND in (001,002,003)
      AND SPRAS eq 'E'
    Thanks,
    sappk25

  • Dynamically change the table fields in smart form

    hi all,
    can any one suggest me the way to change the height and the width of a table dynamically in smart form.
    thanx
    Manish

    Hello,
    That is not possible. You cannot alter the height and width of the smartform. Mainwindows height adjust automatically according to the data.
    Thanks,
    Jayant

  • Unable to format print field on Smart Form

    Hello,
    I have a problem trying to format a print field so that it displays correctly.
    The field in question is a display of a percentage (KOMVD-KBETR).
    I currently have the following in a Program node:
    IF NOT <KO>-KBETR IS INITIAL.
    WRITE <KO>-KBETR CURRENCY <KO>-KOEI1 TO GV_KBETR .
    ELSE.
    CLEAR GV_KBETR.
    ENDIF.
    GV_KBETR has to be a character field for the WRITE to work. However if I use GV_KBETR in my TEXT node it appears some of the formatting options don't work on character fields. The one in question is (<)
    I created a variable GV_KBETR_DISP type KBETR and added GV_KBETR_DISP = GV_KBETR to the program node above. Thisformats fine on the smartform. However using this setup I occasionally get an error when executing the smartform which I diagnosed that the GV_KBETR_DISP = GV_KBETR statement doesn't handle the data correctly if the data has a space in it.
    Has anybody got any suggestions I could use to get round this problem?
    Regards
    Mike.

    Hi,
    Why can't you use the field - KOMVD-KBETR to display ?
    IF you want to map the currency to this currency format, then you can simply add it in the Gloabal defnition -> Currency / Qty fields tab.
    If you do not want to display the initial value, then you can use the text formatting option
    &symbol(I)&  Suppress output of the initial value 
    Regards,
    Selva K.

  • Error in smart form with currency  fields

    while i am using with currency fields in samrt forms error is comming in while i am giving print-preview in se38 "<b>Reference field WA_EKPO-NETPR unknown in form."</b>

    In smart forms if we want to display quantity and currency fields. We cannott directly display currency field and quantity fields.
    To display the mdo like this
    Ex: GLOBAL Definitions
    WA_NETPR LIKE EKPO-NETPR
    For that we have to create an extra variable in global definitions
    Ex: netpr FIELD of EKPO
    CREATE program lines and specify WA_NETWR = itab-netpr.
    Close the thread once your question is answered.
    Regards,
    SaiRam

  • Smartform-currency field error.

    Hi folks,
      In My smartform i want to print the net value from vbrp table ( netpr) .but when iam executing the form it is throwing error as " reference field netpr " is unknown in form..
    where i have to declare reference field of netpr.
    Thanks,
    Neelima.N

    hi ,
      use the following documentation for your help.
    Displaying Fields That Refer to Currencies or Quantities
    Use
    In the ABAP Dictionary, you can assign a currency or quantity field to a table field if the table field contains a currency or quantity value. When printing these fields, SAP Smart Forms can take into account the assigned currency or unit:
    If the value field is in the same table as the assigned currency or quantity field, SAP Smart Forms automatically recognizes this and, during output, formats the value field according to the currency or unit in the assigned field.
    If the value field and the assigned currency or quantity field are stored in different tables, SAP Smart Forms cannot automatically recognize the relationship.
    In the second case, you must inform SAP Smart Forms about the relationship.
    Procedure
    As mentioned above, you only have to perform the following steps if a value field that is to be displayed in a table (for example, VALTAB) has a relationship to a currency or quantity field in another table (for example, CURTAB). In this case, you have to specify the relationship explicitly:
    In the form, define a global field of the same type as the table in which the currency or quantity field is stored, for example WA_CURTAB. Also define a work area for the output of your value field, for example WA_VALTAB.
    If you use a table with a header line, you do not need to define a work area. Instead, you work through the following steps with the header line of the relevant table. In the following step, for example, you would specify the field VALTAB-VALUE instead of WA_VALTAB-VALUE under Field Name.
    Create the relationship to the currency field by switching to the Currency/Quantity fields of the Global Definitions node and entering the following values:
    Field name: WA_VALTAB-VALUE if this is the value field of VALTAB that is to be output
    Reference field: WA_CURTAB-CURRENCY, therefore the currency field of CURTAB
    Use the work area WA_VALTAB on the data tab page of your table node or loop node.
    Create a program lines node before the event at which the value field is printed.
    In the program lines node, assign the currency or unit in which you want to format the value field WA_VALTAB-VALUE to the currency or quantity field of the global field WA_CURTAB-CURRENCY. You have to either select the value of WA_CURTAB-CURRENCY afterwards or have already passed it to the form interface.
    Display or print the value field WA_VALTAB-VALUE.
    Result
    During output, SAP Smart Forms formats the value field WA_VALTAB-VALUE according to the value assigned to the currency or quantity field of the global variable WA_CURTAB_CURRENCY.
    regards,
    Veeresh

  • Not to print Zero values in SMART Forms

    Hi all,
    I have a problem there is a field in SMART FORMS if it is having a zero value it should not print value as 0.00 instead there should be a blank. How to print blank instead of Zero value.
    Waiting for helping hands in this problems. Thanks in Advance.
    Abdul

    Hi Mohammed
    Could you please try like ( I ) after the field .
    this suppresses the initial values.
    i.e : &wa_data(I)&
    Hope this helps
    Regards
    Caglar
    Message was edited by:
            Caglar Ozkor

  • How to call text editors in smart forms?

    In my module pool program,I included text editors for three fields.I want that fields in smart forms too.I need to know how these text editors are called in smart forms?

    Hi achu,
             Any text that gets saved has a corresponding entry in table STXH table. It usually has the following parameters : TDOBJECT,TDNAME,TDID and TDSPRAS.
    What you have to do is create a new text element and under general attributes ---> Type  - give Include Text.
    And in the include text you give the above four parameters which correspond to the text you want to display.
    P.S. Do not forget to check the 'No error if no text exists' checkbox.
    Hope this helps.
    Regards,
    Arun

  • 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.

  • Suppress leading spaces while displaying an amount field in a Smart form

    Hi all,
    In a smart form, I am using fields like KONV-kbetr and VBAP-netwr each of them currency type and 2 decimal places. I want to suppress the decimal places and also the leading spaces while displaying these fields in a smartform cause when this field is inserted in a sentence, a lot of gap is there between the field and the words of the sentence. I dont want to change the field length cause it can be that huge in some cases.
    Please help.
    Thanks ,

    Hi, if you would place it in a sentence, it would be an option to concatenate the text and values into one string and then condense it.
    concatenate <text> <value> into lv_sentence.
    condense lv_sentence.
    but another way is to use codes for displaying values in smartforms:
    This is from a smartforms PDF i have..
    Output Options for Field Contents
    Use the Formatting options to adapt the value of a field before printing it. You can enter the
    relevant parameters directly behind the field name. Make sure to write the short forms of the
    different options in uppercase letters. Some of the options can be combined.
    General Information
    The formatting options are not suited for all data types of fields (for example, for character fields
    you need no exponential representation). You must distinguish between numeric fields and
    character fields.
    Numeric Fields
      If specified, the system first evaluates the length (<length>).
      If no length is specified, the system displays the value in its overall length.
      The trailing blank indicates a positive sign. To suppress it, use formatting option S.
      Any offset <offset> specified is ignored.
    Sequence of evaluation: (<length>), sign to the left(<),Japanese date (L), suppress blanks (C),
    right-justified display (R), insert fillers (F).
    Character Fields
    By default, the system displays the value of a field in its overall length, but truncates trailing
    blanks.
    Sequence of evaluation: suppress blanks (C), <offset> and (<length>), right-justified display (R),
    insert fillers (F).
    Overview
    Formatting Options for Fields
    Syntax Description
    &field+<offset>& Skips <offset> places of the field value (character fields only). If the
    offset is greater than the length of the value, nothing is displayed.
    &field(<length>)& Sets the output length to <length>.
    &field(*)& If the field is defined by a Data Dictionary type, Smart Forms set the
    output length to the value specified there.
    &field(S)& Suppresses the sign
    &field(<)& Displays the sign to the left of the number
    &field(.<nat.number>)& Limits output of decimal places to <nat.number>
    &field(E<nat.number>)& Displays the field value with the fixed exponent <nat.number>. The
    mantissa is adapted to this exponent by shifting the decimal
    character and inserting zeros.
    SAP Smart Forms (BC-SRV-SCR) SAP AG
    Output Options for Field Contents
    72 April 2001
    &field(T)& Suppresses thousand indicators when displaying fields of types
    DEC, CURR, INT, and QUAN.
    &field(Z)& Suppresses leading zeros of numbers
    &field(I)& Suppresses display of initial values
    &field(K)& Deactivates a conversion routine specified in the Data Dictionary.
    &field(R)& Right-justified display. Use this option only when specifying an
    output length as well.
    &field(F<filler>)& Replaces left-justified blanks in the value by the fill character <filler>.
    &field(L)& Converts and a date field to a local date and displays it. The date is
    then formatted using edit mask JPDAT.
    Since this representation uses Japanese characters, use it in the
    Japanese version of the SAP System only.
    &field(C)& The system takes the field value as a sequence of words separated
    by blanks. Option C shifts these words to the left and leaves only
    one blank inbetween as separator. Any leading blanks are
    suppressed. This effect corresponds to that of the ABAP statement
    CONDENSE.

  • Totaling Different Currencies in Smart Forms

    Hi Experts,
    I am able to print smart form in the form of table ,
    Country | Employee No. |Visa Type |Amount| Currency
    USA        1                     B1             500       USD
    USA        1                     L1             200       USD
    UK          1                     WP            100      GBP
    UK          1                     BV             500       GBP
    NL          1                      BV             500      EUR
    DK          1                     BV             100       EUR
    But I want to sum up differnet currencies total wise.
    Please advice.
    Regards,
    IFF

    IFF,
    can you not create program line in Smartforms and use
    At end of for summing up?
    Amit.

  • Really urgent: reagrding adding fields select statement in smart forms

    hi,
    i am working on a smart form which was made by someone else and now i have to make changes in it and now i have to add 1 field in that select statement but it is giving error even if i am storing the  variable in it and declaring it in global declarations.
    plzz help me how to overcome dis problem?

    Hi Ric,
    As u have added one more field in the select statement,
    U must modify the internal table as well.
    Now when u pass this internal table to smartform just chk the type reference of this internal table from smartform : Global Settings - Form Interface - Tables tab.
    In most of the cases its a Z-structure.
    Just add the new field in this structure as that of ur internal table in program. ( At same position..)
    For eg:
    In my program I am passing following table to smartform...
    TABLES
        I_ZEKPO                    = IT_FINAL_DATA
        I_ZADRC                    = IT_VENDOR_ADDRESS
    now in smartform form interface i have declared them as:
    I_ZEKPO             LIKE           ZEKPO     
    I_ZADRC             LIKE           ZADRC  
    here ZEKPO and ZADRC are the structures which I have created via SE11...
    So whenever I modify in the program internal table structure I need to modify respective Z-strucure as well...
    Just chk if the same thin has been already implemented by previous guy...and do the changes..
    Edited by: Dhananjay Patil on Mar 11, 2008 12:03 PM

Maybe you are looking for

  • I'm not able to add a new event to my calender

    every time that I try to add an new event to my calendar I can't. The + is on gray instead of red.

  • Adobe Acrobat Reader 9.1.3 issuing error messages in Windows 7

    Acrobat Reader 9.1.3 is issuing the following error in the event log viewer for Windows 7 (64 bits): Activation context generation failed for "c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll".Error in manifest or policy file

  • Our phone line is down

    Hello there, I have got a electricity/phone pole near where we live in Battle. Someone crashed into it last Friday evening and EDF contractor has replaced it, but BT have not been to reconnect 3 phones (our next doors, their neighbour's and ours) yet

  • How to access OS User created with "identified externally"

    I am able to SQL> create user ops$deskuser identified externally; while deskuser is one of my OS user. I believe it is a very easy question, however I just do not know how to access this user from sqlplus., please help Thanks in advance

  • TS1424 serious error in iTunes registering system of Feed URL.

    There is serious error in iTunes registering system of Feed URL. From yesterday, when submitting feed url, following error message has been occurred.  " We are currently experiencing technical difficulties, please try again later. " all feeds is corr