BeX Analyzer Aggregation - display line item and header amounts in same row

Hi Experts,
I've a requirement in which I'm looking for help.
Consider that I've one DSO with line item detail and I wish to display on a report for each line item (in the same row) the value of the header which has to be the sum of all line items for each header.
Here's an output of what should be displayed:
PO || Hdr  || PO item Item Amount || PO Amount (Sum All Items/Header)
1    ||  1    ||  10 u20AC                          || 15 u20AC
1    ||  2    ||  5 u20AC                            ||15 u20AC
I've already tried to create a formula/calc key figure, using the KF "Item Amount" aggregated with exception of the "PO Hdr" Char, but it doesn't work.
I know that i can built this on the data model but I just want to be sure before that there's no way to achieve this requirement through query designer.
All help will be welcomed!
Thank you.
Nuno

Hi Lakshmipathi Sir,
Thanks for your reply. Could you please let me know how exactly i need to mention the logic to ABAPer.
I can see two fields are giving from VBKD table with line item wise it is displaying.
1. BSTKD
2. BSTKD_M
thanks,

Similar Messages

  • Line item and header records in the same infopackage

    Gurus,
    I wanted to check how can I make sure that I get all the line item documents in the same package with the header document record in the same infopackage? Is there some setting for that? If I am writing a custom extractore how can I make sure of this in ABAP?
    Thanks
    AK

    Dear AKBW,
    This is not very clear why you want to use same infopackage for line-item as well as header data. Normally there are 2 different datasources for line item and for header data.
    Say you are woking with Sales Order Data in ECC.
    So Line-item datasource for sales order data - 2LIS_11_VAITM
    and Header datasource for sales order data - 2LIS_11_VAHDR.
    Now as they are 2 different datasource, so you must need 2 different infopackages.
    Now if you have created one custom datasource in ECC, then just check if its extracting line-item level or header level data. Normally when we create any custom datasource, we try to make it line-item level, to have all the itemwise detail. Though its not mandatory.
    So if you have 2 different datasources (SAP or Custom), you definitely need 2 different infopackages.
    Please let me know, if you still have any more doubt. You can also give me the other detail of the custom datsource you are creating.( type, fields, what it is supposed to extract etc)..

  • BEx Query Formating - Displaying both Sum and Average in the same report

    Hi everybody,
    I need to create a BW report in the below format,
                          Company Code                                            Total       Total Average
                                   0001            0002      0003      0004
    Doc Type
        AV                        10               10         10         10            40                 10
        RV                        20               20         20         20            80                 20
    Getting the report till the 'Total' column is easy but having the 'Total Average' as a separate column is where I am stuck.
    Having the company code in the rows, and not clolumns, would have solved the issue but I need to keep the above format. Also I do not want to
    see the Total Average for every Company Code, just that of the 'Total'.
    In the Query Designer, in the Column section I have first the 'Company Code' and then the 'Count' in a structure, so whatever I add to this structure,
    is displayed for each Company Code, that means 2 columns for each Company code. This changes the format.
    I cannot use the Cell Definition method here, as then it would be a static structure and the number of Company Codes are not fixed.
    It would be great if somebody could provide some suggestions.
    Thank you,
    Ajay

    Hi Suman,
    Thanks for the quick reply.
    I have tried this, but again this will change the format. With the way you said, I will only get the report in the below 2 formats,
    1. Company code in Free Charac, later drill down to Rows,
    Doc Type  Company Code  
        AV                 0001                10
        AV                 0002                10
        AV                 0003                10
        AV                 0004                10
        Total                                      40
        RV                 0001                20
        RV                 0002                20
        RV                 0003                20
        RV                 0004                20
        Total                                      80
    or 2. Company code in Free Charac, later drill down to Column,
                      Company Code                                       
                               0001                     0002                     0003                     0004    
                        Total    Total Avg   Total   Total Avg   Total   Total Avg  Total   Total Avg
    Doc Type
        AV             10           10             10         10           10         10           10           10
        RV             20           20             20         20           20         20           20           20
    Both the above are different from the format that I need.

  • Display line items not possible!

    Hello
    I've a very strange situation on the productive system:
    I have a company code that registers and display account line items, while the second cannot display them, even if I've configurated the same aspects in account fields for the two company codes. That means they have the same
    - flag on display line items  AND
    - sort key  001 - POSTING DATE
    why??
    thanks a lot in advance,
    Chiara

    No, the answer was not that one, but thanks anyway.
    Finally I found the answer in
    Forum:  Message MSITEM033 in New GL - Cannot Display GL Line Items
    note OSS:
    -  1323960   Incorrect entry '/' in SKB1-XLGCLR and BSEG-XLGCLR
    -  1149500  Clearing open items by batch input selection
    -  1437341   Note 1437341 - Correction of BSEG/Index tables after note 1323960
    regards,
    Chiara

  • How to display total "items" and "amount " in header.jsp in CRM ISA B2B

    Hi,
    I am modifying “header.jsp” in standard CRM ISA B2B application.  Here we have summary of total number of items and total amount but it is coming in to button and for that below code is there in “header.jsp” and it display it as button text.
    if (!ui.homActivated) { %>
    !!" alt="" border="0" height="16" width="20">
    </td>
    <td class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.minibasket.default"/>" >
            <form name="basketForm" action="javascript:show_basket();">
         <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.minibasket.default"/>"/>   
        </form>
    </td>   
    <% } else { %>
    <!-- HOM scenario - minibasket displays collective order -->
    <td  class="vertical-align-middle" align="right">
    !!" alt="" border="0" height="16" width="20">
    </td>
    <td  class="vertical-align-middle" name="miniBasket" value="<isa:translate key="b2b.header.collorder.default"/>">
    <form name="basketForm" action="javascript:show_collective_order();">
        <input class="green" name="miniBasket" type="button" value="<isa:translate key="b2b.header.collorder.default"/>"/>   
    </form>
    </td>
    <% } %>
    Now I want to display total number of items and total amount separately in two different <td> element.
    How I can get total number of items and total amount in “header.jsp” I tried below code but did not get any success.
    Insert below line in “header.jsp” with respective page import statement for class or let me know which class I have to import.
    <%
         HeaderSalesDocument  hdr =
                (HeaderSalesDocument) request.getAttribute(MaintainBasketBaseAction.RK_HEADER);
        ItemList items =
                (ItemList) request.getAttribute(MaintainBasketBaseAction.RK_ITEMS);
    %>
    And then I use
    <td><%= hdr.getNetValue() %></td>
    <td><%= items.size() %></td>
    But it is not printing any thing and header page not display at all.
    Pl. tell me how to get total amount and number of items in header area. Which class or object I have to use here.
    I really appreciated any help from any one.
    Thanks and regards.
    Ashish Patel.

    Hi, I tried another logic. I took value from  Standard button, in which B2B application display total items and amount and I hide this field, to another text element.
    Now I Am breaking that value in words and stored them in array  and then trying to display that array with particular number which contains total item and amount through Java Script on Focus.
    But problem here is, It is not getting updated automatically I have to click on new text files to trigger Onfocus event. How I can achieve effect like as soon as Standard button changes it's value which is now hidden filed my new text box should update automatically.
    Thanks.
    Ashish

  • How to display line items corresponding to Header  adobe form

    Hi ,
    As I am new to Adobe Form, So struggling with below problem related with Adobe Form.
    For example, I have data in an internal table :
    Stage      item
    100         A
    100         B
    100         C
    200         D
    200         E
    Here you have for field 'Stage'  value '100' , I have 3 line items, for value '200' , it is 2 line items and so on.
    My requirement is , I have to show Stage field at top and corresponding line items should be displayed in table.
    Stage: 100
    item
    A
    B
    C
    Stage: 200
    D
    E
    I have used Nested table concept to achieve it but didn't get expected output.
    Please help me out.

    Hi,
         If all of your line items are getting displayed in different pages, to my knowledge, there may be two possibilities.
    1) May be the size of the main window can accomodate only one line item. If one item data fills up the window, then there wont' be any space for the next line item data to be accomodated in the same window in the same page, so, the system triggers the next page. Like-wise for each item data. If this is the case, increase the height of the main window to display items in same page.
    2) Check the driver program. Find the Write_form block, which is written inside an item loop. May be there is a Form-control Function module( Control_form with parameter 'NEW-PAGE' ) being called after the write_fom block, within the loop. If this is the case, remove the control_form FM section to make the data display in same page.
    Best Regards,
    Kumaar.S

  • Sum of all line items and display at the bottom of the page

    Hi ABAPers,
    I am displaying line items in the main window based on PO number ....and I've a coloumn Total amount.
    My requirement is after the line items , the  grand total which is the sum of all line items has to be displayed.
    Is this possible. If so, can anybosy help me in that.
    thanks in advance

    Hi ,
    It is possible.
    For that u have to do  following
    take one variable of same type on which you want to calculate total  ... declare in global variable
    double click in the table  goto the calculation tab in that give the variable on which u want to calculate total
    print in the total in the  footer of the table ..
    Hope you resolve your problem
    Let me know any concerns......

  • To display line item data at header level

    Dear Techis ,
    The requirment is that i am havin three line items for a particular document.
    I need to shw amount of all dese line item at Header level , it means of thr line item i will jus pick Amount and will shw it in one single row with in three differen colums .
    is it possible ?
    Thanks&Regards
    Santo

    Hi Santosh,
    So you must be having items in a internal table, loop at that internal table and sum the amount field using a variable inside the loop and print the value.
    If you are dealing with Purchase Order or Sales Order , you can get the value directly from the header tables(EKKO or VBAK).
    Revert back if u have any doubts.
    Regards
    Karthik D

  • Header, Line Item and Cache Techniques Using Hashed Tables

    Hi,
    How can I work with header, line item, and a cache techniques using hashed tables?
    Thanks,
    Shah.

    Hi,
    Here is an example to clarify the ideas:
    In general, every time you have a header-> lines structure you have a unique key for the lines that has at least header key plus one or more fields. I'll make use of this fact.
    I'll try to put an example of how to work with header -> line items and a cache technique using hashed tables.
    Just suppose that you need a list of all the material movements '101'-'901' for a certain range of dates in mkpf-budat. We'll extract these fields:
    mkpf-budat
    mkpf-mblnr,
    mseg-lifnr,
    lfa1-name1,
    mkpf-xblnr,
    mseg-zeile
    mseg-charg,
    mseg-matnr,
    makt-maktx,
    mseg-erfmg,
    mseg-erfme.
    I'll use two cache: one for maintaining lfa1 related data and the other to maintain makt related data. Also I'll only describe the data gathering part. The showing of the data is left to your own imagination.
    The main ideas are:
    1. As this is an example I won't use inner join. If properly desingned may be faster .
    2. I'll use four hashed tables: ht_mkpf, ht_mseg, ht_lfa1 and ht_makt to get data into memory. Then I'll collect all the data I want to list into a fifth table ht_lst.
    3. ht_mkpf should have (at least) mkpf's primary key fields : mjahr, mblnr.
    4. ht_mseg should have (at least) mseg primary key fields: mjahr mblnr and zeile.
    5. ht_lfa1 should have an unique key by lifnr.
    6. ht_makt should have an unique key by matnr.
    7. I prefer using with header line because makes the code easier to follow and understand. The waste of time isn't quite significant (in my experience at least).
    Note: When I've needed to work from header to item lines then I added a counter in ht_header that maintains the count of item lines, and I added an id in the ht_lines so I can read straight by key a given item line. But this is very tricky to implement and to follow. (Nevertheless I've programmed it and it works well.)
    The data will be read in this sequence:
    select data from mkpf into table ht_mkpf
    select data from mseg int table ht_mseg having in count all the data in ht_mkpf
    loop at ht_mseg (lines)
    filter unwanted records
    read cache for lfa1 and makt
    fill in ht_lst and collect data
    endloop.
    tables
    tables: mkpf, mseg, lfa1, makt.
    internal tables:
    data: begin of wa_mkpf, "header
    mblnr like mkpf-mblnr,
    mjahr like mkpf-mjahr,
    budat like mkpf-budat,
    xblnr like mkpf-xblnr,
    end of wa_mkpf.
    data ht_mkpf like hashed table of wa_mkpf
    with unique key mblnr mjahr
    with header line.
    data: begin of wa_mseg, " line items
    mblnr like mseg-mblnr,
    mjahr like mseg-mjahr,
    zeile like mseg-zeile,
    bwart like mseg-bwart,
    charg like mseg-charg,
    matnr like mseg-matnr,
    lifnr like mseg-lifnr,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    end of wa_mseg,
    data ht_mseg like hashed table of wa_mseg
    with unique key mblnr mjahr zeile
    with header line.
    data: begin of wa_lfa1,
    lifnr like lfa1-lifnr,
    name1 like lfa1-name1,
    end of wa_lfa1,
    data ht_lfa1 like hashed table of wa_lfa1
    with unique key lifnr
    with header line.
    data: begin of wa_makt,
    matnr like makt-matnr,
    maktx like makt-maktx,
    end of wa_makt.
    data: ht_makt like hashed table of wa_makt
    with unique key matnr
    with header line.
    result table
    data: begin of wa_lst, "
    budat like mkpf-budat,
    mblnr like mseg-mblnr,
    lifnr like mseg-lifnr,
    name1 like lfa1-name1,
    xblnr like mkpf-xblnr,
    zeile like mseg-zeile,
    charg like mseg-charg,
    matnr like mseg-matnr,
    maktx like makt-maktx,
    erfmg like mseg-erfmg,
    erfme like mseg-erfme,
    mjahr like mseg-mjahr,
    end of wa_mseg,
    data: ht_lst like hashed table of wa_lst
    with unique key mblnr mjahr zeile
    with header line.
    data: g_lines type i.
    select-options: so_budat for mkpf-budat default sy-datum.
    select-options: so_matnr for mseg-matnr.
    form get_data.
    select mblnr mjahr budat xblnr
    into table ht_mkfp
    from mkpf
    where budat in so_budat.
    describe table ht_mkpf lines g_lines.
    if lines > 0.
    select mblnr mjahr zeile bwart charg
    matnr lifnr erfmg erfme
    into table ht_mseg
    from mseg
    for all entries in ht_mkpf
    where mblnr = ht_mkpf-mblnr
    and mjahr = ht_mjahr.
    endif.
    loop at ht_mseg.
    filter unwanted data
    check ht_mseg-bwart = '101' or ht_mseg-bwart = '901'.
    check ht_mseg-matnr in so_matnr.
    read header line.
    read table ht_mkpf with table key mblnr = ht_mseg-mblnr
    mjahr = ht_mseg-mjahr.
    clear ht_lst.
    note : this may be faster if you specify field by field.
    move-corresponding ht_mkpf to ht_lst.
    move-corresponding ht_mseg to ht_lst.
    perform read_lfa1 using ht_mseg-lifnr changing ht_lst-name1.
    perform read_makt using ht_mseg-matnr changing ht_lst-maktx.
    insert table ht_lst.
    endloop.
    implementation of cache for lfa1.
    form read_lfa1 using p_lifnr changing p_name1.
    read table ht_lfa1 with table key lifnr = p_lifnr
    transporting name1.
    if sy-subrc <> 0.
    clear ht_lfa1.
    ht_lfa1-lifnr = p_lifnr.
    select single name1
    into ht_lfa1-name1
    from lfa1
    where lifnr = p_lifnr.
    if sy-subrc <> 0. ht_lfa1-name1 = 'n/a in lfa1'. endif.
    insert table ht_lfa1.
    endif.
    p_name1 = ht_lfa1-name1.
    endform.
    implementation of cache for makt
    form read_makt using p_matnr changing p_maktx.
    read table ht_makt with table key matnr = p_matnr
    transporting maktx.
    if sy-subrc <> 0.
    ht_makt-matnr = p_matnr.
    select single maktx into ht_matk-maktx
    from makt
    where spras = sy-langu
    and matnr = p_matnr.
    if sy-subrc <> 0. ht_makt-maktx = 'n/a in makt'. endif.
    insert table ht_makt.
    endif.
    p_maktx = ht_makt-maktx.
    endform.
    Reward points if found helpfull...
    Cheers,
    Siva.

  • Matching FI Line Items and Total Records for FM

    Dear Friends,
    Currently, we are implementing Public Sector Management using Former Budgeting.
    Some PR and PO has been created, before the FM budget data transferred from Cost Center Planning using FM9C.
    Using FMRP_2FMB4002 report, the u2018Available Amountu2019 still equal to u2018Curr. Budget Amountu2019, even though we can display the detail PR and PO by double-click the column u2018Assignedu2019 and u2018Commts/Act.u2019 in this report.
    After executing RFFMRC04, system shows many line items containing Fund Center, Commitment Items, and its Amount.
    I need your assistance to resolve these issues, so that the FM Report can be analyzed accordingly.
    Thanks for your kind attention.
    Regards,
    (Vincent)

    Hi,
    This thread has been created some time ago and recieved no response. Can you please close if you feel this issue/query has been resolved in the meantime. If it has not then please provide additional information in relation to your query. By providing updates to your thread it moves you thread to the first page of thread and increases visibility and possiblity for the multiptude of experts in SDN Forums to offer their support.
    Therefore please update with more information or close thread.
    Thank you for your assistance.
    Regards,
    Brendan.
    (ERP FI/CO SDN/WIKI Moderator)
    http://wiki.sdn.sap.com/wiki/display/ERPFI/ERP+Financials

  • FBCJ LINE ITEM AND FI LINE ITEMS ARE DIFFERENT

    Dear Expert
    FBCJ LINE ITEM AND FI LINE ITEMS ARE DIFFERENT

    Hi,
    It seems from the screen shot you are seeing different documents as in the first screen shot it clearly shows you have booked the multiple expenses under one see the below screen shot we have circled it
    whereas FB03 screen shows different.
    You can do one thing click on circle item and check the expenses involved in it and accordingly go to FBL3N and display documents for that G/L for the date 05.04.2014.
    Hope your issue has been resolved else revert.
    Regards,
    Tejas.

  • How to display line items twice in a single page in sap script

    HI,
      I am working on check printing. I copied the standard driver program and form to Zprogram and ZForm. Which are RFFOUS_C(print program) and F110_PRENUM_CHECK(Form Name).
    I want to display the line items twice in the same page and sub sequent pages.
    Currently I am able to display line items only once.
    Example:
    PAGE1.
    line item1
    line item2
    line item3
    line item4
    line item5
    line item1
    line item2
    line item3
    line item4
    line item5
    line items 1 to 5 which are in main window.
    How to achive this problem.
    Regards,
    vinod

    Hi
    I had the same request for a check form in Canada. I solved it by writing the line item output into variables and print these variables in a second window. It was ~10 hours of effort, not a real nice technical solution but it worked.
    If you require I can send you a PDF of the sap script form definition. You can contact me at [email protected] Answers can take 1 week or more. 
    Best regards
    JD

  • Displaying line items, although not activated in FS00

    Hi everyone!
    I've got a question about line items.
    I had created a GL account, and in it's master record I didn't activated Display line item. But, when I call transaction for displaying GL account's line items (FAGLL03), I can see line items?
    How is that possible?
    I know that there are some special cases, for example expense accounts: for every expense account there is a cost element in CO, and no matter settings in FS00, for expense account there is always line item display. Similary, reconciliation accounts always have open items management, irrespective of settings in FS00.
    But this is just regular account, with very few settings in master record: its balance sheet account, the account currency is local currency, sort key 001 and field status group G001. And that's all.
    Can somebody explaine this?

    Guys. In addition to above my problem.  I was facing this problem due to some graphics issue on my laptop. I was not able to see most of the fields because of Graphics Driver installed on my laptop. ( Later on I got this solution. ).
    This seems very unrealistic to hear but my experience is true.
    I hope in future if some one will have this issue please check out driver compatibility specially Graphics. This problem may suppose to encounter with Dell. 
    Anyways Z layout also worked fine as suggested by Guest FICO.
    Thank you all.
    Regards,
    Sharvari Joshi.

  • Problem in display line items in FS10N

    Hi all,
               I have checked ,check box in G/L account  "Line items display "  in FS00 in current period ( 4 / 2014 )after that line items get displayed in FS10N for this period .
    There is problem in displaying line items for same  G/L account with previous all periods such as 3/2014,2/2014,1/2014.
    I have tried report "RFSEPA01" it works fine if we enter document number for selection with other parameters ,but it gives error if we run report with just Company code and G/L account .
    Please provide any other way to get item details for previous periods or is there any update on report "RFSEPA01".
    Please let me know why this issue occurred, if we activated the line item display for the particular G/L account in between the Posting period
    Thanks,

    Hi,
    You can check below two programs
    RFSEPA01 - for line item display
    RFSEPA02 - for open item display
    Steps to follow:
    1. Block the G/L account from posting
    2. Run both programs
    3. Unblock the G/L account
    this will make the earlier posted items visible.
    Regards,
    Jyoti

  • Error display line items

    Hi Gurus,
    please help me on this error.. what to do?
    No line item display possible for account 41000010 1000
    Message no. F4430
    Diagnosis
    You have determined that displaying line items is not to be possible for G/L account 41000010 in company code 1000.
    Procedure
    It is presumably a clearing account (incoming check account, GR/IR clearing account) which has its own reports for analysis.

    Hi,
    Intally GOTO FS00 and tick the line item display and then GOTO SE38 and give program RFSEPA01 and execute .
    then GIVE co code and GL account number
    Documemt 1-999999999
    hope this solve your problem
    regards,
    Santosh kumar

