Smartform on purchase order

hi  friends,
i need to create a smartform for purchase order.in this i need to extract ship to details,remit to details.from which tables and using which link can i get these details .please help me asap friends.

Hi
Take the Partner function for Shipto and Remit to and pass the Po number to EKPA (partner Function table for PO) and take the Partner number of Shipto and Remitto and take their address details from  LFA1 or ADRC table and use them in smartform
In smartform you can write the selects in PROGRAM lines and fetch the data
Reward points for useful Answers
Regards
Anji
Message was edited by:
        Anji Reddy Vangala

Similar Messages

  • Smartform in Purchase Order ME21N

    Hi guys.
    I'm working in SAP 6.0 ECC. I am developing a sapscript for purchase order and it is working well, but i wanna do the same in smartform, i checked on the web that sap 6.0 ecc has some standard smartform for Purchase Order, but mine doesnt have it. In addition, i tried to convert my sapscript to smartform, but the only thing that converts are the windows, no tables or variables, so it doesnt work.
    how can i do it? somebody did a smartform for ME21N??? what are the parameters that i need to use? the idea is that this smartform will be trigged at the moment of release the purchase order throught ME29N.
    Regards
    it will be super usefull that somebody could send me a smartform

    Sending attachments by mail is not really compliant with forum rules (because other people won't get the information).
    The good answer would have been to look at SDN "smart forms" home page, then look at section "preconfigured smart forms".
    It says that it must be downloaded from SWDC (SAP software download center), choose Installations and Upgrades -> ...Entry by Application Group -> SAP Best Practices -> SAP BP BASELINE PACKAGE ...

  • Custom SmartForm for Purchase Order Printing

    Hi,
    I need a customized smartform for purchase order, which is called after the standard transaction ME9F.
    I adjusted "Conditions for Output Control" by using transaction NACE  ( Erased the name of the form MEDRUCK, Entered my customized smartform's name under smartform Form part and chose the type as smartform )
    However, I couldn't success to see my printview whereas I continued to see the printview of Medruck.
    I'd searched for the problem through here and the net,  I found some names of smartforms such as: /SMB40/MMPO_L  and /SMB40/MMPO_A and their driver programs like: /SMB40/FM06P . The package which consists of these elements was mentioned as " /SMB40/ "... but despite I downloaded it, my system still doesn't have the elements.
    So, how can I use my own purchase order smartform or if i need the forms mentioned,  in which best practice package i can find them?
    SAP ECC 6.0
    SAP_APPL 604
    SAP_BASIS 701
    Thanks in advance,

    Hi,
    If your SAP doesnt have a standard smartform for PO, it is quite complicated to use smarform rather than sapscript.
    I guess that you will need to modify the program SAPFM06P that calls the sapscript and make it call the smartform.
    I will take a few time to adapt the sapscript.
    Regards
    Miguel

  • Smartform for purchase order.

    Hello friends,
        I am creating the smartform for purchase order printing whih is attached to output type ZNEU and that output type is used in ME23N.
        But at the time of creating versions in PO in ME22N it is giving error messages of diffrant types like form routine not present.
      Now  I want your opinion in deciding whether to go for new smartform for PO printing or I shoud procede with script MEDRUCK. If anyone have developed smartform for PO which supports versions, please suggest the wayout.
    Rgds,
    Madan

    Hello,
    You have to write form routines in the Driver program to trigger the form.
    Please Reward if helpful.
    Srujan.

  • Standard smartform for Purchase Order

    What is the standard smartforms for purchase order?Where can i find this?Give me print program for the same.

    Hi
    Preconfigured smartforms are not available on ECC 6.0. You have to either download from service.sap.com or migrate existing script to smartforms.
    Regards,
    Vishwa.

  • Standard smartforms for purchase orders in scm server

    hi
    what are standard smartforms for purchase orders in scm server(not on R/3 server)
    in R/3 i know
    /SMB40/MMPO_UK
    /SMB40/MMPO_L
    /SMB40/MMPO_A
    but i want to know in SCM(Supply Chain Management) server
    Thanks,
    Phani

    check below may be u r looking for the same
    /SCA/ORDER_DESCRIPTION_AUTO
    /SCA/ORDER_NUMBER_AUTO
    /SCA/ORDER_NUMBER2_AUTO
    ~~Guduri

  • To find name for standard smartform of purchase order in Tcode me21n.......

    Please do not offer rewards
    Hi Abapers,
                 I had doubt, regarding how to find the name of standard smartform available for purchase order in tcode - ME21N.
              After executing ME21N, n print preview i get a form without logo. So i want to customize the form according to my clients requirement.For this i want to know the Smartform name, so tat i can copy to 'Z.....' and make the customization.
              Can anybody assist me overcome this problem of how to find out the name of smartform without knwing functionmodule name also....
                <<Text removed>>
    Advanced Thanks..............
    Edited by: Matt on Mar 25, 2009 10:26 AM

    DESIGN ONE SMARTFORM AS PERUR NEED.
    DRIVER PROGRAM FOR THISIS
    *& ZSAPFM06P
    &----     Print of a PO by SMART FORMS               *
    *& Purchase order printing program
    &----      FORM ENTRY
    SmartForm from customizing table TNAPR
    determine smartform function module for invoice
                    variant            = ' '
                    direct_call        = ' '
    control-no_open   = 'X'.
    control-no_close  = 'X'.
    call smartform invoice
                         archive_index        = toa_dara
                         archive_parameters   = arc_params
                    mail_appl_obj        =
                         mail_recipient       = ls_recipient
                         mail_sender          = ls_sender
                         output_options       = ls_composer_param
                         is_bil_invoice       = ls_bil_invoice
                         is_repeat            = repeat
              importing  job_output_info      = ls_job_info
                        document_output_info =
                        job_output_options   =
      error handling
       message id sy-msgid type sy-msgty number sy-msgno
               with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    analyse internal error table of Smart Forms
      add your handling
    REPORT ZSAPFM06P.
    TABLES: TNAPR,
            nast.
    DATA: lf_fm_name TYPE rs38l_fnam,
          lf_formname TYPE  tdsfname,
          control type ssfctrlop,
          errtab  type tsferror.
    FORM entry_neu using ent_retco ent_screen.
      lf_formname = tnapr-sform.
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING  formname           = lf_formname
             IMPORTING  fm_name            = lf_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.
      control-no_dialog = 'X'.
      control-preview   = 'X'.
      control-langu     = sy-langu.
          CALL FUNCTION lf_fm_name
               EXPORTING
                           control_parameters   = control
                           user_settings        = 'X'
                           is_nast              = nast
               EXCEPTIONS formatting_error     = 1
                          internal_error       = 2
                          send_error           = 3
                          user_canceled        = 4
                          OTHERS               = 5.
      if sy-subrc <> 0.
        ent_retco = 0.
      else.
        ent_retco = 0.
      endif.
      call function 'SSF_READ_ERRORS'
           importing
                errortab = errtab.
      if not errtab is initial.
      endif.
    ENDFORM.
    DEFINE UR PROGRAM NAME AND SMARTFORM NAME IN NACE.

  • Item text needed in Smartform for Purchase Order

    Dear Friends
    i am creaing a smartform form for a Purchase Order , where i am to show item text , & material po text
    also but i am not getting how to show them , i have tried with Function Module Read_ text but if for any item text is not maintained it throw a error     text xxxxxxxxxx code f01 not found in language en .
    kindly somebody help me with the elaborated steps
    regards
    digvijay rai

    Requirement : Need to display the item text in the scripts Tcode me23n.
    problem: the below subroutine program which i wrote reads the entire paragraph but when the values transfered to the script, the script variable accepts only one line. can you please help to pass  the entire value to scripts.
    Actual output
    th respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the exchoose warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.D
    Displayed  output
          th respect to the materials. The only warranties for SAP Group products and s
    code written in scripts :
    DEFINE &VALUE& TYPE STRING(500)
    PERFORM ITEMTEXT IN PROGRAM ZDISPLAYINGITEMTEXT
    USING &EKKO-EBELN&
    USING &EKPO-EBELP&
    CHANGING &VALUE&
    ENDPERFORM
    Item Text : &VALUE&
    REPORT  ZDISPLAYINGITEMTEXT.
    DATA : name type thead-tdname,
           p_ebeln TYPE ekko-ebeln,            "  Purchase order Number
           p_ebelp TYPE ekpo-ebelp.
    types :strin(450).
    data : p_valu type strin.
       data : p_valu1 type strin.
    data: lines type table of tline with header line.
       data: IT_LINE LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
    IT_TEXT1 LIKE STANDARD TABLE OF itcsy INITIAL SIZE 0 WITH HEADER LINE,
    W_LINE LIKE IT_LINE.
    Types : stri(450).
    data f_name type stri.
    FORM itemtext TABLES i_intab STRUCTURE itcsy
                           i_outab STRUCTURE itcsy.
    *BREAK-POINT.
        READ TABLE i_intab INDEX 1.
      MOVE i_intab-value TO p_ebeln.
      READ TABLE i_intab INDEX 2.
      MOVE i_intab-value TO  p_ebelp.
    *parameters: p_ebeln type ekko-ebeln,
               p_ebelp type ekpo-ebelp.
    concatenate p_ebeln p_ebelp into name.
    call function 'READ_TEXT'
         exporting
              id                      = 'F01'
              language                = sy-langu
              name                    = name
              object                  = 'EKPO'
         tables
              lines                   = lines
         exceptions
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              others                  = 8.
    loop at lines.  "   INTO w_line.
    BREAK-POINT.
    *move w_line to it_text1.
    *append it_text1.
    *write:/ it_line.
    *p_valu = f_name.
    *p_valu1 = w_line.
    concatenate p_valu lines-tdline into p_valu.
    *p_valu = f_name.
    endloop.
    message p_valu type 'I'.
    READ TABLE i_outab INDEX 1.
        MOVE p_valu TO i_outab-value.
        MODIFY i_outab INDEX sy-tabix.
    *loop at lines.
    write:/ f_name.
    *endloop.
    *READ TABLE i_outab INDEX 1.
       MOVE lines TO i_outab-value.
       MODIFY i_outab INDEX sy-tabix.
    endform.

  • Standard SmartForm for Purchase Order in ECC6.0?

    Hello SAPients!
    Does anybody knows if SAP has released a standard SmartForm in ECC 6.0 as an alternative to SAPScript MEDRUCK? Do you know the name?
    Thanks!

    Hi,
    Please refer OSS Note 843193:
    "The SAP Best Practices Preconfigured Smart Forms are available for
    ERP 2004 (ECC 5.0) only.
    It is not planned to deliver the preconfigured SmartForms as separate SAP Best Practices solution for other releases.
    If future releases, the prconfigured SmartForms will be delivered with the country-specific SAP Best Practices Baseline Packages.
    Please check http://service.sap.com/bestpractices for availability."
    Regards,
    Amey

  • Smartforms of purchase order in ecc 6.0

    Hi there,
    In a PO we have pricing condition(me23n).
    I need to print those pricing conditions as per each and every PO number.
    For this i have to check two things as per my reqirement,
    1- whether it is active or inactive
    2- the amount of that particular conditions should be grreater than zero
    How to check the tw at the same time??
    I do give good reward points and bottom line is that i need an answer desperately.

    Roshan ,
    The view what you have metioned is for schema maintenance . ( general )
    First you have asked for active condtion type.
    For each condition type-condition record catalog there will be a table generated based on the fields  selected in catalog . Check whether the PO you have, satisfies this condition record table entry.
    For each of this condition type , Price and scales will be maintained.
    I am sure there should be some FM / Class for this. This you can get it when you debug when we press ANALYSIS button in Pricing tab of PO.
    Basically it depends on the purpose-required.
    you can check the table KONV for Condition Pricing .with Number of the document condition ( KNUMV) as ref. field.
    Thx'
    Parthi
    Reward if useful.

  • Purchase order in SmartForms

    hi,
    I am getting an error in ABAP program for smartform of Purchase order
    In Purchase order screen (ME21N) for any field I Pressed F1 and from technical details I got the TABLE name and field name, but when I put in Smartform report it gives me the below error.....
    "MEPO1211 is not define in ABAP Dictionary as a table, projection view or database view".
    in SE16
    "MEPO1211 is a strucute, not a table".
    I wanna to know how to use structure in report instead of table.
    like we use MARA table as
    TABLES : MARA,
    I need to print some data from the MEPO1211,
    plz help me
    Thanx in advance

    Hi,
    Goto form interface double  click on it and you will
    find
    ZXEKKO     TYPE     EKKO
    in tables tab strip you will get these itabs
    L_XEKPO     LIKE     EKPO
    L_XEKPA     LIKE     EKPA
    L_XPEKPO     LIKE     PEKPO
    L_XEKET     LIKE     EKET
    L_XTKOMV     LIKE     KOMV
    L_XEKKN     LIKE     EKKN
    L_XEKEK     LIKE     EKEK
    L_XKOMK     LIKE     KOMK
    use these and dont use the fields which are used in ME21N or 22N  or 23N. this is being handled   by print program you are calling
    Regards
    Shiva

  • Purchase Order History in smartform

    Hi gr8 minds
    I have developed smartform for purchase order .
    now i wanna develop amendment purchse order .
    any idea how to go for it .
    thanks & regards
    siddharth

    Hi Siddharth,
    As Samir has suggested you have to get this information from CDHRD and CDPOS. In one of the posts yesterday, Andreas and Rob have nicely mentioned how to fetch data from Change Document.
    Updated record should come in txt file
    CALL FUNCTION 'CHANGEDOCUMENT_READ'
      EXPORTING
    *   ARCHIVE_HANDLE                   = 0
    *   CHANGENUMBER                     = ' '
    *   DATE_OF_CHANGE                   = '00000000'
        objectclass                      = '<b>EINKBELEG</b>'
        OBJECTID                         = EKKO-EBELN "PO Number
    *   TABLEKEY                         = ' '
    *   TABLENAME                        = ' '
    *   TIME_OF_CHANGE                   = '000000'
    *   USERNAME                         = ' '
    *   LOCAL_TIME                       = ' '
    *   TABLEKEY254                      = ' '
    *   KEYGUID                          = ' '
    *   DATE_UNTIL                       = '99991231'
    *   TIME_UNTIL                       = '235959'
      tables
        editpos                          =  editpos
    EXCEPTIONS
       NO_POSITION_FOUND                = 1
       WRONG_ACCESS_TO_ARCHIVE          = 2
       TIME_ZONE_CONVERSION_ERROR       = 3
       OTHERS                           = 4
    IF sy-subrc <> 0.
    ENDIF.
    Regards,
    Subramanian V.

  • Purchase order layout using Smartform

    Hi All,
    Can anyone let me know how to create Purchase order layout using smartforms and assigning it to output type.
    Is there standard smartform for purchase order?

    http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
    http://www.sap-basis-abap.com/sapsf001.htm
    http://help.sap.com/printdocu/core/Print46c/de/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    http://www.esnips.com/doc/13b7ae7a-b32c-4b96-b588-881859d4ac99/Template,Table,Loop,Command-in-Smartforms.doc
    http://www.esnips.com/doc/97acb00a-e513-4611-91f0-c626f460bfc5/Smart_Form_Overview.pdf
    http://www.esnips.com/doc/77a981b9-8fe3-4fbb-8101-67745c1fe60c/SMART-FORMS_shail.ppt
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-press.com/downloads/h955_preview.pdf
    http://www.ossincorp.com/Black_Box/Black_Box_2.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    Try this. A simple sample Smart Form.
    SAP Smartforms can be used for creating and maintaining forms for mass printing in SAP Systems. The output medium for Smartforms support printer, fax, e-mail, or the Internet (by using the generated XML output).
    According to SAP, you need neither have any programming knowledge nor use a Script language to adapt standard forms. However, basic ABAP programming skills are required only in special cases (for example, to call a function module you created or for complex and extensive conditions).
    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.
    SMARTFORMS GENERATION: (calling internal table fields)
    &#61656; Open a smartform using the tcode ‘smartforms’.
    &#61656; Usually form attributes shows admn data.
    &#61656; In the form interface declare import/export parameters if any. Else declare the tables in tables tab button.
    &#61656; In the windows and pages expand and create a table. It automatically generates header, main area and footer for the table.
    &#61656; In data tab button in the table we usually declare a work area to bring the data from se38. Like: ktab into wa. ( The purpose of declaring the wa is , to get the data of the ktab in to header from the body area of the internal table).
    &#61656; And in the tablepainter pushbutton in table we can have any no of line types. Depending on the requirement. ( for ex: If we want to devide a row in to 4 columns, we can devide it as 4,4,4,4cm as line type 1, And usually for the footer we don’t need no of columns, So, we declare it as one column with 16cm measure with the name line type 2.). We can use these line types in the tables.
    &#61656; In the header right click>>create>>tableline. It asks for line type. Select one line type which is appropriate.
    &#61656; Like same create a row2 in main area using right click. If we select the line type 1, it automatically generates 4 cells. We can create text in each cell as per requirement.
    &#61656; We can generate general attributes using general attributes tab button in the text. Or in the other way. We can switch on the field list on/off button from the application tool bar. It displays all the attributes in the left down corner of the screen. We can drag and drop the required fields in the general attributes tab button of the text.
    &#61656; We continue the same procedure for all the texts. The texts should be displayed in the gray color. Then only it can collects the data from the abap editor fields.
    &#61656; If it wont turns gray, we can check the fields in the editor by changing it to the line editor. The best thing is to drag the fields from the list, rather than declaring like &wa-matnr&
    &#61656; In the footer also we create a line type and in that table line we create text.
    SE38 PROGRAM(method I):
    REPORT Z_CALLING_SMARTFORM2 .
    tables: mara.
    select-options: S_MATNR for MARA-MATNR.
    DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
    data: FM_NAME TYPE RS38L_FNAM.
    SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in
    S_MATNR.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
    formname = 'Z_MYFIRST_FORM2'
    VARIANT = ' '
    DIRECT_CALL = ' '
    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 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
    ktab = ktab
    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.
    IN THE OTHER WAY(method II):
    REPORT Z_CALLING_SMARTFORM2 .
    tables: mara.
    select-options: S_MATNR for MARA-MATNR.
    DATA: kTAB LIKE MARA OCCURS 1 WITH HEADER LINE.
    SELECT * FROM MARA INTO TABLE kTAB WHERE MATNR in S_MATNR.
    CALL FUNCTION '/1BCDWB/SF00000199'
    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
    ktab = ktab
    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.
    In the method I we are calling the amartform dynamically using the function module 'SSF_FUNCTION_MODULE_NAME'.
    Here we are exporting form name and importing fm_name.
    So we need to declare the variable fm_name as
    data: FM_NAME TYPE RS38L_FNAM.
    We can have the type of the fm_name in the function module 'SSF_FUNCTION_MODULE_NAME' (in the export tab button).
    Since we are passin the name of the Function module generated by the smart form in to the fm_name variable. We run the function module with the name fm_name, but not the FM generated by the smartform(like /1BCDWB/SF00000199)¬¬¬¬¬¬.
    In the method II we directly call the smartform generated function module (i.e, /1BCDWB/SF00000199).
    But the method I is recommended. In the method I, The fm_name is a variable we don’t put it in the quotes while calling.
    In the both methods we declare the internal table using the like option, but not begin of…. end of. And in select statement we select *, But not individual fields.
    EX2:
    SMART FORM NAME: ZGITI_FORM1.
    SE38:
    REPORT Z_CALL_GIRI_FORM1 .
    TABLES: VBRK.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
    SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN.
    SELECTION-SCREEN END OF BLOCK B1.
    *INITIALIZATION.
    *T1 = 'SELECTION-CRIETERIA'.
    DATA: BEGIN OF I_INVOICE OCCURS 1.
    INCLUDE STRUCTURE ZSTR_INVOICE.
    DATA: END OF I_INVOICE.
    DATA: VAR1 LIKE VBRP-NETWR.
    DATA: BEGIN OF I_ADDRESS OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ADDRESS.
    DATA: END OF I_ADDRESS.
    DATA: BEGIN OF I_ORDER OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ORDER.
    DATA: END OF I_ORDER.
    DATA: BEGIN OF I_ITEM OCCURS 1.
    INCLUDE STRUCTURE ZSTR_ITEM.
    DATA: END OF I_ITEM.
    DATA: BEGIN OF I_VBFA OCCURS 1,
    VBELV LIKE VBFA-VBELV,
    VBELN LIKE VBFA-VBELN,
    END OF I_VBFA.
    SELECT KUNAG VBELN VKORG VTWEG SPART FROM VBRK INTO TABLE I_INVOICE
    WHERE VBELN IN S_VBELN.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT KUNNR LAND1 NAME1 NAME2 ORT01 PSTLZ REGIO FROM
    KNA1 INTO CORRESPONDING FIELDS OF TABLE I_ADDRESS FOR ALL ENTRIES IN
    I_INVOICE WHERE KUNNR = I_INVOICE-KUNAG.
    ENDIF.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT VBELV VBELN FROM VBFA INTO TABLE I_VBFA FOR ALL ENTRIES IN
    I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
    ENDIF.
    IF I_VBFA[] IS NOT INITIAL.
    SELECT VBELN BSTNK FROM VBAK INTO CORRESPONDING FIELDS OF TABLE I_ORDER
    FOR ALL ENTRIES IN I_VBFA WHERE VBELN = I_VBFA-VBELV.
    ENDIF.
    IF I_INVOICE[] IS NOT INITIAL.
    SELECT POSNR MATNR ARKTX FKIMG NETWR FROM VBRP INTO TABLE I_ITEM FOR ALL
    ENTRIES IN I_INVOICE WHERE VBELN = I_INVOICE-VBELN.
    ENDIF.
    LOOP AT I_ITEM.
    AT LAST.
    SUM.
    VAR1 = I_ITEM-NETWR.
    ENDAT.
    ENDLOOP.
    CALL FUNCTION '/1BCDWB/SF00000223'
    EXPORTING
    ARCHIVE_INDEX =
    ARCHIVE_INDEX_TAB =
    ARCHIVE_PARAMETERS =
    CONTROL_PARAMETERS =
    MAIL_APPL_OBJ =
    MAIL_RECIPIENT =
    MAIL_SENDER =
    OUTPUT_OPTIONS =
    USER_SETTINGS = 'X'
    var = VAR1
    IMPORTING
    DOCUMENT_OUTPUT_INFO =
    JOB_OUTPUT_INFO =
    JOB_OUTPUT_OPTIONS =
    tables
    i_vbrk = I_INVOICE
    i_vbak = I_ORDER
    i_vbrp = I_ITEM
    i_kna1 = I_ADDRESS
    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.

  • Smartforms on Purschase Order and Purchasing Contracts in SRM system

    Hi Friends,
        Can anyone provide sample example of smartforms on Purchase Order and Purchsing Contracts in SRM system?
    It is great, if you send me valuable material to create smartforms on PO and Purchase Contracts in SRM system.
    Thanks in Adv.
    BABA

    Hello BABA,
    Try this link. Hope this helps.
    [Re: Creating SRM PO with Smartforms BBP_PO;
    Please discuss this issues in SRM- General forum for better replies.
    Cheers,
    Suvendu

  • Table Header not shown in Purchase Order Smartform

    I have downloaded an installed an SAP SmartForm for Purchase Order (/SMB40/MMPO_DE). Unfortunatelly the document with this form cutting the right side of the document by printing. The width of the tables is 19,5 cm, it should be 19,00 or less. Anyhow, I have started to reduce the width of all windows and included tables and of course the table cells. This works fine with all tables, also with a dynamic content, but if I reduce the static header table t_header(window winheader, cell hd_netwr) for 0,5 cm this doesn't appear on printform. I have tried then to restore everything like it was - no effect.
    What could it be ?
    Kind Regards

    I have found the solution and have localized the problem or vise versa.
    The table had the hight 0,99 LN and the window hight was 0,5 cm. It seems to me that this 2 parameters had a size-conflict. When I have changed the line hight to 0,5 cm it starts work.
    Why it was done on this matter and why the error was not shown during compiling the form and how it did work before I have touched the window - this questions could be addressed to SAP.
    Kind Regards
    Alexey Voynikov

Maybe you are looking for