ALV for one header and multiple item table

Hello All,
I have a requirement to display records from one header and three item table using ALV.
The output should be such that
     1-line - record from header table
     followed by - records from the 1st item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
     followed by - records from 2nd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
     followed by - record from 3rd item table(can have multiple entries corresponding to a header record and each should be displayed on separate line)
Can you help me out.
Thanks and regards,
Subramanian.

hi
data population is same for alv or normal reporting.
First you select the data from header
          select from item data using for all entries in it_header where....
          select item 2
          selct item 3
loop a it_header
read item1
read item2
read item3
check sy-subrc
move to i_final
then build fieldcatalog and display..
look the example
SELECT   PERNR
           STELL
           WERKS
           ABKRS
           ENAME
           ENDDA
           BEGDA
           ORGEH
           PERSG
           PERSK
           KOSTL
      FROM PA0001
      INTO TABLE I_PA0001
     WHERE PERNR IN S_PERNR
       AND ABKRS IN S_ABKRS
       AND PERSG IN S_PERSG.
SELECT  SPRSL
            STELL
            ENDDA
            STLTX
            FROM T513S
            INTO TABLE I_T513S
            FOR ALL ENTRIES IN I_PA0001
            WHERE STELL = I_PA0001-STELL AND SPRSL = 'EN'.
    SELECT  PERSA
            NAME1
         FROM T500P
         INTO TABLE I_T500P
         FOR ALL ENTRIES IN I_PA0001
        WHERE PERSA EQ I_PA0001-WERKS.
  LOOP AT I_PA0001 .
READ TABLE I_T513S INTO WA_T513S WITH KEY STELL = WA_PA0001-STELL
                                              SPRSL = 'EN'
                                              ENDDA = WA_PA0001-ENDDA.
    IF SY-SUBRC IS INITIAL.
      MOVE WA_T513S-STLTX TO WA_FINAL-STLTX.
    ENDIF.
    V_SNO = V_SNO + 1.
Read Value For Personal area Text.
    READ TABLE I_T500P INTO WA_T500P WITH KEY
                            PERSA = WA_PA0001-WERKS.
    IF SY-SUBRC EQ 0.
      MOVE WA_T500P-NAME1 TO WA_FINAL-NAME1.
    ENDIF.
FORM DISPLAY_DATA .
--BUILDING FIELD CATALOG--
  CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
   EXPORTING
     I_PROGRAM_NAME               = V_REPID
     I_INTERNAL_TABNAME           = 'I_FINAL'
  I_STRUCTURE_NAME             =
  I_CLIENT_NEVER_DISPLAY       = 'X'
     I_INCLNAME                   = V_REPID
  I_BYPASSING_BUFFER           =
  I_BUFFER_ACTIVE              =
    CHANGING
      CT_FIELDCAT                  = I_FCAT[]
   EXCEPTIONS
     INCONSISTENT_INTERFACE       = 1
     PROGRAM_ERROR                = 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.
*--Modifying titles of Field Catalog--
  READ TABLE I_FCAT INTO WA_FCAT WITH KEY FIELDNAME = 'S_NO'.
  IF SY-SUBRC EQ 0.
    WA_FCAT-REPTEXT_DDIC = 'X'.
    WA_FCAT-SELTEXT_S = TEXT-041.
    WA_FCAT-SELTEXT_M = TEXT-041.
    WA_FCAT-SELTEXT_L = TEXT-041.
    WA_FCAT-OUTPUTLEN = 3.
    WA_FCAT-JUST = 'L'.
    MODIFY  I_FCAT FROM WA_FCAT INDEX SY-TABIX.
    CLEAR WA_FCAT.
  ENDIF.
do for all the fields u want to display..
Award points if useful.

