Output in smartforms

how can i debug the forms

Nivas,
If try /H and debug it takes more time to reach your code in the SMARTFORM.
Right way is go to your SMARTFORM and HARD CODE BREAK-POINT, where ever you want to stop the controller, so that the controller will stop there directly.
it is easy, than /H.
<b>Reward each helpful answers.</b>
Thanks,
Sreekanth

Similar Messages

  • Problem during output of smartform in PDF

    Hi All,
    I am using Function module for output of smartform in PDF Format.But it is giving following informatio -OTF end command // missing in OTF data.
    and then no data in pdf format.
    Could you please help me whar shoul I do for that?
    MY code is like that :
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
    FORMAT = 'PDF'
    MAX_LINEWIDTH = 132
    ARCHIVE_INDEX = ' '
    COPYNUMBER = 0
    ASCII_BIDI_VIS2LOG = ' '
    PDF_DELETE_OTFTAB = ' '
    IMPORTING
    BIN_FILESIZE = W_bin_filesize
    BIN_FILE =
    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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    Search the error in the first call to smartforms. ([Function documentation Checking and Testing a Smart Form|http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/83fb5bdf8f11d3969700a0c930660b/frameset.htm])
    Regards,
    Raymond

  • How to send output of smartform in pdf format as an attachment to email

    how to send output of smartform in pdf format as an attachment to email
    search before posting further and follow Forum rules
    Edited by: Vijay Babu Dudla on Jan 15, 2009 4:50 AM

    Did u check on sdn?
    i dont think so or else there are many posts on this topic and good wikis too.
    look at one of these code tutorial wiki
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/mail%2bsend%2bthrough%2boutput%2bcontrols
    So next time do use the search functionality.
    кu03B1ятu03B9к
    Edited by: kartik tarla on Jan 15, 2009 12:33 PM

  • Send output of smartforms by mail to a specified e-mail adress.

    Dear all ,
            How can I send output of smartforms to purchase order pdf format and send this pdf file to a specified e-mail address.
    Best regards,
    Merry

    zhang for the pdf you need to put the code as given below..........:-) .This include the complete sequence.
    Converting the Smartform into PDF Format
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = C_PDF
       MAX_LINEWIDTH               = 132
    IMPORTING
       BIN_FILESIZE                = V_LEN_IN
      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
    IF SY-SUBRC <> 0.
      MESSAGE 'Error in CONVERT_OTF'(049) TYPE C_MSGTYPE_I.
    ENDIF.
    Convert PDF from 132 to 255.
    LOOP AT I_TLINE INTO W_TLINE.
    TRANSLATE W_TLINE USING ' ~'.
    CONCATENATE W_BUFFER W_TLINE INTO W_BUFFER.
    APPEND W_BUFFER TO I_BUFFER.
    ENDLOOP.
    LOOP AT I_BUFFER INTO W_BUFFER.
    TRANSLATE W_BUFFER USING '~'.
        DO.
          W_RECORDS = W_BUFFER.
          APPEND W_RECORDS TO I_RECORD.
          SHIFT W_BUFFER LEFT BY 255 PLACES.
          IF W_BUFFER IS INITIAL.
            EXIT.
          ENDIF.
        ENDDO.
    ENDLOOP.
    Object with PDF.
    I_OBJBIN[] = I_RECORD[].
    Content of the email.
      W_OBJTXT-LINE         = 'Smartform_output is attched'(020).
      APPEND W_OBJTXT TO I_OBJTXT.
    *I_OBJTXT[] = I_RECORDS[].
    DESCRIBE TABLE I_OBJTXT LINES V_LINES_BIN.
    Document Data
        CLEAR W_DOC_CHNG.
        W_DOC_CHNG-OBJ_NAME  = 'ZSAS_TRAVAGREE'.
        W_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
        W_DOC_CHNG-OBJ_DESCR = 'Form for Travel Agreement'(021).
        W_DOC_CHNG-PRIORITY  = C_HIGH_1.
        W_DOC_CHNG-DOC_SIZE  = V_LINES_BIN * 255.
    Pack to main body as RAW.
    Obj. to be transported not in binary form
    Start line of object header in transport packet
    CLEAR W_OBJPACK.
    REFRESH I_OBJPACK.
    I_OBJPACK-HEAD_START = 1.
    Number of lines of an object header in object packet
    I_OBJPACK-HEAD_NUM = 0.
    Start line of object contents in an object packet
    I_OBJPACK-BODY_START = 1.
    Number of lines of the object contents in an object packet
    I_OBJPACK-BODY_NUM = V_LINES_TXT.
    Code for document class
    I_OBJPACK-DOC_TYPE = 'RAW'.
    CLEAR I_OBJPACK-TRANSF_BIN.
    APPEND I_OBJPACK.
    To specify the mail content and subject.
      DESCRIBE TABLE I_OBJBIN LINES V_LINES_BIN.
    Packing as PDF.
    I_OBJPACK-TRANSF_BIN = 'X'.
    I_OBJPACK-HEAD_START = 1.
    I_OBJPACK-HEAD_NUM = 0.
    I_OBJPACK-BODY_START = 1.
    I_OBJPACK-BODY_NUM = V_LINES_BIN.
    I_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    I_OBJPACK-DOC_TYPE = 'PDF'.
    I_OBJPACK-OBJ_NAME = 'ZSAS_TRAVAGREE'.
    I_OBJPACK-OBJ_DESCR = 'Form for Travel Agreement'(021).
    APPEND I_OBJPACK.
    Document information.
    REFRESH I_RECLIST.
    e-mail receivers.
    W_RECVLIST-RECEIVER = G_MAIL_ID.
    W_RECVLIST-EXPRESS = C_X.
    W_RECVLIST-REC_TYPE = C_EXTERNAL_EMAIL. "Internet address
    APPEND W_RECVLIST TO I_RECLIST.
    REFRESH I_OBJHEAD.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA                    = W_DOC_CHNG
        PUT_IN_OUTBOX                    = C_X
        COMMIT_WORK                      = C_X
      TABLES
        PACKING_LIST                     = I_OBJPACK
        OBJECT_HEADER                    = W_OBJHEAD
        CONTENTS_BIN                     = I_OBJBIN
        CONTENTS_TXT                     = I_OBJTXT
        RECEIVERS                        = I_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 <> 0.
    ENDIF.
    let me know if you wanna any help ....
    Edited by: varghese oommen on Apr 29, 2009 10:16 AM

  • How to convert the output of smartforms into doc format

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

    Hi friends,
    I want the output of smartform to be saved in doc format. I don't want to view the printpreview screen and then save it. The way we save the output in pdf format I want it to be done in doc format. Please don't suggest this option
    After the print preview, Select the menu Goto->List Display.
    Now select the menu System->List->Save->Local File.
    Now you can select the radio buttion Rich Text Format.
    Now you save the document as a .doc file (say test.doc)
    Regards,
    Satabdi

  • Reg. Output in smartform

    Dear Experts
    Can anyone give example for "  Input throgh script and output in smartform ". Pls help urgently.
    Thanks
    Rajakumar.K

    Dear Experts
    The below  is my script,the output should come in smartform.
    Pls help,
    Report ZPR.
    TABLES:mara,makt.
    DATA:BEGIN OF pr OCCURS 0,
    matnr LIKE mara-matnr,
    ersda LIKE mara-ersda,
    ernam LIKE mara-ernam,
    laeda LIKE mara-laeda,
    aenam LIKE mara-aenam,
    lvorm LIKE mara-lvorm,
    END OF pr.
    DATA:pr1 LIKE pr OCCURS 0 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    SELECT-OPTIONS:mat FOR mara-matnr.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECT maramatnr maraersda maraernam maralaeda mara~aenam
    mara~lvorm INTO TABLE pr1 FROM mara
    WHERE mara~matnr IN mat.
    write :/'Material',
          'Material Desc'.
    LOOP AT pr1.
      WRITE:/ pr1-matnr,
      pr1-ersda,
      pr1-ernam,
      pr1-laeda,
      pr1-aenam,
      pr1-lvorm.
    ENDLOOP.
    Thanks
    Rajakumar.K

  • The text which is in text node is not displaying in output in smartforms

    Hi,
      In smartforms i created a text node and entered some text like following.
         Target Quantity               60000001     60000002          
         Scheduled Quantity               60000003     60000004               
         So far delivered Quantity          60000005     60000006
         Last delivered Quantity          60000007     60000008
          Delivery Schedule Details
    the text which i entered as above in the text node is not displaying.It is in main area.

    Hi
    if u are using table or template inside the main window
    then just mention the position of the text element
    goto text element - output options- output structure tab----give line and column no.
    Thanks
    krushna

  • Report output in smartform example

    Hello,
    Can anyone tell me if there are available sample reports in SAP with output in a smartform? I have a report which fills an internal table. I would like to pass this internal table to a smartform and display the form.
    Thank you!

    Hi Marian,
    Check this info.
    <b>Calling SMARTFORMS from your ABAP program</b>
    Check this sample 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
    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.
    Hope this resolves your query.
    <b>Reward all the helpful answers.</b>
    Regards

  • Word output from smartform

    Moved to correct forum
    Hi,
    Is there any way to convert a smartform output to a word document? The document contains some graphics, lines and table objects in it. Do you have any suggestions about it?
    Edited by: Matt on Apr 15, 2009 8:45 AM

    Hi,
    It can only be done to a certain level.
    You cannot transfer the formatting etc. Only the text.....
    So don't bother. Use a PDF. They can be change/edited easily and they look fantastic.
    See the [link |http://help.sap.com/saphelp_nw70/helpdata/en/27/67443cc0063415e10000000a11405a/content.htm]
    Let me know if you need any further help...
    Thank you,
    Anupama.

  • Error in print output of smartform

    Hii
    i have designed a smartform for packilist...In the output if a material has 1 batch number then the output is coming...but if a material has multiple batch numbers not getting the output....and the same error for proforma invoice also...if it has multiple line items the output is not coming....i want all the line items to be printed in same form....can anyone help me regarding this....

    Hello Venkat,
    First of all check whether all batch numbers for that material are coming in the code or not.
    To do this,put a break point in the code and execute.
    If batch numbers are not coming then retreive them first and allot space to print those batch numbers in the form.
    Hope its useful.
    Regards
    Kota.

  • XML output in smartform

    Hello,
    My requirement is to create xml file from a smartform and iam able to do that fine but iam not sure how to create XSL file to view the xml output.
    Thanks for your help.

    H Friend,
    In Smartform, from Form Attributes -> Output Options -> Output Format you can choose either XSF format or XSD formt.
    Please press F1 and read documentation.
    Hope it will help you.
    Regards
    Krishnendu

  • Download the output of smartform into excell sheet

    Hi Experts,
    We have one smartform for list out the  Shipment  packing list.
    Now the requirement is we need to download  into excel file output of the samrtform when we issue the output.
    Please help on this issue to resolved.
    Thanks and regards,
    Amjad Hussain,

    Hi,
    As per my knowledge, it is not possible to download into Excel , but we can store as PDF or faxing or mail with PDF attachement is possible.
    Bye

  • Hi all, i didn't get my output using smartform?

    Hi,
    Can i copy standard program sapfm06p to zprogram.where can i write my code for smartform(my zprogram).in that program.plz help me urgent.

    Hi,
    1.For PO ,the smartform driver program is not sapmf06p.The form name is /smb40/mmpo_A or _l.
    2.Copy this form and write code in program lines of smart layout.
    3.For help :
    http://www.****************/Tutorials/Smartforms/SFMain.htm
    4.Driver program is :
    PUCHASE ORDER
    Output type : NEU
    ScriptForm Name : MEDRUCK
    Driver Program Name : SAPMF06P
    smartform name : /SMB40/MMPO_L
    smartform driver program : /SMB40/FM06P
    Regards,
    Shiva Kumar

  • Output in smartform

    I dont want print preview screen in the smartform output.
    so i used control_parameters = 'X' in the my functional module.
    but my question is how i make sure i am getting the output screen
    or how can i get the output screen by supressing print preview.

    We had a similar scenario...
    Well here is the solution...
    For ONLY PREVIEW
    ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    ST_CONTROL_PARAMETERS-PREVIEW = 'X'.
    For PRINTING DIRECTLY
    ST_CONTROL_PARAMETERS-PREVIEW = ' '.
    ST_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
    ST_OUTPUT_OPTIONS-TDIMMED = 'X'.
    CALL FUNCTION v_fm_name
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS = st_control_parameters
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS = st_output_options
    USER_SETTINGS = 'X'   default it to space
    IMPORTING
    DOCUMENT_OUTPUT_INFO = st_document_output_info
    JOB_OUTPUT_INFO = st_job_output_info
    JOB_OUTPUT_OPTIONS = st_job_output_options
    TABLES
    IS_LABELS = IS_LABELS
    EXCEPTIONS
    FORMATTING_ERROR = 1
    INTERNAL_ERROR = 2
    SEND_ERROR = 3
    USER_CANCELED = 4
    OTHERS = 5
    also
    IF sy-subrc = 0.
          CALL FUNCTION 'CONVERSION_EXIT_SPDEV_INPUT'
            EXPORTING
              input  = l_pdest
            IMPORTING
              output = l_output_option-tddest.
        ENDIF.
    SELECT SINGLE patype
    FROM tsp03
    INTO l_output_option-tdprinter
    WHERE padest = l_output_option-tddest.
    IF sy-subrc = 0.
    Do nothing
    ENDIF.
    Populate output options
    l_output_option-tdimmed = 'X'.
    l_control-no_dialog = 'X'.
    CALL FUNCTION v_form_fm
    EXPORTING
    control_parameters = l_control
    output_options = l_output_option
    user_settings = ''
    p_first = p_first
    p_title = v_title
    p_prog = v_prog
    p_system = v_system
    p_date = v_date
    p_time = v_time
    p_user = v_user
    p_plant = v_plant
    TABLES
    i_report = i_report
    i_mat_zfg = i_mat_zfg
    EXCEPTIONS
    formatting_error = 1
    internal_error = 2
    send_error = 3
    user_canceled = 4
    OTHERS = 5.

  • Check output with Smartforms?

    Greetings, everyone.
    Is it at all possible to use Smartforms to create check (payment advice) output?
    All the documentation I've found says to basically use RFFOUS_C and a SAP Script layout (F110_PRENUM_CHCK or a customized version), but I'd much rather use Smartforms if I can to format and output checks.
    The relevant SAP version is 4.7.
    Thanks for your assistance!!
    Chad

    Dear Chad,
    As you have the script F110_PRENUM_CHCK - download the script first onto your desktop.
    Open the Tcode SMARTFORMS.
    Go to Menu- Utilities->Migrate SAPScript Form.
    You need to create a Custom Smartform and Name it as SF_F110_PRENUM_CHCK.
    Then in there is a option of giving the Source form(SAP Script) as the SAP Script Name = F110_PRENUM_CHCK.
    Target Form(Smartform) = SF_F110_PRENUM_CHCK.
    Then the SAP Script would have transfferred its layout into a smartform.
    Now take this Smartform and use it to customise accordingly the layout according to you requirements. This will ease your efforts a lot.
    Hope this helps you out. Please do reward accordingly.
    Thanks
    Venugopal

  • Xml output from smartforms

    Hi,
    I need to get xml (xsf?) output from I-SU Print Workbench/Smartforms document. Has anybody done this? I would apriciate some hints of how to solve this?
    regards,
    erki

    Hello Erki,
                      This is how i did it.
    data :  s_archive_index     TYPE toa_dara,
           s_archive_index_tab TYPE tsfdara,
           s_archive_params    TYPE arc_params,
           s_control_param     TYPE ssfctrlop,
           s_mail_appl_obj     TYPE swotobjid,
           s_mail_recipient    TYPE swotobjid,
           s_output_options    TYPE ssfcompop,
           s_mail_sender       TYPE swotobjid,
           s_doc_output_info   TYPE ssfcrespd,
           s_job_output_info   TYPE ssfcrescl,
           l_line(1024)        TYPE C,
           l_table             like table of l_line,
           xsf_line            like line of s_job_output_info-xsfdata.
    s_output_options-xsfcmode = 'X'.
         s_output_options-xsf      = 'X'.
         s_output_options-xsfoutmode  = 'A'.
         s_output_options-XSFFORMAT  = 'X'.
        CALL FUNCTION v_fm_name
         EXPORTING
           ARCHIVE_INDEX              = s_archive_index
           ARCHIVE_INDEX_TAB          = s_archive_index_tab
           ARCHIVE_PARAMETERS         = s_archive_params
           CONTROL_PARAMETERS         = s_control_param
           MAIL_APPL_OBJ              = s_mail_appl_obj
           MAIL_RECIPIENT             = s_mail_recipient
           MAIL_SENDER                = s_mail_sender
           OUTPUT_OPTIONS             = s_output_options
           USER_SETTINGS              = 'X'
           LV_SALES                   = p_sales
           LV_PADDR                   = v_address_num
           LV_ADRNR                   = v_adrnr
           LV_EQUNR                   = v_equnr
           LV_SERNR                   = v_sernr
         IMPORTING
           DOCUMENT_OUTPUT_INFO       =  s_doc_output_info
           JOB_OUTPUT_INFO            =  s_job_output_info
         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.
    loop at s_job_output_info-xsfdata into xsf_line.
      l_line = xsf_line.
      append l_line to l_table.
    endloop.
    CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
         FILENAME                        = 'C:\temp\test.xml'
       TABLES
         DATA_TAB                        = l_table.

Maybe you are looking for

  • Interactive pattern question

    hey all, i need help, i have a school project, which is making website. i need a tutorial on how to make moving interactive pattern like this http://andy.thlndr.com i appreciate any advice, please help! thks

  • Alert for orphaned files (.mdf, .ldf & .ndf)

    Hi,  Has anyone got any code that can scan all attached drives/directories for database files and compare them to what the instance says are attached files?  I have some code which works but you have specify the directories to monitor.   I know that

  • I1 DISPLAY PRO and DISPLAY MACBOOK PRO 15 " GLOSSY SCREEN

    "Ciao" to all. I recently  i bought a macbook pro 15 "glossy screen. Would like to try to calibrate the monitor with a i1 DISPLAY PRO produced by X-Rite. Some of you have already tried? with what result? Many thanks for the responses.

  • I Tunes for Windows

    Hi All why can I not download Itunes for windows the I click on down load now. A popup appears asking me to save the file " itune64setup.exe" I click save then nothing. Bob

  • MapiExceptionMdbOffline: Unable to make connection to the server. (hr=0x80004005, ec=1142)

    Hello, We have 2 Exchange 2013 (build 712) servers in a DAG with distinct subnets. Cisco ASA in between was set to have no filtering between servers in subnet. We cannot add database copies nor move mailboxes. Tes-Mapiconnectivty fails with unspaceId