Picking List Smart Form error

I am getting a short dump in class "CL_SSF_XSF_UTILITIES==========CP"
while running the smartform for the picking list.
The short dump says "division by 0 (type p) error." in "CONVERT_METRIC" method
The code where actual dump occurs is:
<b>when unit_character.
     case ounit.
     when unit_twip.
          ovalue = ivalue * 1440 / cpi.
     when unit_point.
          ovalue = ivalue * 72 / cpi.
     when unit_inch.
          ovalue = ivalue / cpi.</b>.
Any help would be appreciated.
Thanks

hi friends,
i am facing with the same problem..
can you please let me know what is the solution for this problem ?
please remember actually it is a standard program we cant modify it... ?
Thanks in advance...
ysr
Edited by: ysr@jay on Feb 12, 2010 10:50 AM

Similar Messages

  • Smart Form Error Page format 2 with orientation 1 unknown

    I have created smart form with Page Format DINA4 (297x210). While executing the smart form i am getting error as "Page format 2 with orientation 1 unknown".

       Same Attributes on each page only Next Page is in increment order.

  • Smart forms Error - Form does not exist

    Hi,
    I have created a smart form and activated without any inconsistancies. SE38 code has been done properly and activated.
    While executing the forms an error has raised saying 'Form does not exist'.
    Could anyone suggest me what is the route cause for this error?
    Regards,
    Arundathi.

    Hi
    Have you designed the smartform in SMARTFORMS tcode?
    after writing the code
    see the steps and check once again
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.html
    step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    Here is the procedure
    1. Create a new smartforms
    Transaction code SMARTFORMS
    Create new smartforms call ZSMART
    2. Define looping process for internal table
    Pages and windows
    First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
    Here, you can specify your title and page numbering
    &SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
    Main windows -> TABLE -> DATA
    In the Loop section, tick Internal table and fill in
    ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
    3. Define table in smartforms
    Global settings :
    Form interface
    Variable name Type assignment Reference type
    ITAB1 TYPE Table Structure
    Global definitions
    Variable name Type assignment Reference type
    ITAB2 TYPE Table Structure
    4. To display the data in the form
    Make used of the Table Painter and declare the Line Type in Tabstrips Table
    e.g. HD_GEN for printing header details,
    IT_GEN for printing data details.
    You have to specify the Line Type in your Text elements in the Tabstrips Output options.
    Tick the New Line and specify the Line Type for outputting the data.
    Declare your output fields in Text elements
    Tabstrips - Output Options
    For different fonts use this Style : IDWTCERTSTYLE
    For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
    5. Calling SMARTFORMS from your ABAP 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
    Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
    http://sapr3.tripod.com
    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.
    for Smartforms material
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapgenie.com/abap/smartforms.htm
    How to trace smartform
    http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    check most imp link
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    <b>step by step good ex link is....
    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html</b>
    Subtotals - Check the link...
    Re: Subtotal with Table Node in smartforms
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Smart form error

    Hi Abapers,
    i'm getting an error while printing a form.
    error descr.: -
    Output could not be issued
    Message no. VL086
    Diagnosis
    An error occurred in the message processing program.
    Procedure
    Contact your system administrator
    Also if I run my smartfrom independently i got message like this
    Exception       FORMATTING_ERROR
    Message ID:          SSFCOMPOSER                Message number:           601
    Message:
    Reference field GS_LIKP-ZWEIGHWT unknown in form.
    with 0 entries

    Hi Adams,
    The error is for field GS_LIKP-ZWEIGHWT. It seems to be a quantity field. If it is then you'll have to maintain a reference field for it in you Smartform. To do this -
    Goto Global Definations -> Currency/Quant.fields
    Here give the field name GS_LIKP-ZWEIGHWT and in the reference field give some quantity field contained in some internal table that you have passed in the form attributes. Give data type as QUAN.
    Activate the Form and execute. This should solve your problem.
    Hope this helps!
    Regards,
    Saurabh

  • Smart forms error

    Hi all,
    When I am trying to use the function module SSF_FUNCTION_MODULE_NAME, it is giving a runtime error that the generated function module is not found.
    please help me resolve this
    This is the code i used:-
    REPORT  ZSSFFUNCTION.
    DATA: fname TYPE rs38l_fnam.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZTESTINVOICE'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
        FM_NAME                  = 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.
    CALL FUNCTION FNAME
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
        INVOICE                    = '12345'
      SALESORG                   =
      DISTRIBUTION               =
      DIVISION                   =
      DATE                       =
      CUSTNO                     =
      NAME                       =
      CITY                       =
      COUNTRY                    =
      POSTALCODE                 =
        ITEM                       = '12345'
      MATNR                      =
      DESC                       =
        QUANTITY                   = '4'
        NETVAL                     = '1000'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      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.
    The error is Function Module FNAME is not found.
    Edited by: Kartheek on Mar 3, 2008 8:31 PM

    Hi
    Check this..declaration of l_f_fname
    FORM call_smartform.
      DATA :  l_f_fname   TYPE  tdsfname,
              l_t_control LIKE  ssfctrlop,
              l_t_out     TYPE  ssfcompop.
      l_t_control-no_dialog  =   'X'      .
      l_t_control-device     =   'PRINTER'.
      IF ok_code = 'GPRV'.
        l_t_control-preview  =   'X'      .
      ENDIF.
      l_t_out-tdnewid        =   'X'      .
      l_t_out-tddelete       =   ' '      .
      l_t_out-tdimmed        =   'X'      .
      l_t_out-tddest         =   p_prnter .
      l_t_out-tddataset      =   'SMART'  .
      l_t_out-tdcopies       =   '001'    .
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                formname           = g_c_form
           IMPORTING
                fm_name            = l_f_fname
           EXCEPTIONS
                no_form            = 1
                no_function_module = 2
                OTHERS             = 3.
      IF sy-subrc <> 0.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e004(ssfcomposer) WITH 'Z90VT_A030_01'.
          WHEN 2.
            MESSAGE e005(ssfcomposer) WITH 'Z90VT_A030_01'.
          WHEN 3.
            MESSAGE e003(ssfcomposer).
        ENDCASE.
      ELSE.
    Passing the selected Data into another Table, Adjacent Duplicates
    Deleted in The Smartform Call
        g_t_formdata1[] = g_t_formdata[] .
        CALL FUNCTION l_f_fname
             EXPORTING
                  control_parameters = l_t_control
                  output_options     = l_t_out
                  user_settings      = ''
                  i_language         = sy-langu
             TABLES
                  g_t_data           = g_t_formdata
             EXCEPTIONS
                  formatting_error   = 1
                  internal_error     = 2
                  send_error         = 3
                  user_canceled      = 4
                  OTHERS             = 5.
        IF sy-subrc <> 0.
          CASE sy-subrc.
            WHEN 1.
              MESSAGE e602(ssfcomposer).
            WHEN 2.
              MESSAGE e001(ssfcomposer) WITH 'Z90VT_A030_01'.
            WHEN 3.
              MESSAGE e001(ssfcomposer) WITH 'Z90VT_A030_01'.
            WHEN 4.
              MESSAGE e012(ssfcomposer).
          ENDCASE.
    ENMDFORM call_smartform.
      Hope it helps.

  • Smart forms. How to setup logic for standard text usage.

    Hi All!
    Could you advise please is there a way, except abap programming, to setup in smart forms that different standard texts values (tcode so10) to be used based on different selected parameters (e.g. customers, vendors etc... ).
    e.g.
    For picking list smart form:
    for customer A- standard text A to be used.
    for customer B- standard text B....
    Thanks,
    Best Regards,
    Andrey
    Edited by: Andrey Kruglov on Mar 16, 2009 1:30 PM
    Edited by: Andrey Kruglov on Mar 16, 2009 1:30 PM

    HI,
    Refer this thread:
    Re: how to display symbols in smartforms
    There is a standard smartform for invoice.
    LB_BIL_INVOICE.
    Refer this thread:
    Re: Can anybody plz give me Smartforms print prog for Invoice/PackList
    Regards,
    Gayathri
    Message was edited by: Gayathri Hariharan

  • [PLEASE HELP] Display Customer Ref. No. in Pick List

    Hi,
    We are trying to display Customer Ref. No. (from Sales Order / Res. Invoice) in the pick list.
    I have created a new UDF in the PIck List row.
    But I am not sure what is the correct query to use to call this out so I can link it to the UDF.
    Could someone please help us?
    Thank you very much.
    Edited by: Anfernee Chang on Nov 21, 2011 5:53 AM

    shafi_sunshine wrote:
    Hi ,
    >
    > Try This....
    >
    > You can  use FMS
    >
    >
    > SELECT $[$14.0.0]
    >
    >
    >
    > Thanks
    > Shafi
    Hi shafi_sunshine,
    I have tried both of the following queries,
    SELECT $[ORDR.NumAtCard]
    SELECT $[$14.0.0]
    but it's hasn't worked. It returned the following error in the pick list screen
    Internal error (3006) occurred.
    Thank you.

  • *configure the Picking list(PL) output type,a smart form for PL.

    Hello SIR,
    I want to configure the Picking list(PL) output type,a smart form for PL but there should be an output type to print*.
    i have assign the out type to shipping point in t.code ovlt .i have created picking list in t.code nact. i created sales order and delivery. i have check my picking list in ovl2n change mode picking out put is available in extra-picking output. i have checked my picking out put for smart form in systems-service-output control if i execute it show like no data to list. no spool request number has generated there.
    so were i have to check picking list preview for smart form . is spool request number is necessary.plz help me to view preview of picking list.or plz say the steps to configure this to preview.
    thanks,
    agilarasan

    Hi,
    Go to Nace .The application for Goods Issues is
    ME - Inventory Management -> select and click on output types ->select wa03 output type and click on processing routines here you can find the form name and the driver program name.So while printing select wa03 as the output type.
    <REMOVED BY MODERATOR - REQUEST OR OFFER POINTS ARE FORBIDDEN>
    Regards,
    Harini.S
    Edited by: Alvaro Tejada Galindo on Dec 23, 2008 3:46 PM

  • Error during running of Smart Form of Packing list.

    Hi,
    I am working on packing list using the standard program.
    while writing the code in smart-form i am using the SALES_UNIT field of IT_GEN.
    but it is giving the error as follows.
    *The data object "IS_DLV_DELNOTE" does not have a component called "IT_GEN-SALES_UNIT".*
    I have declared IS_DLV_DELNOTE as ledlv_delnote in Form Interface of smartform.
    Please help me in above issue.

    Hi
    The structure LEDLV_DELNOTE is having the IT_GEN
    if you  are using it for delivery then use the above structure
    Regards
    Shiva

  • Create Smart form for Pick list

    Hi,
    How do i start for creating a smart form for pick list.
    Regards
    Ajay

    hi
    refer this
    http://www.****************/Tutorials/Smartforms/PO/page1.htm
    Edited by: Swetha on Jul 10, 2008 6:15 PM

  • Error When Processing Picking List Script.

    Hi Experts,
    I have created Script for Picking List,
    I am getting the below error when processing ...
    Error Info...   VN 073: Errors occurred while processing output
    Its working fine when Standard Script SD_PICK_SINGLE is used ..
    Pls Help.
    Regards

    Hi Raghu,
    Before processing your picking list form make sure you have created a output type for it and you have assigned your form name and program name to that output type. you can see this in TCODE: NACE
    Thanks,
    Pritesh

  • Error in Smart Forms diplay

    Hi All,
    I configured the smart form and given the name of right print program for contract.
    and created the message type ZNEU.
    when I want to print it by using ME9K.I am getting error of Value of spool attribute can not be changed.This same smart form worked in testing client with the same configuration.
    Please help me out.
    Helpful answers will be rewarded
    Thanks in Advance,
    Praveen

    Hi,
    Please talk to your basis person or pl. use this link to know the print controls...
    1. Choose Tools > CCMS > Spool > Spool administration.
    2. Then choose Full administration. Choose Print controls  on the DeviceTypes tab page to display a list of the standard print controls.
    See the print controls in both the systems... they must be different.
    Hope this will help u solve the problem, If yes then give points.
    Darshan

  • Crystal Report Pick List - "Table ADM1 could not be found" Error

    Hi,
    When preview is select in sales order, we select pick list gets error.
    Crystal Report Window Forms Viewer:
    "Table ADM1 could not be found"
    Error in File Temp {   .........} .rpt
    The table could not be found"
    If I login remotely , then log into SAP as this user I do not get an error.
    I have given user full authorisation.
    I have run Verify Database.
    I am assuming it is some database or network user access rights.
    Could anyone help on this?
    Kind Regards,
    Eric

    Report was developed and tested against a 'test' database and then imported into a 'production' database.
    Problem appears to be that when B1 connects it does not reset the login credentials for the unlinked tables such as ADM1 and OADM.
    Performing the following steps appears to solve the problem.  Not sure how many of them are really necessary.
    1. Develop and test against the test system as before.
    2. Save as a .rpt file outside B1.
    3. 'Set Datasource Location' to the appropriate B1 datasource for the production database and individually link every table as well as the data source.
    4. Save the .rpt file again.
    5. Import into the production database.
    This does not specifically address the issue where it worked when logged in to the server but not remotely.  Perhaps when logged in remotely the test database was not visible but when logged in locally it was.

  • 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.

  • Function module of smart form delivered an error

    Hi All,
    I am getting an error like this
    "Function module /1BCDWB/SF00000007 of smart form delivered an error"
    FUNCTION /1BCDWB/SF00000007.
    ""Global interface:
    *"       IMPORTING
    *"             VALUE(ARCHIVE_INDEX) TYPE  TOA_DARA OPTIONAL
    *"             VALUE(ARCHIVE_PARAMETERS) TYPE  ARC_PARAMS OPTIONAL
    *"             VALUE(CONTROL_PARAMETERS) TYPE  SSFCTRLOP OPTIONAL
    *"             VALUE(MAIL_APPL_OBJ) TYPE  SWOTOBJID OPTIONAL
    *"             VALUE(MAIL_RECIPIENT) TYPE  SWOTOBJID OPTIONAL
    *"             VALUE(MAIL_SENDER) TYPE  SWOTOBJID OPTIONAL
    *"             VALUE(OUTPUT_OPTIONS) TYPE  SSFCOMPOP OPTIONAL
    *"             VALUE(USER_SETTINGS) TYPE  TDBOOL DEFAULT 'X'
    *"             VALUE(ARCHIVE_INDEX_TAB) TYPE  TSFDARA OPTIONAL
    *"             REFERENCE(ORDERADM_H) TYPE  CRMT_OUTPUT_ORDERADM_H_COM
    *"             REFERENCE(ACTIVITY_H) TYPE  CRMT_OUTPUT_ACTIVITY_H_COM
    *"             REFERENCE(OPPORT_H) TYPE  CRMT_OUTPUT_OPPORT_H_COM
    *"             REFERENCE(ORGMAN_H) TYPE  CRMT_OUTPUT_ORGMAN_H_COM
    *"             REFERENCE(PARTNER_H) TYPE  CRMT_OUTPUT_PARTNER_H_COMT
    *"             REFERENCE(PRICINGDATA_H) TYPE
    *"                             CRMT_OUTPUT_PRICINGDATA_H_COM
    *"             REFERENCE(SALES_H) TYPE  CRMT_OUTPUT_SALES_H_COM
    *"             REFERENCE(SHIPPING_H) TYPE  CRMT_OUTPUT_SHIPPING_H_COM
    *"             REFERENCE(PAYPLAN_D_H) TYPE
    *"                             CRMT_OUTPUT_PAYPLAN_D_H_COMT
    *"             REFERENCE(CUMULAT_H) TYPE  CRMT_OUTPUT_CUMULAT_H_COM
    *"             REFERENCE(CUSTOMER_H) TYPE  CRMT_OUTPUT_CUSTOMER_H_COM
    *"             REFERENCE(ACS_H) TYPE  CRMT_ACS_H_COM
    *"             REFERENCE(BILLING_H) TYPE  CRMT_OUTPUT_BILLING_H_COMT
    *"             REFERENCE(CANCEL_H) TYPE  CRMT_OUTPUT_CANCEL_H_COMT
    *"             REFERENCE(APPOINTMENT_H) TYPE
    *"                             CRMT_OUTPUT_APPOINTMENT_H_COMT
    *"             REFERENCE(BILLPLAN_D_H) TYPE
    *"                             CRMT_OUTPUT_BILLPLAN_D_H_COMT
    *"             REFERENCE(BILLPLAN_H) TYPE  CRMT_OUTPUT_BILLPLAN_H_COMT
    *"             REFERENCE(STATUS_D_H) TYPE  CRMT_OUTPUT_STATUS_D_H_COMT
    *"             REFERENCE(STATUS_H) TYPE  CRMT_OUTPUT_STATUS_H_COMT
    *"             REFERENCE(SRV_SUBJECT_H) TYPE
    *"                             CRMT_OUTPUT_SRV_SUBJECT_H_COMT
    *"             REFERENCE(SRV_SUBJECT_I) TYPE
    *"                             CRMT_OUTPUT_SRV_SUBJECT_H_COMT
    *"             REFERENCE(SRV_REASON_H) TYPE
    *"                             CRMT_OUTPUT_SRV_REASON_H_COMT
    *"             REFERENCE(SRV_RESULT_H) TYPE
    *"                             CRMT_OUTPUT_SRV_RESULT_H_COMT
    *"             REFERENCE(SRV_REFOBJ_H) TYPE
    *"                             CRMT_OUTPUT_SRV_REFOBJ_H_COMT
    *"             REFERENCE(SRV_REFOBJ_I) TYPE
    *"                             CRMT_OUTPUT_SRV_REFOBJ_H_COMT
    *"             REFERENCE(ORDERADM_I) TYPE  CRMT_OUTPUT_ORDERADM_I_COMT
    *"             REFERENCE(ORDERADM_I_IN) TYPE
    *"                             CRMT_OUTPUT_ORDERADM_I_IN_COMT
    *"             REFERENCE(ORDERADM_I_QT) TYPE
    *"                             CRMT_OUTPUT_ORDERADM_I_QT_COMT
    *"             REFERENCE(ORGMAN_I) TYPE  CRMT_OUTPUT_ORGMAN_I_COMT
    *"             REFERENCE(PRICINGDATA_I) TYPE
    *"                             CRMT_OUTPUT_PRICINGDATA_I_COMT
    *"             REFERENCE(PRICING_I) TYPE  CRMT_OUTPUT_PRICING_I_COMT
    *"             REFERENCE(PRODUCT_I) TYPE  CRMT_OUTPUT_PRODUCT_I_COMT
    *"             REFERENCE(SALES_I) TYPE  CRMT_OUTPUT_SALES_I_COMT
    *"             REFERENCE(SERVICE_I) TYPE  CRMT_OUTPUT_SERVICE_I_COMT
    *"             REFERENCE(SCHEDLIN_I) TYPE  CRMT_OUTPUT_SCHEDLIN_I_COMT
    *"             REFERENCE(SCHEDLIN_I_CF) TYPE
    *"                             CRMT_OUTPUT_SCHEDLIN_I_CF_COMT
    *"             REFERENCE(SHIPPING_I) TYPE  CRMT_OUTPUT_SHIPPING_I_COMT
    *"             REFERENCE(PARTNER_I) TYPE  CRMT_OUTPUT_PARTNER_I_COMT
    *"             REFERENCE(ITEM_CSTICS_I) TYPE  CRMT_ITEM_CSTICS_TAB
    *"             REFERENCE(CUSTOMER_I) TYPE  CRMT_OUTPUT_CUSTOMER_I_COMT
    *"             REFERENCE(BILLING_I) TYPE  CRMT_OUTPUT_BILLING_I_COMT
    *"             REFERENCE(CANCEL_I) TYPE  CRMT_OUTPUT_CANCEL_I_COMT
    *"             REFERENCE(FINPROD_I) TYPE  CRMT_OUTPUT_FINPROD_I_COMT
    *"             REFERENCE(ORDPRP_I) TYPE  CRMT_OUTPUT_ORDPRP_I_COMT
    *"             REFERENCE(APPOINTMENT_I) TYPE
    *"                             CRMT_OUTPUT_APPOINTMENT_I_COMT
    *"             REFERENCE(BILLPLAN_D_I) TYPE
    *"                             CRMT_OUTPUT_BILLPLAN_D_I_COMT
    *"             REFERENCE(BILLPLAN_I) TYPE  CRMT_OUTPUT_BILLPLAN_I_COMT
    *"             REFERENCE(STATUS_I) TYPE  CRMT_OUTPUT_STATUS_I_COMT
    *"             REFERENCE(WORKING_SET_E_S_BBP) TYPE
    *"                             /1CN/WORKING_SET_E_S_BBP_T
    *"             REFERENCE(LANGUAGE) TYPE  SY-LANGU
    *"             REFERENCE(SERVICE_I_ASSI) TYPE
    *"                             CRMT_OUTPUT_SERVICE_I_***_COMT
    *"             VALUE(FORM_TYPE) TYPE  C OPTIONAL
    *"             REFERENCE(Y_V_PARTNER_FLAG) TYPE  C OPTIONAL
    *"       EXPORTING
    *"             VALUE(DOCUMENT_OUTPUT_INFO) TYPE  SSFCRESPD
    *"             VALUE(JOB_OUTPUT_INFO) TYPE  SSFCRESCL
    *"             VALUE(JOB_OUTPUT_OPTIONS) TYPE  SSFCRESOP
    *"       EXCEPTIONS
    *"              FORMATTING_ERROR
    *"              INTERNAL_ERROR
    *"              SEND_ERROR
    *"              USER_CANCELED
    DATA: %INPUT     TYPE SSFCOMPIN,
          %RESULT_OP TYPE SSFCRESOP,
          %RESULT_PD TYPE SSFCRESPD,
          %RESULT_CL TYPE SSFCRESCL,
          %TABDEF    LIKE LINE OF %TABDEFS,
          %ARCTAB    TYPE TSFDARA,
          BEGIN OF %FULLNAME,
            FORM TYPE TDSFNAME VALUE 'YCRM_ORDER_SERVICE_RMA',
            VARI TYPE TDVARIANT,
            ACTV TYPE TDBOOL VALUE 'X',
          END OF %FULLNAME.
    TYPES: T_XDF_ELEM(255)    TYPE C,
           T_XDF_ATTR(255)    TYPE C.
    DATA:  IMPORT_PARAMETER   TYPE TABLE OF RSIMP WITH HEADER LINE,
           CHANGING_PARAMETER TYPE TABLE OF RSCHA WITH HEADER LINE,
           TABLES_PARAMETER   TYPE TABLE OF RSTBL WITH HEADER LINE,
           EXPORT_PARAMETER   TYPE TABLE OF RSEXP WITH HEADER LINE,
           EXCEPTION_LIST     TYPE TABLE OF RSEXC WITH HEADER LINE.
    DATA:  XDF_TABLE          TYPE TSFIXML,
           XDF_LENGTH         TYPE I.
    DATA:  XDF_DOCUMENT       TYPE REF TO IF_IXML_DOCUMENT,
           XDF_PARAMETER      TYPE REF TO IF_IXML_ELEMENT,
           L_NAME             TYPE STRING,
           L_VALUE            TYPE STRING,
           L_OBJECT           TYPE STRING,
           L_DATE             TYPE STRING,
           L_TIME             TYPE STRING,
           RC                 TYPE SY-SUBRC.
    FIELD-SYMBOLS: <DATA_OBJECT> TYPE ANY.
    CLASS CL_IXML DEFINITION LOAD.
    CONSTANTS: C_XDF_ROOT_ELEMENT TYPE T_XDF_ELEM VALUE 'XDF',
           C_XDF_ATTR_TYPE       TYPE T_XDF_ATTR VALUE 'TYPE',
           C_XDF_ATTR_TIMESTAMP  TYPE T_XDF_ATTR VALUE 'TIMESTAMP',
           C_XDF_ATTR_OBJ        TYPE T_XDF_ATTR VALUE 'OBJECT'.
    DATA:  XDF_FACTORY      TYPE REF TO IF_IXML,
           XDF_ROOT_ELEMENT TYPE REF TO IF_IXML_ELEMENT.
    DATA:  L_GETSTATE    TYPE DDTYPEGET,
           L_TYPE        TYPE DDTYPEKIND,
           L_TYPE_NAME   TYPE TYPENAME,
           L_DDIC_OBJ    TYPE DDTYPES OCCURS 0 WITH HEADER LINE,
           L_DD02L_STATE TYPE DD02L   OCCURS 0 WITH HEADER LINE,
           L_DD04L_STATE TYPE DD04L   OCCURS 0 WITH HEADER LINE,
           L_DD40L_STATE TYPE DD40L   OCCURS 0 WITH HEADER LINE,
           L_XMLOUTPUT   TYPE SSFXMLOUT,
           L_SFSY        TYPE SFSY.
    TYPE-POOLS: ABAP.
    DATA: XDF2_IXML        TYPE REF TO IF_IXML,
          XDF2_DOCUMENT    TYPE REF TO IF_IXML_DOCUMENT,
          XDF2_SRC_OBJECTS TYPE ABAP_TRANS_SRCBIND_TAB,
          XDF2_SRC_OBJECT  LIKE LINE OF XDF2_SRC_OBJECTS.
    DEFINE XDF2_APPEND_SRC_OBJECT.
      XDF2_SRC_OBJECT-NAME  = '&1'.
      TRANSLATE XDF2_SRC_OBJECT-NAME TO UPPER CASE.
      GET REFERENCE OF &2 INTO XDF2_SRC_OBJECT-VALUE.
      APPEND XDF2_SRC_OBJECT TO XDF2_SRC_OBJECTS.
    END-OF-DEFINITION.
    DEFINE XDF_GET_DDIC_INFO.
      CLEAR L_DDIC_OBJ.
      IF NOT &2 IS INITIAL.
        L_TYPE_NAME = &2.
      ELSEIF NOT &1-TYP IS INITIAL.
        L_TYPE_NAME = &1-TYP.
      ELSEIF NOT &1-LINE_OF IS INITIAL.
        L_TYPE_NAME = &1-LINE_OF.
      ELSEIF NOT &1-TABLE_OF IS INITIAL.
        L_TYPE_NAME = &1-TABLE_OF.
      ELSE.
        CLEAR L_TYPE_NAME.
      ENDIF.
      CALL FUNCTION 'DDIF_TYPEINFO_GET'
           EXPORTING TYPENAME = L_TYPE_NAME
           IMPORTING TYPEKIND = L_TYPE.
      L_DDIC_OBJ-TYPENAME = L_TYPE_NAME.
      L_DDIC_OBJ-TYPEKIND = L_TYPE.
      IF NOT L_DDIC_OBJ IS INITIAL.
        COLLECT L_DDIC_OBJ.
      ENDIF.
    END-OF-DEFINITION.
    DEFINE XDF_CREATE_DATA_STREAM.
      CLEAR: L_OBJECT, L_DATE, L_TIME, L_NAME, L_TYPE_NAME, L_VALUE.
      IF &3 = 'T'.
        CONCATENATE &1-PARAMETER '[]' INTO L_NAME.
      ELSE.
        L_NAME = &1-PARAMETER.
      ENDIF.
      IF NOT &2 IS INITIAL.
        ASSIGN (L_NAME) TO <DATA_OBJECT>
               CASTING TYPE (&2).
        L_TYPE_NAME = &2.
      ELSEIF NOT &1-TYP IS INITIAL.
        ASSIGN (L_NAME) TO <DATA_OBJECT>
               CASTING TYPE (&1-TYP).
        L_TYPE_NAME = &1-TYP.
      ELSEIF NOT &1-LINE_OF IS INITIAL.
        ASSIGN (L_NAME) TO <DATA_OBJECT>.
        L_TYPE_NAME = &1-LINE_OF.
      ELSEIF NOT &1-TABLE_OF IS INITIAL.
        ASSIGN (L_NAME) TO <DATA_OBJECT>.
        L_TYPE_NAME = &1-TABLE_OF.
      ELSE.
        ASSIGN (L_NAME) TO <DATA_OBJECT>.
        CLEAR L_TYPE_NAME.
      ENDIF.
      CALL FUNCTION 'SDIXML_DATA_TO_DOM'
           EXPORTING
                 NAME        = L_NAME
                 DATAOBJECT  = <DATA_OBJECT>
           IMPORTING
                 DATA_AS_DOM = XDF_PARAMETER
           CHANGING
                  DOCUMENT    = XDF_DOCUMENT
             EXCEPTIONS
                  OTHERS      = 1.
      L_NAME  = C_XDF_ATTR_TYPE.
      L_VALUE = L_TYPE_NAME.
      CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
           EXPORTING NAME      = L_NAME
                        VALUE     = L_VALUE
           RECEIVING RVAL      = RC.
      CLEAR L_DDIC_OBJ.
      READ TABLE L_DDIC_OBJ WITH KEY TYPENAME = L_TYPE_NAME.
      CASE L_DDIC_OBJ-TYPEKIND.
        WHEN 'S'.
          READ TABLE L_DD02L_STATE WITH KEY TABNAME = &1-TYP.
          L_DATE = L_DD02L_STATE-AS4DATE.
          L_TIME = L_DD02L_STATE-AS4TIME.
          L_OBJECT = 'TABL'.
        WHEN 'E'.        " data elements
          READ TABLE L_DD04L_STATE WITH KEY ROLLNAME = &1-TYP.
          L_DATE = L_DD04L_STATE-AS4DATE.
          L_TIME = L_DD04L_STATE-AS4TIME.
          L_OBJECT = 'DTEL'.
        WHEN 'L'.        " table types
          READ TABLE L_DD40L_STATE WITH KEY TYPENAME = &1-TYP.
          L_DATE = L_DD40L_STATE-AS4DATE.
          L_TIME = L_DD40L_STATE-AS4TIME.
          L_OBJECT = 'TTYP'.
        WHEN OTHERS.
          CLEAR: L_DATE, L_TIME, L_OBJECT.
      ENDCASE.
      L_NAME  = C_XDF_ATTR_OBJ.
      CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
           EXPORTING NAME      = L_NAME
                     VALUE     = L_OBJECT
           RECEIVING RVAL      = RC.
      L_NAME  = C_XDF_ATTR_TIMESTAMP.
      CONCATENATE L_DATE L_TIME INTO L_VALUE.
      CALL METHOD XDF_PARAMETER->SET_ATTRIBUTE
           EXPORTING NAME      = L_NAME
                     VALUE     = L_VALUE
           RECEIVING RVAL      = RC.
      CALL METHOD XDF_ROOT_ELEMENT->APPEND_CHILD
           EXPORTING NEW_CHILD = XDF_PARAMETER
           RECEIVING RVAL      = RC.
      CHECK RC = 0.
    END-OF-DEFINITION.
    CLEAR DOCUMENT_OUTPUT_INFO.
    CLEAR JOB_OUTPUT_INFO.
    CLEAR JOB_OUTPUT_OPTIONS.
    L_SFSY = SFSY.
    CLEAR SFSY.
    SFSY-PAGE = L_SFSY-PAGE.
    SFSY-FORMPAGES = L_SFSY-FORMPAGES.
    SFSY-JOBPAGES = L_SFSY-JOBPAGES.
    SFSY-XDF = L_SFSY-XDF.
    SFSY-XDF2 = L_SFSY-XDF2.
    CLEAR INTSFSY.
    IF CONTROL_PARAMETERS-NO_OPEN = SPACE.
       CALL FUNCTION 'SSF_CREATE_COMPOSER_INPUT'
            EXPORTING
                 ARCHIVE_PARAMETERS = ARCHIVE_PARAMETERS
                 USER_SETTINGS      = USER_SETTINGS
                 MAIL_SENDER        = MAIL_SENDER
                 MAIL_RECIPIENT     = MAIL_RECIPIENT
                 MAIL_APPL_OBJ      = MAIL_APPL_OBJ
                 OUTPUT_OPTIONS     = OUTPUT_OPTIONS
                 CONTROL_PARAMETERS = CONTROL_PARAMETERS
            IMPORTING
                 INPUT              = %INPUT.
      IF OUTPUT_OPTIONS-XSFCMODE = SPACE.
        %INPUT-XSF        = ' '.
        %INPUT-XSFOUTMODE = ' '.
        %INPUT-XSFOUTDEV  = ' '.
        %INPUT-XSFACTION  = ' '.
        %INPUT-XSFFORMAT  = ' '.
      ENDIF.
      CALL FUNCTION 'SSFCOMP_OPEN'
           EXPORTING  INPUT  = %INPUT
           IMPORTING  RESULT = %RESULT_OP
           EXCEPTIONS OTHERS = 1.
      IF SY-SUBRC <> 0.
        %VARIANT = SPACE.
        PERFORM %RAISE.
      ENDIF.
      JOB_OUTPUT_OPTIONS = %RESULT_OP.
    ENDIF.
    IF SFSY-XDF = 'X'.
      CALL FUNCTION 'FUNCTION_IMPORT_INTERFACE'
           EXPORTING
                FUNCNAME           = '/1BCDWB/SF00000007'
                INACTIVE_VERSION   = SPACE
           TABLES
                IMPORT_PARAMETER   = IMPORT_PARAMETER
                CHANGING_PARAMETER = CHANGING_PARAMETER
                TABLES_PARAMETER   = TABLES_PARAMETER
                EXPORT_PARAMETER   = EXPORT_PARAMETER
                EXCEPTION_LIST     = EXCEPTION_LIST
           EXCEPTIONS
                OTHERS             = 1.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      L_GETSTATE-TBHD = L_GETSTATE-TBFD = L_GETSTATE-DTEL = 'X'.
      L_GETSTATE-TTHD = L_GETSTATE-TTFD = 'X'.
      LOOP AT IMPORT_PARAMETER.
        XDF_GET_DDIC_INFO IMPORT_PARAMETER IMPORT_PARAMETER-DBFIELD.
      ENDLOOP.
      LOOP AT CHANGING_PARAMETER.
        XDF_GET_DDIC_INFO CHANGING_PARAMETER
                          CHANGING_PARAMETER-DBFIELD.
      ENDLOOP.
      LOOP AT TABLES_PARAMETER.
        XDF_GET_DDIC_INFO TABLES_PARAMETER TABLES_PARAMETER-DBSTRUCT.
      ENDLOOP.
      CALL FUNCTION 'DD_TYPEINFO_GET'
           EXPORTING  GETSTATE    = L_GETSTATE
           TABLES     DDTYPES_TAB = L_DDIC_OBJ[]
                      DD02L_TAB   = L_DD02L_STATE[]
                      DD04L_TAB   = L_DD04L_STATE[]
                      DD40L_TAB   = L_DD40L_STATE[].
      XDF_FACTORY = CL_IXML=>CREATE( ).
      XDF_DOCUMENT = XDF_FACTORY->CREATE_DOCUMENT( ).
      L_NAME = C_XDF_ROOT_ELEMENT.
      XDF_ROOT_ELEMENT
           = XDF_DOCUMENT->CREATE_ELEMENT( NAME = L_NAME ).
      CALL METHOD XDF_DOCUMENT->APPEND_CHILD
           EXPORTING  NEW_CHILD  = XDF_ROOT_ELEMENT
           RECEIVING  RVAL       = RC.
      CHECK RC = 0.
      LOOP AT IMPORT_PARAMETER.
        XDF_CREATE_DATA_STREAM IMPORT_PARAMETER
                               IMPORT_PARAMETER-DBFIELD 'I'.
      ENDLOOP.
      LOOP AT CHANGING_PARAMETER.
        XDF_CREATE_DATA_STREAM CHANGING_PARAMETER
                               CHANGING_PARAMETER-DBFIELD 'C'.
      ENDLOOP.
      LOOP AT TABLES_PARAMETER.
        XDF_CREATE_DATA_STREAM TABLES_PARAMETER
                               TABLES_PARAMETER-DBSTRUCT 'T'.
      ENDLOOP.
      CALL FUNCTION 'SSFCOMP_XDF_OUTPUT'
           EXPORTING  DOCUMENT = XDF_DOCUMENT
           EXCEPTIONS OTHERS   = 1.
    ELSEIF SFSY-XDF2 = 'X'.
      XDF2_IXML     = CL_IXML=>CREATE( ).
      XDF2_DOCUMENT = XDF2_IXML->CREATE_DOCUMENT( ).
      XDF2_APPEND_SRC_OBJECT ARCHIVE_INDEX ARCHIVE_INDEX.
      XDF2_APPEND_SRC_OBJECT ARCHIVE_PARAMETERS ARCHIVE_PARAMETERS.
      XDF2_APPEND_SRC_OBJECT CONTROL_PARAMETERS CONTROL_PARAMETERS.
      XDF2_APPEND_SRC_OBJECT MAIL_APPL_OBJ MAIL_APPL_OBJ.
      XDF2_APPEND_SRC_OBJECT MAIL_RECIPIENT MAIL_RECIPIENT.
      XDF2_APPEND_SRC_OBJECT MAIL_SENDER MAIL_SENDER.
      XDF2_APPEND_SRC_OBJECT OUTPUT_OPTIONS OUTPUT_OPTIONS.
      XDF2_APPEND_SRC_OBJECT USER_SETTINGS USER_SETTINGS.
      XDF2_APPEND_SRC_OBJECT ARCHIVE_INDEX_TAB ARCHIVE_INDEX_TAB.
      XDF2_APPEND_SRC_OBJECT ORDERADM_H ORDERADM_H.
      XDF2_APPEND_SRC_OBJECT ACTIVITY_H ACTIVITY_H.
      XDF2_APPEND_SRC_OBJECT OPPORT_H OPPORT_H.
      XDF2_APPEND_SRC_OBJECT ORGMAN_H ORGMAN_H.
      XDF2_APPEND_SRC_OBJECT PARTNER_H PARTNER_H.
      XDF2_APPEND_SRC_OBJECT PRICINGDATA_H PRICINGDATA_H.
      XDF2_APPEND_SRC_OBJECT SALES_H SALES_H.
      XDF2_APPEND_SRC_OBJECT SHIPPING_H SHIPPING_H.
      XDF2_APPEND_SRC_OBJECT PAYPLAN_D_H PAYPLAN_D_H.
      XDF2_APPEND_SRC_OBJECT CUMULAT_H CUMULAT_H.
      XDF2_APPEND_SRC_OBJECT CUSTOMER_H CUSTOMER_H.
      XDF2_APPEND_SRC_OBJECT ACS_H ACS_H.
      XDF2_APPEND_SRC_OBJECT BILLING_H BILLING_H.
      XDF2_APPEND_SRC_OBJECT CANCEL_H CANCEL_H.
      XDF2_APPEND_SRC_OBJECT APPOINTMENT_H APPOINTMENT_H.
      XDF2_APPEND_SRC_OBJECT BILLPLAN_D_H BILLPLAN_D_H.
      XDF2_APPEND_SRC_OBJECT BILLPLAN_H BILLPLAN_H.
      XDF2_APPEND_SRC_OBJECT STATUS_D_H STATUS_D_H.
      XDF2_APPEND_SRC_OBJECT STATUS_H STATUS_H.
      XDF2_APPEND_SRC_OBJECT SRV_SUBJECT_H SRV_SUBJECT_H.
      XDF2_APPEND_SRC_OBJECT SRV_SUBJECT_I SRV_SUBJECT_I.
      XDF2_APPEND_SRC_OBJECT SRV_REASON_H SRV_REASON_H.
      XDF2_APPEND_SRC_OBJECT SRV_RESULT_H SRV_RESULT_H.
      XDF2_APPEND_SRC_OBJECT SRV_REFOBJ_H SRV_REFOBJ_H.
      XDF2_APPEND_SRC_OBJECT SRV_REFOBJ_I SRV_REFOBJ_I.
      XDF2_APPEND_SRC_OBJECT ORDERADM_I ORDERADM_I.
      XDF2_APPEND_SRC_OBJECT ORDERADM_I_IN ORDERADM_I_IN.
      XDF2_APPEND_SRC_OBJECT ORDERADM_I_QT ORDERADM_I_QT.
      XDF2_APPEND_SRC_OBJECT ORGMAN_I ORGMAN_I.
      XDF2_APPEND_SRC_OBJECT PRICINGDATA_I PRICINGDATA_I.
      XDF2_APPEND_SRC_OBJECT PRICING_I PRICING_I.
      XDF2_APPEND_SRC_OBJECT PRODUCT_I PRODUCT_I.
      XDF2_APPEND_SRC_OBJECT SALES_I SALES_I.
      XDF2_APPEND_SRC_OBJECT SERVICE_I SERVICE_I.
      XDF2_APPEND_SRC_OBJECT SCHEDLIN_I SCHEDLIN_I.
      XDF2_APPEND_SRC_OBJECT SCHEDLIN_I_CF SCHEDLIN_I_CF.
      XDF2_APPEND_SRC_OBJECT SHIPPING_I SHIPPING_I.
      XDF2_APPEND_SRC_OBJECT PARTNER_I PARTNER_I.
      XDF2_APPEND_SRC_OBJECT ITEM_CSTICS_I ITEM_CSTICS_I.
      XDF2_APPEND_SRC_OBJECT CUSTOMER_I CUSTOMER_I.
      XDF2_APPEND_SRC_OBJECT BILLING_I BILLING_I.
      XDF2_APPEND_SRC_OBJECT CANCEL_I CANCEL_I.
      XDF2_APPEND_SRC_OBJECT FINPROD_I FINPROD_I.
      XDF2_APPEND_SRC_OBJECT ORDPRP_I ORDPRP_I.
      XDF2_APPEND_SRC_OBJECT APPOINTMENT_I APPOINTMENT_I.
      XDF2_APPEND_SRC_OBJECT BILLPLAN_D_I BILLPLAN_D_I.
      XDF2_APPEND_SRC_OBJECT BILLPLAN_I BILLPLAN_I.
      XDF2_APPEND_SRC_OBJECT STATUS_I STATUS_I.
      XDF2_APPEND_SRC_OBJECT WORKING_SET_E_S_BBP WORKING_SET_E_S_BBP.
      XDF2_APPEND_SRC_OBJECT LANGUAGE LANGUAGE.
      XDF2_APPEND_SRC_OBJECT SERVICE_I_ASSI SERVICE_I_ASSI.
      XDF2_APPEND_SRC_OBJECT FORM_TYPE FORM_TYPE.
      XDF2_APPEND_SRC_OBJECT Y_V_PARTNER_FLAG Y_V_PARTNER_FLAG.
      XDF2_APPEND_SRC_OBJECT JOB_OUTPUT_INFO JOB_OUTPUT_INFO.
      CALL TRANSFORMATION ID
           SOURCE (XDF2_SRC_OBJECTS)
           RESULT XML XDF2_DOCUMENT.
      CALL FUNCTION 'SSFCOMP_XDF2_OUTPUT'
        EXPORTING
          DOCUMENT = XDF2_DOCUMENT
        EXCEPTIONS
          OTHERS   = 1.
      IF SY-SUBRC <> 0. RAISE ERROR. ENDIF.
    ELSE.
      %FULLNAME-VARI = %VARIANT.
      %VARIANT = SPACE.
      IF %HEADER IS INITIAL.
        IMPORT HEADER   TO %HEADER
               REFTAB   TO %REFTAB
               DOCSTRUC TO %DOCSTRUC
               TABDEF   TO %TABDEFS
               FROM DATABASE STXFCONTR(SF) ID %FULLNAME.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'SSFRT_SET_ERROR_PARAMETERS'
               EXPORTING I_FORM      = 'YCRM_ORDER_SERVICE_RMA'.
          CALL FUNCTION 'SSFRT_WRITE_ERROR'
               EXPORTING I_ERRNUMBER = SSF_ERR_NO_RUNTIME_OBJECT
                         I_MSGID     = 'SSFCOMPOSER'
                         I_MSGNO     = '002'
                         I_MSGV1     = 'YCRM_ORDER_SERVICE_RMA'.
          PERFORM %RAISE.
        ENDIF.
        SELECT SINGLE SDATE STIME FROM D010SINF
          INTO (%HEADER-SDATE, %HEADER-STIME)
          WHERE PROG    = '/1BCDWB/SAPLSF00000007'
            AND R3STATE = 'A'.
        IF SY-SUBRC <> 0.
          CLEAR: %HEADER-SDATE,
                 %HEADER-STIME.
        ENDIF.
      ENDIF.
      LOOP AT %TABDEFS INTO %TABDEF.
        CALL FUNCTION 'SSFCOMP_TABLE_DEFINITION'
             EXPORTING  CPI    = %HEADER-CPI
                        LPI    = %HEADER-LPI
             CHANGING   TABDEF = %TABDEF
             EXCEPTIONS OTHERS = 1.
        IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
      ENDLOOP.
      CALL FUNCTION 'SSFRT_SET_REFERENCES'
           EXPORTING I_REFTAB = %REFTAB .
      CALL FUNCTION 'SSFRT_SET_LANGUAGES'
           EXPORTING I_CONTROL_PARAMETERS = CONTROL_PARAMETERS
                     I_MASTERLANGUAGE     = 'E'
                     I_THRULANG           = ' '
                     I_INSTALL_LANG       = ' '
           IMPORTING O_LANGUAGES          = %LANGUAGES.
      %HEADER-LANGU = %LANGUAGES-LANGU1.
      %WEXIT = SPACE.
      PERFORM %GLOBAL_CLEAR.
      PERFORM %GLOBAL_INIT.
      CLEAR %ARCTAB.
      IF ARCHIVE_INDEX_TAB[] IS INITIAL.
        APPEND ARCHIVE_INDEX TO %ARCTAB.
      ELSE.
        %ARCTAB = ARCHIVE_INDEX_TAB.
      ENDIF.
    > CALL FUNCTION 'SSFCOMP_PROCESS_DOCUMENT'
           EXPORTING  HEADER           = %HEADER
                      DOCSTRUC         = %DOCSTRUC
                      STARTPAGE        = CONTROL_PARAMETERS-STARTPAGE
                      ARCHIV_INDEX_TAB = %ARCTAB
                      MAIL_APPL_OBJECT = MAIL_APPL_OBJ
           IMPORTING  RESULT           = %RESULT_PD
           EXCEPTIONS OTHERS           = 1.
      IF SY-SUBRC <> 0. PERFORM %RAISE. ENDIF.
      DOCUMENT_OUTPUT_INFO = %RESULT_PD.
    ENDIF.
    The function module 'SSFCOMP_PROCESS_DOCUMENT' is returning sy-subrc value 1.
    Could you please tell me how to rectify this error
    Thanks and Regards,
    Soumya.

    The error I am getting is a formatting error as shown below:
    L_ERROR-MSGTY                  E
    L_ERROR-MSGID                  SSFCOMPOSER
    L_ERROR-MSGV1                  YTI_FCR004_RETREP_TYPE

Maybe you are looking for

  • Images in scroll text

    How can I insert JPG images or similar into a scrolling text? I need to insert logos, like Dolby and stuff, and I don't know how to do this. Do I have to do it in After FX? Motion? Livetype? Thanks in advance for any advice.

  • I want to exchange all my equipment for the newest model available.

    I've been a steady customer since Feb. 2008. I want to exchange all of my equipment for the latest model available. How do I go about that? 

  • Wont play

    i have the shuffle and i have downloaded a cd onto my computer and also got music from i-tunes and when i am i-tunes you see the music but when i try to play the music from the shuffle, i just see a green light and hear nothing, i have restored it, d

  • How can i fix Connection issues with back to my mac since yosemite upgrade.

    Ok I have been having nothing but problems with back to my mac since the upgrade. both machines are using yosemite and I have even reinstalled yosemite on both still having connection issues. anyone else know how I can fix this? I get one of 2 error

  • JSP and Interbase

    I am trying to connect to an Interbase database using JSP. When I run the JSP I get an internal error. Can anyone help me with this, please? Here is the error stack: type Exception report message Internal Server Error description The server encounter