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

Can anyone tell me how to debug a smartform

Hi friends,

1) I am getting an error in smartforms. The smartform was activated with out any errors. But after giving the value and executing it, when i select a print preview button it goes to screen and it show an exception error. So anyone tell me how to resolve this one.

2) Some one suggested that after generating function module ->click on debugging and then click on display, there i can find a sub routine GLOBAL_INIT(it has all are variables which are used in that smartform). But when i did this procedure i did not find any sub routine like GLOBL_INIT. tell me how to debug a smartform.

3) After generating the function module in smartforms in real time do we need to add any characters before that function module for ex: BL/001/5478/V2547. This function module is generated after completing of design and now if i want to use this FM in program can i directly use this one or SSF_BL/001/5478/V2547 like these characters are used. tell me why and what are those characters.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 06, 2014 at 05:08 PM

    Go to transaction SMARTFORMS, find the function module name for your smartform.

    Go to transaction SE37, paste the function module name and go to attributes.

    Double click on the "Program" field to navigate into the ABAP report of your smartform, go into the last include of this report.

    You'll find the logic of your smartform on this include. You can put breakpoints on this code.

    Finally, excecute the report that calls your smartform.

    Regards,

    Rubén Mircin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 05:09 PM

    Hi,

    Display your smartform and from menu go to Environment / Function Module Name copy that name (eg: /1BCDWB/SF00000016) and display it with SE37.

    After that go to menu: Goto / Main Program and double click last INCLUDE.

    There you have FORM %GLOBAL_INIT and all the other code lines. You can set breakpoint here.


    It's posible that you have to declare some variables in Global Definitions / "Currency/Quant. Fields", I don't know for sure as you didn't mentioned the error you got.


    Adi.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi again,

      You can not use the name of the function because it will get changed every time.

      Use function SSF_FUNCTION_MODULE_NAME to determine the name of the function (and store it in a variable - eg: FM_NAME) which gets generated and after call it like this:

      DATA FM_NAME TYPE RS38L_FNAM.

      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
      FORMNAME = 'SMARTFORM_NAME'
      IMPORTING
      FM_NAME = FM_NAME
      EXCEPTIONS
      NO_FORM = 1
      NO_FUNCTION_MODULE = 2
      OTHERS = 3.


      * call smartform

      CALL FUNCTION FM_NAME

      * params go here

      EXCEPTIONS
      FORMATTING_ERROR = 1
      INTERNAL_ERROR = 2
      SEND_ERROR = 3
      USER_CANCELED = 4
      OTHERS = 5.


      Adi.

  • Posted on Jan 06, 2014 at 05:10 PM

    Hi

    Place the external debugging on the generated function module of your smartform in your print program.

    Seems your startform is ok but when you clicks on print preview button you are getting the error means ,there should be something wrong with your print options like spool generation etc.

    Debugging the smartform is same like debug the function module only.

    Regards,

    Sreeram

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 06, 2014 at 05:16 PM

    thank you one and all.

    what about my 3rd question.

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Ram,

      Initially we can't develop program with the function module which is generated by smartform, because based on server function module name will be changed, so better to use SSF_FUNCTION_MODULE_NAME.

      Adrian already posted above regarding this.

      Thanks,

      Ashok.

  • Posted on Jan 06, 2014 at 06:00 PM

    This message was moderated.

    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.