Smart form for different header level data

Hi,
I need to design a smart form,in th samart form i have 2 header records and for each header reocrd again 10 item records.
My form shd print with fst header record  and its item records and after ending fst header record details it shd give 2nd header record and its item records.
For example I have Header records A and B
A have 1 2 3 4   5 item records and
B have 7 8 9 10 11 item records
My form shd be
A----
1
2
3
4
5
b----
7
8
9
10
11
Any inputs please
Regards
Rasheed
Edited by: Rasheed salman on Mar 19, 2009 5:33 PM

You can use the SORT to have different header.
You must be having some indicator in your ITEM table to distinguish different set of data.
In the TABLE node, Under the DATA tab, give your field in the Sort Criteria.
Select the check box Event on Sort Begin.
This will create a new node under the HEADER and MAIN area of your table. In this Node, you can put your Header to have it different for different set of records.
Like:
MAIN window
.. TABLE with sort of field1
.... HEADER
.... FIELD1 sort begin "use this for Header
.... MAIN
Regards,
Naimesh Patel

Similar Messages

  • How to use Read_text in Smart Forms for printing Header Texts

    Dear ALL,
    I want to print Header Texts in SmartForms, For that
    I am using T/Code VL02N .. and choosed  Header ..
    got this details...  from Text Header.
    Text Name       :0080000441
    Language         :EN
    Text ID             :Z002
    Text Object       :VBBK.
    So in Smart forms Under Template i have created a text and Program Code .
    Inside that I have used this below code .
    CALL FUNCTION 'READ_TEXT'
    EXPORTING
    *CLIENT= SY-MANDT
    ID = 'Z002'
    LANGUAGE =  SY-LANGU
    NAME = NAME
    OBJECT = 'VBBK'
    TABLES
    LINES = IT_TLINE
    EXCEPTIONS
    ID = 1
    LANGUAGE = 2
    NAME = 3
    NOT_FOUND = 4
    OBJECT = 5
    REFERENCE_CHECK = 6
    WRONG_ACCESS_TO_ARCHIVE = 7
    OTHERS = 8.
    IF SY-SUBRC 0.
    CLEAR IT_TLINE.
    ENDIF.
    Kindly suggest me, Where  to declare the variables and loops for using this Read_Text Syntax in Smartforms .
    Response to this will be highly appreciated........  
    Regards ,
    Vinoth.

    hi
    good
    please check this code
    CONSTANTS:
    *For text reading like in LCNMMFTX / FORM SET_CONTROL_TEXT
               text_id  like thead-tdid     value 'MATK',
               text_obj like thead-tdobject value 'AUFK  '.
    data tlines like tline occurs 0 with header line.
    data tdname like thead-tdname.
    data tdheader like thead.
    if not it_proj-ltxsp is initial.
    refresh tlines.
            tdname = sy-mandt.
            tdname+3 = it_proj-rsnum.
            tdname+13 = it_proj-rspos.
            tdname+17 = it_proj-rsart.
            call function 'READ_TEXT'
                 exporting
                    id        = text_id
                    language  = it_proj-ltxsp
                    name      = tdname
                    object    = text_obj
                 importing
                    header    = tdheader
                 tables
                    lines     = tlines.
                exceptions
                   not_found = 01.
    thanks
    mrutyun^

  • BADI for sales order header level data

    Is there any BADI which will give me the sales order header level data? I need net price of the sales order in header level. KOMK structure does not contains the net price value.

    My requirement is:
    I am writing a pricing routine for calculating ZSMR condition value in sales order header level. The formula for calculating is (NET PRICE / NET SALES COST) / NET PRICE.
    I can't use VBAK  because I have not saved the sales order yet. I need to use some structure.
    Which structure contains the net price of the sales order in header level. KOMK structure does not contains the net price value.
    Edited by: dossgs on May 21, 2010 4:08 PM

  • How to Generate a complex smart form for the Sales Order different pages h

    How to Generate a complex smart form for the Sales Order different pages has different page Layouts  explain me?

    in print program in interface when calling the form there should be some option to tell it to make a NEW spool everytime.
    I have it in mind for sap-script it is ITCPO-TDNEWID. Dont have it in mind for SAMRTFORMS but still it should work somehow similar.

  • 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

  • New Smart form for Tax calculation

    Dear Consultants,
    I am new for ABAP module, I want to create one smart form, for tax calculation. As per the attachment Most of the fields are standard, only the value I want to pick from Different Infotypes and RT table. please suggest how to create smart form.
    Thanks & Regards,
    Naresh

    Hi,
    create a executable program, pass the all values to Internal table.
    create the structure as same as internal table.(eg: ztable).
    create table type for this structure(eg: ytable)
    T-code: Smartforms.
    click the Form Interface tab, click table . click table
    in that declare the  variable (itab like ytable).
    click the form Painter,
    desgin the output structure.
    Select "Fieldlist on/FF''.
    drag and drop the fields
    Right  click on the main window create a Window -> right click on create window -> click table.ble
    add vertical lines to the table.
    Right click on the mainwindow->flowlogic->loop. enter the itab name.
    activate the smartforms. execute.
    copy the generated number.
    goto to abap editor program.
    Delcare:
    DATA : FM_NAME TYPE RS38L_FNAM.
    CONSTANTS C_FORMNAME TYPE TDSFNAME VALUE 'ZSMARTFORM4'. (smartforms name)
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
                     EXPORTING
                       formname                 = c_formname
    *                 VARIANT                  = ' '
    *                 DIRECT_CALL              = ' '
                    IMPORTING
                      FM_NAME                  = fm_name
    *               EXCEPTIONS
    goto to pattern paste the number and execute.
    comment the number and add fm_name.
    execute.
    Regards,
    Venkat.

  • How to user Smart form for the BID in SRM 4.0

    Hello,
    We have SRM 4.0 and we need to send the BID information to the vendor. This is because we have vendors that are not able to get in to our system and we have to send them a print out of the bid information so that they give us back the information. Then our users will insert it in the system.
    It could be as an attach to the email or it could be printable in the program SPPS - Selecting and Processing Outputs.
    SAP says that there is a smart form BBP_BIDINV_BID and BBP_BID_NOTIFICATION but I am not managing to make them work.
    I found some messages to help solving specific problems so I assume it is possible to do this...
    Is there someone that can help me?
    Thanks very much.
    My best regards,
    Catarina Campos

    Hi
    <u><b>Here is the standard solution to use your own forms:-></b></u>
    <u>- copy the smartform BBP_BIDINV_BID to ZBBP_BIDINV_BID (transaction SMARTFORMS) and apply your changes
    - use BADI to call your custom form ZBBP_BIDINV_BID</u>
    <b>For PDF output form change use BADI BBP_OUTPUT_CHANGE_SF.</b>
    <b>For email notification change use BADI BBP_CHANGE_SF_BID instead.</b>
    <u>You will find all relevant documentation in SPRO --> Supplier Relationship Management --></u>
    SRM Server --> Business Add-Ins (BAdIs) --> Document Output -->
    - Change Forms for Document Output
    - Change Smart Form for E-Mails Relating to Bids
    <u><b>Please go through the links below for more details -></b></u>
    Re: how to use cutom smartform instead standard?
    Re: Email message customization ?
    Re: Bid Invitation Email Subject
    Re: Email notification to bidder should reflect start/end date and time
    Re: RFQ Smartform in SRM
    Re: Standard Text
    Do let me know.
    Regards
    - Atul

  • SMART FORM FOR PURCHASE ORDER

    Hii Experts,
    I am developing a smart form for purchase order. I am customizing the existing PO smart form according to the clients requirements. The customer needs fields Discount percentage, Excise duty and VAT/CST%... all these fields when i explored in transaction me23n come from a structure so the values come only at run time.. can anyone tell me the exact table and fields from where these comes so that i can retrieve it from there and display it in my smart form. The fields i need are discount percentage, excise duty and VAT/CST%. its urgent.

    REPORT  ZMR_PURCHASE_ORDER.
    types: BEGIN OF ty_lfa1,
              LIFNR TYPE lfa1-LIFNR,
              MCOD1 TYPE lfa1-MCOD1,
              STRAS TYPE lfa1-STRAS,
              MCOD3 TYPE lfa1-mcod3,
          END OF ty_lfa1.
    TYPES: BEGIN OF ty_ekpo,
              ebeln TYPE ekpo-ebeln,
              ebelp TYPE ekpo-ebelp,
              txz01 TYPE ekpo-txz01,
              menge TYPE ekpo-menge,
              peinh TYPE ekpo-peinh,
              brtwr TYPE ekpo-brtwr,
          END OF ty_ekpo.
    TYPES: BEGIN OF ty_ekko,
            ebeln TYPE ekko-ebeln, "purchase doc
            LIFNR TYPE ekko-LIFNR, "vendor
            MCOD1 TYPE lfa1-MCOD1, "vendor name
            STRAS TYPE lfa1-STRAS, "vendor add
            MCOD3 TYPE lfa1-MCOD3, "vendor city
            bedat TYPE ekko-bedat, "doc date
            unsez TYPE ekko-unsez, "contact person
            verkf TYPE ekko-verkf, "attn
            telf1 TYPE ekko-telf1, "tele
            ihrez TYPE ekko-ihrez, "ref
            KNUMV TYPE ekko-KNUMV, "doc condition
           ebelp TYPE ekpo-ebelp, "item
           txz01 TYPE ekpo-txz01, "message desc
           menge TYPE ekpo-menge, "qty
           peinh TYPE ekpo-peinh, "rate
           brtwr TYPE ekpo-brtwr, "gross
        END OF ty_ekko.
    TYPES: BEGIN OF ty_t685t,
            kschl TYPE t685t-KSCHL,
            vtext TYPE t685t-vtext,
          END OF ty_t685t.
    TYPES: BEGIN OF ty_line_item,
            KNUMV TYPE konv-KNUMV, "condition number
            STUNR TYPE konv-STUNR, "step
            kposn TYPE konv-kposn, "item
            KSCHL TYPE konv-KSCHL, "condition type
            vtext TYPE t685t-vtext, "condition name
            KAWRT TYPE konv-KAWRT,  "base amt
            KRECH TYPE konv-KSCHL,  "calculation type
            qty(13) TYPE n,         "qty
            kbetr TYPE konv-kbetr, "condition rate
            kwert TYPE konv-kwert, "condition value
        END OF ty_line_item.
    data: wa_ekko TYPE zms_ekko,
          wa_item TYPE zms_konv,
          wa_lfa1 TYPE ty_lfa1,
          wa_t685t TYPE ty_t685t,
          wa_ekpo TYPE ty_ekpo.
    data: it_ekko TYPE TABLE OF zms_ekko,
          it_item TYPE TABLE OF zms_konv,
          it_lfa1 type TABLE OF ty_lfa1,
          it_t685t TYPE TABLE OF ty_t685t,
          it_ekpo TYPE TABLE OF ty_ekpo.
    SELECTION-SCREEN : BEGIN OF BLOCK ss_block WITH FRAME TITLE text-001.
       PARAMETERS: pa_ver(2) TYPE c DEFAULT '0'.
        SELECT-OPTIONS: pa_pord FOR wa_ekko-ebeln,
                        pa_date for wa_ekko-bedat.
    SELECTION-SCREEN : END OF BLOCK ss_block.
    SELECT EBELN LIFNR bedat unsez verkf telf1 ihrez knumv from ekko
        into CORRESPONDING FIELDS OF TABLE it_ekko.
      if pa_pord is not INITIAL.
        DELETE it_ekko WHERE ebeln not in pa_pord.
      endif.
      if pa_date is not INITIAL.
        DELETE it_ekko WHERE bedat not IN pa_date.
      endif.
    if it_ekko is not INITIAL.
      SELECT lifnr MCOD1 STRAS MCOD3 from lfa1
        INTO CORRESPONDING FIELDS OF TABLE it_lfa1
        FOR ALL ENTRIES IN it_ekko
        WHERE LIFNR = it_ekko-LIFNR.
      SELECT ebeln ebelp txz01 menge peinh brtwr from ekpo
        INTO CORRESPONDING FIELDS OF TABLE it_ekpo
        FOR ALL ENTRIES IN it_ekko
        WHERE EBELN = it_ekko-ebeln.
      loop at it_ekko into wa_ekko.
        READ TABLE it_lfa1 into wa_lfa1 WITH KEY lifnr = wa_ekko-LIFNR.
        wa_ekko-MCOD1 = wa_lfa1-MCOD1.
        wa_ekko-stras = wa_lfa1-stras.
        wa_ekko-MCOD3 = wa_lfa1-MCOD3.
        MODIFY it_ekko FROM wa_ekko TRANSPORTING MCOD1 STRAS MCOD3 WHERE ebeln = wa_ekko-ebeln.
      ENDLOOP.
      SELECT KNUMV STUNR KPOSN KSCHL KRECH kbetr kwert KAWRT from konv
        into CORRESPONDING FIELDS OF TABLE it_item
        FOR ALL ENTRIES IN it_ekko
        WHERE KNUMV = it_ekko-KNUMV.
      SELECT kschl vtext from t685t
        INTO CORRESPONDING FIELDS OF TABLE it_t685t
        FOR ALL ENTRIES IN it_item
        WHERE spras = 'EN' and KSCHL = it_item-KSCHL.
      LOOP AT  it_item into wa_item.
        READ TABLE it_t685t into wa_t685t with key KSCHL = wa_item-KSCHL.
        wa_item-vtext = wa_t685t-vtext.
        if wa_item-kschl = 'ZBP1'.
          wa_item-qty = wa_item-KAWRT / wa_item-kbetr.
        endif.
        if wa_item-KRECH = 'A'.
         wa_item-kbetr = wa_item-kbetr / 10.
        endif.
        if wa_item-kschl = 'NAVS'.
          wa_item-vtext = 'Sales Tax'.
        endif.
        MODIFY it_item from wa_item TRANSPORTING vtext kbetr kschl qty
          WHERE stunr = wa_item-STUNR and
                kposn = wa_item-kposn.
      ENDLOOP.
      DELETE it_item WHERE kposn = '000000'.
      DELETE it_item WHERE kschl <> 'ZBP1' and kschl <> 'ZD01' and kschl <> 'ZE01'
          and kschl <> 'NAVS' and kschl <> 'ZSRV'.
      sort it_item by kposn STUNR.
    CALL FUNCTION '/1BCDWB/SF00000025'
      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
          it_ekko                    = it_ekko
          it_item                    = it_item
      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.
    endif.

  • PO Form Issue with Header Level Changes

    Issue:
    It has been observed that whenever changes are done in PO Header (e.g. Header Text), system prints Billing Address and Communications Details as blank. If the changes are made to Line Item level along with header then system prints the Billing address and Communication Details correctly.
    Analyse:
    we are using the SELECT statement below to fetch the field for
    Billing Address and Communications Details.
    SELECT SINGLE
    mandt z_plant z_company_code z_toll_free_no z_local_no z_fax_no
    z_email z_name1 z_name2 z_street z_house_no z_district z_post_code
    z_city z_country z_vat_no z_loc_term_cond z_langu
      FROM zptp_poformdata
      INTO w_poformdata
      WHERE z_plant = ls_ekpo-werks
    AND   z_company_code = ls_ekpo-bukrs .  
    And when we only change the header level  data no value is passing for comany code and plant . as a result Select statement gets failed and we are getting blank window.
    NOTE: we are getting blank box only when we fire a print or fax.The preview is coming fine.

    by asking so many questions in a single post,you are violating the rule of engagement given below
    Only One Question Per Posting
    For each question that you have, make a separate posting. Don't ask multiple questions in one posting, this is confusing for people and might not get answered, since the subject line does not reflect all your problems. If a new and unrelated question comes up during a thread, start a new thread.

  • Smart form for cutting list---Urgent

    Hi Experts,
    I have to create a smart form for cutting list in PP module.
    Selection criteria are:
    1.) select all orders(AFKO-AUFNR) wiht AFVU-USR00 = 'CUT' where AFVU-AUFPL = AFKO-AUFPL
    2.) Group according to material no.(AFKO-PLNBEZ)
    Form fields are as follows:
    Name : MARC-MATGR
    Cut & Process date: AFVV-FSAVD where AFVV-AUFPL=AFKO0AUFPL
    Ref Packing date:   AFVU-USR00= ASSY_GAL of th superior order(AFKO-MAUFNR,where AFVU-                             AUFPL   = AFKO-AUFPL)
    Order :  AFKO-AUFNR
    Sales Order: AFPO-KDAUF of superior order(AFKO-MAUFNR,where AFVU-AUFPL   = AFKO-AUFPL)
    Item Number :
    Qty: AFVV-MGVRG where AFVU-USR00='CUT' & AFVU--AUFPL = AFKO-AUFPL
    & co many other fields form AFKO table.
    I am bit confused what will be the fields & tabels i have to declare in Form interface & Global parameters.
    What will be the internal table for the table which display data.
    In the main page i have to show 10 colums i dont no how to define table for those 10 columns
    As per the requirement can anywone please tell me in detail to solve these problems. like which r te tables i have to use in interface parameters & which wil be in global paramenters.
    Which itab i will use to create the table in main window
    & how i can declare 10 columns in that table.
    Regards,
    Nik

    hi nikil.
            I use to follow this procedure.
    1) Based on the select criteria.fetch values in to differnet itab's from differnet tables.
    2) then try to put the selected rows based on condition into a single internal table.
    3)u can send that final internal table from program and u have to use that internal table in form interrface.
    4)design the smartforms and call the fields accordingly from the final inetrnal table .
    5)u should be good in using select query ,read table statement etc.
    check this with other and take a decision.some of them use to write codes then and there before using the fields using progarm lines.
    but i am comfortable in my method.
    mani

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

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

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

  • What is Header level data and item level data? Please elaborate.

    What is Header level data and item level data? Please elaborate.
    Details:
    EKKO is Purchasing Document Header; what is purchasing Document Header? who,what and where can i look for this data.
    EKPO is Purchasing Document Item; what is Purchasing document item means?
    what is item level data means?
    When you take the Senario of SRM and ECC; where the purchase data is maintained primarily in SRM or ECC?
    Thanks in advance. I will assign the points only to the valuable information.
    York.

    Hi York,
       You are right in stating EKKO as header and EKPO as line item data. They are maintained in ECC.
    Now for the details about the data:
    In SAP every transaction is referred to as a document. In this case you are talking about a purchase document. Now what does purchaing document contain? I will contain information like: Who is the vendor? When was the transaction done? what was bought? What is the quantity of each item bought?
      Whatever is applicable across the document is called header data... and what is applicable for each item is called line item data. In this case
    1. Header data would be the vendor, date of transaction, purchaing organization ... etc.
    2. Line item data would be the item details, the quantity of the item, the unit price of each item ...etc.
    Hope this helps.
    Best regards,
    Kazmi

  • Header Level Data In Sales Doc

    Hi Gurus'
    I know that header level data is applicable to all the items in the sales document. But is this always the case? Is there a case where header level data is not applicable to all items in the sales order?
    i want to know so i can test it on the system.
    thanks

    Amit,
    Header level information may not be same as item level information. Few examples:
    1. Business data (Incoterms, Payment terms)
    Based on your configuration, in VOV7, item category, if you activate business item. Then you can have different incoterms etc. at header level and item level in a sales order.
    2. Partners
    As mentioned by JM, if you set up partner determination, assigned to sales document type and item category, both having SH partner function; then in the sales order, you can have different SH at header and different SH at item levels.
    3. Division
    Based on configuration, VOV8, sales document type, field item division if you activate this, then the division at header and item can be different.
    In the sales order, header division will come from the division given in the initial screen VA01
    and in the item, the division will populate from the material master 's division.
    TW

  • Header level data

    Hi SAP Prof,
    1.what are the possible questions in Header level data, Item Level data and  scheduline data.

    Dear Rajesh Johnston,
    I would request you to spend some time with ths link. It will help you to get the overview of SAP SD module. http://sap-img.com/sap-sd.htm
    If you go to the search on SDN forum you will find lot of help on the similar data.
    Hope this helps you.
    Do award points if you found them useful.
    Regards,
    Rakesh
    P.S. you can send me a mail at my mail id [email protected] for any specific details

  • Smart form for PR

    Hi,
    My users wants Print of PR...Though i told them that PR is an internal document and SAP doesn't provide and smart forms for PR..But they are not getting convinced and they arre requesting smart form for PR...
    Is there and user EXIT or BADI for this...
    Pl let me know..
    Utsav

    Hi Utsav ... most probably you need to go for a z-report development with your ABAPer, still try the following solution, if it works ...
    Click print button in the view of PR (t-code: me53n). Your PR must be arranged in spool list. Use T-code SP01,and enter the Date created,Created By and you will find your pr in the list according to the exact time you click the print button, choose it. Then click print. Make sure your printer is working well.

Maybe you are looking for