Similar Messages

  • Content Conversion: One row with one header and multiple item structures. Possible?

    Dear all,
    I have a input that looks like this:
    HeaderKeySomeHeaderInformationItemKeySomeItemInformationItemKeySomeItemInformation...
    Here's the actual input
    TEHGMESS0026000000288S0001TEI2____026200006112410400000000           18010000000000                                                      00126000000000126000120600000000002000000000                                    000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000JTEI2____026200006112410400000000           19010000000000                                                      00126000000000126000120600000000002000000000                                    000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
    HeaderKey = TEHGMESS
    ItemKey = TEI2____
    Is it possible to process this via MessageTransformBean (my actual scenario is JMS to IDoc)? I already tried but I only succeeded when having new lines in my input to separate between Header and (multiple) Items.
    So when the input and my configuration looks like below it works, but when I only have a single row input it doesn't work, even when specifying xml.recordHeader.endSeparator = '0' / xml.recordItem.endSeparator = '0'. I even tried xml.endSeparator = '0' but no luck.
    Input that works
    TEHGMESS0026000000288S0001
    TEI2____026200006112410400000000           18010000000000                                                      00126000000000126000120600000000002000000000                                    000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
    TEI2____026200006112410400000000           19010000000000                                                      00126000000000126000120600000000002000000000                                    000WESTMONOBERTBE2014052309422408120003 000000000000000000000000000000J
    Matching configuration that works for input which structures are delimited by new line.
    Paramentername
    Parametervalue
    Transform.Class
    com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType
    text/xml;charset=utf-8
    xml.conversionType
    StructPlain2XML
    xml.documentName
    MT_TEI2Split
    xml.documentNamespace
    http://hansgrohe.com/pi/MQ/TEI2/10
    xml.keyFieldName
    SATZARTKey
    xml.keyFieldType
    CaseSensitiveString
    xml.processFieldNames
    fromConfiguration
    xml.recordHeader.fieldFixedLengths
    8,4,9,1,4
    xml.recordHeader.fieldNames
    SATZARTKey,SATZLENHG,NUTZLEN,MESSAE,MESSNR
    xml.recordHeader.keyFieldValue
    TEHGMESS
    xml.recordItem.fieldFixedLengths
    8,4,2,10,8,19,3,3,2,10,6,2,10,6,2,10,6,6,6,6,6,11,9,2,10,6,2,10,6,3,4,3,7,14,8,1,31
    xml.recordItem.fieldNames
    SATZARTKey,SATZLEN,BUCHART,TRNR,ANDGNR,MITEM,TEIVARI,BSTSTATU,REFTYP,ORNO,POS,REFTYP1,ORNO1,POS1,CHATYP,CHARGE,CHAPOS,ABBVONL,ABBNACH,ZUBVONL,ZUBNACH,I2MENG,I2BUNR,REFTYPN,ORNON,POSN,REFTYP1N,ORNO1N,POS1N,BSTSTATN,ABUSERAB,ABUSERFN,ABUSERNA,I2TIME,I2LIDNR,I2FMCODE,FILLER
    xml.recordItem.keyFieldValue
    TEI2____
    xml.recordsetName
    records
    xml.recordsetStructure
    recordHeader,1,recordItem,*
    Any clues on this? Is it even possible to have multiple structures in one row? Many thanks in advance
    Jens

    SAP came back to me with this answer:
    First, I would like to point the documentation for Message Transform
    Bean (MTB) in 7.4:
    http://help.sap.com/saphelp_nw74/helpdata/en/57/0b2c4142aef623e10000000a155106/content.htm?frameset=/en/57/0b2c4142aef623e10000000a155106/frameset.htm&current_toc=/en/45/0ea2de423c2d6be10000000a11466f/plain.htm&node_id=18
    As it is written at the beginning of this document, MTB is used to
    call classes written for the Plain Adapter Engine. So you may find
    additional documentation about the parameters for convertion in the
    documentation of the Plain Adapter Engine
    (http://help.sap.com/saphelp_nw74/helpdata/en/0d/00453c91f37151e10000000a11402f/content.htm?frameset=/en/1b/d5ef3b1ad56d4fe10000000a114084/frameset.htm&current_toc=/en/75/246b3de666930fe10000000a114084/plain.htm&node_id=11).There it is written that the structures by default are
    arranged line-by-line. The endSeparator just adds additional character
    string as a separator after the last column in a row.
    I hope that this answers your question. MTB expects the data to be
    structured line by line.
    You may add a custom module, which transforms the message in the
    expected format.
    If you have a look at the second link there's even a more precise wording that multiple structures within one line are not supported:
    xml.NameA.endSeparator
    Even if no specification is made here, a line break must follow since substructures are always expected as a line of the document.
    Bottom line is that it's not supported by now and verfied by me with PI 7.4 SP5
    Many thanks to Ambrish, Amit and Hareesh for the valuable input. Will probably try to work things out for now following Ambrish's / Hareesh's suggestion as this seems easier to implement. Amit's proposal with a dedicated module however would probably be the more polished solution.
    Cheers
    Jens

  • Can I use multiple IDs for one iTunes and multiple devices

    We have one family computer with iTunes, my older brother has an iPhone and I have an iPhone. A family ID was previously used to purchase songs for the family to share. My older brother has created an apple ID for his iPhone, and l have a yet unused apple ID. my brother downloaded songs etc onto the family iTunes that I would like to share, there are songs on the family apple ID that we would both like. Can you download purchases from multiple apple IDs into one iTunes  account, then sync that data onto multiple phones that each have a separate ID? Is iTunes linked to one ID? Can purchases from multiple IDs be grouped together in our family account. Also do I Actually need a separate Apple for my iPhone to prevent private messages and contacts being shared?
    Thanks for any advice

    I forgot to add my iPhone is brand new and unused, and also that the iTunes account has non purchased songs on there. Can these be shared. As it is a new computer the purchases from the family ID have not been downloaded yet

  • HT1495 Multiple logons for one computer and multiple devices trying to use one itunes account.

    I have one computer with a logon for Kids and one for Adults.  There is a touch and nano that was added to a single itunes account tied to my email on the adult logon and the shuffle that is on the kids account.  I can't seem to get the multiple devices access to all the songs with out erase and re-sync error message when not using the right device on the assigned logon to the computer - why and can we change this?

    It sounds like each Windows user has it's own iTunesLibrary.itl file.  If that is the case, then you are correct, the correct device must be connected when logged in with the correct login.
    If all Windows logins share an iTunesLibrary.itl file... then it does not matter which login is used or which device is connected.

  • ALV  -  Multiple item tables

    Hi  Guys,
    Is there any way in ALV to dispaly one header table and 2 correspoding item tables.
    Using F.M   'REUSE_ALV_HIERSEQ_LIST_DISPLAY'  we can display one header and one item (tables) but in my case in want display 2 item tables.
    ie, basicaly 3 levels header, item1 and item 2.
    Waiting for your reply,
    Steevan

    Hello Steeven,
       Pls check the demo program <b>BALVBT02</b>, which deals with multiple tables.
    Thanks&Regards,
    Siri.

  • Valid to date for BOM Header and Item

    Hello everyone,
    I have been searching for "valid-to" date for BOM header and Items since several days but no luck ..
    I know we can see it using transactions cs11/cs03 etc. But i wish to know the table where they are stored. As I need to extract them to BW.
    Any help will be highly appreciated.
    Thanks in advance!
    Regards,
    Anuj

    Hi Anuj
    In table STPO,the field AEDAT gets updated only when a change number is used,otherwise the valid to date will be shown nil here.
    And also ref the link
    Problem finding Valid To Date or Change number to on BOM
    pavan

  • Header and Line Item reporting (MultiProvider)

    Hello All,
    We have data coming in from a LO Extractor.  There are 2 extractors.  1 for line item the other for Header.  The line item extractor has all the fields for both so we decided to use this extractor (the line item).
    Question is, when extracting this data multiple records come over.  Let's say the order has 2 line items.  It brings over a header record and then 2 line item records.  We have it going to an ODS and then Cube.  The ODS key is order number and item.  Well the header record comes over with item number #, so 3 records hit the ODS.
    How do you handle this?  We saw something about denormalization and make this header record item number a 0.
    Can someone explain to us how to handle this?  We also read about a Constant selection and loading the header record and line item as we are to both the InfoCube, but we just don't understand this solution.
    Please help, Thank you

    Item level will have all fields those are in Header level.Header level data will be a subset of Item level data.Load only Item level and when you require header data remove Item number in that relevant DSO and you can see all the data summarized to header level in overwrite mode.
    This will not be good option if you require some fields that may have different records in the header and the item.
    One better option is create a secondary staging DSO that updated by header, item and schedule line level and you can choose your own data fields and key fields. You can update them in overwrite mode to have summarized records that avoids duplication of records from header and item for same document.
    Constant selection wil be helpful in the report level not during load process.
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e7/5f983c1a356858e10000000a114084/frameset.htm
    This will ensure total displayed is constant even after navigation. So it hides repetitive records displaying after drilldown.

  • Displaying header and line items

    Hi,
    i) i have a fieldname i.e text and its value to display in the bodypage  (body)..
    i want to display the text and its value only if the value is there.. otherwise it should not be displayed and a blank line also should not appear
    in smartforms we can handle that in conditions in the corresponding node, how we do the same in adobe forms?
    ii) suppose i have header and line items and for each header item i want to display the line items, both r in 2 tables how can we handle this
    Thanks

    Hi Shekar,
    The following solutions useful if you are using printbased forms.
    1. To display the field if the value is there.
    ->In the Context you can define the condtion on the filed.
    ->You can write a script on the subform superior to the field
    [code]      if ( $.field.rawValue == <value> ) then
                $.field.presence = “hidden”
          endif [/code]
    2. Header and item table
    In the SFP context drag the header table from interface.drag the item table from interface on the DATA in the header table. it will placed at the end of the header table. Now select the item table select where clause in the properties ( at the bottom of the screen ).there you create a line for condition using create button. drag the field from header table field ( say header-matnr ) on the right side and then drag the same field from the item table ( say item-matnr) in the left side.This will filter the item records relevent for header record.
    refer the message
    Re: Adobe IF Attachments

  • How to upload header and corresponding item details to application server?

    Hi all,
      How to upload control data , header data and the corresponding data in the application server based on the company code.
    If the user selects multiple company codes like US, GE,IN....3 files need to placed in the application server with the corresponding header and item details. The control data is unique per file.
    Thanks,
    Charan

    For Header and Item data you create separate structure as below...
    Header
    |----Link
    |----
    |----
    !-----Item
                |-----link
                |-------
    (Note the hierarchy- Header str>LINK--> Its fields->ITEM str > LINK under ITEM str->ITEM's fields under ITEM's fields.)
    Header part will have all header fields. Item will come under Header and all ITEM's fields will come under Item.
    Both HEADER and ITEM will have field LINK -- Char 003 which will allow all ITEMs for a HEADER to fall under proper Header data..
    Header and Item Structure will have different files as per the sequence of the fileds..
    Map the fields properly..
    It will work...
    If its helpful to you don't forget to reward the pts..
    Edited by: sumesh on May 19, 2008 4:28 PM

  • How to repeat Header and Footer's table on each page

    Hi all of you,
    I have to create an invoice form which look alike the Purchase order forms example provided by Adobe.
    In the table object, i set up exactly the same attribute as the example but i didn't manage to get the same result :
    - the table is nested in a subformular which attribute is Flowed + Page Break.
    - Header and Footer's table are set up such as they should be repeated on every page.
    I work on the Adobe Life cycle 8.01 and ECC 6.0.
    Thanks for the help

    Hi Vincent,
    Use the Create Table assistence while you creating the table, there you will specify the header and footer
    Change the table type as flowed in object tab.
    Then select the Header Row in Hierarchy tab and go to the Pagination in object tab
                           there you check Include Header Row in Subsequent Pages and same as footer.
    By
    Parthi

  • Header and Footer Items in Adobe Muse? Also Menu text being cut off half way.

    How can I make the header and footer items load faster in Adobe Muse? I am hosting with Business Catalyst. Everything else loads almost immediatly on my web page, but my Header and Footer graphic- wood grain picture- take almost 10 seconds to load, and almost a minute to load on mobile devices.
    As well, my menu's are not loading correctly on other peoples devices. On my lap top everything looks fine, but on other peoples devices the text in my menus is only loading half way? -only shows half the text.
    Still working on my site, but to see what I am talking about you can visit the web page I am in the middle of building at www.bkskin.com
    Please give me some advice if any of you have some, thank you.
    Megan Burnett

    Hello,
    It seems to be an issue with the Font that you have used.
    You have used Bubble-one font and if you check this font in Google Chrome it is cut off and if you check in Firefox, it comes up fine.
    Please have a look at this link in Google Chrome and Firefox and you will see the difference : http://www.google.com/fonts/specimen/Bubbler+One
    I would suggest you to use some other font in order to fix it.
    Regards,
    Sachin

  • Query regarding the data type for fetcing records from multiple ODS tables

    hey guys;
    i have a query regarding the data type for fetcing records from multiple ODS tables.
    if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
    can any one help with some suggestion.

    Hi Mudit,
    One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
    AS is used to rename the column name when data is being selected from your DB.
    So, the query  Select ename as empname from emptable will return the data with column name as empname.
    Regards,
    Bhavesh

  • In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account.

    In private browsing not working in Firefox 3.6.12 If I open yahoomail one session for one account and if I open other session for yahoomail, it automatically opens the earlier mail account. But if I want to use more than one yahoomail accounts, in private browsing is not working. Please suggest.

    That problem isn't related to Private Browsing specifically, that's how Firefox works with regards to multiple "sessions" with the same server - only one logon is allowed at any time. Try using one of these extensions to be able to run multiple session cookies.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • Need information about FI document  with header and no items

    Hello Experts!
    I need your help for understanding the following subject :
    How is it possible when using F.13 to obtain a fi document with header without items sometimes,
    and fi document with header and items anothers times?
    We didn't saw/found customizing topics about that ( to enable or not header without items) Some exists?
    The only difference in the two cases are the document's type involded which are not the same.
    Regards,
    Josiane

    Hi,
    We verify  and compare everything.  it's the same everywhere except the document type of the invoice
    first case, F.13 create conciliation fi document with header and no items
    invoice ( doc. type YB )
    payment ( doc type ZT)
    conciliation ( doc type XZ )
    2th case, F.13 create conciliation fi document with header   and none items
    invoice ( doc. type YT )
    payment ( doc type ZT )
    conciliation ( doc type XZ )
    We match / compare  every fields and value  between invoice of 1st and 2tch case,  every fields and value between payment  of 1st and 2th case.
    ( we create  tests case in own integration system for reproduce  )
    We alse match / compare customizing of invoice type document YB and YT and  they seems identical...
    The procedure is the same with F.13 to do conciliation in both cases.
    we got same amount, same currency etc etc.
    We still didn't understand why with invoice type YT the conciliation document created is not the same as invoice type YB ...
    Nobody have idea ?

  • 'BBPSC11' error in Monitor SC for one User having multiple positions but on

    Hello,
    'BBPSC11' error in Monitor SC for one User - having multiple positions in org structure - but having one BP code associated to all positions.
    We have one BP ID associated to multiple positions of the same user - in multiple org structure.
    The org unit is refered as one Project and like wise we have multiple projects people worked on.
    Once the Proj is over we move the Users from one Proj (Org unit) to another Proj, with new Position created copying the old and associate old BP code to it.
    With this when we go for Monitor SC option - enter User ID in Created By field - old SC are listed but we are getting error if we click on the Detail icon.
    Error:The Internet Transaction Server could not start the transaction "BBPSC11" because of the following error: Attribute for user contains errors. Inform systemadmin. .
    AD

    Hi,
    Pl. verify the user with txn-bbp_attr_check. It could be that the org. relationship of the user changed with what was captured on shopping cart. Also use txn-users_gen to repair the user.
    Regards,
    Sanjeev

Maybe you are looking for