Skip to Content
author's profile photo Former Member
Former Member

smartforms

how to debug smartform

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Mar 25, 2008 at 10:16 AM

    HI,

    1) DEBUG Smartform:

    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.

    Different ways we can debug smart forms.

    1)goto tcode SFTRACE --> click "trace on"

    2) Get the function module name and set break points in function module name.

    HTH

    Regards,

    Dhruv Shah

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 10:19 AM

    Hi

    write

    BREAKPOINT.

    from where you want to debug the smartform.

    Regards

    Aditya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 25, 2008 at 10:34 AM

    hi,

    Hi,

    The the best way to debug the form is to put a breakpoint in the function module generated by the smartform.

    Procedure:

    Open the smartform we want to debug.

    Goto Environment -> Function module name.

    Open the function module in SE37. From the menu GOTO -> main program. Open the last include.

    This incude contains the entire code ie the code we have written in initalization + form routines + program lines + sap generated code.

    Even we can search for the text nodes, folders, templates, tables, graphics, address nodes etc with their names.

    Put a breakpoint at any point you want.

    If we issue any doc which triggers this form, when the control reaches the break point it will stop.

    Please note that hard-coding the break points in the code ( Program lines ) is not recommended and it canĀ“t be done unless if it is development server.

    So, always put a session break point in the related function module.

    We can use SFTRACE transaction to know the sequence of the control flow.

    If you want to break at each and every text that is printed on the output form put the break points in the forms.

    1. %write_text to break at text element.

    2. %WRITE_TEXT_MODULE to break at text module.

    3. %WRITE_INCLUDE_TEXT to break at include text.

    Please put a break point at the first sy-subrc check.

    If the control reaches this point, you can find the name of the element in the varible NAME and the content in the text node in %TEXT.

    Its easy to understand the sequence of the printing if we put a breakpoint as stated above.

    Hope this helps, Do reward.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.