How to count number of line items in BEX

Hello friends,
I am showing summarized data in BEX but i have to show one column number of records for that line .
For e.g.
Profit Center                        Document Number          amount 
Newyork                                101                             1000
Newyork                                102                             2000
I have to show as
Profit Centre        Amount      Line Items
Newyork             3000           2
Please give me suggestion how to do it in BEX ?
Regards
Nilesh Vakil

Hi Nilesh,
          Check here...
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
Re: Count the values of a characteristic
Thanks,
Vijay.

Similar Messages

  • How can find number of line item?

    HI All.
    I have one internal table it has PO number ,line item and quantity.
    Each PO number have number of Line item ,
    now i want find how many line item per Po number .I need find for line item for all Po number.please help me
    Thanks.
    Jay

    see the below code and i tested and it is working well.
    data : begin of i_ekpo occurs 0,
           ebeln like ekpo-ebeln,
           ebelp like ekpo-ebelp,
           end of i_ekpo.
    data v_count type i.
    start-of-selection.
    select ebeln ebelp from ekpo into table i_ekpo.
    loop at i_ekpo.
    v_count = v_count + 1.
    at end of ebeln.
    write:/ i_ekpo-ebeln,v_count.
    clear : v_count.
    endat.
    endloop.
    Reward points if it is helpful
    Thanks
    Seshu

  • How to count number of lines in a DMEE Tree

    Hi all,
    My requirement is that in my DMEE tree I have to count entries of line item data(FPAYP). Suppose for entry of FPAYH there are two entries in FPAYP then for first line of FPAYP 1 should be printed and for next line of FPAYP 2 should be printed and so on.
    Can anybody tell me how to do this?
    Regards,
    Azra.

    Well, if you know how to read one line with a Buffered reader, and you know how to keep reading lines until you run out, then all you have to to is initialize a counter to zero before you start reading, add 1 to it each time you read a line, and then examine its value when you're done.
    Try that, and post again if you get stuck.
    Just be careful how you construct your loop. "Off by one" errors are a common way to get bitten. It could happen if you count what you think is the last line, but you've actually already counted all the lines and you end up counting one extra for "there are no more lines".

  • How to resrict number of line items in IDOC  Payment file

    Hai
    I had an issue where user wants to restrict the number of line items in the payment IDOC file. Is there any possibilty to restict these number of line items to 6.
    Because the user has some reporting problem with the bank regarding the IDOC file
    Kindly help me
    Thanks in advance
    Regards,
    Akash Narayana

    Hi Akash,
    Execute transaction code <b>WE20</b> and open up the "<b>Partner Type B</b> - i.e. <b>Bank</b>". Select the bank in question. To the right of the screen, you would see 3 different sections. You are interested in the middle section "<b>Outbound parmtrs</b>.". Highlight the "<b>Message type</b>" (e.g. COSMAS - Master cost center) you want to reduce the size and click on the "<b>Display</b>" icon just underneath it. In the "<b>Outbound Options</b>" tab, change the "<b>PacketSize</b>" to 6 and save your entries.
    Repeat this for all other outbound parameter "<b>Message Types</b>" for this bank. e.g. "<b>EUPEXR</b> - Reference message for electr. signature (for ext. payments)" and "<b>PAYEXT</b> - Extended payment order" etc. That is, change the "<b>PacketSize</b>" for each to <b>6</b> and save your entires. This would reduce the number of each set of messages sent to the bank to 6.
    I hope the above helps.
    Do not forget to award the points please.
    Regards,
    Jacob

  • How to count number of lines in a file?

    I am using a BufferedReader to read my file, but I like to know how to count the number of lines in a file is there a way to do that in Buffered Reader or do I have to use FileInputLineStream?

    Well, if you know how to read one line with a Buffered reader, and you know how to keep reading lines until you run out, then all you have to to is initialize a counter to zero before you start reading, add 1 to it each time you read a line, and then examine its value when you're done.
    Try that, and post again if you get stuck.
    Just be careful how you construct your loop. "Off by one" errors are a common way to get bitten. It could happen if you count what you think is the last line, but you've actually already counted all the lines and you end up counting one extra for "there are no more lines".

  • How to count number of lines inside methods() using the Doclet API

    Wrote a custom doclet using the [Doclet API|http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/doclet/index.html ] .
    The purpose for the doclet is to load Java source files and create stubs (which are identical Java source files but do not contain any method implementation details).
    Instead, the method implementation details need to be replaced with blank lines...
    public class MyDoclet {
         private static String TAB = "\t";
         public static boolean start(RootDoc root) {
              ClassDoc[] classes = root.classes();
              // Parse through class or interface
              for (ClassDoc clazz : classes) {
                   Type superClass = clazz.superclassType();     
                   // Print Methods
                   MethodDoc[] methods = clazz.methods();
                   for (MethodDoc method : methods) {
                        Parameter[] parameters = method.parameters();
                        println();
                        if (!method.isPrivate()) {
                             print(TAB + method.modifiers() + " "
                                                    + method.returnType().simpleTypeName() + " " + method.name());
                             print("(");
                             for (int i=0; i < parameters.length; i++) {
                                  Parameter parameter = (Parameter) parameters;
                                  print(parameter.type().simpleTypeName() + " " + parameter.name());
                                  if (i != parameters.length - 1) {
                                       print(", ");
                             print(")");
                             println(" {");
                             println("\n");
                             println(TAB + "}");
              return true;
    As one can see, I am just creating the method and placing the opening and closing curly braces (along with a new \n line escape sequence, in between).
    Am not really that familiar with the Doclet API...
    Question(s):
    (1) What is the best way to figure out how many lines of code are inside each method and then use a for loop to insert the exact same number of blank lines inside the methods?
    (2) Is there a way to do it using the com.sun.javadoc.SourcePosition.line() method?
    Would really appreciate it if someone could help me because this is an important requirement (hence the 10 Duke Stars).
    Happy coding to all,
    Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    This is not possible using the Doclet API, because JavaDoc does not store any information regarding implementation detail. Although MethodDoc#position will give you the line where the method is declared, there is no way to determine where the method body starts and ends.
    If you need that much information, maybe you would be better of using a tool such as Eclipse's Abstract Syntax Tree parser. AST will provide you with line numbers for each code expression, hence it is relatively easy to compute the first and last line in a method body.

  • How to Count Number of completed line items in past 6 months / 12 months ?

    How to Count Number of completed line items in past 6 months / 12 months ?
    Hi,
    I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
    Purchase Order document = ZEBELN
    Line Item = ZEBELP.
    I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
    I have "Delivery Completed" field, ELIKZ.
    So, based on this would I be able to calculate it in Query Designer?
    If so, Please let me know how

    Hello Deva
    If youe want to calculate the completed line item for last 6 or 12 month then i think u will be displaying the query data for these montrhs...create a customer exit to give you date range and restric it in filter area....
    Now Choose any of the below option
    1. I would suggest to implement an additional key figure "counter" in cube and fill values with one for which delivery is completed.
    Now use calculated key figure in Query Designer based on logic
    IF counter = 1 THEN counter ELSE 0
    OR
    2. create a formula variable based on ELIKZ and use replacement path variable, it will display you no. of docs for which delivery is completed....
    Award points if it solves your problem
    Revert back in case of further assistance...
    Thanks
    Tripple k

  • Please let me know how to Count Number of completed line items in past 6 mo

    How to Count Number of completed line items in past 6 months / 12 months ?
    Hi,
    I am trying to count "Number of Completed Line Items in Purchase Order Document" for my Key Figure ZPO_CNT.
    Purchase Order document = ZEBELN
    Line Item = ZEBELP.
    I need to find and count if the Line Item has been received in the past 6 months from today and similarly in the past 12 months.
    I have "Delivery Completed" field, ELIKZ.
    So, based on this would I be able to calculate it in Query Designer?
    If so, Please let me know how
    Krishna

    Hi Experts,
    I dont have a defined Restricted key figure yet.
    I have populated 0COMPL_DEL(Delivery Completed Indicator)  and 0EBELN (Purchasing Document Number) and 0EBELP (Line Item Number in Purchasing Document) .
    This is what I think how I need to calculate:
    Number of completed line items in past 6 months:
    If  Delilvery Completed Indicator (0COMPL_DEL) = x, calculate No. of Line Items (ZPO_CNT) from 0CALDAY to 6 months
    and
    Number of completed line items in past 12 months:
    If  Delilvery Completed Indicator (0COMPL_DEL) = x, calculate No. of Line Items (ZPO_CNT) from 0CALDAY to 12 months
    Please let me know if the logic is correct. If so, how I can create this in report

  • Maximum number of line items in PO/SA....

    Hi,
    1.
    What is the limitation on maximum number of line items in a PO/schedulling agreement/Contract.
    2.
    Also what is the maximum permissible number of lines in a single accounting document possible.As far as I know there is a limitation of counter 999 meaning if an aaccounting document is generated after GR then it will only allow max 999 lines.
    Is there any other way to avoid this.Because in my case I have for several line items in PO and several pricing conditions with separate GL account.Now when I do GR and if a PO has many line items with about 4 to 5 conditions then for each line item there would be minimum 6-7 entries.
    How can this best be handled in SAP.
    I was being adviced to split the GR but is there any better way or is there any option like summerised acounting document ?
    Please suggest as this is most critical for me.
    Thanks in advance
    Regards,
    manOO

    Hi,
    There is no limitation in PO.  But if you want, you can use following user exit;
    <b>EXIT_SAPMM06E_012</b>
    With regard to Maximum Number of items: There is a limit of (999) line items which can be posted per FI document. This is because the line item number (BSEG-BUZEI) field length is defined as (3) numeric positions, i.e., (999) line items.
    The most commonly used workarounds are as follows:
    (1) Implement FI summarization (per note 36353).
    (2) Cancel the original billing document and split it into smaller documents using different payment terms but actually with the same terms, in case of invoice verification.
    This will avoid the (999) line item limit for FI postings. Please also have a look at the note 117708 and 77161.
    Bye,
    Muralidhara

  • Dynamic Counter in BEx Report to count the drilldown line item.

    Hi,
    I have a requirement to show the count of different parts in a report. For example the report,
    Part Number            Costs
    100                    200 $
    and if you drill down from the part number to line item details, you will get,
    Item Number            Costs
    10                      50 $
    20                      50 $
    30                      50 $
    40                      50 $
    So basically Part Number 100 is consists of 4 Item numbers. Now I want to show original report like this,
    Part Number            Costs               Counter
    100                    200 $               4
    Is there any way I can catch that counter, like how many line item is there per Part Number ?
    I am thinking of 2 ways, Virtual key Figure to calculate this or in alternate if possible use the Classification extractor (not sure if it possible to count the number of items per classification extractor though).
    Is there any better or simpler way to deal this without changing the cube structure ?
    Thanks for your time spent on this,
    Kind Regards,
    Arpan

    Hi,
    You can get this functionality with Virtual Key figures.
    You will have the complete dataset in the RSR00002 Enhancement in CMOD.
    Thank you
    Arun

  • Number of line items in each Invoice

    Hi Gurus,
    I have one requirement
    i need to display one column in the Report i.e. "Line items per eachinvoice" which should give the number of line items per that Invoice
    when iam using tcode 'FB03' at ECC - Document Display it is giving
    for Doc 1111 - 2 line items
    for Doc 2222 - 12 line items
    so in the report that column should display
    2 for Doc 1111
    12 for Doc 2222
    please guide me how to do this
    Thank you

    create a formula with constant 1
    and set the exception aggregation as Total, and set the reference char as Line Item.
    Make sure you have Invocie in the report.
    - Danny

  • Number of Line Items Issue at the time of Payroll posting

    Dear All,
    While creating a posting document (Payroll posting) for FI, the maximum number of line item allowed is 999 where as I have 1464 line items. I am creating only one document based on Company code and it is giving me the following error, which is because of number of line item;
    Acct determination not defined for trans. HRA 1002  in chart of accts AGCA
    Message no. F5113
    Diagnosis
    An automatic posting cannot be created because the account determination for transaction HRA with keys 1002  is not defined in chart of accounts AGCA.
    System Response
    The document cannot be posted.
    Procedure
    Depending on the type of processing, you can hold the document and post it later. If this is not possible and the error cannot be eliminated straightaway in customizing, you must leave processing and enter the document later.
    Procedure for the system administrator
    Correct the account determination for the specified transaction. Proceed
    Please tell me how to create least amount of documents for posting?
    Regards.

    SPRO> payroll >Reporting posting payroll result to Accoutning > Activities in Account system >Assigning Accounts >Assign Technical accounts
    Here eneter 1001 payroll clearing account and next enter 1002 same payroll clearing account. by doing this it will allow document splitting.

  • Reg: Maximize the Number of Line Items in Invoice Verification

    Hi Gurus,
                 For a Client who is dealing in Retail business,there is a necessity to maintain a huge number of line items at Invoice Verification level.Standard SAP has some maxium line items for each document type.Where are the control for maximum line items and how to increase that?
    Regards,
    Sarosh

    Hi,
    At Billing-Country specific settings you will be able to maintain maximum 3 digit billing item no i.e 999.
    Any other suggestion.
    Regards,
    Sarosh

  • Increasing the number of line items in PO

    hello fellow abapers,
    i have a query. i dont know if its the headache of the function ppl or the technicial person - which happens to be me - but i have to get this solved at the earliest.
    now ive made a PO for materials from the scratch and everythin is workin fine. except that out of the blue comes a PO with over 10000 line items. yes, thats right - 10,000 line items.
    so obviously an error was thrown by SAP. unfortunately the end-user did not think it necessary to take a printout or record the error message.
    anyways the error said something to the effect that it did not allow so many line items or somthing like that.
    now can anybody pls help me out with this. firstly is dhere any restrictions on the number of line items, and secondly, if thats the case how do i find a work-around.
    thanx a bunch
    pk

    Hi,
    The basis sets the maximum number of pages that can be printed by the user in authorization object S_SPO_PAGE.
    Please discuss with your basis guy.
    Tyken

  • How do I add PO line item to incomplete log procedure

    Hi SD Experts,
    How do I add PO line item to incomplete log procedure for VA02? Is that possible through configuration and/or code? if it is done by code, what userexit or BAdI I need to implement?
    Thanks,
    Duy

    Hi Duy,
    You need to go to SD > Basic functions > log of incomplete items > define incomplete procedure > select group A (sales header) > procedures > select 11 (Sales order) > fields tab and add PO number incompletion fields as below:
    table---field namedescriptionscreen--status--warning
    VBKD---BSTKDPO number-KBES     -
    0----
    X
    Finally, you should assign your incompletion procedures to your sales doc. typ.
    I hope these will work.
    Regards,

Maybe you are looking for

  • Monitoring 3750x and 3560x Redundant Power Supply and Fans

    I need help for monitoring the redundant power supply of my switches (3750x and 3560x) I have configured my snmp on my switches and is able to monitor interfaces, temperature and etc. The problem is when I am monitoring the redundant power supply and

  • Integrate a text editor in an ITS applicate

    Hello, I want to develop an ITS application for our sales reps to be able to key in text and also have the ability to change fonts, bold, underline, etc and then save this text to be displayed elsewhere.  I have seen many text editors on the internet

  • Bridge copy and paste folders with the same name question

    I just copied and pasted a folder named, as an example, "concerts" with a bunch of pictures to another drive with a folder with the same name. I choosed "substitute" when prompted and all the pics existing in old "concerts" folder have been deleted a

  • Can someone explain shortest path switch over in Multicast?

    Can someone explain shortest path switch overin Multicast?

  • Payment not redirecting to Paypal

    I was making an order and using a gift card and money from my paypal (or so I planned), but as I click to continue to my purchase with paypal, Bestbuy sends my to a black white page. I use google chrome. I'm not exactly sure if it's just me or if it'