Debug im smartform step by step

how i can debug step by step like in sapscript.
i tried to make break-point in the smartf,and use smartform_trace and not for this i maean (sftrace dont work i dont know).
i need step by step how????

Hi Rani,
Checkout This Thread..,
How to Debug a Smartform
For more info on smart forms:
Re: smartform step by step material required
hope it helps..,
Regards,
Vinoth

Similar Messages

  • Step by Step Debugging in BSP page

    Hi,
      Can any one tell me How to do the Step by step debugging? In ABAP application we are doing through /h command.Like this any command is there in BSP page for debugging? And where actually we need to place the break point means in Controller or in View?
    Thanks in advance,
    Regards,
    Anu.

    HI
    GOOD
    GO THROUGH THESE LINKS
    http://www.sappro.com/downloads/technical_guides/WebAppDevTOC.pdf
    http://www.sap.com/solutions/netweaver/pdf/50052038.pdf
    THANKS
    MRUTYUN

  • Step By Step creation of Smartform in ECC6.0 with example program.

    Hi,
    Can anyone give me the steps to create smartforms in ECC6.0 with example program call the function module created by form.
    Regards,
    Chandru

    Hi   Chandra Prakash,
    Go through the following Links, here u can find example with step
    by step.
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    http://sap.niraj.tripod.com/id67.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    Regards,
    Eshwar.

  • Is it possible to debug step by step for share point designer workflow in share point 2010

    Hi all,<o:p></o:p>
    I have created a reminder date work flow but it is not working .In this work flow it need to be check first its status if its status is suspend then only workflow can run .I am
    attaching below workflow logic check if any modifications needed please suggest me . And  I have doubt is it possible to check step by step debugging like in coding we are using break point in this way any break point is available for designer workflows
    ? If break point is available please guide me how to get and use those<o:p></o:p>
    Thanking you,<o:p></o:p>
    ArunDarly 
    <o:p>Workflow logic given below</o:p>

    You can't step through a SharePoint Designer Workflow.  The normal workaround is to Log messages to the History list with the values you want to look at where you would normally put breakpoints.  Then run the workflow and examine the history
    list to see how the values changed as you went through your workflow.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Step by step debugging pl/sql procedure

    How can we debug a pl/sql procedure step by step

    We know about this, for a workaround you can try editing jdev-Darwin.conf and adding a line like the following:
    # Add our debug classes to the bootclasspath
    AddVMOption -Xbootclasspath/a:../../rdbms/jlib/ojdi.jar
    In short, ojdi.jar needs to be on the bootclasspath on the mac. I'm not sure how well this will work, but it's one of the changes we're planning for our 10.1.2 release of JDeveloper
    Rob
    Team JDev

  • Error while step-by-step debugging

    Hello,
    This problem happens to me quite often, but not everytime.
    On Windows XP, SP2, I develop an application which is deployed onto a JBoss 4 server through IDEA IntelliJ 7.
    I launch my server through IntelliJ too, using the jrockit-R27.4.0 - 1.6.0 VM.
    The application is a web based application using Wicket.
    When I attempt to do step-by-step debugging, quite often, the stepping is very very slow. Then, after usually 2 steps, I receive this message:
    ERROR: transport error 202: connect failed: Connection refused
    ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
    JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
    The application has requested the JVM to exit with an fatal error from JNI. Error message:
    JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)After which, I cannot use this server anymore, I have to kill it and restart it (which annoys me, as I chose JRockit to avoid the PermGen errors that the Sun VM had when redeploying 2 or 3 times the application on the JBoss server)
    Any idea what this is due to? Or how I could solve it?

    I'll try to reproduce the issue with a small java app instead of JBoss.
    From the environment point of view:
    IntelliJ 7.0.2 (build 7549)
    Compiler: Sun Javac for JDK1.5.0.12
    OS: Win XP, SP 2
    IJ connects to the VM using socket (but errors also happened with Shared Memory connection, although the error message was different)
    cmd /c "C:\Program Files\jboss-4.2.1.GA\bin\run.bat" -c default
    ===============================================================================
      JBoss Bootstrap Environment
      JBOSS_HOME: C:\Program Files\jboss-4.2.1.GA
      JAVA: C:\Program Files\Java\jrockit-R27.4.0-jdk1.6.0_02\bin\java
      JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:2106,suspend=y,server=n -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
      CLASSPATH: C:\Program Files\Java\jrockit-R27.4.0-jdk1.6.0_02\lib\tools.jar;C:\Program Files\jboss-4.2.1.GA\bin\run.jar
    ===============================================================================--
    Edited by FDonckels at 11/29/2007 5:09 AM

  • Smartform step by step material required

    Hi friends ,
    i m new to smartforms . i need some good material on smartforms . if possibe with screenshots or a step by step procedure to implement them .
    regards,

    Hi,
    Check these links.In this,I am explaining everything step-by-step.Kindly reward points by clikcing the star on the left of reply,if it is useful.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    Check these links also.
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm

  • Smartforms Step by Step...

    Hi All,
    i m new to smartforms can u pls give me the detail step by step tutorial link, or can u mail me the tutorial in pdf or in any format.. my mail id is [email protected]
    Thanks & regards,
    Yunus

    Hai Yunus
    Go through the following Links
    I have sent you some documents.
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    Thanks & regards
    Sreenivasulu P

  • Step by step  4 smartforms

    hi,
    I need step by step guide for smartforms can any one provide that.
    thanks in Advance

    hi sagar ,
    Even I struggled a lot in understanding smartforms...just last week i understood what smart forms are...
    u can really understand by the name itself..yes it is a very smart form to present ur data....
    STEPS  :
    1) basic transaction to create a smartform is 'SMARTFORMS' .
    2) Enter a smartform name .
    3)press create button .
    4) instantly ur smart form - form bulider gets opened , where u can enter a short description about the smartform that u r going to create .
    5) every form will have global settings.
    6) these global settings consist of
              a)  form attributes .
              b)  form interface .
              c)  global definitions .
    7) form attributes is for general attributes about the form .
    8) form interface is specially for declaring any parameter -  where any user can enter some value to the parameter n get the corresponding output . the parameter can b an importing or exporting parameter also .
    9)  in global definitions u declare all the global data in gobal data option necessary for ur program  eg: variables , internal tables , work areas .....
    10) in types option u define all the structures necessary for the program ...
    11) in initialization option u can write all ur select queries ...
    12) every smart form consist of pages....
    13) in every page u can create a page ,  a window ,  or a graphic...
    14)in every window u can create another window , graphic , address , text , table ...
    15) suppose u create a table for a particular window...
    16) then each table will consist of header , main area and a footer ...
    17) for header , main area  and footer u can also create a table line
    18)  for every table line mention a line type...
    19) a line type can b declared in
                        double click on table .
                               click on 'DETAILS' icon .
                                    declare the line type 
    by mentioning the number of columns for the table with units.
    20) use 'DATA' option for looping internal table to workarea also using WHERE condition along with SORTING option for ascending or decending the fields selected for the internal table .
    21) use 'CALCULATIONS'  option for making any grand total of any field from the internal table ...by mentioning operation as total , field name as say vbap-netpr , target field name as say total which is also declared in the global data ,  and time
    as AFTER THE LOOP  or BEFORE THE LOOP  .
    u can also u left frames, right frames....for ur table ...
    22) activate at each step and clear the errors...
    23) press f8 for processing the smartform ..
    automatically a function module name comes and excute the module
    enetr if u have any importing parameter as form interface ..
    24) give LP01 for output device and give print preveiw first
    25) execute...u can get as desired output as u want..
    i hope these steps will help u a lot in working and understanding smartforms...
    otherwise always refer to www.sdn.sap.com website....
    please reward me points if u understand my steps ....
    Ginni .

  • Pls Send me Step by Step procedure for a Smartforms

    hi all ,
                        pls send me Step by step procedure for a Smartform creation or PPT  to This Email id : [removed by moderator]
    thanks in advance
    rgds
    rafi.v

    hi mahammad rafi,
    u can read this,
    smart forms
    Introduction to SAP SmartForms
    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
    SAP Smart Forms have the following advantages:
    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.
    Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
    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. 
    In 4.6, Alternatively in a paragraph format use the Page protection attribute to determine whether or not to display a paragraph completely
    on one page. Mark it if you want to avoid that a paragraph is split up by a page break. If on the current page (only in the main window)
    there is not enough space left for the paragraph, the entire paragraph appears on the next page. 
    Details information about SAP Barcodes
    A barcode solution consists of the following:
    - a barcode printer
    - a barcode reader
    - a mobile data collection application/program
    A barcode label is a special symbology to represent human readable information such as a material number or batch number
    in machine readable format.
    There are different symbologies for different applications and different industries. Luckily, you need not worry to much about that as the
    logistics supply chain has mostly standardized on 3 of 9 and 128 barcode symbologies - which all barcode readers support and which SAP
    support natively in it's printing protocols.
    You can print barcodes from SAP by modifying an existing output form.
    Behind every output form is a print program that collects all the data and then pass it to the form. The form contains the layout as well as
    the font, line and paragraph formats. These forms are designed using SAPScript (a very easy but frustratingly simplistic form format
    language) or SmartForms that is more of a graphical form design tool. 
    Barcodes are nothing more than a font definition and is part of the style sheet associated with a particular SAPScript form. The most
    important aspect is to place a parameter in the line of the form that points to the data element that you want to represent as barcode on
    the form, i.e. material number. Next you need to set the font for that parameter value to one of the supported barcode symbologies.
    The next part of the equation can be a bit tricky as you will need to get a printer to print that barcode font. Regular laser printers does not
    normally print barcode fonts, only specialized industrial printers that is specifically designed to support that protocol and that uses
    specialized label media and heat transfer (resin) ribbon to create the sharp image required for barcodes.
    Not to fear though, there are two ways to get around this:
    - You can have your IT department do some research - 
    most laser printers can accept a font cartridge/dimm chip (similar to computer memory), called a BarDIMM that will allow a laser printer to
    support the printing of barcodes.
    - Secondly, you can buy software that you can upload in your SAP pri
    regards..
    seshu.

  • SMARTFORMS - Step by Step Tutorial

    Hi All,
    I am looking for a step-by-step detail example for Smart Forms. It would be great if it was up-to-date and not including the now extinct COMPLEX STRUCTURE option.
    <b><REMOVED BY MODERATOR></b>
    Many Thanks,
    Dips Naik
    SAP Consultant / Project Manager
    Message was edited by:
            Alvaro Tejada Galindo

    Smart Forms:
    Transaction Code for Create Smarf Forms: SMARTFORMS
    Transaction Code for Create Styles (Paragraph Formats, Character Formats, etc.,)  Used in Smart Forms: SMARTSTYLES
    Steps to be followed while creating Smart Forms:
    1.     Enter the Form Name (e.x. ZEKKO_EKPO) and Press Create Button.
    2.     Enter Form Description and Select the “Output options” Tab &#61664; Enter the Page Format (e.x. DINA4) and Style (e.x.SF_STYLE_01).
    3.     Double click the Form interface Left Sub-tree.
    4.     Enter the Import Parameters (The values that passed from the Print Program into the Form) (e.x. Company Code)
    Parameter name     Type assignment     Reference type          Default value          Pass value
    COMPANY_CODE     TYPE               EKKO-BUKRS                         &#61522;
    5.     Double click the Global definitions from the Left Sub-tree.
    Assume that we are using two tables EKKO and EKPO in this example:
    6.     Click the “Types” Tab.
    7.     Enter the Code as following:
    TYPES: BEGIN OF WA_EKKO,
            EBELN LIKE EKKO-EBELN,
            BUKRS LIKE EKKO-BUKRS,
          END OF WA_EKKO.
    TYPES: BEGIN OF WA_EKPO,
            EBELN LIKE EKPO-EBELN,
            EBELP LIKE EKPO-EBELP,
            MENGE LIKE EKPO-MENGE,
            NETPR LIKE EKPO-NETPR,
           END OF WA_EKPO.
    TYPES: T_EKKO TYPE STANDARD TABLE OF WA_EKKO,
           T_EKPO TYPE STANDARD TABLE OF WA_EKPO.
    8.     Click the “Global data” Tab.
    Declare the Internal Tables and Work Areas as follows:
    Variable name          Type assignment     Reference type     Default value           Constant
    I_EKKO          TYPE               T_EKKO
    I_EKPO          TYPE               T_EKPO
    WA_EKKO          TYPE               WA_EKKO
    WA_EKPO          TYPE               WA_EKPO
    9.     Double click the “%PAGE1 New Page” in the Left Sub-tree.
    10.     Change the %PAGE1 to “FIRST” or any name and Enter the Description (e.x. First Page).
    11.     Select the Next Page as “FIRST”
    12.     Select the “Output options” Tab and select the format of the page (Portrait or Landscape) and all other print attributes.
    13.     Select the “Background Picture” Tab, and Enter the Name, Object and Id of the image file. (Before this step, go to SE78 and import the image first) for the Image which has to be appeared in the Background of the Script.
    14.     If you want to add any LOGO in the First Page of the Script then right click the “FIRST New Page” in the Left Sub-tree from the Menu option “Create” &#61664; select the “Graphic”.
    15.     Double click the “%Graphic1 New Graphic 1” in the Left Sub-tree.
    16.     Give the Name and Description (e.x. Graphic = “COMP_LOGO” and Description = “LOGO WINDOW”)for the New Graphic Inserted.
    17.     Enter Name, Object and ID for the Graphic image and Select the Color grid screen (BCOL) option button in the “General attributes” Tab.
    Click - Output options Tab. Set Left and Upper Margins as given:
    18.     Right click the “FIRST New Page” in the Left Sub-tree and from the Menu option “Create” &#61664; select the “Window”.
    19.     Double click the “%WINDOW1 New Window1” in the Left Sub-tree and enter the Window name and Description (e.x. Window = “ADD_WIN” and Description = “Address Window”)
    Set the Left and Upper margins for the ADD_WIN as follows:
    20.     Right click “ADD_WIN Address Window” in Left Sub-tree and from the Menu option “Create” &#61664; select the “Program Lines”.
    21.     Enter the Program Lines name and description (e.x. Program Lines = “ADD_FETCH” and Description = “FETCHING COMPANY ADDRESS”)
    22.     Enter the Input Parameter as  COMPANY_CODE and Export Parameter as V_ADRNR in the “General attributes” Tab and write the select query as following:
    SELECT SINGLE ADRNR INTO V_ADRNR
           FROM T001 WHERE BUKRS EQ COMPANY_CODE.
         (Note: Before writing the select query first declare the Variable V_ADRNR in the Global definitions area as follows:
         V_ADRNR           TYPE          T001-ADRNR.
    23.     Right click the “ADD_WIN Address Window” in the Left Sub-tree and from the Menu option “Create” &#61664; select the “Address”.
    24.     Double click the “%ADDRESS1 New address1” and change the Address name and description (e.x. Address = COMP_ADD and Description = “COMPANY ADDRESS”).
    25.     Select the Type of the address in the “General attributes” Tab. (Since we are retrieving the Organization address, we selected the first radio button) and in the Address number text box pass the V_ADRNR Variable as &V_ADRNR&.
    26.     Set the Main window attributes like this: (Setting of window co-ordinates)
    27.     Right click the “MAIN Main Window” in the Left Sub-tree and from the Menu option “Create” &#61664; select the “Program Lines”.
    28.     Enter the name and description (e.x. Program Lines = “SELECT_RECORD” and Description = “SELECTING RECORDS”).
    29.     Enter the Input Parameter as  COMPANY_CODE and Output Parameter as I_EKKO and I_EKPO in the “General attributes” Tab and write the select query as following:
    SELECT EBELN BUKRS
           INTO TABLE I_EKKO
           FROM EKKO
           UP TO 10 ROWS
           WHERE BUKRS EQ COMPANY_CODE.
    IF SY-SUBRC EQ 0.
      SORT I_EKKO BY EBELN.
      SELECT EBELN EBELP MENGE NETPR
             INTO TABLE I_EKPO
             FROM EKPO
             FOR ALL ENTRIES IN I_EKKO
             WHERE EBELN EQ I_EKKO-EBELN.
      IF SY-SUBRC EQ 0.
        SORT I_EKPO BY EBELN EBELP.
      ENDIF.
    ENDIF.
    30.     Right click “MAIN Main Window” in the Left Sub-tree and from the Menu option “Create” &#61664; select the “Complex Section”.
    31.     Enter the Section name and description (e.x. Section = “PO_LOOP” and Description = “PURCHASE ORDER NUMBER LOOP”) and check the “Repeat processing” check box and select the “Output type” as Unstructured (i.e. select the Unstructured radio button) in the “General attributes” Tab.
    32.     Select the “Data” Tab.
    33.     Enter the Internal Table Name as I_EKKO and Work area name as WA_EKKO and sort by the BUKRS and EBELN fields.
    34.     Right click “PO_LOOP PURCHASE ORDER NUMBER LOOP” in Left Sub-tree and from the Menu option “Create” &#61664; select the “Text”.
    35.     Enter the Text name and description (e.x. Text = “PO_NO_DISPLAY” and Description = “PURCHASE ORDER NUMBER DISPLAY”) and enter the values as in the screen shot
    Click the Text Editor
    Display the values of Company Code and Purchase Order Number as shown below:
    Press Back Button, then Press Save and Check Buttons
    36.     Right click the “PO_LOOP PURCHASE ORDER NUMBER LOOP” in the Left Sub-tree and from the Menu option “Create” &#61664; select the “Template”.
    37.     Double click on “%TEMPLATE1 New template” and enter the Template name and description (e.x. Template Name = “OI_HEAD” and Description = “ORDER ITEM HEADER”).
    Before press save or enter click the “Table Painter Button” which will take you to following screen.
    To avoid the “cross line” in the Editor click the “Settings Button”
    which will result in the following popup, in which you un-check the “Cross” Check Box and press enter.
    38.     Split the Cell into Four or into any number of columns you want to display in the script by right clicking the “%C1”.
    and press “Back” Button.
    39.     Select the pattern of the table to be displayed in the script by the clicking “Select pattern” Button
    Selected table pattern
    40.     Inorder to Display the “Column Text“ for the table columns, insert the Text as shown below:
    41.     Right click the “OI_HEAD ORDER ITEM HEADER” and from the Menu path “Create” &#61664; Select the “Text” .
    42.     Enter the Text name and description (e.x. Text = “HEAD1” and Description = “COLUMN1”) and enter the values as in the screen shot (i.e. as explained in the point no 34).
    43.     Inorder to match the Template Column with the insertedText  “HEAD1 COLUMN1”, select the “Output  options” Tab and Enter the Line Number and Column Number in which the above Text has to be printed in the form
    44.     Repeat Step No.40 & 41 for all the remaining column headings.
    45.     The Form is ready with all data upto Table Header. Inorder to populate data under each column header, insert a table.
    46.     Insert the Table under “PO_LOOP PURCHASE ORDER NUMBER LOOP” by right clicking the same.
    47.     Enter Table Name and Description (e.x. Table Name = “OI_DISPLAY” and Description = “ORDER ITEM DISPLAY”)
    48.     Match the column width with the “OI_HEAD ORDER ITEM HEADER” Template (refer step no 38 screet shot no 2) and Select the “Default” radio button and “No page break” check box. Click the “Select pattern” push button to select the table pattern to be displayed.
    49.     Click the “Data” and populate the Item details by looping the Internal Table I_EKPO into the Work Area WA_EKPO sorted by EBELN and EBELP as shown in the following screen shot
    50.     Inorder to Display the values for each column, we have to Insert Separate Text for each column under the Table “OI_DISPLAY ORDER ITEM DISPLAY” by Right clicking the same. Enter the Name and Description for the Each Text Inserted under the Table.
    Column 1 for Line Item of each Purchase Order – Populate the values for each column as explained in the step no 34.
    Inorder to Match the Item values with the Template Header, In the Inserted Text “ORD_ITM_COL COLUMN1” Click the “Output options” and Select the “New line” Check box and Select the “Line type” as “Detail” and also check the “New cell” Check box.
    51.     Similary add one Text for the remaining columns.
    For the Second Column Text You need only to select the “New cell” Check box.
    For the Third Column Text also You need only to select the “New cell” Check box.
    52.     Before Inserting the 4th Text for the 4th Column, we have to calculate the Amount by Multiplying the Quantity and Unit Price and for the same we have to insert “Program Lines” by Right clicking “OI_DISPLAY ORDER ITEM DISPLAY”
    53.     Similarly calculate the subtotal by adding the totals and calculate the grand total by adding the subtotals.
    Before doing the calculations, declare variables for total, subtotal and grand total in Global definitions.
    InputParameters: WA_EKPO-MENGE,WA_EKPO-NETPR & OutputParameters: V_TOTAL,V_SUBTOTAL, V_GRDTOTAL.
    54.     Now add the 4th Text to display the 4th column in the Form.
    For the Fourth Column Text also You need only to select the “New cell” Check box.
    55.     Inorder to display the Subtotals (which has been created earlier i.e. refer to step no 52) of all the Line Items for each Purchase Order, we have to Insert a separate Text Under the Table OI_DISPLAY ORDER ITEM DISPLAY” by right clicking the same.
    56.     Enter the Name and Description for the Inserted Text (e.x. Text = “SUB_TOTAL_DISPLAY” and Description = “SUB_TOTAL_DISPLAY” and populated the value for subtotal.
    57.     After each purchase order, the Variable V_SUBTOTAL has to be refreshed, Inorder the clear the subtotal variable we have to insert “Program Lines” by right clicking the “OI_DISPLAY ORDER ITEM DISPLAY”.
    58.     Enter Name and Description for the Program Lines (%CODE1 New program lines 1) Inserted (e.x. Program lines = “CLR_VAR” and Description = “CLEAR SUBTOTAL VARIABLE”. Input parameters = “V_SUBTOTAL”. Clear the variable as shown below:
    59.     Now, we have to display the Grand Total (i.e. summation of all the subtotals). Insert “Text”  under the “PO_LOOP PURCHASE ORDER NUMBER LOOP” by right clicking the same.
    Text “%TEXT1 New text1” gets inserted. Now enter the name and description for the same and also populated the value for grand total
    Text = “GRD_TOT_DISP”, Description = “GRAND TOTAL DISPLAY” and Variable V_GRDTOTAL has been populated to display the grand total in the form.
    60.     Inorder to display the Current Page Number and Total Number of pages in the form we need a separate window and to obtain the same right click the “FIRST First Page” and the insert window.
    Window “%WINDOW1 New window 1” get inserted under the first page.
    61.     Enter the Window name and description (e.x. Window = “PG_WIN” and Description “PAGE NUMBER WINDOW”)
    Set the window co-ordinates for page number window “PG_WIN” as given below:
    62.     Inorder to display the page numbers we have to insert a “Text” by right clicking the “PG_WIN PAGE NUMBER WINDOW”.
    Text “%TEXT1 New text 1” gets inserted and now enter the text name and description.
    Text = “PG_DISP”, Description = “PAGE NUMBER DISPLAY” and Page Number gets displayed from the Transparent Table “SFSY”.
    63.     General Screen Shot of Entire Left Sub-tree:
    64.     Form output:
    65.     SOME MORE FURTHER MODIFICATIONS / ADDITIONAL OPTIONS IN THE ABOVE CREATED FORM:
    Condition-1: Create second page and company logo should get printed only in the first page and not in the second page. Similarly, company address window should get printed only in the last page and not in other pages.
    To create the second page right click the “FIRST First Page” in the left sub-tree.
    66.     Another page gets inserted with name “%PAGE1 New page 1”.
    67.     Enter Page name and description for the inserted new page (e.x. Page = “SECOND” and Description = “Second Page”) and set the next page as inserted second page and select the mode as increase counter as shown below:
    68.     Now change the “FIRST First Page”s Next page as “SECOND” and change the mode as Initialize counter.
    69.     Now copy the Main, Company Address, Page No windows from “FIRST First Page “ to “SECOND Second Page”.
    70.     Arrange all the windows under the Main window in both first and second page. Inorder to restrict the company logo to be printed only in the first page, go to the first page and double click the “LOGO_WIN LOGO WINDOW” and select the “Conditions” tab and Check the “only on first page” Check Box.
    71.     Output showing the main window got printed only in the first page and not in the second page and so on ….
    First Page: With LOGO
    Second Page: Without LOGO
    72.     Inorder to restrict the Company address to be printed only in the last page and not in the remaining pages, double click the “ADD_WIN ADDRESS WINDOW” in the first page and Check the “only after end of main window” Check Box. Repeat the same process for the second page also.
    73.     Output showing the address window got printed only in the last page and not in the first page and so on ….
    First Page: without company address
    Last page (second page): with company address window
    74.     Condition-2: Purchase order’s whose value is more than 5000 only should get displayed / printed.
    Inorder  to achieve the same, right click the “PO_LOOP PURCHASE ORDER NUMBER LOOP” and select the “Loop”.
    75.     “%LOOP1 New loop 1” gets inserted
    76.     Enter Loop name and description.
    77.     Select the “Data” Tab Loop the Internal I_EKPO as shown below:
    78.     Inorder to check the subtotal value for each purchase order (i.e. purchase order value should be more than 5000), Insert a program lines under the new loop inserted.
    79.     “%CODE1 New program lines 1” gets inserted
    80.     Enter the name and description for Program lines. Before calculating the subtotal declare two variables one for total and another for subtotal in Global definitions. Calculate the Subtotal as shown below:
    Input parameters: “WA_EKPO-MENGE, WA_EKPO-NETPR, V_TOT”; Output Parameters: “V_VALUE”.
    81.     Now we calculated the subtotal for each purchase order. Inorder to restrict the display of purchase orders whose values are more than 5000, we need to insert “Alternate” and for the same right click the “PO_LOOP PURCHASE ORDER NUMBER LOOP” and from the menu path create &#61664; select the “Alternate”.
    82.     “%CONDITION1 New alternate 1” gets inserted.
    83.     Enter Alternate name and description. Select the “General attributes” Tab and Enter the condition of subtotal > 5000 as shown:
    84.     Now, move “PO_NO_DISPLAY PURCHASE ORDER NUMBER DISPLAY, OI_HEAD ORDER ITEM HEADER, OI_DISPLAY ORDER ITEM DISPLAY, SUB_TOTAL_DISPLAY DISPLAY SUBTOTAL and CLR_VAR New program lines” under the “TRUE” part.
    85.     In the “FALSE” part (i.e. If subtotal value is less than 5000, then clear the variable), insert program lines and code as shown:
    86.     Only those purchase order whose value is more than 5000 gets displayed – First Page.
    Only those purchase order whose value is more than 5000 gets displayed – Second Page.
    87.     Condition-3 Each Purchase Order should get printed in a new page. Logo should get printed in the first page along with the first purchase order and similarly, Grand total should get printed in the last page with the last purchase order.
    88.     Inorder to achieve this, when the first successful purchase order whose value is more than 5000 is found then increase one counter variable by 1 (this is required because the “New page command” should not get triggered in the first page itself”) and for the same we have to insert a “Program lines” under the “TRUE” part of “CHK_COND SUBTOTAL CONDITION”.
    Before increasing the counter variable first declare the counter variable in the “Global definitions” part.
    Output parameters: V_COUNTER.
    89.     Inorder to avoid triggering “New page command” in the first page, we have to insert “Command” in the “TRUE” part of “CHK_COND SUBTOTAL CONDITION” by right clicking the same as shown below:
    90.     “%COMMAND1      New command 1” gets inserted.
    91.     Enter name and description for the inserted Alternative. Select “General attributes” Tab and check whether for the counter variable is more than 1.
    92.     If the counter variable is more than 1 means, we got the second successful purchase order whose value is more than 5000. Hence, we can trigger new page command here and for the same right click the “TRUE” part in “NEW_PG NEW PAGE COMMAND” as shown:
    “%COMMAND1 New command 1” gets inserted
    93.     Enter the name and description for Command and select the “General attributes” Tab and Check the “Go to new page” and select the page as “SECOND” as shown below:
    94.     The following is the output: First Page with company logo and without company address window, first purchase order whose value is more than 5000.
    Second page: without company logo and with company address window for the last purchase order whose value is more than 5000.
    95.     The new PROBLEM we faced when we create the smart form is page number. Total Page Number got displayed as “*” as shown:
    96.     Inorder to solve the above problem Double Click the “PG_DISP PAGE NUMBER DISPLAY” and Click the Text Editor.
    Upon clicking the text editor it will take you to the following screen:
    Cut (Ctrl+X) the “SFSY-FORMPAGES” and delete the remaining things as shown.
    Go to the menu path Insert &#61664; Symbols &#61664; New as shown
    Which will result you in the following popup and fill the popup as shown.
    97.     It will takes you to the following screen.
    98.     Now replace &SFSY-FORMPAGES4(4CZ)& as &SFSY-FORMPAGES0(4CZ)&
    99.     Press back and then check, activate and execute – You can observe that the problem has resolved.
    100.     Enjoy and try to create more smart forms……..
    Reward Points if useful....
    Regards,
    Sarathy.

  • Step By Step Process Of SmartForms In Ecc6.0

    Hi,
    I am New In SAP(ABAP) i Need  Step By Step Proces Of Smart Forms, in Ecc6.0
    Thaank & Regards
      Mateen
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Aug 11, 2008 10:25 AM

    Dear Sir,
    I have tried and gone through search also,but in between i am getting struck in the steps.
    i got one senario i was following that but that option is not prsent in ECC6.0
    In Global definition we define I/P parameters and O/P parameters
    after that we go for Main window.
    Main window->Create->Complex Selection
    Here in ECC 6.0 there is no option of  Complex Selection
    Pls Help i have to develop more print programms
    Regards
    Mateen

  • ABAP/4 u0096 Step by Step Main Concept details

    can any one give the details of ABAP/4 – Step by Step Main Concept details and Links.

    Hi
    Start with this.Refer this
    http://www.sapbrain.com/FAQs/TECHNICAL/SAP_ABAP_DATADICTIONARY_FAQ.html
    http://www.****************/InterviewQ/interviewQ.htm
    http://help.sap.com/saphelp_46c/helpdata/en/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Reports
    http://www.sapgenie.com/abap/reports.htm
    http://www.allsaplinks.com/material.html
    http://www.sapdevelopment.co.uk/reporting/reportinghome.htm
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    ALE/ IDOC
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.sappoint.com/abap/ale.pdf
    http://www.sappoint.com/abap/ale2.pdf
    http://www.sapgenie.com/sapedi/idoc_abap.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/78/217da751ce11d189570000e829fbbd/frameset.htm
    http://www.allsaplinks.com/idoc_sample.html
    http://www.sappoint.com/abap.html
    http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
    http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
    http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
    http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
    http://www.sapgenie.com/sapedi/index.htm
    http://www.allsaplinks.com/idoc_sample.html
    Check these step-by-step links
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501-0010-ee84-de050a6cc287
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-0010-eabe-82149bcc292e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501-0010-0090-bdfb2d458985
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    SAPScripts
    http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
    http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
    http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
    http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
    http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
    http://esnips.com/doc/b57e8989-ccf0-40d0-8992-8183be831030/sapscript-how-to-calculate-totals-and-subtotals.htm
    SAP SCRIPT FIELDS
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/8033ea454211d189710000e8322d00/content.htm
    scripts easy material
    http://www.allsaplinks.com/sap_script_made_easy.html
    Debugging Document.
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_47x200/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://www.cba.nau.edu/haney-j/CIS497/Assignments/Debugging.doc
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/84/1f624f4505144199e3d570cf7a9225/frameset.htm
    http://help.sap.com/saphelp_bw30b/helpdata/en/c6/617ca9e68c11d2b2ab080009b43351/content.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/b3/d322540c3beb4ba53795784eebb680/frameset.htm
    Reward points if useful
    Regards
    Anji

  • Debug SRM & Smartform

    Hi
    I am using web based SRM.From here i am using an Contract that has to output a smartform.There is something wrong with my smartform and i would like to debug it.Could you please tell me how to do that?
    thanks a lot.

    Hi,
    To debug a smartform follow steps:-
    1. Goto transaction SMARTFORMS.
    2. Give your smartform name and press F8.
    3. You will be taken to a screen which shows a Function Module name.
    4. Press display for that FM.
    5. At the bottom of the code, there is a sub-routine PERFORM %GLOBAL_INIT.
    6. Goto this sub-routine and check for the code in smartform programs lines.
    7. Put a debug point.
    8. Now display the smartform output for the contract using the t-code from R/3 .
    You can now debug the code.
    Hope this helps you.
    Regards,
    Tarun
    Edited by: Tarun Gambhir on Sep 15, 2009 12:49 PM

  • Debug a smartform

    Hi,  Can anyone tell me the way to debug a smartform and to upload a logo into
    SAP.

    1) One way to debug smartform is to debug the Function Module of that smartforms.
    If you want to debug particular smartform node that the solution would be,
    insert a "Program Line" just above the node you want to debug and this program line write a normal abap breakpoint.
    So whenever you call the smartforms, it will stop at this breakpoint and you can debug onwards.
    2) SFTRACE can be used for debugging SMARTFORMS.
    1)goto tcode SFTRACE --> click "trace on"
    2) Get the function module name and set break points in function module name.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    or
    Try with this:
    In the form Utilities->debugger / RSTXDBUG FM for debugging
    or
    You can set break "sy-uname" within your smart form code sections and this will take you to the code sections in the function module of the smart form when the break point is reached. This way by timing the break points you can look at the code of the various nodes of your smart form.
    BREAK-POINT can be used only in own program lines in smartform - not very helpful because it always stops until removed and generated again.
    Or you can use transaction SMARTFORM_TRACE.
    1. use transaction SMARTFORM_TRACE
    2. in the SMARTFORMS, use utilities to show the function name. You can analyze this function in SE37 and set dynamic breakpoints as required. Lok at the SMARTFORM_TRACE to decide where to set break points.
    or
    SMARTFORMS DEBUGGING
    For smartforms debugging you can do this.
    1. Execute the smartform (execute button in SMARTFORMS transaction)
    2. Take the generated function module and display it in SE80.
    3.Find the smartforms Elements (text elements, windows, code lines, loops) in this and set Soft break points.
    Correct name is SMARTFORM_TRACE. You have lots of options for adequate analysis
    Tcode - SFTRACE
    Re: How to Debug a Smartform
    Debug of smartform and sapscript.
    Debugging SmartForms
    Debugging of a subroutine pool.
    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
    The steps for including graphical elements in the layout set are as follows
    • The graphical element (like company logo) should be in valid graphic file format like .bmp or .jpg
    • Use appropriate software to convert the above file into a .TIFF file
    • Use report RSTXLDMC to upload this file as a text module in SAP
    • Execute the above program from the ABAP /4 editor
    • Enter the location of the .TIFF file on the PC
    • Specify BMON or BCOL as the raster image type
    • The SAP system suggests a name for the file ( like ZHEX-MARCO-* ). The * indicates the type of file. For e.g. if the file contains a logo then the name can be ZHEX-MACRO-LOGO
    • The ID should be ‘ST’ and give the logon language
    • Running the program will convert this .TIFF file into a text element
    • Incorporate this converted logo in the appropriate window under the appropriate text element by giving
    INCLUDE ZHEX-MACRO-LOGO OBJECT TEXT ID ST in the first line
    regards,
    srinivas
    <b>*reward points for useful answers* </b>

Maybe you are looking for