Notes on smartforms

hi  all,
   plz send me notes on smartforms .
thanks,

Hi
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.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.
check this:
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
check this linkls------>
https://www.sdn.sap.com/irj/sdn/collaboration
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Reward points if useful
Regards
Anji

Similar Messages

  • Purchase Order Driver Program Not loading SMARTFORM

    Hi,
    I have developed Z smartform by copying from standard form and tried to call from standard program only but here I am not able to call my Z smartform and I am able to call only Z SAPSCRIPT from this standard program.
    I have done all the necessary changes in NACE transaction but then also only when I keep the script name its working fine but when I replace this by smartform name the driver program is not calling smartform .!! why?
    Please do let me know why is it like this?
    Thanks
    Sudharshan

    Hi,
    PO driver program is written to support only SAPSCRIPT. So if you want to assign smartform in NACE, you should take a Zcopy of the driver program SAPFM06P with its include FM06PE02 as ZFM06PE02. And give the zprogram against the driver program field in NACE.
    Then you need to replace the entry_nue subroutine in ZFM06PE02 with the below code.
    form entry_neu using ent_retco ent_screen.
      data: l_druvo like t166k-druvo,
            l_nast  like nast,
            l_from_memory,
            l_doc   type meein_purchase_doc_print.
    * Data Declaration for PO smartform Modification
    DATA: fname TYPE rs38l_fnam,
            xkomk TYPE TABLE OF komk,
            gs_output TYPE ssfcompop,
            gs_dialog TYPE ssfctrlop.
      clear ent_retco.
      if nast-aende eq space.
        l_druvo = '1'.
      else.
        l_druvo = '2'.
      endif.
      call function 'ME_READ_PO_FOR_PRINTING'
           exporting
                ix_nast        = nast
                ix_screen      = ent_screen
           importing
                ex_retco       = ent_retco
                ex_nast        = l_nast
                doc            = l_doc
           changing
                cx_druvo       = l_druvo
                cx_from_memory = l_from_memory.
      check ent_retco eq 0.
       IF tnapr-sform NE ' '.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
          EXPORTING
            formname           = tnapr-sform
          IMPORTING
            fm_name            = fname
          EXCEPTIONS
            no_form            = 1
            no_function_module = 2
            OTHERS             = 3.
        IF sy-subrc EQ 0.
            gs_dialog-no_dialog = 'X'.
            gs_dialog-preview = 'X'.
            gs_output-tddest = 'LP01'.
            gs_output-tdnoprev = ' '.
            gs_output-tdnoprint = ' '.
            gs_output-tdimmed = 'X'.
            gs_output-tdnewid = 'X'.
         CALL FUNCTION fname  " modify the interface as per your needs
            EXPORTING
              control_parameters = gs_dialog
              output_options     = gs_output
              user_settings      = ' '
              zxekko             = l_doc-xekko
              zxpekko            = l_doc-xpekko
            TABLES
              l_xekpo            = l_doc-xekpo
              l_xekpa            = l_doc-xekpa
              l_xpekpo           = l_doc-xpekpo
              l_xeket            = l_doc-xeket
              l_xtkomv           = l_doc-xtkomv
              l_xekkn            = l_doc-xekkn
              l_xekek            = l_doc-xekek
              l_xkomk            = xkomk
            EXCEPTIONS
              formatting_error   = 1
              internal_error     = 2
              send_error         = 3
              user_canceled      = 4
              OTHERS             = 5.
        ELSE.
          CALL FUNCTION 'ME_PRINT_PO'
            EXPORTING
              ix_nast        = l_nast
              ix_druvo       = l_druvo
              doc            = l_doc
              ix_screen      = ent_screen
              ix_from_memory = l_from_memory
              ix_toa_dara    = toa_dara
              ix_arc_params  = arc_params
              ix_fonam       = tnapr-fonam                      "HW 214570
            IMPORTING
              ex_retco       = ent_retco.
        ENDIF.
      ELSE.
        CALL FUNCTION 'ME_PRINT_PO'
          EXPORTING
            ix_nast        = l_nast
            ix_druvo       = l_druvo
            doc            = l_doc
            ix_screen      = ent_screen
            ix_from_memory = l_from_memory
            ix_toa_dara    = toa_dara
            ix_arc_params  = arc_params
            ix_fonam       = tnapr-fonam                        "HW 214570
          IMPORTING
            ex_retco       = ent_retco.
      ENDIF.
    endform.
    While calling the smartform modify the fm interface to your needs.
    This will solve your problem.
    Regards
    Karthik D

  • Release notes for Smartforms 4.7

    Dear Friends,
      If anybody can provide release notes on Smartforms for SAP 4.7
    Thanks in Advance.........
    Message was edited by:
            Ashish Kansara

    Hi
    Refer this link for ECC 5.0 & 6.0:
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/68805bb88f297ee10000000a422035/frameset.htm
    A similar post
    /message/1783778#1783778 [original link is broken]
    <b>You can go through the Release Notes for each of the versions after 4.6B (4.6C, 4.7 , ECC 5.0 & ECC 6.0)
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/688055b88f297ee10000000a422035/content.htm
    For 4.7 SAP R/3 http://help.sap.com/saphelp_47x200/helpdata/en/12/9d78d6d8f74043a32e82be87e433b7/content.htm</b>
    Release Notes on SAP Web Application Server 6.30
    http://help.sap.com/saphelp_47x200/helpdata/en/2b/64fc3e9d3b6927e10000000a114084/content.htm
    http://solutionbrowser.erp.sap.fmpmedia.com/
    How to create a New smartfrom, it is having step by step procedure
    http://sap.niraj.tripod.com/id67.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.
    check this:
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
    check this linkls------>
    https://www.sdn.sap.com/irj/sdn/collaboration
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Reward points for useful Answers
    Regards
    Anji
    Message was edited by:
            Anji Reddy Vangala

  • AT user command in interactive list(basic) is not calling smartform

    Hi,
    I am facing a problem, which will be strange for all i think.
    in a basic list (not ALV) simple interactive report i am using
    a at user-command. my concern is to collect the checked
    box in the first output report display and store it into the
    internal table and call a smart form when user
    enter 'SHOW' command.
    the problem is when i am entering a show command and
    debugging it, it collects all the checked checkbox in the
    internal table and it even call the smartform print popup
    window, when i give print or printpreview it leave the
    program with out throughing any error.
    here is the code.
    at user-command.
      case sy-ucomm.
        when 'SHOW'.
          do mline times.
            READ LINE SY-INDEX FIELD VALUE itab_item-chkbox.
            if itab_item-chkbox eq 'X'.
    *          write:/ itab_item-banfn,30 itab_item-bnfpo.
              perform extract_final_data using itab_item-bnfpo itab_item-banfn.
            endif.
          enddo.
          refresh: itab, itab_ser.
          clear:   itab, itab_ser.
    * move all data to structure (itab) of form .
          loop at iitab_wa1.
            Move :  iitab_wa1-matnr  to itab-matnr,
                    iitab_wa1-meins  to itab-meins,
                    iitab_wa1-ebeln  to itab-ebeln,
                    iitab_wa1-ebelp  to itab-ebelp,
                    iitab_wa1-menge  to itab-ktmng,
                    iitab_wa1-lfdat  to itab-eindt,
                    iitab_wa1-typ    to itab-typ.
            append itab.
            clear  itab.
          endloop.
    * display the selected item in the report screen.
          if sy-subrc is initial.
    * sorting the table according to RFQ no and item no.
            sort itab by ebeln ebelp.
    * including sr.no in table itab
            clear icnt.
            loop at itab.
              icnt  =  icnt  +  1.
              itab-srno = icnt.
              modify itab.
              clear  itab.
            endloop.
    * Call the output form.
    * YSF_MEDRUCK_RFQ_PR_ser_SAE is in 300
    * for pr to rfq material and service in single form.
            CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
              EXPORTING
                FORMNAME = 'YSF_MEDRUCK_RFQ_PR_MAT_SAE'
              IMPORTING
                FM_NAME  = V_FM.
            CALL FUNCTION '/1BCDWB/SF00000037'
              EXPORTING
                ser_flg          = ser_flag
                material         = p_mat
                services         = p_ser
              TABLES
                itab             = itab
              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.
          else.
            write: ' Some error has occurred'.
          endif.
      endcase.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Aug 22, 2008 6:16 PM

    hi...
    this shouldnt be happening..ne ways.u may try this..
    put the smartform calling code in a report porgram and then use submit program and return command.
    write this part of code in the report program....you will get all ur variables from stack....
    Report y_call_sf.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING
                FORMNAME = 'YSF_MEDRUCK_RFQ_PR_MAT_SAE'
              IMPORTING
                FM_NAME  = V_FM.
            CALL FUNCTION v_fm
              EXPORTING
                ser_flg          = (calling_prog)ser_flag    --> declare like this fro stack access
                material         = (calling_prog)p_mat
                services         = (calling_prog)p_ser
              TABLES
                itab             = (calling_prog)itab
              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.
          else.
            write: ' Some error has occurred'.
          endif.
    calling prog is program from where u r submitting.......
    so ur code will look like this....
    at user-command.
      case sy-ucomm.
        when 'SHOW'.
          do mline times.
            READ LINE SY-INDEX FIELD VALUE itab_item-chkbox.
            if itab_item-chkbox eq 'X'.
             write:/ itab_item-banfn,30 itab_item-bnfpo.
              perform extract_final_data using itab_item-bnfpo itab_item-banfn.
            endif.
          enddo.
          refresh: itab, itab_ser.
          clear:   itab, itab_ser.
    move all data to structure (itab) of form .
          loop at iitab_wa1.
            Move :  iitab_wa1-matnr  to itab-matnr,
                    iitab_wa1-meins  to itab-meins,
                    iitab_wa1-ebeln  to itab-ebeln,
                    iitab_wa1-ebelp  to itab-ebelp,
                    iitab_wa1-menge  to itab-ktmng,
                    iitab_wa1-lfdat  to itab-eindt,
                    iitab_wa1-typ    to itab-typ.
            append itab.
            clear  itab.
          endloop.
    display the selected item in the report screen.
          if sy-subrc is initial.
    sorting the table according to RFQ no and item no.
            sort itab by ebeln ebelp.
    including sr.no in table itab
            clear icnt.
            loop at itab.
              icnt  =  icnt  +  1.
              itab-srno = icnt.
              modify itab.
              clear  itab.
            endloop.
    Call the output form.
    YSF_MEDRUCK_RFQ_PR_ser_SAE is in 300
    for pr to rfq material and service in single form.
           submit y_call_sf and return. -->plz check the syntax
      endcase.

  • BR Nota Fiscal Smartform

    Using ECC 6.0, there is a standard smartform called J_1B_NF_SMARTFORMS.
    But in Nota Fiscal customizing, only Sapscript forms are allowed, the smartform textbox is hidden in configuration screen.
    Is there any other way to configure this smartform?
    Ps.: I tried set SF name directly into TNAPR table, and it works perfectly. All performs are prepared to use this SF, I just can't customize in correctly way.
    Thanks in advance,
    Guilherme Frisoni

    From SPRO, Smartform field is hidden, but from transaction J1BJ the field appears OK.

  • Print Dialog not opened -Smartform

    Hi Experts
                We have defined a output type and assigned a smartform for Invoice.
               The problem is we have included 60 billing items into a single billing document.
               So, when we try VF02 and the Issue output type, it opens the window and select the output type then give the print preview, the print dialog window is not opened.
               when i try it debug mode, the RV_MESSAGE_DIALOG fm returns the value(4) as  OTHERS.
                 So it leaves the transaction, how to solve this problem, what could be the reason actually. Its most urgent, pls anyone help me.
    Thanks in advance.
    Regards
    Rajaram

    solved

  • Treating loops as a whole, not separately - Smartform

    Hi,
    In a smartform, each table and it's loop is treated separately.
    For example, if a table has a loop into a structure, the table will process each record of the loop.
    How do you treat the loops as a whole of several tables? For example,
    table 1 loops into a structure for record 1. That record is processed.
    Then table 2 loops, with its 1st record having a key that ties it to the 1st record in table 1.
    Here is a better diagram:
    - Section unrelated to Line items, dealing more with the PO
    - Line Item 1 – some general details in a table
    >>> Table 1 about the line item, dealing with data about it
    >>> Table 10 about the line item, dealing with data about it
    - Line Item 2 – some general details in a table
    >>> Table 1 about the line item, dealing with data about it
    >>> Table 10 about the line item, dealing with data about it
    - Section unrelated to Line items, dealing more with the PO
    Thanks,
    John

    Hi John,
    Are you looking for nested loops, you can't nest tables, but you can define a loop within a table.
    Table 1 would be defined as a table node, then table 2 within it as a loop.  This loop for Table 2 will use the line types defined for table 1, but as you can define an number of line types this doesn't create a problem.  In order to limit your table 2 entries to just those relevant to the current entry of table 1 use the where condition of the loop.
    Regards,
    Nick

  • Error Function module " " not found in Smartforms

    Hi all,
    Please help me out….
    I created the form using the smartforms, check it and activated it. I can see the unique function module is assigned to the form. I wrote the ABAP program and use function module ‘SSF_FUNCTION_MODULE_NAME’and also define data types.
    when I called the function module fm_name for passing values and tables from program to smartform. This is working perfectly in development server but in production it giving error like Function module " " not found.
    Below I m pasting my code.
    *& Report  ZCASHJOURNAL                                                *
    REPORT  zcashjournal                            .
    TABLES: bseg.
    DATA: FM_NAME TYPE rs38l_fnam.
    DATA:BEGIN OF it_bseg OCCURS 0.
            INCLUDE STRUCTURE bseg.
    DATA:END OF it_bseg.
    DATA:BEGIN OF it_bseg1 OCCURS 0.
            INCLUDE STRUCTURE bseg.
    DATA:END OF it_bseg1.
    DATA: gv_amt_in_words TYPE spell,
          gv_word TYPE spell-word,
          gv_decword TYPE spell-decword.
    DATA:BEGIN OF gt_bkpf OCCURS 0.
            INCLUDE STRUCTURE bkpf.
    DATA:END OF gt_bkpf.
    DATA:bktxt TYPE bktxt.
    DATA:waers TYPE waers.
    DATA:belnr TYPE belnr_d.
    DATA:werks TYPE bukrs.
    DATA:desc  TYPE butxt.
    DATA:awkey TYPE awkey.
    DATA:docno TYPE matnr.
    DATA:cajo  TYPE awkey.
    DATA:desc1 TYPE butxt.
    DATA:dmbtr TYPE dmbtr.
    SELECTION-SCREEN BEGIN OF BLOCK b2.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (15) FOR FIELD s_belnr.
    SELECTION-SCREEN POSITION 28 .
      PARAMETERS : s_belnr TYPE bseg-belnr .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
      SELECTION-SCREEN COMMENT (15) FOR FIELD s_werks.
        SELECTION-SCREEN POSITION 28 .
          PARAMETERS: s_werks TYPE werks.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK b2.
    SELECT * FROM bkpf
               INTO CORRESPONDING FIELDS OF TABLE gt_bkpf
              WHERE belnr LIKE s_belnr
              AND   bukrs LIKE s_werks.
    IF NOT gt_bkpf[] IS INITIAL.
      SELECT * FROM bseg
          INTO CORRESPONDING FIELDS OF TABLE it_bseg
          FOR ALL ENTRIES IN gt_bkpf
          WHERE bukrs EQ gt_bkpf-bukrs
          AND   belnr EQ gt_bkpf-belnr
          AND   shkzg EQ 'S'.
    ENDIF.
    LOOP AT gt_bkpf.
      bktxt = gt_bkpf-bktxt.
      waers = gt_bkpf-waers.
      belnr = gt_bkpf-belnr.
      werks = gt_bkpf-bukrs.
      awkey = gt_bkpf-awkey.
      docno = awkey+0(10).
      cajo = awkey+10(4).
    ENDLOOP.
    LOOP AT it_bseg.
      dmbtr = it_bseg-dmbtr.
    ENDLOOP.
    IF s_werks EQ '65'.
      desc = 'JCBML - Heavy Equipments'.
    ENDIF.
    IF cajo EQ '0001'.
      desc1 = 'PETTY CASH PLANT II'.
    ENDIF.
    CALL FUNCTION 'SPELL_AMOUNT'
      EXPORTING
        amount    = dmbtr
        currency  = waers
        filler    = space
        language  = sy-langu
      IMPORTING
        in_words  = gv_amt_in_words
      EXCEPTIONS
        not_found = 1
        too_large = 2
        OTHERS    = 3.
    IF sy-subrc EQ 0.
      MOVE : gv_amt_in_words-word TO gv_word,
             gv_amt_in_words-decword TO gv_decword.
    ENDIF.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        formname                 = 'ZCASHRECPT'
    IMPORTING
       FM_NAME                  = FM_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 'SSF_FUNCTION_MODULE_NAME'
            EXPORTING  formname           = 'ZCASHRECPT'
                    variant            = ' '
                    direct_call        = ' '
            IMPORTING  fm_name            = lf_fm_name
            EXCEPTIONS no_form            = 1
                       no_function_module = 2.
    *v_vbeln = S_VBELN-low.
    CALL FUNCTION FM_NAME
      EXPORTING
        bktxt            = bktxt
        waers            = waers
        belnr            = belnr
        werks            = werks
        desc             = desc
        docno            = docno
        cajo             = cajo
        desc1            = desc1
        dmbtr            = dmbtr
        gv_word          = gv_word
      TABLES
        T_ZDEB           = it_bseg
      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.

    Hi Rakesh,
    Check two things
    1. Program tranpsorted to production without any error in request log.
    2. Smartform tranpsorted to production without any error in request log and without renaming / misspelling it.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'ZCASHRECPT'
    IMPORTING
    FM_NAME = FM_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.
    Also try to uncomment the Message id part and it will show some meaningful message.
    And to check whether actaually fucntion module is generated or not goto smartforms ->Smartform name -> Display -> Environment->Fucntion module name . if this is blank try to retransport smartform.
    Hope that helps.
    Regards
    Kapadia
    ***Assigning points is the way to say thanks in SDN.***

  • Smartforms - What you see is not what you get ?

    I create a delivery note by smartforms.
    Print Preview in the PC, the position of data is correct.
    But printed on the paper, what you see in the PC is not what you get? The page format is custom, not standard.
    Is there somebody know reason?
    Thanks!!

    I all really depends  on the printer, the print drivers, and how the printer is setup on the basis side.
    I have seen the same thing when printing one layout from two different printers.  They didn't look the same.
    Regards,
    Rich Heilman

  • Dunning Smartform F150_DUNN_SF configuration

    Hi,
    Could anyone let me know the steps involved in configuration of Dunning smartform, I am also having a requirement where I have to configure Dunning smart form F150_DUNN_SF with the standard print program.
    Could you please explain me the steps to configure this smartform, I am able to configure a sap script for dunning but not the smartform.
    Thanks in advance.
    Best Regards,
    Abnish Jain

    Hello
    Based on the configuration in FBMP where the frequency is given and grace period is also given. Based on that the dunning levels are triggered when you dun a customer using F150. So each time in one run the dunning level is updated in the customer in the other dunning run the dunning level moves on to the next.
    Thanks and Regards

  • Dunning smartform F150_DUNN_SF Error ?

    Hi All,
    I have assigned the standard dunning smartform "F150_DUNN_SF" for dunning letter printout, i have also configured BTE event 1720 to trigger smartforms. While triggering the dunning letter from F150 transaction, its giving a error "ULINE not found". Please provide some solution to this error ?
    Thanks & Regards,
    Navneeth K.

    Hi,
    Could you please let me know the steps involved in configuration of Dunning smartform, I am also having a requirement where I have to configure Dunning form F150_DUNN_SF with the standard print program.
    Could you please explain me the steps to configure this, I am able to configure a script for dunning but not the smartform.
    Thanks in advance.
    Best Regards,
    Abnish Jain

  • Smartforms of Sales Excise invoice

    Hello,
          I am not getting Smartforms of Sales Excise invoice printout after clicking Excise Invoice (F9). If i will use script then no problem but i have problem in smartforms.
    Plz help me .
    Vivek

    Hi
    In NACE  Check Application     V1  Output Type     JEXC
    Program                 J_1IEXCP_OUTPUT
    Form Routine         ENTRY
    Form                      J_1I_EXC_INVOICE
    As of now its been configured to Sap script all u have do is to Write ur own Driver Program if u want to use Smartforms
    and in the Driver Program call u r new  smartform....
    surya

  • DG Output on Delivery Note

    Dear Experts,
    THis is regarding form for LD00.
    For getting DG data on form, there is one std form in sap which is RVDELNOTE. The respective print program is RVADDN01
    Please note that, I have exported RVDELNOTE in All Languages from another IDES system and Imported the same in my system.
    I have replaced this LE_SHP_DELNOTE with RVDELNOTE  then I am getting error: Output could not be issued
    As this is script and not the smartform, I have tried following two combinations In transaction NACE, but still error continue
    Combination 1)
    Medium: Print Output
    Program: RVADDN01
    Form Routine: ENTRY
    Form:BLANK
    PDF/SamartForm Form: RVDELNOTE
    Type: BLANK
    Combination 2)
    Medium: Print Output
    Program: RVADDN01
    Form Routine: ENTRY
    Form:RVDELNOTE
    PDF/SamartForm Form: BLANK
    Type: BLANK
    again if I assign LE_SHP_DELNOTE, it is working fine..
    on the other hand, RVDELNOTE is also Standard SAP Script. I have not done any changes in it.
    Pls guide,
    Regards
    Amol
    Note: I am already referring the Note 453250 - No dangerous goods data on delivery note: Possible causes

    Problem resovled at my own..
    Thanks...

  • SRM Smartform - How to write custom logic to get data

    Hi Experts,
    I am new to SRM 7.0 now. I want to know where the code logic can be written to print the custom smart form?
    I have already create custom smarts form ZBBP_PO, and implement the BADI  BBP_OUTPUT_CHANGE_SF to pass the custom form name.
    But i don't know where to write the code for fetching the source data. In ECC, we can write the code in a separate report program. How it does in SRM now? It is said some class and method will print the form. How to find it? and how to add custom logic.?
    Or the logic of fetching source data should be embeded in the smart form? I don't like to write much more codes directly in smart form.
    Thanks!

    Yeah, I know it. but I don't want to write code logic into the Smartforms. in ECC, i always write the code in a separated program which will pass the data to smartform and call function module to print it.
    i just want to know whether i can write the code in somewhere else in SRM, not in smartform.

  • Printing 4 copies with different header in smartform

    Hi Friends,
    I am printing Delivery Note using smartforms, for that i created form by coping SAP`s standard form LE_SHP_DELNOTE with some layout changes.
    Its workin fine., but now user wants that it should print 4 copies of that form with different header, like
    CUSTOMER COPY, WAREHOUSE COPY, GATE COPY, OFFICE COPY
    This is usually done in other companies on carbonated papers, but they want this to print on normal paper.
    Please suggest is it possible, if yes how should i do it...
    Regards,
    Brijesh Soni

    Create a secondary window.Select Window type as u201CCopies Windowu201D.The variable SFSY-COPYCOUNT would provide us count of the copy whether it is a first copy, second copy and others. We would use this field to print the owner of the copy.We would define a string, which would hold the name of the copy (bank copy and others) depending on the value of SFSY-COPYCOUNT. Define a variable in the global definition.
    Now select your Copies window, right click u2013 Select Create à Flow Logic à Program Lines 
    The output parameter is W_TEXT.
    IF SFSY-COPYCOUNT = 001.
    W_TEXT = 'Original'.
    ELSEIF SFSY-COPYCOUNT = 002.
    W_TEXT = 'Duplicate'.
    ELSEIF SFSY-COPYCOUNT = 003.
    W_TEXT = 'Tripilicate'.
    ENDIF.

Maybe you are looking for