Smart Form Functional Specification

Hi Gurus,
I have to design a smart form functional specification, but i don't have any idea about how to prepare the functional specification?
can anybody send me the smart form functional specification template ?
which helps me to prepare the specification

Hi Devi,
Here is the FS for Form,
Functional Specification Document for Forms
Authors     
Approved By     
TABLE OF CONTENTS
1     OVERVIEW SECTION:     3
1.1     DOCUMENT OVERVIEW:     3
1.2     REVISION HISTORY:     3
1.3     OPEN ISSUES:     3
1.4     EXTERNAL REFERENCES:     3
1.5     REQUEST OVERVIEW:     3
1.6     GENERAL PROCESSING REQUIREMENTS:     4
2     BUSINESS/FUNCTIONAL REQUIREMENTS     5
2.1     REQUIREMENT DESCRIPTIONS:     5
2.2     BUSINESS DRIVER     5
2.3     TO-BE BUSINESS PROCESS:     5
2.4     TO-BE BUSINESS PROCESS FLOW DIAGRAM:     5
2.5     ASSUMPTIONS:     5
2.6     DEPENDENCIES:     5
2.7     RISKS:     5
2.8     SECURITY:     6
2.9     OTHER REQUIREMENTS:     6
3     FORM SECTION     7
3.1     REPORT SELECTION SCREEN:     7
3.2     STANDARD FORM NAME:     7
3.3     FORM LAYOUT:     7
3.4     DATA SOURCE:     7
3.5     SPECIAL REQUIREMENTS PROCESSING:     7
3.6     HOW TO EXECUTE THE FORM:     8
4     UNIT TEST PLAN SECTION     9
4.1     FUNCTIONAL UNIT TEST PLAN:     9
5     USER GUIDE REQUIREMENTS     10
5.1     USER GUIDE REQUIREMENTS:     10
6     APPENDIX     11
6.1     APPENDIX:     11
1     Overview Section:
1.1     Document Overview:
(Provide the high level identification information about the object to be developed. Id, title, Release etc)
Project      Project Atlas
Development Object ID:     SC-F-125
Development Object Title:     Purchase Order Form
Release:     
Process Team:     Supply Chain
Process Area:     Procure-to-Pay
1.2     Revision History:
{This section should be filled with other details about the owner of functional specs, current status of document as explained in the status key etc}
Date Modified     Version     Modified By     Description of Change(s)
1.3     Open Issues:
(Any open issues should be reported in this section)
Issue #     Issue Date     Issue Title / Description     Priority     Resolved Date     Any Other Comments
1.4     External References: 
(Identify any documents referenced in any part of this document.  (Attach documents where possible.)
Document Title     Filename     Author     Identifier (Version/Date)
Process Flow diagram      N/A          
Screen Shots if any     N/A          
Sample data file     PO Form Layout (Single Page)     Erik Kraus     1/ (10/11/2006)
Sample data file     PO Form Layout (Multiple Pages)     Erik Kraus     1/ (10/11/2006)
1.5     Request Overview:
Complexity     0   High
1   Medium
0   Low
System(s) Impacted     1   R/3
0   CRM
0   BW

     0   Other
Existing SAP transaction(s) involved?     ME22N, ME23N
New SAP transaction(s) involved?     ME22N; then click “Messages” to print or “Print Preview” to view.
Menu path for transaction(s)     Logistics  Materials Management  Purchasing  Change
1.6     General Processing Requirements:
(Check the appropriate boxes for e.g. if the development object is an batch report that runs monthly, then check the Online and Monthly boxes in the Processing mode and frequency section and also provide the expected data volume if known)
Processing Mode:     1   Online
0   Batch
Frequency     0   Annually
0   Quarterly
0   Monthly
1   Daily
     1   Real Time 
1   Ad-Hoc
1   Others
Expected Data Volume     
2     Business/Functional Requirements
Section 2 describes what is needed.  This information is used to build the design (how to do it) in Sections 3 and on
2.1     Requirement Descriptions:
Describe the purpose of the object.  Brief overview
The purchase order form is used to display the purchase order in SAP. This form can also be sent to the supplier via e-mail or fax in SAP. The PO can also be displayed in the “Print Preview” screen and printed out as well.
2.2     Business Driver
The PO Form is standard in SAP. Modifications to the form will be necessary to meet the needs of the purchasing organizations at Sage. The PO form is necessary so that all the details of the purchase order can be faxed/ emailed to the supplier and also can be printed out into a hard copy form for internal purposes. The PO form also needs to be able to be viewed via the print preview icon in SAP.
2.3     To-Be business process:
Describe the To-Be business process
Customized Sage Purchase Order Form.
2.4     To-Be business process flow diagram:
Describe the To-Be business process flow diagram
N/A
2.5     Assumptions:
List all the assumptions that were made when developing this object
1)     Standard SAP PO Form will need to be modified from its standard layout.
2)     Font for Purchase Order form will be Times New Roman
3)     PO Form will be created in English
2.6     Dependencies:
List all the dependencies that were made when developing this object
N/A
2.7     Risks: 
(What are the risks that make this development unique?  What risks need to be proactively dealt with in order to be successful? What data sources are needed but not readily available?  Are there any risks or concerns that make this development out of the ordinary?)
N/A
2.8     Security: 
(Any security requirement for this object)
2.9     Other Requirements: 
(If there are any other requirement which is not covered under section 2)
N/A
3     Form Section
Type:      0  SAP Script     1  Smart forms   
3.1     Report Selection Screen: 
Describe the selection screen of the program.  Specify fields for selection and what checks are needed after the user has entered their criteria.
Field Name     Select Options / Parameters / Radio Buttons / Check Boxes     Default Values
From – To     Validation
     Required /Optional     F4 Values
