Header and Item table - Form Design Question

Hi All,
I have a header table and Item table. For every record in the header table I have multiple records in the item table. I want to have a adobe form in the following way
1. A new page starts for every record in the header table and Items in the item table for this header record can span multiple pages with the same header information.
2. When all the items are displayed for that particular header record, a new page should start for the next header record.
I created one internal table in the following way
Header_field1 Header_field2 Item_table(with all the items for this header record)
Header_field1 Header_field2 Item_table(with all the items for this header record)
I am not sure how to use a table for this scenario (Should It be a nested table?).
Please provide me some ideas.
Thanks,
Ganesh.

Hi Balasubramani,
I made some changes and have the following now. Can you please let me know how I can achieve page break for every BP_NUMBER.
I have a nested table like the one below.
Main table u2013 Has header and Items information. Every header record has some header information like BP number, name and all line items for that BP in a nested table .
IT_HEADER:
BP_NUMBER     BP_NAME           IT_ITEMS(Items table)
BP_NUMBER     BP_NAME           IT_ITEMS
BP_NUMBER     BP_NAME           IT_ITEMS
To display this information I created the following
Subform1 u2013 overflow u2013bound to $record.IT_HEADER.DATA[*] u2013 (Repeat sub form for
|                                             each data item)
|->Header sub form u2013 Positioned
|     |
|     |-> Text Field u2013 bound to BP_NUMBER
|
|
|->Item sub form -
     |     
     |->Item Table u2013 bound to IT_ITEMS
          |
          |->Data u2013 bound to IT_ITEMS.DATA[*] u2013(Repeat row for each data item)
In the output BP number in the first record of IT_HEADER gets displayed and then all the Item records in IT_ITEMS for that BP get displayed. This is repeated all the records in IT_HEADER which is perfectly fine.
Please provide me some suggestions to solve the following issues I am having
1.     I need a page break between records of IT_HEADER. I want the new subform1 for the next header record to start in a new page. I tried conditional break option, on the only field BP number in header sub form. I have two master pages and two body pages. All the above information is in master page 2 and body page 2.  I am also not sure what to select in the TO section of the conditional break screen.
2.     When there is an overflow in IT_ITEMS I need the Header sub form to be shown in the next page too.
Thanks,
Ganesh.

