6 Columns with Active Background
6 Columns with Active Background
Active List Item Background

24SF2610 – Creating Basic SMARTFORM

Steps to Create a Basic Smart Form in SAP

  1. Access SMARTFORMS
    • Enter the transaction code SMARTFORMS in the SAP command field and press Enter.
  2. Create a New Smart Form
    • Click on Create.
    • Enter a name for the Smart Form (e.g., Z_SF_NEW).
    • Provide a short description (e.g., “Basic Invoice Form”).
    • Click Create.
  3. Define the Form Structure
    • Main Window: This will hold the primary content.
    • Right-click on Main Window and select CreateMain Window.
    • Set the properties (height and width) as needed.
  4. Add Text Elements
    • Right-click on the Main Window and select CreateText Element.
    • Enter a Text Name (e.g., TITLE).
    • Click on the Text Editor icon to add your text (e.g., “Invoice”).
    • Save and go back.
  5. Add a Graphic (Optional)
    • Right-click on the Main Window and select CreateGraphic.
    • Specify the Graphic Name (e.g., Logo).
    • Link to an existing graphic or upload a new one.
  6. Add a Table for Data Display
    • Right-click on the Main Window and select CreateTable.
    • Define the Table Name (e.g., ITEMS).
    • Set up the table structure with the necessary columns (e.g., Item Number, Description, Quantity, Price).
  7. Populate the Table with Data
    • Right-click on the table and select CreateRow.
    • Add Text Elements within the row for dynamic data (e.g., ITEM-NO, ITEM-DESC).
  8. Define Output Parameters
    • Go to Global Settings in the Smart Form.
    • Set output options for printing, PDF generation, etc.
  9. Test the Smart Form
    • Click on the Test button (or use F8).
    • Review the output preview for accuracy.
  10. Save and Activate the Smart Form
    • Click Save (or use Ctrl + S).
    • Click Activate to make the Smart Form callable.
  11. Call the Smart Form from ABAP Program
    • Write an ABAP program to call your Smart Form using the function module SSF_FUNCTION_MODULE_NAME and pass necessary data.

Example ABAP Code

DATA: lv_formname TYPE rs38l_fnam,

      lv_funcname TYPE rs38l_fnam.

lv_formname =Z_MYFORM‘. ” Your Smart Form name

CALL FUNCTION ‘SSF_FUNCTION_MODULE_NAME

  EXPORTING

    formname           = lv_formname

  IMPORTING

    fm_name            = lv_funcname.

CALL FUNCTION lv_funcname

  EXPORTING

    … ” Pass additional parameters and data here

  EXCEPTIONS

    others = 1.

By following these steps, you can successfully create a basic Smart Form in SAP.

Author : Aniket Pawar, 9373518385  

24SF2610 – Creating Basic SMARTFORM

Steps to Create a Basic Smart Form in SAP

  1. Access SMARTFORMS
    • Enter the transaction code SMARTFORMS in the SAP command field and press Enter.
  2. Create a New Smart Form
    • Click on Create.
    • Enter a name for the Smart Form (e.g., Z_SF_NEW).
    • Provide a short description (e.g., “Basic Invoice Form”).
    • Click Create.
  3. Define the Form Structure
    • Main Window: This will hold the primary content.
    • Right-click on Main Window and select CreateMain Window.
    • Set the properties (height and width) as needed.
  4. Add Text Elements
    • Right-click on the Main Window and select CreateText Element.
    • Enter a Text Name (e.g., TITLE).
    • Click on the Text Editor icon to add your text (e.g., “Invoice”).
    • Save and go back.
  5. Add a Graphic (Optional)
    • Right-click on the Main Window and select CreateGraphic.
    • Specify the Graphic Name (e.g., Logo).
    • Link to an existing graphic or upload a new one.
  6. Add a Table for Data Display
    • Right-click on the Main Window and select CreateTable.
    • Define the Table Name (e.g., ITEMS).
    • Set up the table structure with the necessary columns (e.g., Item Number, Description, Quantity, Price).
  7. Populate the Table with Data
    • Right-click on the table and select CreateRow.
    • Add Text Elements within the row for dynamic data (e.g., ITEM-NO, ITEM-DESC).
  8. Define Output Parameters
    • Go to Global Settings in the Smart Form.
    • Set output options for printing, PDF generation, etc.
  9. Test the Smart Form
    • Click on the Test button (or use F8).
    • Review the output preview for accuracy.
  10. Save and Activate the Smart Form
    • Click Save (or use Ctrl + S).
    • Click Activate to make the Smart Form callable.
  11. Call the Smart Form from ABAP Program
    • Write an ABAP program to call your Smart Form using the function module SSF_FUNCTION_MODULE_NAME and pass necessary data.

Example ABAP Code

DATA: lv_formname TYPE rs38l_fnam,

      lv_funcname TYPE rs38l_fnam.

lv_formname =Z_MYFORM‘. ” Your Smart Form name

CALL FUNCTION ‘SSF_FUNCTION_MODULE_NAME

  EXPORTING

    formname           = lv_formname

  IMPORTING

    fm_name            = lv_funcname.

CALL FUNCTION lv_funcname

  EXPORTING

    … ” Pass additional parameters and data here

  EXCEPTIONS

    others = 1.

By following these steps, you can successfully create a basic Smart Form in SAP.

Author : Aniket Pawar, 9373518385