N/A     N/A     N/A     N/A     N/A     N/A
3.2     Standard form name: 
Give the name of the SAP Script or Smart form name if copied from SAP
“MEDRUCK” Form in SAP
3.3     Form Layout: 
Describe the form layout for each page.
The PO form will contain information at the Header Level, Item Level, and Authorizations levels.
Header Level:
The header level will contain all the supplier, bill-to party/address, and ship-to party/address information.  The header level will also contain the payment and shipping terms, logo, page number, purchase order title, purchase order number, supplier number in SAP, and the PO date.
Item Level:
The item level will contain the item number, material and description, order unit, quantities, date required, unit cost, and the total amount of the line-item.  The item-level will also contain the line-item text of purchase order.
Authorization:
The authorization section of the form will contain the name, telephone number, and email address of the purchasing agent.
Other:
-The Total Amount and Currency will be displayed to the right of the Authorization information.
-The layout will include sections and fields with borders. For example the Ship-To, Bill-To, and Supplier will be enclosed in rounded edge boxes. The Layout can be viewed in the Attachments section:
portion of section 3.4. which will show an example of  a PO with only one page and a PO with multiple pages.
3.4     Data Source: 
Identify the data that has to be appeared in the forms. Table Name-Field Name
All the fields will be available on the SAP standard form “MEDRUCK”. Any additional fields that are not on the standard form will need to be added.  The mapping for additional fields not in the standard form will be shown below in each section (Header Level, Item-Level, and Authoriztions) if required.
Please see below for the required fields in the form:
This Section will contain details on the Header, Line-Item, and Authorization sections of the form. A section for attachements will also be inlcuded at the end.
I. Header Information:
The following fields will be displayed for the header information.
-     Title: Purchase Order
-     Logo: The Sage Software logo will appear in the top left corner of the form.
-     PO Creation Date (MM/DD/YYYY)
-     Supplier Number
-     PO Number
-     Page Number
-     Bill to Name and Address
-     Supplier Name and Address
-     Ship to Name and Adress
-     Payment Terms: (not on standard form, see field mapping section below)
-     Shipping Terms: (not on standard form, see field mapping section below). The shipping terms are the same as the “incoterms” in SAP. There are two fields for the incoterms and both will be used for the shipping terms.
-     Header Text
Additional Notes for Header Fields:
PO creation date should be in format “MM/DD/YYYY”
Page Number should be in format “Page 1 of 1, Page 2 of 3, etc” format
The “Bill To” name and address will come from the company code  that is assigned to the plant in the purchase order.
The “Ship To” name and address will come from the storage location in the first line-item on the purchase order if the “SC Vendor” box is not checked on the delivery address tab of the purchase order. If the “SC Vendor” box is checked on the delivery address tab, then the “Ship To” address will come from the delivery address tab on the purhcase order from the central address management system.
The “Supplier” name and address will come from the vendor master in the purchase order.
The central address management system will need to be queried when looking up the “Bill To”, “Deliver”, and “Supplier” addresses.
Header Text: The text to be inserted here will be pulled from the Header Text in the purchase order.
Example: Text is pulled from the Header text with the green checkmark.
If the PO Form requires additional pages, then the header information should be duplicated on the subsequent pages.
Additional Fields :
Field Mapping for additional header fields that are not on the Standard SAP PO (MEDRUCK) Form . These fields can also be viewed on the PO Forms in the Attachments section.
PO Form Additional  Fields
Field Name     SAP Table/ Field Name
Payment Terms     MEPO1226-ZTERM
Shipping Terms (incoterms1)     MEPO1226-INCO1
Shipping Terms (incoterms 2)     MEPO1226-INCO2
II. Item Level Information
The following fields will be on the PO form for the item-level:
-     Item Number
-     Material
-     Material Description
-     Unit (Unit of Measure)
-     Quantity
-     Date Req’d (MM/DD/YYYY)
-     Unit Cost
-     Amount
Each field will have an allotted amount of characters, so that all the text can fit on the line-item. Using .5 inch margins with times new roman 10pt font; there are 105 possible characters in microsoft word for the line-item details to fit on the line. The fields are broken down as follows with their allotted characters to accommodate the 105 allowed spaces:
Characters:
Item Number:  1-3
Material: 6-18
Descriptoin: 6-36
Unit: 39-49
Quantity: 44-56
Date Required: 60-69
Unit Cost: 77-86 (Commas and Delimals will be included in the Price. Two total decimal Spaces)
Amount: 92-103 (Commas and Delimals will be included in the Price. Two total decimal Spaces)
The Numbering Ranges above can be viewed below line-item 040 in the “PO Form Outline (Sinlge Page)” document in the Attachments section.
Note: These number ranges are shown as an example of what the form should like. They do not have to match up identicle to the specifications listed above.
Additional Notes for Line-Item Fields:
- Material Description will be displayed directly below the Material on the next line.
- Item Text: The Item text will be displayed if there are any item texts from the Purchase order. The text will be displayed two lines below the Material description. So there will be one line without any text. Also, the next line-item on the PO form will be displayed  two lines below the item-level text; so there will be only one line with no text between the line-item with text and the subsequent line-item.  Line items 020 and 030 depict this in the “PO Form Outline_v1” document in the attachments section. The Line Item text will come from the “Material PO text” (identified below with a green checkmark) from the line-item on the purchase order as shown below.
- The Date Required Format will be “MM/DD/YYYY”.
- For every item in the purchase order, the program should loop through each item and check to see if the “returns item” box is checked (MEPO1211-RETPO). If this box is flagged on the purchase order, then the purchase order form needs to be updated with a return indicator. This indicator can be viewed on ‘line-item 030’ of the attached word document ““PO Form Outline (Single Page)” in the Attachments section.
- The line-item fields should have the following alignment:
Material: Left
Material Description: Left
Unit: Left
Qty.: Right
Date Required: Left
Unit Cost: Right
Amount: Right
- If the line-items do not fit on one page, then they should continue on to subsequent pages. The Header information should be copied to all the subsequent pages and the authorization section will be displayed on the last page as well as the total amount and currency. This example can be viewed in document “PO Form Outline (Multiple Pages)” in the Attachments section.
Dislclaimer:
A disclaimer will also be included in this section and after all the line-items. The disclaimer text is still pending. An example of a disclaimer is shown in the “PO Form Outline (Single Page)” after line-item 040. This document can be found in the Attachments section.
If a PO requires multple pages, the the disclaimer will be displayed on the last page after the last line-item.
III. Authorization Information
This section will contain the purchasing agent: The purchasing agent will be the person who created the purchase order. This section will also contain their telephone number and email address.
The first and last name of the person who created the purchase order should be displayed here. This can be looked up in the users profile. The user profile will also contain their email and telephone number.
The field names for can be viewed below or in the “PO Form Outline (Single Page)” document in the Attachments section.
PO Form Additional  Fields
Field Name     SAP Table/ Field Name
First Name     ADDR3_DATA-NAME_FIRST
Last Name     ADDR3_DATA-NAME_LAST
Telephone Number     SZA5_D0700-TEL_NUMBER
Email     SZA5_D0700-SMTP_ADDR`
Attachments:
3.5     Special Requirements Processing: 
Describe the processing required to support any special requirements (e.g. signatures, logos, OCR, bar coding etc.).
3.6     How to execute the form: 
Describe how to trigger the form e.g. Standard SAP transaction code or custom transaction code etc. If standard SAP transaction code describe the menu path
The form needs to be able to be viewed and printed.
To View:
Transaction ME22N or ME23N; Then Click the Print Preview   icon to view the Form.
To Print:
1) Transaction  ME22N.
2) Click Messages
3) Select Output “NEU” and medium “1 Print output”
4) Click the “Further data” button as shown in the screen shot above
5) Select  “4 Send immediately (when saving the application)”
6) Click Back   then Click Save  
7) Select “LOCAL” for logical Destination
8) Click “Save” again  
4     Unit Test Plan Section
4.1     Functional Unit Test Plan:
Document the criteria to be used for validating programming accuracy and positive/ negative results
Step     Scenario     Expected Results
Number     Description of what is being tested in this step     Description of what is expected to happen in this step
1     Go to Transaction ME22N and Display PO Form by clicking the Print Preview Icon     Form should mirror the forms in the Attachments section.
2     Go to Transaction ME22N and Print PO Form     PO Form should print as showed in the Print Preview Screen and the forms the Attachments section.
3     Create PO that will force PO form to cross multiple pages and then click Print Preview     PO Form should have Header information on all pages and line-item shoulds continue on to the subsequent pages. Authorization, Total Amount, Currency, and Disclaimer will be on the last page. The page numbers should also be correct and in the right format. This should mirror the “PO Form Outline (Multiple Pages)” document in the Attachments section.
4     Go to Transaction ME22N and print PO as in step 3     PO Form shoul print as showed in the Print Preview Screen and the “PO Form Outline (Multiple Pages)” document in the Attachments section.
5     User Guide Requirements
A User Guide must be provided to assist the person responsible for running the program(s).  The User Guide must be in cookbook-style (required elements with step by step instructions) and annotated screen prints.  The User Guide will be required in the running of the object in the Production environment as well as the QA and Test environments.
5.1     User guide Requirements:
N/A
6     Appendix
6.1     Appendix:
N/A
Hope it will help ..
Regards,
Arjun.
<b>Reward the points if it hepls</b>

Similar Messages

  • Smart form function modules

    I have a smart form and executing it with standard tcode but I couldnt see the output. How could i view the generated function module and where to assign this.  Help needed immediately.
    Janelle

    In your print program first call the following FM.  Pass the name of your smartform.  It will return the generated FM name.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
           EXPORTING
                FORMNAME           = V_FORM_NAME
           IMPORTING
                FM_NAME            = V_FM_NAME
           EXCEPTIONS
                NO_FORM            = 1
                NO_FUNCTION_MODULE = 2
                OTHERS             = 3.
    Now call the returned FM name.
    CALL FUNCTION V_FM_NAME

  • Smart forms function modules

    hi all,
    what is the function module to pass the print partamets in smartforms.

    Hi
    the function module is SSF_FUNCTION_MODULE_NAME.
    here is sample code....
    in this vname is the function module which is generated when we execute the smartform.....it is declared as ...
    vname type rs38l_fnam.
    in the ssf_function_module_name...in exporting we need to pass the values which we want to pass ,from print program to form.
                     STRUCTURE DECLARATION
    data : wa_lfa1 type z50875_lfa1,
           wa_ekko type z50875_ekko,
           wa_ekpo type z50875_ekpo,
           it_ekpo type  z50875it_ekpo,
           vname type rs38l_fnam.
                  SELECTION-SCREEN
    selection-screen begin of block b1 with frame title text-000.
    parameter : p_no type ekko-ebeln obligatory.
    selection-screen end of block b1.
    at selection-screen on p_no.
      perform validate.
                    START-OF-SELECTION
    start-of-selection.
      perform get_vendordata.
      perform get_itemdata.
      call function 'SSF_FUNCTION_MODULE_NAME'
        exporting
          formname           = 'ZMM_SMARTFORMS'
        importing
          fm_name            = vname
        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 vname
        exporting
          wa_lfa1          = wa_lfa1
          wa_ekko          = wa_ekko
          wa_ekpo          = wa_ekpo
        tables
          it_ekpo          = it_ekpo
        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.
    *&      Form  GET_DATA
    form get_data .
      select single ebeln lifnr
                from ekko
                into wa_ekko
                where ebeln = p_no.
    endform.                    " GET_DATA
    *&      Form  GET_VENDORDATA
    form get_vendordata .
      select single lifnr name1 land1 ort01 regio
               from lfa1
               into wa_lfa1
               where lifnr = wa_ekko-lifnr.
    endform.                    " GET_VENDORDATA
    *&      Form  GET_ITEMDATA
    form get_itemdata .
      select ebelp ematn aedat mtart netwr
               from ekpo
               into  table it_ekpo
               where ebeln = wa_ekko-ebeln.
    endform.                    " GET_ITEMDATA
    *&      Form  validate
    form validate .
      perform get_data.
      if sy-subrc ne 0.
        message 'PURCHASE DOCUMENT DOES NOT EXISTS' type 'E'.
        exit.
      endif.
    endform.                    " validate

  • Smart form function module

    hi ,
    The code in program lines is stored in which part of the generated function module and belongs to which  include.
    Thank you.

    Hi ,
    Try to locate the any variable u have written in the program line in   se37 .
    Regards

  • Smart Form Download in PDF

    Hello All ,
                   I have created one smart form and provided option to download the same in PDF. My Problem is that is  downloaded in PDF but at the same time my end user want to see the print preview and take the print from there itself also.
    I am using the following code can some one suggest me the what need to do the change after both option will work at  the same time.
    Please Note I have also made the use of property
    SSFCOMPOP-TDNOPREV
    But after this also issue not resolve. Some one Please suggest me the how to resolve the issue.
    DATA :
          WA_FMNM        TYPE  TDSFNAME,      " Smart Forms: Form Name
          WA_CNTL        TYPE  SSFCTRLOP,     " FOR PDF PRINT
          WA_POP         TYPE  SSFCOMPOP,     " printer name
          T_OTF_FROM_FM  TYPE  SSFCRESCL,
          T_PDF_TAB      LIKE  TLINE OCCURS 0 WITH HEADER LINE,
          T_OTF          TYPE  SSFCRESCL-OTFDATA,
          W_BIN_FILESIZE TYPE  I, " BINARY FILE SIZE
          W_FILE_NAME    TYPE  STRING,
          WA_FNMD        TYPE  RS38L_FNAM.    " Name of Function Module
    DATA:
          W_FORM_NAME    TYPE TDSFNAME,
          W_FMODULE      TYPE RS38L_FNAM,
          W_CPARAM       TYPE SSFCTRLOP,
          W_OUTOPTIONS   TYPE SSFCOMPOP,
          W_FILE_PATH    TYPE STRING,
          W_FULL_PATH    TYPE STRING.
    SMART FORM FUNCTION MODULE
    WA_FMNM  =  TEXT-113.
    W_FORM_NAME  =  TEXT-113.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          FORMNAME                 = WA_FMNM
       IMPORTING
          FM_NAME                  = WA_FNMD
       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.
    END FORM
    WA_CNTL-GETOTF     =  'X'.
    WA_CNTL-NO_DIALOG  =  'X'.
    WA_CNTL-PREVIEW    =  SPACE .
    WA_POP-TDDEST      = 'LP01'.
    CALL FUNCTION WA_FNMD
    EXPORTING
        CONTROL_PARAMETERS         =  WA_CNTL
       OUTPUT_OPTIONS             = WA_POP
        V_APPLN_OB                 = V_APPLN_OB
        V_KUNNR_OB                 = V_KUNNR_OB
        V_EBELN                    = V_EBELN
        V_CAT_NAME                 = V_CAT_NAME
        V_VAR_NAME                 = V_VAR_NAME
    IMPORTING
      JOB_OUTPUT_INFO              = T_OTF_FROM_FM
      TABLES
        T_ZCNC18                   =  T_ZCNC18
    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.
    T_OTF[] = T_OTF_FROM_FM-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 <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
    EXPORTING
        PROMPT_ON_OVERWRITE = 'X'
    CHANGING
        FILENAME    = W_FILE_NAME
        PATH        = W_FILE_PATH
        FULLPATH    = W_FULL_PATH
    EXCEPTIONS
        CNTL_ERROR           = 1
        ERROR_NO_GUI         = 2
        NOT_SUPPORTED_BY_GUI = 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.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
      BIN_FILESIZE  = W_BIN_FILESIZE
      FILENAME      = W_FULL_PATH
      FILETYPE      = 'BIN'
      APPEND        = ' '
      WRITE_FIELD_SEPARATOR = ''
      HEADER                = '00'
      TRUNC_TRAILING_BLANKS = ''
      WRITE_LF              = 'X'
      COL_SELECT            = ''
      COL_SELECT_MASK       = ''
      DAT_MODE              = ''
      CONFIRM_OVERWRITE     = ''
      NO_AUTH_CHECK         = ''
      CODEPAGE              = ''
      IGNORE_CERR           = ABAP_TRUE
      REPLACEMENT           = '#'
      WRITE_BOM             = ''
      TRUNC_TRAILING_BLANKS_EOL = 'X'
    TABLES
      DATA_TAB              = T_PDF_TAB
    EXCEPTIONS
      FILE_WRITE_ERROR        = 1
      NO_BATCH                = 2
      GUI_REFUSE_FILETRANSFER = 3
      INVALID_TYPE            = 4
      NO_AUTHORITY            = 5
      UNKNOWN_ERROR           = 6
      HEADER_NOT_ALLOWED      = 7
      SEPARATOR_NOT_ALLOWED   = 8
      FILESIZE_NOT_ALLOWED    = 9
      HEADER_TOO_LONG         = 10
      DP_ERROR_CREATE         = 11
      DP_ERROR_SEND           = 12
      DP_ERROR_WRITE          = 13
      UNKNOWN_DP_ERROR        = 14
      ACCESS_DENIED = 15
      DP_OUT_OF_MEMORY = 16
      DISK_FULL = 17
      DP_TIMEOUT = 18
      FILE_NOT_FOUND = 19
      DATAPROVIDER_EXCEPTION = 20
      CONTROL_FLUSH_ERROR = 21
      OTHERS = 22   .
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
      WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Swati Namdev

    Hi Swati,
    Pls refer the below code:
    TABLES: ekko.
    DATA: int_itab TYPE TABLE OF ekko WITH HEADER LINE.
    DATA: wf_name TYPE rs38l_fnam.
    DATA: wf_so1.
    *For PDf Conversions
    DATA: int_tab_otf_data TYPE ssfcrescl,
          int_pdf_tab LIKE tline OCCURS 0 WITH HEADER LINE,
          int_tab_otf_final TYPE itcoo OCCURS 0 WITH HEADER LINE,
          file_size TYPE i,
          bin_filesize TYPE i,
          file_name TYPE string,
          file_path TYPE string,
          full_path TYPE string,
          cparam TYPE ssfctrlop,
          outop TYPE ssfcompop.
    **Preview not allowed.
    outop-tddest = 'LP01'.
    cparam-no_dialog = 'X'.
    cparam-preview = ' '.
    cparam-getotf = 'X'.
    GET PARAMETER ID 'EBLEN' FIELD wf_so1.
    SELECT mandt ebeln bukrs bsart ernam ekorg bedat FROM ekko INTO TABLE
    int_itab WHERE ebeln = wf_so1.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname           = 'Z_SMARTFORM_FINAL2'
      IMPORTING
        fm_name            = wf_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.
    CALL FUNCTION wf_name
      EXPORTING
        control_parameters = cparam
        output_options     = outop
        user_settings      = space
      IMPORTING
        job_output_info    = int_tab_otf_data
      TABLES
        int_itab           = int_itab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    int_tab_otf_final[] = int_tab_otf_data-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
      EXPORTING
        format        = 'PDF'
        max_linewidth = 132
      IMPORTING
        bin_filesize  = bin_filesize
      TABLES
        otf           = int_tab_otf_final
        lines         = int_pdf_tab.
    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 METHOD cl_gui_frontend_services=>file_save_dialog
      CHANGING
        filename = file_name
        path     = file_path
        fullpath = full_path.
    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 'GUI_DOWNLOAD'
      EXPORTING
        bin_filesize = bin_filesize
        filename     = full_path
        filetype     = 'BIN'
      IMPORTING
        filelength   = file_size
      TABLES
        data_tab     = int_pdf_tab.
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Ramneet Ahuja

  • Dynamic Changes in Smart Form ( From External Source )

    Dear Sap Folks ,
                Whether the SF layout attributes can be changed from the external loading program dynamically .
    Please give your views on this topic.
    Thanks in advance .
    Best Regards,
    Raj

    Hi Raja,
    As far as my understanding goes this cannot be achieved by an external program but what you can do is that you can some flags that you can set in the print program and when you pass them to the smart form function module(the function module generated by the smartform) you can decide whether certain windows need to be displayed or not by giving a condition to them. You can have two windows with diferrent attributes and then switch between them with the help of flags acting as conditions.
    Hope this will help
    Sudhi

  • Regarding Smart Form Printing, Print Preview issues

    Hi,
    I have couple of issues regarding Smart Form Printing, Print Preview.
    In my program i am passing below parameters to smart form function module:
    t_control-device = c_printer.
    t_control-no_dialog = space.
    t_control-preview = space.
    t_control-no_dialog = c_x.
    t_output-tddest = g_spld.
    t_output-tdimmed = c_x. " Print Immediately
    t_output-tddelete = space. " Don't Release spool after output
    g_user_settings = c_x.
    Issue#1: Though i have set preview paramter to space, after executing program it is prompting for Preview Screen, There again i have to give printer name though i am passing printer name as above and i need to hit on print preview button to set Layout output.
    Here how can i go directly to layout output without preview screen.
    Issue#2: In some cases we need to Print the layout set output after executing program immediately without prompting for preview screen and then Layout set output should also be shown after printing the output.
    How can i solve these issues!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    In the SAP menu screen goto <b>System->User Profile->Own data</b>
    There in the defaults tab, for the output device give the value you had maintained for <b>g_spld.</b> This will not prompt you a dialog screen, and if you want to print immediately select the checkbox as well. Then try to execute the smartform. Hope this solves ur issue.
    Tushar

  • Passing printer name to smart form

    Hi,
    How to pass more than four characters printer name to smart form function  module name. Please  help me. I will give points.
    Thanks.

    Hi,
        Thanks for your reply but there I can pass maximum four character printer name but my case printer name contains 12 characters. If I pass 12 characters printer name it is considering first four characters and it is displaying printer name is not found. So please tell me how to pass more than four characters printer name.
    Thanks.

  • Smart Form by email

    Hi SDN,
    According to the help:
    http://help.sap.com/saphelp_crm40sr1/helpdata/en/2b/468ca63fa611d5b6a1006094192fe3/frameset.htm
    "To send forms as e-mails using SAP Smart Forms, you have to fill the e-mail parameters of the generated function module:
    The parameters MAIL_SENDER and MAIL_RECIPIENT to pass the sender and the recipient of the document. To fill these parameters, you have to create the respective BOR objects of object type RECIPIENT and fill their attributes.
    The parameter MAIL_APPL_OBJ, which you use to link the application object with the sent document. You have to create a BOR object for this parameter too.
    To ensure that SAP Smart Forms evaluates the e-mail "
    My problem is how can i make the conection to the BCI? On the generated function appears the folowing:
    is_mail_appl_obj -
    fill this parameter if your application object is a BOR object
    the output will be connected with the BOR object via SAP Office
    this is done for mail and fax but not for print outputs
      ------>
    is_mail_appl_obj-LOGSYS    =
    is_mail_appl_obj-OBJTYPE   =
    is_mail_appl_obj-OBJKEY    =
    is_mail_appl_obj-DESCRIBE  =
      ------>
    How do i create the container?
    Can you help me?
    Thanks in advance
    Maria João Rocha

    Hi,
    I found the solution myself.
    I've changed the paramter get OTF of the smart form function, then I call the FM CONVERT_OTF, change the format from 132 to 244 characters.
    Then call a ZFM that uses the macro instructions for BOR
    (message) and it works fine.
    Maria João Rocha

  • Functional specification and logic flow for smart form PO

    Dear Friends ,
    For PO develelpment in smart form as per client requirement which are the details we need to give for developers . I had given only table and fiels name for the displaying elements in PO , message type , document type . They are asking conditions also , is it this the job of functional consultant ? .
    If any one having sample FS for PO plaese send . Other than EKKO , EKPO which are the table are there for PO related...?
    RB

    Hi
    Based on your requiremnts you need to give the details of the fields
    First List down all the Required fileds to be in the layout like Vendor details, Plant details, delivery details, Material details, Conditions, Terms & conditions.
    Based on the above you can get the details from the tables used in PO creation.
    EKKO Purchasing Document Header
    EKPO Purchasing Document Item
    EKKI Purchasing Condition Index
    EKAN Vendor Address: Purchasing Document
    EKKN Account Assignment in Purchasing Document
    EKPA Partner Roles in Purchasing
    EKPB "Material Provided" Item in Purchasing Document
    EKPV Shipping Data For Stock Transfer of Purchasing Document Item
    KONV Conditions (Transaction Data)
    EREV Version in Purchasing
    MARA -
    MARC -
    These tables can be used based on your requiremnts
    Thanks & Regards
    Kishore

  • Smart Form  for cutomised Inovice, Functional spec

    Dear all,
    I need to give Functional specification for developing a smart form for Invoice. Tables are not as evident as we have in case of R/3. please give me general tips to give spec to abap consultant to fetch various fields.
    where used list of tables for a particular field is also not helping much. I need
    1) Bill to address
    2) sold to address
    3)condition data
    4) terms of payment
    5) reference date stuff
    Please suggest me a general way or logic bassed on which i can ask my abap consultant to develop the smartform and driver prog as well.
    Thnaks in advance,
    Regards,
    Kiran C

    Hi
    yes usually customers ask to adopt the same layout as they are already using. Usually I draw the layout on visio and assign a number for each field. In the spec I put the layout picture and and mention for which field where data will come from.
    For example:
    A. PO header:
    Field number | Description | Source
    1 | PO number | EKKO-EBELN
    2 | Vendor code | EKKO-LIFNR
    3 | Vendor name | LFA1-NAME1 * rule 1
    C. Rules:
    1 - select NAME1 from table LFA1 where LFA1-LIFNR = EKKO-LIFNR
    Hope this helps.
    Regards
    Eduardo Chagas

  • How to use function module ADDRESS_INTO_PRINTFORM in a smart form

    Hi Experts,
    I have a requirement where in the address window in the smart form output should be  country specific. For example if the customer is an Indian . The address should NAME,CITY and POSTAL CODE. I searched on web to find a function module wich will display the address in country specific format I found ADDRESS_INTO_PRINTFORM I am not sure whether this is right function module or not. If this is correct please help me in using this.
    Thanks and Regards,
    Srini..

    That function module should be able to do the formatting you're after, as long as the necessary settings are present in the country configuration. It appears the default formatting routine for India would want the postal code before the city, so you may have to change that if your requirement calls it for being after the city. But keep in mind that such config changes will have an effect on other programs that format addresses.
    The function module also has pretty extensive documentation.
    In a Smartform, you have an ADDRESS element that does the formatting for you, so theoretically you shouldn't have to use the function module though...

  • 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

  • Which function Group  a smart form belongs to?

    Hello Gurus!!
    May i know to which function group does the dynamically generated function module of a smart form belong to?
    Thanks in Advance.

    You can find out yourself...
    1 Go to smartforms...
    2 enter your Smartform name..
    3 press the test button.. it will take you to the SE37
    4 Press display button... select the First Tab... here you will have your function group.
    Regards,
    Naimesh Patel

  • Functional Specification for Acceptance forms

    Hi Guru's,
    Please help with the functional Specification for Acceptance or Regret letters for RFx(RFQ, RFI or RFP)?
    Your assistance will be appreciated,

    Hi,
    The output type available for Quotation rejection is ABSA and the programme name is SAPFM06P.Form routine ENTRY_ABSA.The form Medruck need to be changed by your abaper as per the text you need to incorporate.
    Dhruba

Maybe you are looking for