Smartform error message

Hi
I am new in form printing and I have this issue: I created a my own report printing a smartforms; everything works correctly, but recentley I noticed that if I decide to not print when the print panel prompt is shown (I hit cancel and not print or preview) I get an error and control is not returned to calling report. What should I do to avoid this error?
Thanks in advance
Gabriele

Hi
If the user aborts the print, the exception USER_CANCELED of the fm generated for the smartform is raised, so if you don't manage the exceptions a dump occurs, else u need to manage the exception and send a message if an exceptions is raised
.CALL FUNCTION <SMARTFORM FM>
  EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
       SEND_ERROR                = 3
       USER_CANCELED             = 4
       OTHERS                    = 5 .
CASE SY-SUBRC.
   WHEN 0.
   WHEN 4. MESSAGE I208(00) WITH 'Print deleted by user'.
   WHEN OTHERS,
ENDCASE.
Max

Similar Messages

  • FM SSF_CLOSE failing and giving error message while printing a smartform

    Hi,
    for language spanish the smartform is not getting printed for output type SG11 but for english it is getting printed? What could be the reason? I debugged and found that SSF_CLOSE is failing and giving error message.
    Thanks and regards,
    AP.

    Hi Aparajita,
    for changing from one languages to another translations in SE63 is to be done, either search on SCN for using SE63 , or atleast see these wiki help .
    Transaction SE63 - Translation Tools for Translators (BC-DOC-TTL) - SAP Library
    Transaction SE63 (SAP Library - Translation Tools for Translators (BC-DOC-TTL))

  • In Smartform i am getting a Error Message Graphic cannot be displayed

    Hi All,
               I am trying to display a image in smartform . In the Code i have created a BDC for SE78 for Image upload and when the Image is Upload and when i try to execute the Smartform i am getting a Error Message : Graphic cannot be displayed
    I am trying to load a BMP image in  the form.
    Can anyone help me out .
    Thanks in Advance .
    Regards
    Shankar

    Hi,
    There are two possibilies of issue here.
    1. The BDC is not correct so the image is not uploaded.
    2. Graphic parameter is not properly specified in smartform.
    Please check issue no 1 first. If you confirm that image already in SAP, then you can go to issue no 2.
    Regards,
    Teddy Kurniawan

  • Getting an error message when converting smartform to pdf form

    Hi,
    I'm getting an error message, when trying to convert smartform to pdf.
    [H:\Argentina\Error]
    <<No Question asked. Thread locked>>
    kindly help
    Thanks
    Devinder
    Edited by: kishan P on Jan 19, 2012 3:01 PM

    Hi,
    Your smartform getting the correct output. If the output is fine i will some process follow it to convert it into PDF.
    <<Do you even know what is the issue. Dont guess>>
    Edited by: kishan P on Jan 19, 2012 2:58 PM

  • Getting an error message while generating smartform

    Hi,
      We transported 1 smartform from one system to another. Now at another system when I tried to test this form it is giving me an error message like 'Error during generation of form'. It was running fine at system1 but no idea why its not being generated here.
    Please help me out as soon as poosible.
    Regards,
    Shikha

    Hi,
    I think you have hardcoded the functiona module name as something
    call function '/1BCDWB/SF00000334'  in the driver progarm .
    it should not be hard coded .
    Use SSF_FUNCTION_MODULE_NAME instead to get the functiona module name during runtime.
    Regards,
    Guru
    mark if helpful

  • Smartform Error : "Sytems Message 042 from WA SSF Composer Doesnot Exist "

    Dear All,
    I am having problem with smartform. Actually it was runnning Properly and I messed up something,
    and Now I am getting a Message in status bar as <b>"System Message 042 from WorkArea SSF Composer Doesnot Exist".</b>
    Where could be the problem, Please Help me in this regard.
    Thanking you.
    Regards
    Venkat.

    Venkat,
    I don't think we can't make anything out of the error message. You can debug and find out which element is giving the problem. Then you can probably can figure out what is wrong with that element.
    Debugging elements is not going to be easy, you will have to be really careful with each element.
    Regards,
    Ravi

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • Smartforms error

    Hi experts
    i did a print prg for sending the pdf attachment by smartforms.
    but it's getting dumpped,this is my code
    plz help me,its urgent.
    i checked even SDN Forums also.i made some changes,
    even though i don't get the output.
    it shows not matching the I_OBJBIN in "SO_NEW_DOCUMENT_ATT_SEND_API1" function module.
    REPORT  ZCS_SF6.
    Internal Table declarations
    DATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
          i_tline TYPE TABLE OF tline WITH HEADER LINE,                i_receivers TYPE TABLE OF somlreci1 WITH HEADER LINE,        i_record LIKE solisti1 OCCURS 0 WITH HEADER LINE,     
    Objects to send mail.
          i_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,  
          i_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          i_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          i_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
    Work Area declarations
          w_objhead TYPE soli_tab,     
          w_ctrlop TYPE ssfctrlop,
          w_compop TYPE ssfcompop,
          w_return TYPE ssfcrescl,     
          w_doc_chng typE sodocchgi1,  
          w_data TYPE sodocchgi1,
          w_buffer TYPE string,       
    Variables declarations
          v_form_name TYPE rs38l_fnam,
          v_len_in LIKE sood-objlen,   
          v_len_out LIKE sood-objlen,  
          v_len_outn TYPE i,
          v_lines_txt TYPE i,
          v_lines_bin TYPE i.
    call function 'SSF_FUNCTION_MODULE_NAME'
    exporting
      formname = 'ZCS_FORM6'
    importing
      fm_name = v_form_name
    exceptions
      no_form = 1
      no_function_module = 2
      others = 3.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    w_ctrlop-getotf = 'X'.
    w_ctrlop-no_dialog = 'X'.
    w_compop-tdnoprev = 'X'.
    CALL FUNCTION v_form_name
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = W_CTRLOP
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = W_COMPOP
       USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = W_RETURN
      JOB_OUTPUT_OPTIONS         =
    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.
    i_otf[] = w_return-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
      format = 'PDF'              
      max_linewidth = 132         
    LINES-TDLINE
    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
      OTHERS = 4.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    Convert PDF from 132 to 255.
    LOOP AT i_tline.
    Replacing space by ~
    TRANSLATE i_tline USING '~'.
    CONCATENATE w_buffer i_tline INTO w_buffer.
    ENDLOOP.
    Replacing ~ by space
    TRANSLATE w_buffer USING '~'.
    DO.
    i_record = w_buffer.
    Appending 255 characters as a record
    APPEND i_record.
    SHIFT w_buffer LEFT BY 255 PLACES.
    IF w_buffer IS INITIAL.
    EXIT.
    ENDIF.
    ENDDO.
    Attachment
    Refresh: i_reclist,
    i_objtxt,
    i_objbin,
    i_objpack.
    clear w_objhead.
    Object with PDF.
    i_objbin[] = i_record[].
    *******DESCRIBE TABLE i_objbin LINES v_lines_bin.
    Object with main text of the mail.
    i_objtxt = 'Find attached the output of the smart form.'.
    APPEND i_objtxt.
    *i_objtxt = 'Regards,'.
    *APPEND i_objtxt.
    *i_objtxt = 'Chandu'.
    *APPEND i_objtxt.
    DESCRIBE TABLE i_objtxt LINES v_lines_txt.
    read table i_objtxt index v_lines_txt.
    Document information.
    w_doc_chng-obj_name = 'Smartform'.         
    w_doc_chng-expiry_dat = sy-datum + 10.     
    w_doc_chng-obj_descr = 'Smart form output'.
    w_doc_chng-sensitivty = 'F'.               
    w_doc_chng-doc_size = v_lines_txt * 255.   
    Pack to main body as RAW.
    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.
    Packing as PDF.
    i_objpack-transf_bin = 'X'.
    i_objpack-head_start = 1.
    i_objpack-head_num = 1.
    i_objpack-body_start = 1.
    describe table i_objbin lines v_lines_bin.
    read table i_objbin index v_lines_bin.
    i_objpack-doc_size = v_lines_bin * 255.    
    i_objpack-body_num = v_lines_bin.          
    i_objpack-doc_type = 'PDF'.                
    i_objpack-obj_name = 'Smartform'.          
    i_objpack-obj_descr = 'sf output'
    APPEND i_objpack.
    Document information.
    CLEAR i_reclist.
    e-mail receivers.
    i_reclist-receiver = '[email protected]'. 
    *i_reclist-express = 'X'.    "Send express
    i_reclist-rec_type = 'U'.                             
    APPEND i_reclist.
    Sending mail.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data = w_doc_chng 
      put_in_outbox = 'X'        
    TABLES
      packing_list = i_objpack   
      object_header = w_objhead  
      contents_hex = 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.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    points wl be rewarded,if it is useful
    thanks in advance.

    HI,
      Here is the complete program for you.. I have done the same requirment..
                 P R O G R A M     D E C L A R A T I O N                 *
    PROGRAM ID            : ZF_QUERY_BANK
    AUTHOR                : Mahesh Raganmoni
    OWNER(Process Team)   :
    CREATE DATE           : 03/04/2004
    R/3 RELEASE VERSION   : 4.72
    BASED-ON PROGRAM      : none
    ADS                   : BP14.B&CF.301
    DESCRIPTION           : This program calles the Bank Query Smartform
                            and sends this smartforms as an email to the
                            bank
    MODIFICATION LOG CONTROL (Most recent on top):
    DATE             AUTHOR              CTS REQ     DESCRIPTION
    *09/13/2004    Mahesh Raganmoni        DR1K901766  Original Version    *
                          T   A   B   L   E   S                          *
    TABLES : BUT021, "BP: Address usages
             BUT020, "BP: Addresses
             T001,   "Company Codes
             DFKKZP, "Payment lot: Data for payment
             BUT000, "BP: General data I
             ADR3,   "Fax Numbers (Business Address Services)
             BNKA,   "Bank master record
             T012.   "House Banks
                            Internal Tables                       *
    *Address Details of Business Partner
    DATA :IT_ADDRESS LIKE STANDARD TABLE OF BUS020_EXT WITH HEADER LINE.
    *Return Table
    DATA :  IT_RETURN LIKE STANDARD TABLE OF BAPIRET2.
    PDF Data to hold the data to be sent as an attachment
    DATA : IT_PDF_NUC_DATA TYPE STANDARD TABLE OF SOLI.
    Converted data from OTF
    DATA : IT_PDF_TABLE TYPE RCL_BAG_TLINE.
    Data Declaration for Sendig Email
    DATA: IT_OBJPACK    LIKE SOPCKLSTI1 OCCURS  1 WITH HEADER LINE,
          IT_OBJHEAD    LIKE SOLISTI1   OCCURS  1 WITH HEADER LINE,
          IT_OBJTXT     LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE,
          IT_OBJBIN     LIKE SOLISTI1   OCCURS 10 WITH HEADER LINE,
          IT_OBJHEX     LIKE SOLIX      OCCURS 10 WITH HEADER LINE,
          IT_RECLIST    LIKE SOMLRECI1  OCCURS  1 WITH HEADER LINE,
          IT_LISTOBJECT LIKE ABAPLIST   OCCURS  1 WITH HEADER LINE.
                             Structures                            *
    DATA :WA_BUS000 TYPE BUS000_EXT,         "Business Partner Details
          WA_ADDRESS TYPE BAPIADDR3,         "Collector Address
          WA_OUTPUT_OPTIONS TYPE SSFCOMPOP,
          WA_CONTROL_PARAMETERS TYPE SSFCTRLOP,
          WA_OUTPUT_DATA TYPE SSFCRESCL,
          WA_HEADER TYPE ZFCOLL_HEADER,  "Smartform Header Info
          WA_DFKKZP TYPE DFKKZP,
          WA_DOCDATA    LIKE SODOCCHGI1.
                             Variables                             *
    DATA : W_FORMNAME TYPE TDSFNAME,             "Smartform Name
           W_NAME_ORG TYPE CHAR35,               "Business Partner Name
           W_ADDRNUMBER LIKE BUT021-ADDRNUMBER,  "Address Number of BP
           W_ADDRESS1 TYPE CHAR35,               "Address Line 1
           W_ADDRESS2 TYPE CHAR35,               "Address Line 2
           W_ADDRESS3 TYPE CHAR35,               "Address Line 3
           W_GE_NAME TYPE CHAR35,                "GE Contact Name
           W_GE_PHONE TYPE CHAR35,               "GE Contact Phone
           W_GE_PHONE1 TYPE CHAR35,               "GE Contact Phone
           W_GE_PHONE_EX TYPE CHAR10,               "GE Contact Phone
           W_GE_EMAIL TYPE CHAR35,               "GE Contact Email
           W_CLIENT_NAME TYPE CHAR30,            "Client Name
           W_GE_FAX TYPE CHAR35,                 "GE Fax No
           W_GE_FAX1 TYPE CHAR35,                "GE Fax No
           W_CLIENT_FAX TYPE CHAR35,             "Client's Fax No
           W_PDF_LEN TYPE I,                     "Length of PDF file
           W_ERR_MESG(120) TYPE C,               "Error Message
           W_ORG1R LIKE DFKKCR-ORG1R,            "Company Code
           W_REFERENCE LIKE DFKKCR-REFERENCE,    "Payment Reference
           W_FNAME TYPE RS38L_FNAM,              "Smartform Function Module
                                                 "     Name
           W_SFNAME TYPE TDSFNAME,   " Smart Form Name
           W_BANKN TYPE CHAR18,   "Bank Account Number
           W_BETRZ TYPE CHAR15,   " Credit AMount
           W_WAERS TYPE CHAR5,    " Credit Currency
           W_VALUT TYPE DFKKZP-VALUT.   " Value Date
    VARIABLES FOR EMAIL
    DATA: W_TAB_LINES  TYPE I,
          W_DOC_SIZE   TYPE I,
          W_ATT_TYPE   LIKE SOODK-OBJTP,
          W_DATFM TYPE XUDATFM.
    VARIABLES FOR DATE
    DATA: W_DAY(2) TYPE C,
          W_MONTH(2) TYPE C,
          W_YEAR(4) TYPE C,
          W_DATE(10) TYPE C.
                             Constants                            *
    DATA : C_SELECTED TYPE C VALUE 'X', "Constant for Checked
           C_COMMA(2) TYPE C VALUE ', ',"Constant for  Comma
           C_HYPHEN TYPE C VALUE '-'.   "Constant for Hypen
                      Selection Screen                            *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: P_KEYZ1 TYPE RFKZ0-KEYZ1 OBLIGATORY, "Payment Lot
                P_POSZA TYPE DFKKZP-POSZA OBLIGATORY. "Item Number
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS: P_REMIT TYPE C AS CHECKBOX DEFAULT 'X', " Remitter Form
                P_GENRL TYPE C AS CHECKBOX USER-COMMAND RG1, " General Form
                P_TEXT TYPE AD_SMTPADR  MODIF ID SC1. " Free Text
    SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-003.
    PARAMETERS:P_MAIL TYPE C AS CHECKBOX USER-COMMAND RG2, "Send Email
              P_MAILID TYPE AD_SMTPADR MODIF ID SC2.
    SELECTION-SCREEN END OF BLOCK b3.
                     Initialization                               *
    WA_OUTPUT_OPTIONS-XDFCMODE = 'X'.
    WA_OUTPUT_OPTIONS-XDF =  SPACE.
    WA_OUTPUT_OPTIONS-XSFCMODE = 'X'.
    WA_OUTPUT_OPTIONS-XDF = SPACE.
              At Selection Screen Output                          *
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF SCREEN-GROUP1 = 'SC1'.
          IF P_GENRL = C_SELECTED.
            SCREEN-INPUT = 1.
          ELSE.
            CLEAR P_TEXT.
            SCREEN-INPUT = 0.
          ENDIF.
        ENDIF.
        IF SCREEN-GROUP1 = 'SC2'.
          IF P_MAIL = C_SELECTED.
            SCREEN-INPUT = 1.
          ELSE.
            CLEAR P_MAILID.
            SCREEN-INPUT = 0.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN.
      IF P_REMIT NE C_SELECTED AND P_GENRL NE C_SELECTED.
        MESSAGE E004 WITH TEXT-004.
      ENDIF.
                      Start of selection                          *
    START-OF-SELECTION.
      IF P_GENRL EQ C_SELECTED.
        IF P_TEXT IS INITIAL.
          MESSAGE I004 WITH TEXT-023.
          STOP.
        ENDIF.
      ENDIF.
      IF P_MAIL EQ C_SELECTED.
        IF P_MAILID IS INITIAL.
          MESSAGE I004 WITH TEXT-005.
          STOP.
        ENDIF.
      ENDIF.
    **Getting Payment Lot and Payment Lot number
      PERFORM GET_PAYMENT_DETAILS.
      IF NOT WA_DFKKZP IS INITIAL.
    Getting the Bank  Details
        PERFORM GET_BANK_DETAILS.
    **Getting the  Ge Contact Details
        PERFORM GET_GE_CONTACT_DETAILS .
    Populating the Structure fields to pass to smartform
        PERFORM FILL_EXPORT_STRUCTURES.
        CLEAR W_FNAME.
    Getting the Function Module name for the Smartform
        IF  P_REMIT EQ C_SELECTED AND P_GENRL NE C_SELECTED.
          W_SFNAME = 'ZF_REMITTER_FORM'.
          PERFORM GET_FORMNAME .
        ELSEIF P_REMIT NE C_SELECTED AND P_GENRL EQ C_SELECTED.
          W_SFNAME = 'ZF_GENERAL_FORM'.
          PERFORM GET_FORMNAME .
        ELSEIF P_REMIT EQ C_SELECTED AND P_GENRL EQ C_SELECTED.
          W_SFNAME = 'ZF_QUERY_BANK_FORM'.
          PERFORM GET_FORMNAME .
        ENDIF.
        IF NOT W_FNAME IS INITIAL.
          PERFORM CALL_FORM.
          IF P_MAIL EQ 'X'.
            IF NOT P_MAILID IS INITIAL.
              PERFORM SET_PARAMETERS.
              PERFORM DEVICE_TYPE.
              PERFORM CALL_FORM.
              PERFORM CONVERT_TO_PDF.
              PERFORM CONVERT_PDF_TO_BINARY.
              PERFORM SEND_MAIL_NO_DISPLAY.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDIF.
    *&      Form  GET_FORMNAME
         Fetch the Function module name for the Smartform
    FORM GET_FORMNAME .
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = W_SFNAME
        IMPORTING
          FM_NAME            = W_FNAME
        EXCEPTIONS
          NO_FORM            = 1
          NO_FUNCTION_MODULE = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " GET_FORMNAME
    *&      Form  CALL_FORM
    To Call the Smartform
    FORM CALL_FORM .
      SHIFT W_BETRZ LEFT DELETING LEADING SPACE.
      CALL FUNCTION W_FNAME
        EXPORTING
          CONTROL_PARAMETERS = WA_CONTROL_PARAMETERS
          OUTPUT_OPTIONS     = WA_OUTPUT_OPTIONS
          USER_SETTINGS      = 'X'
          S_HEADER           = WA_HEADER
          V_ACNO             = W_BANKN
          V_AMOUNT           = W_BETRZ
          V_CURR             = W_WAERS
          V_DATE             = W_VALUT
          V_TEXT             = P_TEXT
        IMPORTING
          JOB_OUTPUT_INFO    = WA_OUTPUT_DATA
        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.
    ENDFORM.                    " CALL_FORM
    *&      Form  FILL_EXPORT_STRUCTURES
    Populate the structure to send to the smartform as input
    FORM FILL_EXPORT_STRUCTURES .
      WA_HEADER-BANKA = BNKA-BANKA.
      WA_HEADER-ADDR_1  = BNKA-STRAS.
      WA_HEADER-ADDR_2 = BNKA-ORT01.
      WA_HEADER-ADDR_3 = BNKA-PROVZ.
      WA_HEADER-ZZSRCBPNM = T012-NAME1.
      SHIFT WA_HEADER-ZZSRCBPNM LEFT DELETING LEADING SPACE.
      WA_HEADER-FAX_NUMBER = W_CLIENT_FAX.
      WA_HEADER-BUTXT = T001-BUTXT.
      WA_HEADER-NAME1 = W_GE_NAME.
      WA_HEADER-TEL_NUMBER = W_GE_PHONE.
      WA_HEADER-TEL_EXTENS = W_GE_PHONE_EX.
      WA_HEADER-SMTP_ADDR = W_GE_EMAIL.
      WA_HEADER-GE_FAX_NUMBER = W_GE_FAX.
    ENDFORM.                    " FILL_EXPORT_STRUCTURES
    *&      FORM  CONVERT_TO_PDF
    Convert the final doucment (OTF FORMAT) into pdf format
    FORM CONVERT_TO_PDF .
      CALL FUNCTION 'CONVERT_OTF'
        EXPORTING
          FORMAT                = 'PDF'
        IMPORTING
          BIN_FILESIZE          = W_PDF_LEN
        TABLES
          OTF                   = WA_OUTPUT_DATA-OTFDATA
          LINES                 = IT_PDF_TABLE
        EXCEPTIONS
          ERR_MAX_LINEWIDTH     = 1
          ERR_FORMAT            = 2
          ERR_CONV_NOT_POSSIBLE = 3
          ERR_BAD_OTF           = 4
          OTHERS                = 5.
    ENDFORM.                    " CONVERT_TO_PDF
    *&      FORM  SET_PARAMETERS
    Set control parameters to get the output format (OTF) from smart form*
    FORM SET_PARAMETERS .
      WA_CONTROL_PARAMETERS-NO_DIALOG = 'X'.
      WA_CONTROL_PARAMETERS-GETOTF    = 'X'.
      WA_CONTROL_PARAMETERS-LANGU = SY-LANGU.
    ENDFORM.                    " SET_PARAMETERS
    *&      FORM  DEVICE_TYPE
    Get the Device type
    FORM DEVICE_TYPE .
      CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
        EXPORTING
          I_LANGUAGE             = WA_CONTROL_PARAMETERS-LANGU
        IMPORTING
          E_DEVTYPE              = WA_OUTPUT_OPTIONS-TDPRINTER
        EXCEPTIONS
          NO_LANGUAGE            = 1
          LANGUAGE_NOT_INSTALLED = 2
          NO_DEVTYPE_FOUND       = 3
          SYSTEM_ERROR           = 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.
    ENDFORM.                    " DEVICE_TYPE
    *&      FORM  CONVERT_PDF_TO_BINARY
    To convert PDF file to Binary format
    FORM CONVERT_PDF_TO_BINARY .
      CALL FUNCTION 'QCE1_CONVERT'
        TABLES
          T_SOURCE_TAB         = IT_PDF_TABLE
          T_TARGET_TAB         = IT_PDF_NUC_DATA
        EXCEPTIONS
          CONVERT_NOT_POSSIBLE = 1
          OTHERS               = 2.
      IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " CONVERT_PDF_TO_BINARY
    *&      FORM  SEND_MAIL_NO_DISPLAY
    To send a email
    FORM SEND_MAIL_NO_DISPLAY .
      DATA: L_SLINE(255) TYPE C,
            L_INDEX TYPE SY-TABIX.
      IT_OBJBIN[] =  IT_PDF_NUC_DATA[].
      Title and Description of the mail
      WA_DOCDATA-OBJ_DESCR = TEXT-012.
    Mail Body content
      PERFORM MAIL_BODY.
      DESCRIBE TABLE IT_OBJTXT LINES W_TAB_LINES.
      READ     TABLE IT_OBJTXT INDEX W_TAB_LINES INTO L_SLINE.
      L_INDEX = W_TAB_LINES + 1.
      WA_DOCDATA-DOC_SIZE = ( W_TAB_LINES ) * 255 + STRLEN( L_SLINE ).
      WA_DOCDATA-OBJ_EXPDAT = '29991231'.
      WA_DOCDATA-SENSITIVTY = 'O'.
      WA_DOCDATA-OBJ_PRIO =  '5'.
      WA_DOCDATA-EXPIRY_DAT = '29991231'.
      WA_DOCDATA-PROC_TYPE = 'R'.
      CLEAR  IT_OBJPACK-TRANSF_BIN .
      IT_OBJPACK-HEAD_START = 0.
      IT_OBJPACK-HEAD_NUM   = 0.
      IT_OBJPACK-BODY_START = 1.
      IT_OBJPACK-BODY_NUM   = W_TAB_LINES.
      IT_OBJPACK-DOC_TYPE   = 'RAW'.
      IT_OBJPACK-OBJ_DESCR  = TEXT-013.
      APPEND IT_OBJPACK.
    Create message attachment
      W_ATT_TYPE = 'PDF'.
      DESCRIBE TABLE IT_OBJBIN LINES W_TAB_LINES.
      READ     TABLE IT_OBJBIN INDEX W_TAB_LINES.
      L_INDEX = W_TAB_LINES + 1.
      IT_OBJPACK-DOC_SIZE = ( W_TAB_LINES ) * 255 .
      IT_OBJPACK-TRANSF_BIN = 'X'.
      IT_OBJPACK-HEAD_START = 0.
      IT_OBJPACK-HEAD_NUM   = 0.
      IT_OBJPACK-BODY_START = 1.
      IT_OBJPACK-BODY_NUM   = W_TAB_LINES.
      IT_OBJPACK-DOC_TYPE   = W_ATT_TYPE.
      IT_OBJPACK-OBJ_DESCR  = TEXT-013.
      APPEND IT_OBJPACK.
    Create receiver list
      IT_RECLIST-RECEIVER = P_MAILID.  "<-- CHANGE ADDRESS
      IT_RECLIST-REC_TYPE = 'U'.
      IT_RECLIST-EXPRESS = 'X'.
      APPEND IT_RECLIST.
    Send Email
      CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = WA_DOCDATA
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'     "USED FROM REL.6.10
        TABLES
          PACKING_LIST               = IT_OBJPACK
          CONTENTS_BIN               = IT_OBJBIN
          CONTENTS_TXT               = IT_OBJTXT
          RECEIVERS                  = IT_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.
        MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
                WITH WA_DOCDATA-OBJ_NAME.
      ELSE.
        SUBMIT RSCONN01 WITH MODE = 'INT' AND RETURN.
        SET SCREEN 0.
      ENDIF.
    ENDFORM.                    " SEND_MAIL_NO_DISPLAY
    *&      Form  GET_PAYMENT_DETAILS
    Get the Payment Lot and Payment Number
    FORM GET_PAYMENT_DETAILS .
    Get the Payment Lot and Payment Number
      SELECT SINGLE BETRZ
                    BVRKO
                    BUKRS
                    WAERS
                    VALUT
                    BANKS
                    BANKL
                    BANKN
                    FROM  DFKKZP
                    INTO (WA_DFKKZP-BETRZ,WA_DFKKZP-BVRKO,
                      WA_DFKKZP-BUKRS,WA_DFKKZP-WAERS,WA_DFKKZP-VALUT,
                      WA_DFKKZP-BANKS,WA_DFKKZP-BANKL,WA_DFKKZP-BANKN)
                    WHERE KEYZ1 = P_KEYZ1
                    AND   POSZA = P_POSZA.
      IF SY-SUBRC NE  0.
        MESSAGE I004 WITH TEXT-100.
        EXIT.
      ELSE.
        W_ORG1R = WA_DFKKZP-BUKRS.
        W_BETRZ = WA_DFKKZP-BETRZ.
        W_BANKN = WA_DFKKZP-BANKN.
        W_WAERS = WA_DFKKZP-WAERS.
        W_VALUT = WA_DFKKZP-VALUT.
      ENDIF.
    ENDFORM.                    " GET_PAYMENT_DETAILS
    *&      Form  GET_BANK_DETAILS
    To Retrive the Bank Details
    FORM GET_BANK_DETAILS .
    *Get the Bank Address Details
      SELECT SINGLE BANKA
                    STRAS
                    ORT01
                    PROVZ
                    FROM BNKA
                    INTO (BNKA-BANKA,BNKA-STRAS,BNKA-ORT01,BNKA-PROVZ)
                    WHERE BANKS = WA_DFKKZP-BANKS
                    AND BANKL = WA_DFKKZP-BANKL.
      IF SY-SUBRC NE 0.
       MESSAGE I004 WITH TEXT-101.
       EXIT.
      ENDIF.
    GET The Bank Contact Name.
      SELECT SINGLE NAME1
                    FROM T012
                    INTO T012-NAME1
                   WHERE BANKS = WA_DFKKZP-BANKS
                   AND   BANKL = WA_DFKKZP-BANKL.
      IF SY-SUBRC NE 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT W_ORG1R IS INITIAL.
    Get the GE Legal Entity Name
        SELECT SINGLE  BUTXT FROM T001
               INTO T001-BUTXT
               WHERE BUKRS = W_ORG1R.
        IF SY-SUBRC NE  0.
           MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_BANK_DETAILS
    *&      Form  GET_COLLECTOR_DETAILS
    To get the Collector Address Details
    FORM GET_GE_CONTACT_DETAILS .
    *Getting the Collector details
      CALL FUNCTION 'BAPI_USER_GET_DETAIL'
        EXPORTING
          USERNAME = SY-UNAME
        IMPORTING
          ADDRESS  = WA_ADDRESS
        TABLES
          RETURN   = IT_RETURN.
      IF NOT WA_ADDRESS IS INITIAL.
        CONCATENATE WA_ADDRESS-FIRSTNAME0(18) WA_ADDRESS-LASTNAME0(17)
                    INTO W_GE_NAME SEPARATED BY SPACE.
        W_GE_PHONE = WA_ADDRESS-TEL1_NUMBR.
        W_GE_PHONE_EX = WA_ADDRESS-TEL1_EXT.
        W_GE_EMAIL = WA_ADDRESS-E_MAIL.
        IF NOT WA_ADDRESS-FAX_EXTENS IS INITIAL.
          CONCATENATE WA_ADDRESS-FAX_NUMBER C_HYPHEN WA_ADDRESS-FAX_EXTENS
                       INTO W_GE_FAX.
        ELSE.
          W_GE_FAX = WA_ADDRESS-FAX_NUMBER.
        ENDIF.
      ENDIF.
    ENDFORM.                    " GET_GE_CONTACT_DETAILS
    *&      Form  MAIL_BODY
    To Build the email body
    FORM MAIL_BODY .
      PERFORM  GET_USER_DATE_FORMAT.
      W_YEAR = W_VALUT+0(4).
      W_MONTH = W_VALUT+4(2).
      W_DAY = W_VALUT+6(2).
      PERFORM GET_DATE.
      IF P_REMIT EQ 'X' .
        CONCATENATE TEXT-020 WA_HEADER-ZZSRCBPNM ',' INTO IT_OBJTXT-LINE
                                SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-021 WA_HEADER-BUTXT  ',' TEXT-022
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        SHIFT W_BETRZ LEFT DELETING LEADING SPACE.
        CONCATENATE TEXT-024 W_DATE
        TEXT-025  W_BETRZ W_WAERS TEXT-026
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-027.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = WA_HEADER-NAME1.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-028 WA_HEADER-BUTXT INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-029.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-030 W_GE_FAX INTO IT_OBJTXT-LINE
                           SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-031 W_GE_PHONE TEXT-035 W_GE_PHONE_EX INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-032 WA_HEADER-SMTP_ADDR INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-033 WA_HEADER-BUTXT INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
      ELSEIF P_GENRL EQ 'X'.
        CLEAR IT_OBJTXT.
        REFRESH IT_OBJTXT.
        CONCATENATE TEXT-020 WA_HEADER-ZZSRCBPNM ',' INTO IT_OBJTXT-LINE
                                SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-021 WA_HEADER-BUTXT '.'
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-034 P_TEXT '.'
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-027.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = WA_HEADER-NAME1.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-028 WA_HEADER-BUTXT INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-029.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-030 W_GE_FAX INTO IT_OBJTXT-LINE
                           SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-031 W_GE_PHONE TEXT-035 W_GE_PHONE_EX INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-032 WA_HEADER-SMTP_ADDR INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
      ELSEIF ( P_REMIT EQ 'X' AND P_GENRL EQ 'X' ).
        CONCATENATE TEXT-020 WA_HEADER-ZZSRCBPNM ',' INTO IT_OBJTXT-LINE
                                 SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-021 WA_HEADER-BUTXT  ',' TEXT-022
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        SHIFT W_BETRZ LEFT DELETING LEADING SPACE.
        CONCATENATE TEXT-024 W_DATE TEXT-025  W_BETRZ W_WAERS TEXT-026
        INTO IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-027.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = WA_HEADER-NAME1.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-028 WA_HEADER-BUTXT INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        IT_OBJTXT-LINE = TEXT-029.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-030 W_GE_FAX INTO IT_OBJTXT-LINE
                           SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE TEXT-031 W_GE_PHONE TEXT-035 W_GE_PHONE_EX INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-032 WA_HEADER-SMTP_ADDR INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
        CONCATENATE SPACE SPACE SPACE INTO IT_OBJTXT-LINE.
        APPEND IT_OBJTXT.
        CONCATENATE  TEXT-033 WA_HEADER-BUTXT INTO
        IT_OBJTXT-LINE SEPARATED BY SPACE.
        APPEND IT_OBJTXT.
      ENDIF.
    ENDFORM.                    " MAIL_BODY
    *&      Form  get_user_date_format
    to get the User Date Format from USR01 table
    FORM GET_USER_DATE_FORMAT.
      CLEAR W_DATFM.
      SELECT SINGLE DATFM INTO W_DATFM
                          FROM USR01
                          WHERE BNAME = SY-UNAME.
    ENDFORM.                    " get_user_date_format
    *&      Form  GET_DATE
          Get the date in the user format
    FORM GET_DATE .
      CLEAR W_DATE.
      CASE W_DATFM.
        WHEN '1'.
          CONCATENATE W_DAY '.' W_MONTH '.' W_YEAR INTO W_DATE.
        WHEN '2'.
          CONCATENATE W_MONTH '/' W_DAY '/' W_YEAR INTO W_DATE.
        WHEN '3'.
          CONCATENATE W_MONTH '-' W_DAY '-' W_YEAR INTO W_DATE.
        WHEN '4'.
          CONCATENATE W_YEAR '.' W_MONTH '.' W_DAY INTO W_DATE.
        WHEN '5'.
          CONCATENATE W_YEAR '/' W_MONTH '/' W_DAY INTO W_DATE.
        WHEN '6'.
          CONCATENATE W_YEAR '-' W_MONTH '-' W_DAY INTO W_DATE.
      ENDCASE.
    ENDFORM.                    " GET_DATE
    Thanks
    Mahesh

  • How to show error message in a report program

    Hello Guys,
    I am making a report using smartforms. I am successful in showing data  but problem is if if i put a value in parameters that does not exist is database, the smartform runs and related fields shows as empty fields. But the form is running. I want to show error message if the parameter values dose not matches with the database values. The message will show as Document not exists
    So i used related error msg here like
    if sy-subrc ne 0.
              message e357.
               endif.
    But it is not working for passing values to smartform. It works if i use in classical report. Plz help me on this issue.
    Thanks,
    Rosaline.

    >
    Rosaline. wrote:
    > Thanks all for reply.  Should i have to use message before call function 'SSF_FUNCTION_MODULE_NAME' ? I tried it but not working.
    >
    >
    if it_final[] is not initial.
    >*             if sy-subrc ne 0. ---> "Remove this condition check, it not required
    >            Message e000(8i) with 'Parameter value not found'.
    >            endif.
    > *            endif. ---> "remove this
    >
    Hi,
    Sy-subrc doesnt need to be validated here, remove that If condition and check again.
    Regards,
    Karthik D

  • Smartform error while printing page wise.

    Hi gurus! 
    while printing from smartforms , if i select particular page in page selection option.
    its giving error - No output request open. End not possible.
    i have used SSF_OPEN and SFF_CLOSE functional module.
    No output request open. End not possible.
    Message no. SSFCOMPOSER154
    Diagnosis 
    You tried to close an output request using function module SSFCOMP_CLOSE, but no output request is active.
    System response
    The system issues an error message.
    Procedure
    Check the sequence in which you call the function modules SSFCOMP_OPEN and SSFCOMP_CLOSE.
    Message was edited by:
            rahul deshmukh

    hi Andrea !
    i have used SSF_OPEN and SSF_close functions.Its displays all pages but Its giving error for page selection printing.
    Message was edited by:
            rahul deshmukh

  • Smartforms error 173

    I would like to know how to solve the following error in smartforms:
    Error number: 173
    Message     : "Table does not fit into window."
    Exception   : FORMATTING_ERROR
    Message ID  : SSFCOMPOSER
    I am trying to fit a main window and another window in a
    template
    Thanks in advance

    As I discovered, this error occurred when there is a conflict between the window created for a template and the template itself. The main node for the template is the window in which one can define a height. In the template, which is the node below the window node, one is also required to enter a value for height that has to be the same value. This can be done in the Template table (tab Template), you’ll find the height defined that is in conflict with the height defined in the table of the window.

  • Error message in processing log in VA02 in External send.

    Hi,
    In my smartform I am using READ_TEXT to read one text and I have checked the exceptions also in the call to function module.
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    ID                            = 'ST'
    LANGUAGE                      = ZNAST-SPRAS
    NAME                          = Y_LV_NAME
    OBJECT                        = 'TEXT'
    TABLES
    LINES                         = y_i_tline
    EXCEPTIONS
    ID                            = 1
    LANGUAGE                      = 2
    NAME                          = 3
    NOT_FOUND                     = 4
    OBJECT                        = 5
    REFERENCE_CHECK               = 6
    WRONG_ACCESS_TO_ARCHIVE       = 7
    OTHERS                        = 8.
    endif.
    But I am not maintaining the text in SO10 and the READ_TEXT will return sy-subrc 4 .In va02 in messages tab ,I am creating output 1(print output) and 5 (external send) and save the document.when I check the processing log for both,In print output I can't see any error messages.But in external send I am getting error message that the text <my text> not found in language <my lang>.I want to know why the error message (exception thrown by READ_TEXT)comes in EXternal send in processing log and it is not coming in the processing log of print output ? .can anybody help me out ? I can't debug while saving the document since everything is handled in back groud(The smartform won't get triggered while saving).

    hi
    Please debug, for which u need to '/H'  B4 that have a break-point in  ur Driver program on SSF or the READ_TEXT Fm and SAVE  in debug mode. When in DEBUG mode ,Under SETTINGS  choose SYSTEM DEBUGGING and UPDATE DEBUGGING  which allow you to debug and check the Error/Exception from the READ_TEXT FM ...
    surya

  • Smartform Error: Items not printed on next page

    Hi everyone,
    I am currently working on a Smartform for printing an Invoice. The problem is as follows:
    I have a First page and a Next Page. There is a Summary in the footer.
    If the items fit on the First page, then there is no problem. If there is space then the Summary is printed on the same page, if there is little space, then the Summary goes on to the Next page (Page Protection is applied).
    The problem arise when the items do no fit on the First Page. In this case, I get a weird error saying "Unexpected Error" and some Message 003. I can't understand what the problem is!
    I have various attachment pages as well and they are printed properly.
    Please help me crack this error at your own leisure!
    Thanks.
    Edited by: kishan P on Oct 13, 2010 9:44 AM

    Hi Ameya
    there might be syntax error. Try to get what exaclty is an error using following code.
    CALL FUNCTION <smartform>
        EXCEPTIONS
        IF SY-SUBRC  0.
           CALL FUNCTION 'SSF_READ_ERRORS'
                IMPORTING
                     ERRORTAB = IT_ERRORLIST.
         ENDIF.
    In IT_ERRORLIST you will get error message.
    Regards
    Sachin G Patil

  • Smartform Error "No defined value'

    Hi ,
    I am getting an error message in smartform 'Amount field has no defined value'.
    I have declared the amount field in global data & it has default value as '0' & i am computing its value in one of the nodes.
    When i try to print this field value at the end in text editor ,it gives the above error message.
    Kindly help.
    Thanks.

    Hi,
    If you are using it in the program lines, have you check if its in the list of variables in the upper part of the node (FROM/IN and TO/OUT).
    Regards,
    Leonard Chomi.

  • Suppress error message in fm READ_TEXT

    Hi
    I have a smartform in which i am trying to display some longtext.My problem is that i have to draw some extra lines when the longtext does not exist.I tried to verify if the longtext exists using the fm READ_TEXT(and set a flag if exists or not ),but it returns error message "Longtext does not exist" and the whole form crashes when the longtext is not found.
    I have to only check if the longtext exists and display it and if it does not exist i have to display another window.How can i suppress that error message that comes from within the FM when the longtext does not exist?
    Is there any other method to see if the longtext exists?
    thanks

    Hi Seba,
      In the driver program please call the read_text FM with exceptions . May be that will help you.
    1.  call to FM read_text with exceptions
    if it_texts[] is initial.
      v_flag = 'X'.
      call FM 'write_form' with another text element.(there write another hardcode texts which you want)
    endif.
    2. If you only need to output the text, you don't need to used READ_TEXT like in an ABAP program,
    just use the INCLUDE command in SAPScript.
    It will read the text and output it to your form.
    The Syntax is like this:
    /: INCLUDE &T166K-TXNAM& OBJECT &T166K-TDOBJECT& ID &T166K-TDID& LANGUAGE &EKKO-SPRAS&
    Thanks,
    Suma.

Maybe you are looking for

  • Any way to back up FAT formatted external hard drive to Time Machine?

    I'm a photographer, and right now my library of photos is a complete mess. I have about 20 GB of photos on one external hard drive and about 30 GB on my Mac's built in hard drive. I recently purchased a new external hard drive to use with Time Machin

  • Help with ESB - FTP Inbound Adaptor - using SFTP

    I am a newbie to ESB. I need to get files from an SFTP server machine and route them to a local file. I have created an ESB project in JDeveloper with an Inbound FTP adaptor, a router and an outbound file adaptor. I then registered it with the ESB se

  • Which document types get a thumbnail and preview in Sharepoint-2013

    I read in the old blogs that preview thumbnails are not supported for excel files, Is this still the same in Sharepiont 2013 ?  Right now I am using sharepoint 2013 and I am not getting preview thumbnails in the search results for excel file types. W

  • Regarding Oracle Financial Analyzer

    Hi all Does oracle Financial Analyzer works with Oracle Apps only or can it be used with Other ERP packages also?? 2)Is there any document on how to get reports regarding EVA,RAROC using the Oracle Financial Analyzer.

  • Linked server issue using SQLNCLI versions on SQL 2008 & 2014

    Hi all, Our product creates databases on a sql server 2008 instance and creates linked servers between them to use distributed queries. This looks like: "EXEC sp_addlinkedserver 'linkDatabaseA', '', 'SQLNCLI10', '.', NULL, NULL, 'DatabaseA'"". Distri