Similar Messages

  • Opportunity Header and Item tables

    I am looking at the keys on the Opportunity Header and Item table which are GUIDs.
    I have the following scenario.
    1. My source table contains the Opportunity Header GUID
    2. My target table requires all the fields from the source table and some Opportunity Header and Item attributes
    I can write WHERE clause logic for my Opportunity Header attributes
    For my Opportunity item attributes I was going to introduce a count - this is not possible with Item GUID unless a part of the GUID is incremental for each line by 1 or there is a maintained field otherwise as part of the Opportunity Item which is a number representation for each line.
    Can someone advise
    Thanks

    Hi,
    In the CRMD_ORDERADM_H table you have the Opportunity GUID as well as the Object ID which is the opportunity id.  In the CRMD_ORDERADM_I table, you have the GUID and also the NUMBER_INT which is the item number.  See if you can use the item number.
    Thanks.

  • Difference between  header and item table

    hi experts
    I have doubt in choosing header and item table. what is the difference between them. on what situations they can be choosed, how can i conclude that my object needs only item or header table.
    thanks in advance.
    maaya

    Hi
    Header will be always a single time data in a transaction
    where as Item data is Multiple lines of data
    Item data in most of the times consists of more number of lines.
    see the header and Item related tables for some Tcodes
    Tcode      Header   Item
    VA01       VBAK    VBAP  Sales order
    VL01N     LIKP       LIPS    Delivery
    VF01       VBRk      VBRP   Invoice/Billing Doc
    ME21N    EKKO     EKPO   Pur order
    Regards
    Anji

  • How can i join the header and item table to fetch the data

    hi experts,
                   i have a doubt in using inner join or for all entries, for fetching the data from the item table mseg, by taking the doc.no from mkpf. Plz sort out the difference, what happens, if i use the both statements for fetching data

    Hi,
    Both has same functionality.
    but if u are using FAE, u ahev to check for the
    ~intial condition of the source table,
    ~ duplicate entries, if any
    Inner join will fetch the data from all the join tables at once. FAE will fetch the date from a table first then use that data to fetch data from subsequent table.
    say in ur case, if u r using FAE,
    1.select from mkpf.
    2.select from mseg fae in I_MKPF.
    first try using JOIN. if it is taking lots of time, then try FAE.
    regards,
    madhu

  • Header and item details

    Hi all,
          How to link Header and Item details
                                                    Ranjith

    Hi,
    The Line item table always have the header tables key as one of the key field. so u can use it.
    for eg : VBAK-vbeln and VBAP-vbeln
    Vbeln is the link between sales header and item table.
    Hope this helps.

  • Display constant values in header and items from table in ALV

    Hello all,
    I have to dispaly the header and Item entires in the output . and the point is header values are all constant and they are not related to item data .  item data is to dispalyed from VBAP table .
    so how can i achive this .. can i use this FM REUSE_ALV_HIERSEQ_LIST_DISPLAY ...
    example of outpput..
    Header inforamtions..
    name             city                  areacode              areazone            postzip
    abcde            xyz                   1244                    abc                      123456
    and the item details should be right below the header details
    Cnt     Vbeln            vkorg                vtweg               matnr       etc           etc
    1         xxx               xx                         xx                 xxxx         xxx          xxxx
    2        xxx               xx                         xx                 xxxx         xxx          xxxx
    3       xxx               xx                         xx                 xxxx         xxx          xxxx
    4      xxx               xx                         xx                 xxxx         xxx          xxxx
    5    xxx               xx                         xx                 xxxx         xxx          xxxx
    6   xxx               xx                         xx                 xxxx         xxx          xxxx
    I am able to dispaly the line items with the FM 'REUSE_ALV_GRID_DISPLAY' plz advice  the best solution to achive this
    thanks
    Raj
    Edited by: abaprthree on Oct 28, 2009 12:30 PM

    Hi,
    For this you will need to define header for the ALV. Here is a simple example how to do this:
    First you need to write one Header form like following:
    FORM f004_header  USING it_head TYPE slis_t_listheader..
      DATA : wa_line TYPE slis_listheader.
      CLEAR wa_line.
      wa_line-typ = 'H'. " H = Header, S = Selection, A = Action
      wa_line-info = 'List of Sales Orders'.
      APPEND wa_line TO it_head.
    " Here type out all the required data one by one in work are and append it to internal table
    ENDFORM.                    "f004_header
    before calling REUSE_ALV_GRID_DISPLAY you need to call following
    TO HEADER EVENT
    FORM f006_top.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary = it_header.
    ENDFORM.                                                   
    and for REUSE_ALV_GRID_DISPLAY call as following
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-repid
          i_callback_top_of_page   = 'F006_TOP'
          it_fieldcat              = t_fieldcatalog[]
        TABLES
          t_outtab                 = it_data.
    Let me know if any other help is needed.

  • How can i create Header and items in SMART FORM

    Hi Experts,
    How can i create Header and items in SMART FORM in the below driver program.
    _Header fields_
    SELECT BUKRS BUDAT GJAHR CPUDT USNAM BLART BELNR XBLNR BLDAT WAERS KURSF
      FROM BKPF INTO CORRESPONDING FIELDS OF TABLE IT_HEAD WHERE BELNR IN S_BELNR AND BUDAT IN S_BUDAT AND GJAHR EQ S_GJAHR AND BUKRS EQ S_BUKRS AND CPUDT IN S_CPUDT AND USNAM IN S_USNAM.
    Item firlds
    SELECT BUZEI BSCHL SGTXT SHKZG KOSTL PRCTR WERKS WRBTR HKONT KUNNR ZFBDT FROM BSEG INTO CORRESPONDING FIELDS OF TABLE IT_ITEM
      FOR ALL ENTRIES IN  IT_HEAD WHERE BELNR = IT_HEAD-BELNR AND GJAHR = IT_HEAD-GJAHR AND BUKRS = IT_HEAD-BUKRS.
      LOOP AT IT_HEAD.
    MOVE-CORRESPONDING IT_HEAD TO FINAL.
        LOOP AT IT_ITEM
        WHERE BELNR = IT_HEAD-BELNR.
          MOVE-CORRESPONDING IT_ITEM TO FINAL.
    ENDLOOP.
    ENDLOOP.
    Regards,
    Sreedhar.

    for these internal tables you can pass some Identifier  for both tables.
    in header file : IT_HEAD
    IDENT   type  char10,
    BUKRS type BUKRS,
    BUDAT type BUDAT,  like
    in header file :IT_ITEM
    IDENT   type  char10,
    BUZEI type BUZEI,
    BSCHL type BSCHL,  like  in item data
    you need to fille the  IDENT value like
    IT_HEAD:
    10 -- DE01-- 10.20.2009
    20 -- CH01-- 10.20.2009
    IT_ITEM
    10 -- 1234-- KSCHL value  like all records
    10 -- 2345-- KSCHL value  like all records
    10 -- 6783-- KSCHL value  like all records
    20 -- 3452-- 1KSCHL value  like all records
    20 -- 4532-- KSCHL value  like all records
    20 -- 4535-- KSCHL value  like all records
    in smartform you need to create 2 tables.
    or create
    LOOP  with IT_HEAD
    table with IT_HEAD
    table with IT_ITEM
    and put the condition for each table in  DATA tab where condtion  like IDENT = IT_HEAD-IDENT
    in item table also INDENT = IT_ITEM-INDENT..

  • Free form partner function field in Sales document header and item..

    Hello Experts,
    Is there anyway we can use the partner functions functionality in Sales document header and item level, so that we can enter a free form number in the Partner field? I mean is it possible to be able to enter a free form number WITHOUT getting validated against corresponding master data like Customer or Vendor master, Contact person, Personnel or User master records?

    Hi,
    It is not possible.
    Because partner function will be determined in the sales document header and item as per the configuration you have done in the partner determination.
    It is not possible to enter a number wihich is not created and assigned.
    Regards,
    Mullairaja

  • What table stores delivery header and item texts?

    Hi Gurus,
    Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    Can you please tell me which table store the texts?
    Best regards,
    Pavan

    >
    Pavan1 wrote:
    > Hi Gurus,
    >
    > Which table stores header and item text of delivery? We use VBBP text object and provide test id, language to read the texts using function module 'READ_TEXT'.
    >
    > Can you please tell me which table store the texts?
    >
    > Best regards,
    > Pavan
    This stores in text objects so you need to pass
    Here is simple thing to find what to pass to the read_text function module.
    Go to delivery - If you want to find header text - GOTO (on application menu) - Header -texts - Double click on the text where you enter text - GOTO (on application menu) - Header - This will give you a popup kind of screen where you can find the
    text name (if it is header - only delivery number and if it is item - deliverynumber + item number ) , lang, Text id, Text object
    This will give you the required parameters... .

  • Tables for Purchase Requistion Header and Item Texts

    Hi,
    In which Tables does Purchase Requistion Header and Item Texts will be stored.
    Thanks in advance

    Not sure , you can try with T166K , T166P

  • Loop through header and item internal table

    Hi,
        My scenario will be like this, i have two internal tables which is populated based on certain conditions, now i have to call one bapi to update values that am going to store values in a tree structure say for eg mat01 is header and mat02 and mat03 are item values.
          What is the efficient method to call that bapi one time for header creation and consequte times for item creation respectively.
      shall i have to loop thro two internal tables i.e header and item?
    suggestions are welcomed from the experts...
    Thanks in advance...
    Regards,
    Babu

    Hi Babu
    you can do something like that.
    loop it_header.
    *Call bapi to create header
      loop it_item where field_key = it_header-field_key.
    *  Call bapi to create item  
      endloop.
    endloop.
    The important part is the where sentence in the second loop.
    Regards
          David N.

  • Header and Item data in a module pool

    Hi Friends,
    I designed a screen in that i have header data and item data.
    Here in my screen header i have vendor number,Vendor name,
    bank Name, Branch, LC value and Due date fields.
    and for item details i have to take table control.In the item details i have the fields Sl No, PO Number and Po Value.
    and Two push buttons i need to put.SAVE and CANCEL.
    When i click on SAVE all my screen details should be saved in a ZTABLE and should generate a LCDOCUMENT-Number from the system.
    So my question is shell i take the two tables for header and item data or one is enough and if i take two tables(one is header and one is item data) how i write the logic to store into the ztables.
    How can i proceed.Plz provide me with ur inputs
    Thanks and Regards.

    Hi!
    you have to take one table.....in which u have to move the header and item data into that b'coz according to the header data the items are to be displayed.......
    select the data for which ever tables they came and then take a final table in which include all the fields of header and item .loop on all the tables from which data u have taken and inside it move the data of those fields into the fields of the final table.
    In the ALV u need to call the function module to display the ALV with that final table in which ur all data is there and prepare a field catalog of those fields you want to display in the item list.
    for example a sample code is there...
    types:
      begin of type_s_vbak,
        vkorg type vbak-vkorg,             " Sales Organization
        aufnr type vbak-aufnr,             " Sales Order Number
        auart type vbak-auart,             " Sales Order Type
        kunnr type vbak-kunnr,             " Customer Number
        vbeln type vbak-vbeln,             " Sales Document
        knumv type vbak-knumv,             " Number of Document Condition
      end of type_s_vbak.                  " BEGIN OF TYPE_S_VBAK
    types:
      begin of type_s_konv,
        kwert type konv-kwert,             " Condition Value
        kbetr type konv-kbetr,             " Rate (Condition Amount)
        knumv type konv-knumv,             " Number of Document Condition
        kschl type konv-kschl,             " Condition Type
      end of type_s_konv.                  " BEGIN OF TYPE_S_KONV
    types:
      begin of type_s_material,
        kunnr      type vbak-kunnr,          " Customer Number
        matnr      type vbap-matnr,          " Material Number
        arktx       type vbap-arktx,          " Material Description
        steuc       type marc-steuc,          " Fiscal Classification
        kwmeng   type vbap-kwmeng,         " Quantity
        knumv      type vbak-knumv,          " Number of Document Condition
        vbeln        type vbak-vbeln,          " Document Number
        kwert       type konv-kwert,          " Condition Value
        total         type p length 14 decimals 2,
                                           " Total
        ipitype  type p length 9 decimals 3,
                                           " IPI Type
        ipivalue type konv-kwert,          " IPI Value
      end of type_s_material.              " BEGIN OF TYPE_S_MATERIAL
    data:
      fs_vbak type type_s_vbak.
    data:
      fs_mati type type_s_material.
    data:
      fs_konv type type_s_konv.
    data:
       t_vbak like
    standard table
           of fs_vbak.
    data:
       t_konv like
    standard table
           of fs_konv.
    data:
       t_mati like
    standard table
           of fs_mati.
    loop at t_konv into fs_konv where kschl eq 'ZPNF'.
        move fs_konv-kwert to fs_mati-kwert.
        modify t_mati from fs_mati
        transporting kwert
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying Total Field of Material Table.
      loop at t_mati into fs_mati.
        w_total = fs_mati-kwmeng * fs_mati-kwert.
        move  w_total to fs_mati-total.
        modify t_mati from fs_mati
        index sy-tabix
        transporting total.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Type Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        w_total = fs_konv-kbetr div 10.
        move w_total to fs_mati-ipitype.
        modify t_mati from fs_mati
        transporting ipitype
        where knumv eq fs_konv-knumv.
        clear w_total.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    * Modifying IPI-Value Field of Material Table.
      loop at t_konv into fs_konv where kschl eq 'IPI3'.
        move fs_konv-kwert to fs_mati-ipivalue.
        modify t_mati from fs_mati
        transporting ipivalue
        where knumv eq fs_konv-knumv.
      endloop.                             " LOOP AT T_KONV INTO FS_KONV
    and then fill the fieldcatalog and display the ALV
    Edited by: Richa Tripathi on Apr 15, 2009 3:28 PM

  • How to make pricing field as output only in sales order header and item lev

    Hi ,
    I want to make the field PRICING DATE as output only both at header and item level. How can i do pls guide me in detail.
    Regards
    Sunaina

    Hi Sunaina ,
    Through User Exit you get this requirement plese take help of ABAPer to activate the user exit according to your requirement.
    Try With this User Exit
    Program MV45AFZZ
    USEREXIT_FIELD_MODIFICATION
    This user exit can be used to modify the attributes of the screen fields.
    To do this, the screen fields are allocated to so-called modification groups 1 - 4 and can be edited together during a modification in ABAP. If a field has no field name, it cannot be allocated to a group.
    The usage of the field groups (modification group 1-4) is as follows:
    Modification group 1: Automatic modification with transaction MFAW
    Modification group 2: It contains 'LOO' for step loop fields
    Modification group 3: For modifications which depend on check tables or on other fixed information
    Modification group 4: is not used
    The FORM routine is called up for every field of a screen. If you require changes to be made, you must make them in this user exit.
    This FORM routine is called up by the module FELDAUSWAHL.
    See the Screen Painter manual for further information on structuring the interface.
    I hope it will help you,
    Regards,
    Murali.

  • How to find the header and item level status of a CRM contract ?

    Hi,
    Few questions
    A. How to find the header and item level status of a CRM contract ? My req is to select all the contract line items which are in CLOSED status.
    B. How to get the BPs associated with a contract ?
    Anyone have the list of CRM tables and the relation amongst them. Please mail me in [email protected]

    CRMD_ORDERADM_H     Contains the Header Information for a Business Transaction.
    Note:
    1.     It doesn’t store the Business Partner
           responsible for the transaction. To 
           get the Partner No, link it with
           CRM_ORDER_INDEX.
    2.     This table can be used for search
           based on the Object Id(Business
           Transaction No). 
    CRMD_CUSTOMER_H     Additional Site Details at the Header Level of a Business Transaction
    CRMD_LINK     Transaction GUID set for all the Business Transactions
    CRMD_ORDER_INDEX     Contains Header as well as Item details for a Business Transaction.
    Note:
    1.     It doesn’t store the Business 
          Transaction No (Object ID).
          To get the Business Transaction No  
          link the table with
          CRMD_ORDERADM_H
    2.   This table can be used for search
          based on the Partner No
    CRMD_ORDERADM_I     Stores the Item information for a Business Transaction. The scenarios where we have a Contract Header and within contract we have Line Items for the contract, this table can be useful.
    E.g. Service Contracts
    CRMD_CUSTOMER_I     Additional Site Details at the Item Level of a Service Contract
    Pl.reward points.......

  • Checkbox in header and item level records.

    Hello Freinds,
    I have a requirment in which I need to display checkboxes in front of header as well as item level records. I am trying to make a copy of standard transaction VL37. This transaction uses the REUSE_ALV_HIERSEQ_LIST_DISPLAY for displaying header and item level data. I debugged and found that in the alv layout there is a field with name box name. If we pass the name of header internal table to that field then we can get checkbox in front of header level records and if we pass item level internal table name then it shows the checkbox in front of item level records.
    Can anyone provide some possibility of adding checkbox for both header and item level records while using the same ALV FM.

    Hello Harsh,
    I am also kind of facing the same issue. I have used the FM REUSE_ALV_HIERSEQ_LIST_DISPLAY for ALV display. And I need to add checkbox at item level.
    I have tried to add checkbox through field catalog. Following is the code I'm writing.
    l_wa_fieldcat-fieldname = l_c_flag.
    l_wa_fieldcat-tabname   = l_c_item.
    l_wa_fieldcat-checkbox  = abap_true.
    *l_wa_fieldcat-edit_mask = abap_f.
    l_wa_fieldcat-edit      = abap_true.
    l_wa_fieldcat-key       = abap_true.
    l_wa_fieldcat-seltext_m = l_c_flag.
    APPEND l_wa_fieldcat to em_it_fieldcat.
    But in this case the checkbox appears in disabled form.
    Can you please help? Could you be a bit elaborate on your answer i.e. the code snippet? Many thanks.
    Regards,
    Debapriya

Maybe you are looking for

  • How do i stop the search tab from changing other tabs other than just the one with focus?

    everytime i use the search bar located next to the web address, it will change other tabs to the results of my search and not just my tab of focus. how do i stop this? it's never done this before and has only started doing it this week.

  • Call logical links with different enhancement sets on the same business role

    Hello, I am trying to create a business role that contain logical links with different enhancements. I know how to choose an enhancement for the business role but I can't find a way, if possible, that one business role does it. I know how to give an

  • IMac 3rd Party SSD -- No Trim -- What Now?

    After Yosemite, I had the dreaded kext issue due to having a 3rd Party SSD and using SSD Chameleion.  After I got that all sorted out, I ended up not enabling Trim on OS X.  And I'm fine with that.  However, since it has been a month or two since it

  • Reinstalling itunes after computer crash

    my comuter crashed and i had to start from scratch. i reinstalled itunes and everything was fine. so there's nothing in my itunes library but all the old songs from my ipod do show up as playlists. How can i move my playlists onto the itunes library

  • Pricing copied across different line items

    I have a pricing routine assigned to a discount condition type. Routine is working fine but when I add a second line item, discount from second line item is overwriting first line item. How can I prevent that from happening Lets say first line item M