Smart form debugging

how to debug a smart form

Hi,
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
Cheers,
SImha.

Similar Messages

  • Smart forms debugging

    Hi experts,
    Any body pls explain how to debug smartforms ?
    Is it necessary to write print program for smart forms ?

    Hi,
         In the Smartform, within the Code Node you can hardcode a normal abap Break Point ..
    Please set a break point in side the smartform:
    BREAK <USERNAME>.
    Then at the time of print/ preview the program stops there.
    Example : If you set the break point in initializationas
    BREAK <USERNAME>.
    Program stops at break point. After that use Serach and set more break points.
    >Search the program logic/Textelement/Address via search and set the break point at that code.
    Other 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.
    or
    SFTRACE can be used for debugging SMARTFORMS.
    Read More here.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    See the Below thread for how to debug the Smartforms
    How to Debug Smartform?
    Re: debug of smartfrom
    Smart forms
    Thanks
    Nayan

  • To find where a variable is getting updated in a smart form thru debugging?

    Hi Friends,
    This is urgently required.
    In transaction vf02 by putting the billing document no.and navigating as follows:
    billing document -> issue output to ->select the doc->print preview
    a smart form is generated.
    The issue that I am facing is that the from and to date is mssing for some of the documents nos.in the output of the smart form.
    How do I debug the smart form and get to the place where the particular date variables are being picked.
    Thanks a lot in advance !!

    hi,
       Create a short cut as follows
      1) On the vf02, standard tool bar there is an 'shortcut generate' icon will be there, click on it. you will get the screen where under 'Application',  give the following details
    Type: system command
    command: /h
    and click ok then there is a short cut created at your desktop
    2) drag and drop the shortcut before clicking on print preview then debugging will starts
    then you can able to debug the smartform

  • How to debug the smart forms

    Hi All,
    Can any body guide me how to debug the smart forms.
    Thanks & Regards,
    Satish.

    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.
    Regards,
    Satish.

  • Debugging Smart form-Shipemnt-Driver program

    Hai,
    I have created a smart form & output type configuration is done for shiptment.
    scenario 1:
    I set a break point in driver program.When I go to VT02n & entered the shipment number & follew the below steps in the VT02n scree.
    1.select Shipment->output->screen
      enter the ouput type in the displayed popup.
    now the control is going to the code where I set the bbreak point.This is fine.
    Scenario 2:
    I set a break point in driver program.When I go to VT02n & entered the shipment number.
    Hit enter.got the edit page screen.
    now GOTO->OUTPUT
    here I selected the relevant output & followed the procedure to repeat the output again.
    in this case the program not stopped at the place where I set the break point.
    Can any one have any idea this?Why is it happening?

    Hi Bhaskar,
    If you want to debug your smartform then do as follows;
    How to debug smartform in display mode for a particular node.
    Steps to debug a particular node:
    1. Execute the required smartform and take the function module name from there,do not enter into that function module.
    2. in SE38 search for programs by the function module name,
          for eg., if the func module name is /BCDWB/SF00000024 then  search parameter for f4 would be
      /BCDWB/SF00000024, this would give u 4 to 5 prgs in the search list,
       these are the include files which it create for the same smartform .
    out of this open the prg with the name  /BCDWB/LSF00000024F01 in SE38.
    3./BCDWB/LSF00000024F01 - this include file actualy containes the code that we type inside smartforms.
      every node or the windows that is added to the smartform is coded in FORM...ENDFORM ,
      inside this include file.      
    4. FORM look like this .
      FORM %C01.
    NODE CODE5 - this is the name of the node in smartform   
       for the prg line node 'code5',name of the node, coding is inside this form.
         so u can easily put a break point here at this point . 
      ENDFORM.
    like this for every node the FORM is created , u can search for required node and but a break point.
    Hope this information will be helpful to all.

  • Debug Smart form

    Hi any body tell me How to debug smartform?
            thanks and Regards,
                  Praveen.

    In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abap Break Point.
    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.
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    Documentation in smartforms:
    http://www.sap-basis-abap.com/sapsf001.htm
    How to trace smartform is available in this link.
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Tutorials in smartforms:You can download and use the same to study.
    https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/subroutine%20and%20select-option%20in%20smartform.pdf
    I hope this helps.
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • Error in opening the PDF file created from the smart form output.

    Hi All,
    i have a simple smart form which takes 3 values like customer no, name and no of times customer called and gives an out like
    Customer 0001000000 with name Ravi called 5 times today.
    I have to send this output to mail as an attachment.
    for this i am coding as below.
    ******Call the SSF Function module
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = Form name
    VARIANT = ' '
    DIRECT_CALL = ' '
    IMPORTING
    fm_name = lv_fmname
    EXCEPTIONS
    no_form = 1
    no_function_module = 2
    OTHERS = 3
    lv_partner_number = '0001000000'.
    lv_name_org1 = 'Ravi'.
    lv_z_no_calls_day = '5'.
    lw_ctrlop-getotf = 'X'.
    lw_ctrlop-no_dialog = 'X'.
    lw_compop-tdnoprev = 'X'.
    lw_compop-tddest = 'LP01'.
    *******Call the Form Function module and get the OTF of form output
    CALL FUNCTION lv_fmname
    EXPORTING
    name_org1 = lv_name_org1
    partner_number = lv_partner_number
    z_no_calls_day = lv_z_no_calls_day
    control_parameters = lw_ctrlop
    output_options = lw_compop
    user_settings = ' '
    IMPORTING
    job_output_info = w_return
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.
    i_otf] = w_return-otfdata[.
    *********Now here if i look in to the OTF data i got in debug it has the data i aniticipated along with some other data.
    the output is in the format
    TDPRINTCOM(2) TDPRINTPAR(70)
    ST XXXX.. customer 0001000000 with
    name.....
    i have my data in the above format spread in three lines of the output otf table where XXXX... is some number.
    ***********To convert to PDF Format
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    format = 'PDF'
    max_linewidth = 132
    IMPORTING
    bin_filesize = lv_len_in
    BIN_FILE =
    TABLES
    otf = i_otf
    lines = i_tline
    EXCEPTIONS
    err_max_linewidth = 1
    err_format = 2
    err_conv_not_possible = 3
    err_bad_otf = 4
    OTHERS = 5
    *********For testing purpose i created a file on the desktop with the the data in i_tline. it created PDF file but when i tried to open it it's giving an error.
    i_objtxt = 'test with pdf-Attachment!'.
    APPEND i_objtxt.
    DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    READ TABLE i_objtxt INDEX v_lines_txt.
    wa_doc_chng-obj_name = 'Smart Form'.
    wa_doc_chng-obj_descr = 'Frequent Caller Alert_Day'.
    wa_doc_chng-doc_size = ( v_lines_txt - 1 ) * 255 + STRLEN( i_objtxt ).
    *********Creating the Entry for the document
    CLEAR i_objpack-transf_bin.
    i_objpack-head_start = 1.
    i_objpack-head_num = 0.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_txt.
    i_objpack-doc_type = 'RAW'.
    APPEND i_objpack.
    i_objbin] = i_tline[.
    DESCRIBE TABLE i_objbin LINES v_lines_bin.
    READ TABLE i_objbin INDEX v_lines_bin.
    i_objhead = 'Frequentcaller list_Day.pdf'.
    APPEND i_objhead.
    ************Creating the entry for the attachment.
    CLEAR : i_objpack.
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 1.
    i_objpack-body_start = 1.
    i_objpack-body_num = v_lines_bin.
    i_objpack-doc_type = 'PDF'.
    i_objpack-obj_name = 'ATTACHMENT'.
    i_objpack-obj_descr = 'FCA'.
    i_objpack-doc_size = v_lines_bin * 255 .
    APPEND i_objpack.
    CLEAR i_reclist.
    i_reclist-receiver = 'mail id'.
    i_reclist-rec_type = 'U'.
    APPEND i_reclist.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = wa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    TABLES
    packing_list = i_objpack
    object_header = i_objhead
    contents_bin = i_objbin
    contents_txt = i_objtxt
    receivers = i_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    operation_no_authorization = 4
    OTHERS = 99.
    This is all i am doing.
    It is sending a mail with the attachment but we are not able to open the attachment. it's giving an error like file is damaged and couldn't be repaired.
    I serched in the forum but i couldn't get the answer.
    I suspect there is a problem in getting the OTF data..
    Please help me in resolving this issue....
    Thanks in advance.
    RK

    Check the sample , and see where you made the mistake.
    REPORT ZPDF_MAIl.
    DATA:
      w_fm_name      TYPE rs38l_fnam,
      w_bin_filesize TYPE i,
      w_filesize     TYPE i,
      w_lines_txt    TYPE i,
      w_lines_bin    TYPE i.
    DATA:
      wa_ctrlop   TYPE ssfctrlop,
      wa_outopt   TYPE ssfcompop,
      wa_objhead  TYPE soli_tab,
      wa_buffer   TYPE string,
      wa_doc_chng TYPE sodocchgi1.
    DATA:
      BEGIN OF t_mail_ids OCCURS 0,
        mailid TYPE ad_smtpadr,
      END OF t_mail_ids,
      t_otfdata TYPE ssfcrescl,
      t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
      t_pdf_tab TYPE tline OCCURS 0 WITH HEADER LINE,
      t_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
      t_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,
      t_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'Z195_TEST'
      IMPORTING
        fm_name            = w_fm_name
      EXCEPTIONS
        no_form            = 1
        no_function_module = 2
        OTHERS             = 3.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION w_fm_name
      EXPORTING
        control_parameters = wa_ctrlop
        output_options     = wa_outopt
        user_settings      = 'X'
      IMPORTING
        job_output_info    = t_otfdata
      EXCEPTIONS
        formatting_error   = 1
        internal_error     = 2
        send_error         = 3
        user_canceled      = 4
        OTHERS             = 5.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format                = 'PDF'
        max_linewidth         = 132
      IMPORTING
        bin_filesize          = w_bin_filesize
      TABLES
        otf                   = t_otf
        lines                 = t_pdf_tab
      EXCEPTIONS
        err_max_linewidth     = 1
        err_format            = 2
        err_conv_not_possible = 3
        err_bad_otf           = 4
        OTHERS                = 5.
    IF sy-subrc EQ 0.
    ENDIF.                               " IF sy-subrc EQ 0.
    LOOP AT t_pdf_tab.
      TRANSLATE t_pdf_tab USING '~'.
      CONCATENATE wa_buffer t_pdf_tab INTO wa_buffer.
    ENDLOOP.
    TRANSLATE wa_buffer USING '~'.
    DO.
      t_record = wa_buffer.
      APPEND t_record.
      SHIFT wa_buffer LEFT BY 255 PLACES.
      IF wa_buffer IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    t_objtxt = ' To Change the COR, Use the Transaction ZCOR_CHANGE'.
    APPEND t_objtxt.
    t_objtxt = ' Check the Attached PDF file for COR'.
    APPEND t_objtxt.
    DESCRIBE TABLE t_objtxt LINES w_lines_txt.
    READ TABLE t_objtxt INDEX w_lines_txt.
    READ TABLE t_objtxt INDEX w_lines_txt.
    wa_doc_chng-obj_name = 'COR Display'.
    wa_doc_chng-expiry_dat = sy-datum + 10.
    CONCATENATE 'COR' "w_cornr
                '-' "w_stat_descr w_action_desc
           INTO wa_doc_chng-obj_descr SEPARATED BY space.
    wa_doc_chng-sensitivty = 'F'.
    wa_doc_chng-doc_size =  w_lines_txt  * 255.
    CLEAR t_objpack-transf_bin.
    t_objpack-head_start = 1.
    t_objpack-head_num = 0.
    t_objpack-body_start = 1.
    t_objpack-body_num = w_lines_txt.
    t_objpack-doc_type = 'RAW'.
    APPEND t_objpack.
    t_objpack-transf_bin = 'X'.
    t_objpack-head_start = 1.
    t_objpack-head_start = 1.
    t_objpack-head_num = 0.
    t_objpack-body_start = 1.
    DESCRIBE TABLE t_objbin LINES w_lines_bin.
    READ TABLE t_objbin INDEX w_lines_bin.
    t_objpack-doc_size = w_lines_bin * 255 .
    t_objpack-body_num = w_lines_bin.
    t_objpack-doc_type = 'PDF'.
    t_objpack-obj_name = 'COR'.
    t_objpack-obj_descr = 'COR Test'.
    * concatenate 'COR' w_cornr into t_objpack-obj_descr
    *                           separated by space.
    APPEND t_objpack.
    *LOOP AT t_mail_ids.
      CLEAR t_reclist.
      t_reclist-receiver = 'INTENATEMAIL'.
      t_reclist-rec_type = 'U'.
      APPEND t_reclist.
    *ENDLOOP.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        document_data              = wa_doc_chng
        put_in_outbox              = 'X'
        commit_work                = 'X'
      TABLES
        packing_list               = t_objpack
        object_header              = wa_objhead
        contents_bin               = t_objbin
        contents_txt               = t_objtxt
        receivers                  = t_reclist
      EXCEPTIONS
        too_many_receivers         = 1
        document_not_sent          = 2
        document_type_not_exist    = 3
        operation_no_authorization = 4
        parameter_error            = 5
        x_error                    = 6
        enqueue_error              = 7
        OTHERS                     = 8.
    IF sy-subrc EQ 0.
    ENDIF.

  • Print preview of smart form

    Hi all,
    how to view the print preview of a smart form and how to debug the smart form
    Thank You

    SMARTFORM-> execute->execute->pass values if require to import & table parameters ->execute-> on the pop up window give Printer name as LP01 and press print preview.
    For debussing -
    1. write BREAK POINT in the code window.
    2. Put a break point on the call function in the driver program
    3. put a brak point in the generated Function module.
    Refer this link too -
    Re: smartforms
    Regards,
    Amit

  • Issue Regarding Chinese characters In Smart Form Print preview..

    Hi All,
    I am working on a smart form development for chinese users. The requirement is the user will login using English & when the delivery will be issued for output, a check will be done on the country of user. If that comes as china then the international version (C) maintained for that customer will come as output.
    Now the problem is even if I login using EN or ZH the below issue I am facing always.
    In the database I can view the details in chinese properly by logging in as ZH. During debugging also i checked the data from table ADRC & MAKT is coming in chinese properly. But when i gave the values to be output in SmartForm, it is showing the characters like how it will look if I login using EN & view the table contents.
    When i view the data by changing character set as Simplified Chinese then in table i can see chinese texts properly. But when the same data goes to print preview it shows the chinese characters like as it would appear when character set is Unicode or West European..
    Please help..
    Thanks in advance.
    Edited by: malayanayak123 on Jun 1, 2011 5:48 AM

    Dear,
    print preview and physical printout are two different things.
    PrintPreview:
    The data stream will be sent to the frontend and rendered with windows-fonts etc (for backend prints a simulation).
    Printout:
    Frontend: You need a printer, that maps the character, you have to use SAPWIN or SAPWINCF when using cascading fonts. The rendering will be done in the windows spooler.
    Backend: Your printer needs also a mapping (look like something with UTF8). Also the printer needs the fonts installed because the rendering will be done in the printer!
    If you use the pdf-printer in SAP, you need to upload all necessary fonts (TTF) for the pdf-composer. Also you need a unicode pdf printer for that.
    Regards,
    Christian

  • Error when exexuting a smart form from print program

    Hi,
    I have created a Print Program & Layout Set [Smart Form].
    Now when i executed Print program it is throwing following error.
    As internal table that we are passing to F.M is not having any data i have appended some data in debug mode.
    After htting Print Immediaely Button Following EXIT Error is coming.
    No table is currently processed, switching lines is not possible.
    Message no. SSFCOMPOSER 183
    Diagnosis
    You tried to switch to the next table line, but currently no table is open for output.
    System Response
    The system issues an error message.
    Procedure
    This is probably an internal error. Please contact the SAP hotline and report the problem.
    Can anybody solve this issue!
    Thanks in advance.
    Thanks,
    Deep.

    Make sure that you have proper definations of internal table in program and smartform.
    Regards,
    Amey

  • Error in calling/converting smart form from ECC to pdf in portal.

    Hi,
    We have a requirement in our project where we have to show IT form in portal exactly in the way payslip are shown in ESS
    Screen, that is in the pdf form in ess portal screen.
    For this my HR abap consultant has made one customize smart form which is being called from a RFC FM.
    After the FM lf_fm_name gets executed , the OTF data is being captured and then converted in to PDF.
    After that the PDF is then converted into XSTRING format which is then supplied to the portal side through export parameter
    of the RFC.
    Now when we debugged the RFC, the conversion is taking place perfectly fine in to XSTRING.This is wat we assume.
    Portal Side: I have used Iframe ui ELEMENT in my webdynpro java and its property source I have binded with a value attribute
    of type string and I am executing above customize RFC given to me by my HR abap consultant and after executing that RFC with
    userID and payroll year as its import parameter I am taking export parameter of that RFC with name pdf_string of type XSTRING
    of that RFC into my webdynpro java value attribute which i binded to source property of Iframe.
    Now when we see the output in portal , first of all pdf is not getting generated and its showing the error message:
    file does not begin with '%pdf-' and secondly errored Adobe form getting opened outside Iframe window its not coming within
    Iframe window like what payslip comes inside Iframe UI element.
    I want to know what mistake we are doing in our ABAP coding or portal coding.
    Please help.

    Hi Satyam,
    You can use the existing SAP GRT framework for developing the app.
    Its easy and provides more features.
    See this wiki:
    http://wiki.sdn.sap.com/wiki/display/WDJava/HowtodevelopcustomWebDynproESSapplicationsusingGenericReportingTool%28GRT%29
    Regards
    Yugandhar Reddy

  • Smart Form Long Text

    Dear Guys
    I am trying to print long text stores at line Item of ME 23n Text Editor, in Smart From.
    I am calling a BAPI for reading Purchase requistion details. The itab is also showing complete paragraph of text. But when I write it on smart from, previw is not showing complete paragraph. Infact many space is still left in smart form column.

    Thnx Subramanian PL for replying.
    When user writes text in ME23N text field, he normally use Enter Key many times to go to next line but while displaying it on a smart form using a loop the text also breaks unexpectedly due to those Enter Key press by user,while still there is more space to write the text in a sigle line on smart form.
    To avoid above problem I first store all the text belong to a single papragraph in a variable string of smart from. But now when I try to display this text on smart from it is missing few last lines. Infact while debugging it, I can see that text is stored completely in variable.
    Message was edited by:
            Adnan Maqbool

  • Output in Customer Language for Service Dispatch Note Smart form

    We have upgraded from ECC 5.0 to ECC 6.0.
    After the upgrade we are facing an issue in some of our Service related smart forms.
    The version of the driver program is same in both the systems and the smart form is also same.
    The customer's language is maintained in Customer Master data.
    In the un-upgraded system, the forms were printed in the Customer language according to what is maintained in the customer master data.
    But after the upgrade, in the new system, the form is being printed in English as opposed to the Customer language in the older system.
    As I have already mentioned above, in both the systems, the driver program, smart form and Customer Language in the customer master data are similar.
    Kindly suggest me the solution if anyone has faced a similar problem.

    Hi, Actually I have checked in debugging and have come to know that during the upgrade, when I have downloaded the form from ECC 5.0 and uploaded it to ECC6.0, the Language option in the general attributes tab of the text modules is blank and hence the form is displayed in English only.
    Is there any way that I can get the smartform uploaded as it is in the earlier system?

  • How to know no of pages in smart forms to be printed ?

    Hi,
         How to know no of pages in smart forms to be printed ?
    though i got SFSY structure during run time of smartform , even that was not useful.
    &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.
    for that Page &SFSY-PAGE& of &SFSY-FORMPAGES&
    during debug of smart form i don't  understand how it is calculating no of pages  ,as i kept break point before printing page no in smart form.
    please check my  two screen shots, sfsy-formpage still contains current page no only but not total no of pages.
    Help Required.
    Thanks In advance.

    Hi Prakash,
    You will not get these values during debugging.. Let the program execute completely, you will get the right values.
    As Manish said, the value for &SFSY-FORMPAGES& will be known only after all the pages are processed, though it is not necessary that you use them in the final window only. It can be a text node in a window of any type.
    You will get the desired output, just cant see them during debugging within the program. At the time of printing or in the print review, output would be as expected.
    Also, FYI, it would be better to give total pages as &SFSY-FORMPAGES(3ZC)&  as there can be error if the total number of pages exceeds 9, due to lack of sufficient space to print more digits

  • Problem while sending fax through a SAP Smart Form

    Hi,
    I am trying to send fax through a smartform but it is not working, please see the details below.
    I am calling the Function Module "SSF_FUNCTION_MODULE_NAME" in a PAI event.  After storing the FM name "/1BCDWB/SF00000029"in a local variable "ls_frm_name", I am using that for printing the Form and at the same time to fax out the same by passing the following export parameters.
    control_parameters type ssfctrlop with values
      la_ssfctrlop_struc-device      = 'TELEFAX'.
      la_ssfctrlop_struc-no_dialog   = 'X'.
      la_ssfctrlop_struc-langu       = ls_supplier_info-spras.
    output_options type ssfcompop with values
      ls_ssffaxop_struc-tdteleland   = ls_supplier_info-land1.
      ls_ssffaxop_struc-tdtelenum    = lfa1-telfx.
      ls_ssffaxop_struc-tdfaxuser    = syst-uname.
      ls_ssffaxop_struc-tdnoprint    = 'X'.
    along with "fax_details  = ls_zap1_fax_details" declared as interface parameters to the Smart Form.
    But the Function Module is throwing following exception and not sending any Fax.
    SY-MSGID-->OL
    SY-MSGNO-->356
    SY-MSGV1-->NOAUTHORITYCHECK
    Do I need to pass any other values to the FM, I felt that this is not an authorization problem after debugging.
    Can any one please help me in handling this exception and send the fax,
    Thanks,
    Srinivas.
    Edited by: Venkata Srinivas Inavilli on May 20, 2008 2:40 PM

    may it be that in those cases where it doesnt work, that you got no fax number?
    Since it works soemtimes, it seems there are no errors, but rather in some cases some important info is missing, fax number may be one of thsoe important info in a FAX scenario.

Maybe you are looking for