Maybe you are looking for

  • Difficulty obtaining open DNS IP using any network config tool.

    Hey everyone...  I've searched the thread archives and haven't found a solution to this yet... I'm having a hard time connecting to any of my school networks. One is a guest network, one is a wpa2 encrypted network. Using nmcli to connect (after crea

  • HOW DO I TRANSFER PC ITUNES FILES FROM WESTERN DIGITAL EXTERNAL HARD DRIVE TO NEW MACBOOK PRO?

    I AM VERY EXCITED ABOUT MY NEW MACBOOK PRO AND ITS SUPPOSE TO BE HERE TOMORROW! THERE IS ONE MAJOR CONCERN I HAVE THOUGH, I HAVE ALL MY MUSIC FILES ON MY WESTERN DIGITAL ELEMENTS HARD DRIVE (1TB). THE HD IS FORMATTED FOR WINDOWS THOUGH. I WATCHED YOU

  • Uninstall/Install Hootenanny

    Think i messed things up real good here. A few weeks ago, i got a trojan virus on my system. Was able to remove it and do a system restore to an earlier date. Issues were fixed with system. Then i attempted to edit some HTML files in dream weaver and

  • I want to extract data from a PDF using Java

    I would prefer to extract data from a PDF and convert it to XML. Is there an API that will convert a PDF to some Adobe format XML? Ideally I would like to add some JAR files to my classpath, similar to PDFBox. I don't want to install a bunch of serve

  • Any way to hide/collapse events by year?

    I switched to a Mac and iLife and love it!  However, after importing some 20 years of photos in to iPhoto I have a very unwieldily long list of events.  In the past I had separate folders for each year, and then folders for each event under them.  Is