Gauge titles variables

Hello!
I have 3 gauge graphs (for 3 measures), and in legend (gauge titles) I show actual values. With View selector user can ''jump'' between these gauge graphs, but unfortunately, the title values (variables, like @1, @4) keep always the value of the first gauges graph.
How can I ''reset'' these values (variables) when user is jumping between gauges with view selector?
OBIEE 10.1.3.3.1
Thanks Gorazd
Edited by: gor on Apr 8, 2009 3:14 PM

Gorazd
We've had similar issues with charting (and other) title views...They're useless in similar situations....
Charting titles are still not advanced enough (you can't use variables and when you use Title view - you get to see only first row) and there're numerous enhancement requests pending for things like that...
One of the tricks would be creating a separate table view (or report) (with is prompted filter and limit of 1 row) - and put it above the gauges....and then slap some formatting on it (remove borders, etc.)...
Let me know if this would work for you

Similar Messages

  • Inserting Title variable that refers to topic other than where variable resides

    Still using RH9, but I think RH10 is going into our upcoming budget. I understand the Title variable in the Fields and Variables dialog refers to the title of the topic in which you are placing the variable. However, I would like to use a topic title reference in another topic, because it is likely the title will change and I only want to change it in one place and have it reflected automatically.
    Here are two inadequate solutions I would reject:
    Dragging the topic name from the Project Manager and then changing the title of the referred topic: it does not change the reference text.
    Making a user defined variable: seems counterproductive because I will still be making one change too many.
    Example: I have a topic called VIP PO Approval that is referring to the VIP PO Upload/Entry topic. I am putting hyperlinks from the Approval topic to the Upload/Entry topic, but the text of the links should come from the "Upload/Entry" Topic Title field. If the powers that be change the spelling of Upload/Entry (perhaps include spaces around the slash), I only want to change it in the properties of that topic or rename it in Project Manager (the point is, in one place only).
    Does anyone know how to do this in RH9? Is there an enhancement in RH10?
    Thank you.

    I would add to Peter's response by saying this: When you drag and drop to create a link, what the link actually reads is dependent upon how you created the link. For example, if you select the text used to constitute the link, THEN drag to the selected text, the selected text is used instead of the Topic title. And sure, if you just drag the topic to an empty spot on the page, the Topic Title is used.
    Sure, it seems like an extra step is involved, but with RoboHelp 10, I defined a variable and used the variable as my topic title. I then dragged the variable to the selected text to create the variable. Then I dragged the desired topic to the variable to create the link. All seemed to work just fine with the link text updating when the variable was changed
    I think  any way you slice it you are going to have at least one extra step. But then again, anything that gives you more functionality tends to require an extra hoop or two, no? And on the up side, while an extra step is inovolved initially, you actually SAVE steps down the road. So overall, I'd say you are still in the benefit zone.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Document Title Variable Text for Footer

    I am fairly new to InDesign and did as much searching as possible before posting this. I took a three-day class for InDesign, but we never got into variables.
    This is for a technical document template I am creating. What I am trying to do is create a text variable that pulls the "Document Title" from the File Info. This variable would put the document title in the footer of every body page in my document.
    Thanks for any help!

    I took it to mean the data in the indicated field inthe XMP data below:
    You get here by choosing File Info from the File menu in ID, or you can acess it through Bridge, I presume. By default this field seems to be blank, and you get to enter anything you like into it, so it might or might not be the same as the filename (I asked earlier if it was because I hadn't done any investigation and wondered if you had).

  • Page title variables for master pages in muse?

    I'm new to muse and I cant seem to find an option for variables page titles like there is in Indesign.  I have a navigation bar and I would like it to show the current page title in a speific spot of that section.  Am I over looking this feature?

    This is what I was after.  I want to beable to do page titles in the view it self.  I do large prototypes/mockups in muse.
    Typically in a website you'll have a page title in the top left corner.  If I have a 20 page design putting in those titles can become tidious

  • Is there an application title variable ?

    Hi All,
    I've struggled to find a variable that contains the title of my application for use in the headers : something like #APP_VERSION# but for the title. Does such a thing exist ?
    TIA
    Steve

    Steve,
    (Sorry, was working on reply whilst Steve Hall replied already).
    There is no built-in substitution string for the application name, only the application alias (APP_ALIAS), which you could use
    Alternatively if your fixed on using the application name (I presume that's what you mean by title), then you could tweek the workaround suggested here:
    Re: Substitution string apex version
    Just change the SQL specified in step 2 to the following:
    select application_name
      from apex_applications
    where application_id = :APP_IDHope it helps,
    Anthony
    http://anthonyrayner.blogspot.com
    Edited by: Anthony Rayner on Sep 23, 2008 9:47 AM

  • Variable interplay between include files and parent files?

    How can I define a variable in a parent file which is then
    used in some
    logic in an include file? For example, if I have -
    <?php
    $foo = 1;
    ?>
    <?php require_once('foo.php'); ?>
    and in foo.php, I have -
    <?php if ($foo == 1) { echo "FOO"; } ?>
    it doesn't seem to work. Am I testing improperly, or what?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================

    Mine, too. But when you don't know what you are doing,
    sometimes the 'proof
    of concept' tests you design are a bit off-kilter, doncha
    know? I can only
    guess that i was suffering from that.
    I'll verify that I correctly reported this and post back....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Gary White" <[email protected]> wrote in message
    news:[email protected]..
    > On Wed, 9 May 2007 20:26:02 -0400, "Murray *ACE*"
    > <[email protected]> wrote:
    >
    >>Yeah - of course, I changed everything about it, too!
    >
    >
    > I'm still bewildered by what caused the problem. If I
    have two files,
    > first (includevar.php) like this:
    >
    > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    > "
    http://www.w3.org/TR/html4/strict.dtd">
    > <html>
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    > <title>Variable in an Include Test</title>
    > <meta http-equiv="imagetoolbar" content="no">
    > </head>
    > <body>
    > <p><?php
    > $x='This is $x defined in includevar.php';
    > include 'foo.php';
    >
    > print "$y";
    > ?></p>
    > </body>
    > </html>
    >
    > And foo.php like this:
    >
    > <?php
    > $y='This is $y defined in foo.php';
    > print "foo.php says $x<br>\n";
    > ?>
    >
    > The output I get is:
    >
    > foo.php says This is $x defined in includevar.php
    > This is $y defined in foo.php
    >
    > Clearly, the variable defined in the parent file is
    recognized in
    > foo.php and the variable defined in foo.php is
    recognized in the parent
    > file. Hence my bewilderment.
    >
    > Gary

  • Drill in gauges in obiee 11g

    I have a strange situation in gauge when i drill trhough dimension in obiee 11g.
    I create a gauge on a total level of a dimension and i want to drill trhough the next level.
    I select total level and measure i.e.:
    Total 10%
    I create a gauge and in the properties (section Gauge Titles) i set as title @1 and as footer @2.
    Viewing the gauge i see Total as title and 10% as footer.
    When i drill on gauge my situation became this (as seen on table):
    Total Child1 20%
    Child2 5%
    Child3 8%
    My gauges became 3 and i expect to see as titles Child1, Child2, Child3 and as footers 20%, 5%, 8%.
    Actually i have as titles Total, Total, Total and as footers Child1, Child2, Child3.
    Any suggestion?

    The base functionality (group by) is same by logical, and Column level. When your implementation is not using dimension hierarchies and you want a measure something like group by a column you go for Column level.
    The base difference is if you use dimensions you'll have drill down functionality thats it.
    We can go for any kind, if you use column level you'll be loosing beauty of drill down. Thats the reason OBIEE came with default dimension for each logical table.
    This functionality is available right from NQuire.
    Hope this helps :)

  • 11g Gauge Related Questions

    Hi,
    I would like to ask 2 questions regarding the new gauge interface, both are related to defining gauge limits. Let's just state that the value of the gauge measure is larger than the default higher limit, and though, the needle is not shown. Therefore, I would like to set a new higher limit, but dynamically. Basically, I would like to choose the higher value between two possible values, based on some considerations.
    First, I tried defining a new column which performs the calculation (case when...), but when trying to set the limit using 'column name', nothing was shown in the list to select from. Sorry, it's a bit blurry to me what the note *'Only columns that are in the metadata repository or that are based on repository columns (such as Dollars*0.10) are displayed as selections.'* in the docs really means. Whatever I did, I couldn't choose any column name to use as the new gauge limit.
    Then I decided to define a new repository variable that keeps this values (which may differ from day to day). I could use the new variable in a table (using the VALUEOF function), where its correct value is shown, but then, using the same method with the gauge limit (Variable Expr), I got an Type Mismatch error, which is for sure wrong, since I can assure the calculation return a number and nothing else.
    I can, of course, use the SQL option, but hay, shouldn't the more simple and efficient methods work?
    TIA,
    Doron

    Hi,
    Thanks for your response, but sadly I must admit I've already tried it (and retried it again) and it doesn't work.
    Doron

  • Automatic listing of 'title' on web page

    I want each page title listed elsewhere on the web page. The
    template used to create the page should have a title variable
    listed so when I give the new page a title, it automatically is
    listed in the desired location, with proper CSS formating.

    darrel wrote:
    >> Sorry (darrel & Murray *ACE*) I seem to be such
    a dunce, but my coding
    >> skills
    >> are obviously not up to par. I do understand the
    requirement that I
    >> declare a
    >> variable BEFORE I use it, but I obviously don't have
    the procedure to do
    >> this
    >> correctly. Here is a new DW page with what I
    understand to be your
    >> instructions...
    >>
    >> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    >> "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    >> <html xmlns="
    http://www.w3.org/1999/xhtml">
    >> <head>
    >> <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1" />
    >> <!-- TemplateParam name="title" type="text"
    value="whatever" -->
    >> <title>Sample</title>
    >> </head>
    >> <body>
    >> <p>The title of this page is
    @@(title)@@.</p>
    >> </body>
    >> </html>
    >>
    >> All I did was change the title from 'Untitled
    Document' to 'Sample' and
    >> then
    >> preview it in a browser.
    >
    > I don't use DW parameters, so you might have to wait for
    Murray to respond.
    > But, that said, looking at what you have, that seems
    like it should work to
    > me. However, I would do it as such:
    >
    > <!-- TemplateParam name="title" type="text"
    value="whatever" -->
    > <title>@@(title)@@</title>
    > </head>
    > <body>
    > <p>The title of this page is
    @@(title)@@.</p>
    >
    > That way you only have to physically write the parameter
    once. In your first
    > example, if you ever wanted to change the title, you'd
    have to change it
    > both in the parameter AND in the TITLE tag.
    >
    > -Darrel
    >
    >
    <!-- TemplateParam name="title" type="text"
    value="whatever" -->
    what the heck is that...
    Dreamweaver templates... ew!!!
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • Variables to UPPERCASE?

    I have a variable defined in my book chapters that contain the chapter title.  E.g.,
    Variable name: Chapter Title
    Variable value: In the Beginning
    I use this variable on the first page of each chapter, naturally.
    I would also like to have a Right page header, that also displays the chapter title, as is commonly found in most non-fiction books.  But typically (if not always), this page header is in uppercase letters.  Although I could create a new variable for each chapter, and call the variable something like "Chapter Title in Uppercase Letters", this seems rather redundant, if not to mention dumb...IF...there is some trick to have Framemaker 9 uppercase the propercase version of the original variable.  Something like   $Uppercase('Chapter Title')
    Is this possible in FM9?
    Thanks.
    PK

    Sam State wrote:
    I have a variable defined in my book chapters that contain the chapter title.  E.g.,
    Variable name: Chapter Title
    Variable value: In the Beginning
    I use this variable on the first page of each chapter, naturally.
    I would also like to have a Right page header, that also displays the chapter title, as is commonly found in most non-fiction books.  But typically (if not always), this page header is in uppercase letters.  Although I could create a new variable for each chapter, and call the variable something like "Chapter Title in Uppercase Letters", this seems rather redundant, if not to mention dumb...IF...there is some trick to have Framemaker 9 uppercase the propercase version of the original variable.  Something like   $Uppercase('Chapter Title')
    Is this possible in FM9?
    Thanks.
    PK
    Search Google for terms like "FrameMaker uppercase character style," without quotes.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Variable declaration/memory use

    Do you use more memory if you do
    int q = stringBuffer.indexOf("cat");
    stringBuffer.insert(q, "your ");
    than
    stringBuffer.insert(stringBuffer.indexOf("cat"), "your ");
    I would think no...

    So you should
    go with the second version!How do you come to that conclusion? This kind of
    thinking just leads to to code cramming andultimately
    hard to maintain code. AND all stack allocationsare
    released when the method finishes.Title: "variable declaration/memory use"
    That's why I came to this conclusion! Let's say that
    in this method you have a for(;;) that never breaks
    (like a daemon), this memory is never released, is
    it?
    Well, to be picky, the question was which uses more memory, not which is better.
    In any case, the answer "A uses more memory than B" does not automatically imply "Therefore B is better." This kind of microoptimization is rarely useful. If you're so tight on stack that coding like that makes a difference between your program running or breaking, then you probably either need more memory, or, more likely, a better design.

  • Batch combine files into one illustrator document - how to open target document?

    I am making a script which will:
    1) Open a folder of Illustrator files
    2) Open each file in the folder (these files are called the source files)
    3) Select all the contents of the source file
    4) Copy the contents of the source file
    5) Paste these contents into a target file as a new layer
    6) Ensure the new layer has the same name as the old source file
    However, I don't know how to tell Illustrator where my target file is. How can I do this?
    Also, when I paste, how can I turn off paste rembers layers. (So the layers get pasted into the new layer that has the same name as the old document).
    Here is my code:
    // JavaScript Document
    //Set up vairaibles
    var destDoc, sourceDoc, sourceFolder;
    // Select the source folder.
    sourceFolder = Folder.selectDialog('Select the folder with Illustrator files that you want to mere into one', '~');
    // If a valid folder is selected
    if (sourceFolder != null) {
              files = new Array();
              // Get all files matching the pattern
              files = sourceFolder.getFiles();
              if (files.length > 0) {
                        // Get the destination to save the files
                        destDoc = document.selectDialog('Select the final saved document', '~');
                        for (i = 0; i < files.length; i++) {
                                  sourceDoc = app.open(files[i]); // returns the document object
                                  var myLayers = sourceDoc.layers; // All layers in Active Document
                                  //Go through all layers of source document and copy artwork
                                  for (i = 0; i < myLayers.length; i++) {
                                            myLayers[i].hasSelectedArtwork = true;
                                  with(sourceDoc) {
                                            var count = pageItems.length;
                                            for (var i = 0; i < count; i++) {
                                                      pageItems[i].selected = true;
                                            redraw();
                                            copy();
                                            for (var i = 0; i < count; i++) {
                                                      pageItems[i].selected = false;
                                  //Create a new title variable that has the title of the source document
                                  var title = sourceDoc.name;
                                  var title = title.substring(0, title.length - 4); //(remove extension from name)
                                  //Close the Source Document
                                  sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
                                  //Open the Destination Document and create a new layer in it that is named after the title variation
                                  var newLayer = destDoc.layers.add();
                                  newLayer.name = title;
                                  //Paste into this new layer
                                  destDoc = app.paste();
              else {
                        alert('No matching files found');
    Thanks in advance for any help   
    Edit: Also, when pasting, how can I paste in place instead of just pasting.

    I have been studying this script. It is similar to what I need except it places the source files (Instead of copying & pasting them)
    http://kelsocartography.com/blog/?p=204
    I have adapted the script to my needs and it works perfectly, except it has the same problem as before: It pastes the first source file, but then it endlessly starts pasting the second source file (in a loop) and so I have to force quit.
    So my new question is, when looping through files how can you get illustrator to move on the next one?
    The original kelsocartography had this line:
    thisPlacedItem = newLayer.placedItems.add()
    thisPlacedItem.file = imageList[i];
    I belive this line is what makes Illustrator move onto the next file, but I am not sure how to adapt it to my code.
    Here is my code so far:
    function getFolder() {
              return Folder.selectDialog('Please select the folder to be imported:', Folder('~'));
    function importFolderAsLayers(selectedFolder) {
              // if a folder was selected continue with action, otherwise quit
              var myDocument;
              if (selectedFolder) {
                        myDocument = app.documents.add();
                        var firstImageLayer = true;
                        var newLayer;
                        var thisPlacedItem;
                        // create document list from files in selected folder
                        var documentList = selectedFolder.getFiles();
                        for (var i = 0; i < documentList.length; i++) {
                                  // open each document in file list
                                  if (documentList[i] instanceof File) {
                                            // get the file name
                                            var fName = documentList[i].name.toLowerCase();
                                            var sourceDoc = app.open(documentList[i]); // returns the document object
                                            var myLayers = sourceDoc.layers; // Select All layers in Active Document
                                            //Go through all layers of source document and copy artwork
                                            for (i = 0; i < myLayers.length; i++) {
                                                      myLayers[i].hasSelectedArtwork = true;
                                            with(sourceDoc) {
                                                      var count = pageItems.length;
                                                      for (var i = 0; i < count; i++) {
                                                                pageItems[i].selected = true;
                                                      redraw();
                                                      copy();
                                                      for (var i = 0; i < count; i++) {
                                                                pageItems[i].selected = false;
                                            //Create a new title variable that has the title of the source document
                                            var title = sourceDoc.name;
                                            var title = title.substring(0, title.length - 4); //(remove extension from name)
                                            //Close the Source Document
                                            // check for supported file formats
                                            if ((fName.indexOf(".eps") == -1)) {
                                                      continue;
                                            } else {
                                                      if (firstImageLayer) {
                                                                newLayer = myDocument.layers[0];
                                                                firstImageLayer = false;
                                                      } else {
                                                                newLayer = myDocument.layers.add();
                                                      // Give the layer the name of the image file
                                                      newLayer.name = fName.substring(0, fName.indexOf("."));
                                                      // Place the image on the artboard
                                                      sourceDoc.close(SaveOptions.DONOTSAVECHANGES);
                                                      //Paste into this new layer
                                                      newLayer = app.paste();
                        if (firstImageLayer) {
                                  // alert("The action has been cancelled.");
                                  // display error message if no supported documents were found in the designated folder
                                  alert("Sorry, but the designated folder does not contain any recognized image formats.\n\nPlease choose another folder.");
                                  myDocument.close();
                                  importFolderAsLayers(getFolder());
              } else {
                        // alert("The action has been cancelled.");
                        // display error message if no supported documents were found in the designated folder
                        alert("Rerun the script and choose a folder with images.");
                        //importFolderAsLayers(getFolder());
    // Start the script off
    importFolderAsLayers(getFolder());

  • Document currency

    Hi,
      I am working on a report in which there are 5 fields gl account(hkont),vendor code(lifnr),vendor name(name1),aging details,currency(document currency-waers).Here the requirement is I have to split the aging details column into 4 columns(current,31-60,61-90,>90).The document currency  has to be summed up according to vendor name and currency key and split into these 4 columns accordingly.I am not getting the logic how can i split the document currency into these 4 columns.Can anyone suggest me the proper solution for this?I am sending the program on which I am working.
    REPORT  zfir087_prctr_payables NO STANDARD PAGE HEADING
           LINE-SIZE 85
           LINE-COUNT 65
           MESSAGE-ID zfi.
                 INCLUDEs                                               *
    ***THE FOLLOWING INCLUDE CONTAINS HEADER FOOTER DETAILS
    INCLUDE  zca_standard_header_footer1.
    ***THE FOLLOWING INCLUDE CONTAINS ALL THE DATA DECLARATIONS AND
    ***SELECTION SCREEN DETAILS
    INCLUDE  zfir087_accounts_payables_top.
    ***THE FOLLOWING INCLUDE CONTAINS ALL THE SUBROUTINES
    INCLUDE  zfir087_accounts_payables_sub.
                 AT SELECTION SCREEN                                    *
    AT SELECTION-SCREEN .
    Validate the profit center entered on selection screen.
      PERFORM f_valiate_profit_center.
    Validate Recon Account entered on selection screen.
      PERFORM f_validate_recon_account.
    Validate Partner profit center entered on selection screen
      PERFORM f_val_part_profit_center.
    *Begin of SRR-17677
    *At Selection Screen Output
    AT SELECTION-SCREEN OUTPUT.
      PERFORM screen_changes.
    *End of SRR-17677
    START-OF-SELECTION.
    *--SIR-07541 Begin
      SELECT * FROM t001 INTO TABLE t_t001.
    *--SIR-07541 End
    Get data from bsik table
    GET bsik.
    MOVE-CORRESPONDING  bsik TO t_ldb_data.                   "#EC ENHOK
      MOVE:bsik-bukrs TO  d_ldb_data-bukrs,
           bsik-lifnr TO  d_ldb_data-lifnr,
           bsik-belnr TO  d_ldb_data-belnr,
           bsik-bldat TO  d_ldb_data-bldat,
           bsik-blart TO  d_ldb_data-blart,
           bsik-gjahr TO  d_ldb_data-gjahr,
           bsik-buzei TO  d_ldb_data-buzei,
           bsik-xblnr TO  d_ldb_data-xblnr,
           bsik-dmbtr TO  d_ldb_data-dmbtr,
           bsik-waers TO  d_ldb_data-waers,
           bsik-wrbtr TO  d_ldb_data-wrbtr,
           bsik-dmbe2 TO  d_ldb_data-dmbe2,
           bsik-vbund TO  d_ldb_data-vbund,
           bsik-ebeln TO  d_ldb_data-ebeln,
           bsik-augdt TO  d_ldb_data-augdt,
           bsik-augbl TO  d_ldb_data-augbl,
           bsik-zuonr TO  d_ldb_data-zuonr,
           bsik-budat TO  d_ldb_data-budat,
           bsik-sgtxt TO  d_ldb_data-sgtxt,
           bsik-hkont TO  d_ldb_data-hkont,
           bsik-zlsch TO  d_ldb_data-zlsch,
           bsik-zlspr TO  d_ldb_data-zlspr,
           bsik-filkd TO  d_ldb_data-filkd,
           bsik-shkzg    TO     d_ldb_data-shkzg,
    Begin of SRR-22879 APARMAA
           bsik-zfbdt    TO     d_ldb_data-zfbdt,
           bsik-zbd1t    TO     d_ldb_data-zbd1t,
           bsik-zbd2t    TO     d_ldb_data-zbd2t,
           bsik-zbd3t    TO     d_ldb_data-zbd3t,
           bsik-rebzg    TO     d_ldb_data-rebzg.
    End of SRR-22879 APARMAA
      APPEND d_ldb_data TO t_ldb_data.
    Get data from bkpf table
    GET bkpf.
      MOVE:bkpf-bukrs TO d_bkpf-bukrs,
           bkpf-belnr TO d_bkpf-belnr,
           bkpf-gjahr TO d_bkpf-gjahr,
           bkpf-awkey TO d_bkpf-awkey,
           bkpf-hwae2 TO d_bkpf-hwae2.
      APPEND d_bkpf TO t_bkpf.
    END-OF-SELECTION.
    Get purchasing information from rseg table
      IF NOT t_bkpf[] IS INITIAL.
        PERFORM f_get_ebeln_from_rseg.
      ENDIF.
    Get profit center and partner profit center from bfok_a table
      IF NOT  t_ldb_data[] IS INITIAL.
        PERFORM f_get_data_from_bfok_a.
      ENDIF.
    Begin of SRR-22879 APARMAA
      IF NOT  t_ldb_data[] IS INITIAL.
        PERFORM f_get_data_from_lfa1.
      ENDIF.
    End of SRR-22879 APARMAA
    Calculate the sum of the dmbtr field
      PERFORM f_get_sum_from_bfok_a.
    Split the amount in doc currency(wrbtr) in bsik
      PERFORM f_split_wrbtr_in_bsik.
      IF NOT t_final[] IS INITIAL.
    LOGO FOR ALV GRID
        v_logo = c_logo.
        v_title = sy-title.
        v_repid = sy-repid.
    BUILD PRINT SETTINGS
        PERFORM f_build_print_settings USING f_print_settings.
    BUILD LAYOUT
        PERFORM f_build_layout USING f_grid_layout v_title.
    BUILD EVENTS
        PERFORM f_build_events USING t_events[] .
    *DISPLAY REPORT
        IF p_disp EQ 'X'.                                       "SRR-17677
          PERFORM f_display_data.
        ENDIF.                                                  "SRR-17677
      Begin of SRR-17677
    Begin of SRR-22879 APARMAA
       IF p_expo = 'X'.
         EXPORT T_R087 FROM T_FINAL TO MEMORY ID 'R087'.
       ENDIF.
        IF p_expo = 'X'.
         MOVE-CORRESPONDING t_final TO t_final1.              "SRR-24422
          t_final1[] = t_final[].                               "SRR-24422
          EXPORT t_r087 FROM t_final1 TO MEMORY ID 'R087'.
        ENDIF.
    End of SRR-22879 APARMAA
      End of SRR-17677
    Refresh and Clear all internal tables.
        PERFORM f_free_and_clear.
      ELSE.
    NO RECORDS MATCH THE SELECTION CRITERIA
        IF p_disp EQ 'X'.                                       "SRR-17677
          MESSAGE i000 WITH
            'No data exists for the given selection criteria'(050).
        ENDIF.                                                  "SRR-17677
        EXIT.
      ENDIF.
                     DICTIONARY TABLES
    TABLES :bfok_a, lfa1, lfb1, bsik, bkpf,cepc.                "#EC NEEDED
                       TYPES
    *TYPES:
    DATA:
    Type like bsik table
      BEGIN OF d_ldb_data,
        bukrs LIKE  bsik-bukrs,  "COMPANY CODE
        lifnr LIKE  bsik-lifnr,  "Account Number of Vendor or Creditor
        belnr LIKE  bsik-belnr,  "ACCOUNTING DOCUMENT NUMBER
        bldat LIKE  bsik-bldat,  "DOCUMENT DATE IN DOCUMENT
        blart LIKE  bsik-blart,  "DOCUMENT TYPE
        gjahr LIKE  bsik-gjahr,  "FISCAL YEAR
        buzei LIKE  bsik-buzei,
        "NUMBER OF LINE ITEM WITHIN ACCOUNTING DOCUMENT
        xblnr LIKE  bsik-xblnr,  "REFERENCE DOCUMENT NUMBER
        dmbtr LIKE  bsik-dmbtr,  "AMOUNT IN LOCAL CURRENCY
    *--SIR-07541 Begin
         lwaer  LIKE  t001-waers,  "LOCAL CURRENCY KEY
         hwae2  LIKE  bkpf-hwae2,  "2ND LOCAL CURRENCY KEY
    *--SIR-07541 End
        waers LIKE  bsik-waers,  "CURRENCY KEY
        wrbtr LIKE  bsid-wrbtr,  "AMOUNT IN DOCUMENT CURRENCY
        dmbe2 LIKE  bsik-dmbe2,  "AMOUNT IN SECOND LOCAL CURRENCY
        vbund LIKE  bsik-vbund,  "COMPANY ID OF TRADING PARTNER
        ebeln LIKE  bsik-ebeln,  "BILLING DOCUMENT
        augdt LIKE  bsik-augdt,  "CLEARING DATE
        augbl LIKE  bsik-augbl,  "DOCUMENT NUMBER OF THE CLEARING
                                      "DOCUMENT
        zuonr LIKE  bsik-zuonr,  "ASSIGNMENT NUMBER
        budat LIKE  bsik-budat,  "POSTING DATE IN THE DOCUMENT
        sgtxt LIKE  bsik-sgtxt,  "ITEM TEXT
        hkont LIKE  bsik-hkont,  "GENERAL LEDGER ACCOUNT
        zlsch LIKE  bsik-zlsch,  "PAYMENT METHOD
        zlspr LIKE  bsik-zlspr,  "PAYMENT BLOCK KEY
        filkd LIKE  bsik-filkd,  "ACCOUNT NUMBER OF THE BRANCH
        shkzg     LIKE  bsik-shkzg,  "Debit/Credit Indicator
        awkey LIKE bkpf-awkey,   "Reference Key
        prctr LIKE bfok_a-prctr, "Profit Center
        pprct LIKE bfok_a-pprct, "Partner Profit Center
        status TYPE c,           "Status indicator
        korrk LIKE bfok_a-korrk,  "Adjustment Account
    Begin of SRR-22879 APARMAA
        name1   LIKE lfa1-name1,    "Vendor Name
        duedate LIKE sy-datum,      "Due Date
        aging(5) TYPE c,            "Aging Indiacator
        zfbdt   LIKE bsik-zfbdt,
        zbd1t   LIKE bsik-zbd1t,
        zbd2t   LIKE bsik-zbd2t,
        zbd3t   LIKE bsik-zbd3t,
        rebzg   LIKE bsik-rebzg,
    End of SRR-22879 APARMAA
      END OF d_ldb_data,
    Type declaration of type bkpf table
      BEGIN OF d_bkpf,
        bukrs LIKE bkpf-bukrs,       "Company Code
        belnr LIKE bkpf-belnr,       "Accounting Document Number
        gjahr LIKE bkpf-gjahr,       "Fiscal Year
        awkey LIKE bkpf-awkey,       "Reference Key
    *--SIR-07541 Begin
        hwae2 LIKE bkpf-hwae2,       "@nd local currency
    *--SIR-07541 End
      END OF d_bkpf,
    Type declaration of type rseg table
      BEGIN OF d_rseg ,
      belnr  LIKE rseg-belnr,  "Accounting Document Number
      gjahr  LIKE rseg-gjahr,  "Fiscal Year
      buzei  LIKE rseg-buzei,  "Document item in invoice document
      ebeln  LIKE rseg-ebeln,  "Purchasing Document Number
      bukrs  LIKE rseg-bukrs,  "Company Code
      END OF d_rseg,
    Begin of SRR-22879 APARMAA
    Type declaration of type lfa1 table
      BEGIN OF d_lfa1,
      lifnr LIKE lfa1-lifnr,
      name1 LIKE lfa1-name1,
      END OF d_lfa1,
    End of SRR-22879 APARMAA
    Type declaration of type bfok_a table
      BEGIN OF d_bfok_a,
      bukrs LIKE bfok_a-bukrs,  "Company Code
      belnr LIKE bfok_a-belnr,  "Accounting Document Numbe
      gjahr LIKE bfok_a-gjahr,  "Fiscal Year
      buzei LIKE bfok_a-buzei,  "Number of Line Item
      auzei LIKE bfok_a-auzei,
                     "No of Breakdown by Account Assignments for FI Document
      hkont LIKE bfok_a-hkont,  "General Ledger Account
      shkzg LIKE bfok_a-shkzg,  "Debit/Credit Indicator
      dmbtr LIKE bfok_a-dmbtr,  "AMOUNT IN DOCUMENT CURRENCY
      dmbe2 LIKE bfok_a-dmbe2,  "Amount in Second Local Currency
      prctr LIKE bfok_a-prctr,  "Profit Center
      pprct LIKE bfok_a-pprct,  "Partner Profit Center
      korrk LIKE bfok_a-korrk,  "Adjustment Account
      counter TYPE i,
      END OF d_bfok_a.
    Begin of SRR-22879 APARMAA
    Creation of t_final1 table for export to R091.
    Since t_ldb_data has been modified for this SRR, exporting of t_final
    results in a short dump when R091 is executed.Hence t_final1 is
    created with the original structure of t_ldb_data.This will be
    exported to R091.
    DATA:BEGIN OF d_final1,
         bukrs  LIKE  bsik-bukrs,  "COMPANY CODE
         lifnr  LIKE  bsik-lifnr,  "Account Number of Vendor or Creditor
         belnr  LIKE  bsik-belnr,  "ACCOUNTING DOCUMENT NUMBER
         bldat  LIKE  bsik-bldat,  "DOCUMENT DATE IN DOCUMENT
         blart  LIKE  bsik-blart,  "DOCUMENT TYPE
         gjahr  LIKE  bsik-gjahr,  "FISCAL YEAR
         buzei  LIKE  bsik-buzei,
         "NUMBER OF LINE ITEM WITHIN ACCOUNTING DOCUMENT
         xblnr  LIKE  bsik-xblnr,  "REFERENCE DOCUMENT NUMBER
         dmbtr  LIKE  bsik-dmbtr,  "AMOUNT IN LOCAL CURRENCY
    *--SIR-07541 Begin
         lwaer  LIKE  t001-waers,  "LOCAL CURRENCY KEY
         hwae2  LIKE  bkpf-hwae2,  "2ND LOCAL CURRENCY KEY
    *--SIR-07541 End
         waers  LIKE  bsik-waers,  "CURRENCY KEY
         wrbtr  LIKE  bsid-wrbtr,  "AMOUNT IN DOCUMENT CURRENCY
         dmbe2  LIKE  bsik-dmbe2,  "AMOUNT IN SECOND LOCAL CURRENCY
         vbund  LIKE  bsik-vbund,  "COMPANY ID OF TRADING PARTNER
         ebeln  LIKE  bsik-ebeln,  "BILLING DOCUMENT
         augdt  LIKE  bsik-augdt,  "CLEARING DATE
         augbl  LIKE  bsik-augbl,  "DOCUMENT NUMBER OF THE CLEARING
                                      "DOCUMENT
         zuonr  LIKE  bsik-zuonr,  "ASSIGNMENT NUMBER
         budat  LIKE  bsik-budat,  "POSTING DATE IN THE DOCUMENT
         sgtxt  LIKE  bsik-sgtxt,  "ITEM TEXT
         hkont  LIKE  bsik-hkont,  "GENERAL LEDGER ACCOUNT
         zlsch  LIKE  bsik-zlsch,  "PAYMENT METHOD
         zlspr  LIKE  bsik-zlspr,  "PAYMENT BLOCK KEY
         filkd  LIKE  bsik-filkd,  "ACCOUNT NUMBER OF THE BRANCH
         shkzg     LIKE  bsik-shkzg,  "Debit/Credit Indicator
         awkey LIKE bkpf-awkey,       "Reference Key
         prctr LIKE bfok_a-prctr,     "Profit Center
         pprct LIKE bfok_a-pprct,     "Partner Profit Center
         status TYPE c,               "Status indicator
         korrk LIKE bfok_a-korrk,     "Adjustment Account
         END OF d_final1.
    End of SRR-22879 APARMAA
                             TYPE-POOLS
    TYPE-POOLS: slis, " TYPE POOL FOR ALV REPORT
                slist. " System: List Processor for ALV List
                        ALV SPECIFIC DECLARATIONS
    DATA:
    TABLES REQUIRED SPECIFICALLY FOR ALV REPORTING
          t_sortcat        TYPE  slis_t_sortinfo_alv   ,
           t_field_catalog  TYPE slis_t_fieldcat_alv,
           t_events         TYPE slis_t_event,
                   FIELD STRINGS (Naming convention F_)
          f_grid_settings  TYPE lvc_s_glay,                     "#EC *
          f_grid_layout    TYPE slis_layout_alv,                "#EC *
          f_print_settings TYPE slis_print_alv.       "print settings
                         INTERNAL TABLES
    Int table to get the data from bsik table using logical databse
    DATA: t_ldb_data  LIKE STANDARD TABLE OF d_ldb_data,
    Int table to get the data from bkpf table
          t_bkpf LIKE STANDARD TABLE OF d_bkpf,
    Int table to store the data from rseg table
          t_rseg LIKE STANDARD TABLE OF d_rseg,
    Int table to store the data from bfok_a table
          t_bfok_a LIKE STANDARD TABLE OF d_bfok_a.
    *Int table to store the sum of the values of field dmbtr in t_bfok_a
    *table
    DATA:  t_bfok_a1 LIKE STANDARD TABLE OF d_bfok_a,
           t_bfok_a2 LIKE STANDARD TABLE OF d_bfok_a WITH HEADER LINE.
    DATA:  t_final LIKE STANDARD TABLE OF d_ldb_data WITH HEADER LINE.
    *Begin of SRR-17677
    Begin of SRR-22879 APARMAA
    *DATA: t_r087 LIKE STANDARD TABLE OF d_ldb_data WITH HEADER LINE.
    DATA: t_r087 LIKE STANDARD TABLE OF d_final1 WITH HEADER LINE.
    End of SRR-22879 APARMAA
    *End of SRR-17677
    Begin of SRR-22879 APARMAA
    DATA: t_lfa1 LIKE STANDARD TABLE OF d_lfa1.
    DATA: t_ldb_data1 LIKE STANDARD TABLE OF d_ldb_data.
    DATA: t_final1 LIKE STANDARD TABLE OF d_final1 WITH HEADER LINE.
    End of SRR-22879 APARMAA
    *--SIR-07541 Begin
      DATA: wa_t001 TYPE t001,
            t_t001  LIKE STANDARD TABLE OF wa_t001.
    *--SIR-07541 End
                             VARIABLES
    DATA: v_title LIKE sy-title,            " Variable for Report Title
          v_repid LIKE sy-repid,            " Variable for Report Name
          v_base_amount LIKE bfok_a-dmbtr,  " Base amount to be split
          v_amount_sum  LIKE bfok_a-dmbtr,  " Base amount sum
    Begin of SRR-22879 APARMAA
         v_aging(5) type c.                                   "SRR-24422
          v_aging(5) type n.                                    "SRR-24422
    End of SRR-22879 APARMAA
    FIELD-SYMBOLS: <ldb_data> LIKE LINE OF  t_ldb_data,
                   <bfok_a>   LIKE LINE OF  t_bfok_a,
                   <bfok_a1>  LIKE LINE OF  t_bfok_a1,
                   <bkpf>   LIKE LINE OF  t_bkpf,
                   <rseg>   LIKE LINE OF  t_rseg,
    Begin of SRR-22879 APARMAA
                   <lfa1>   LIKE LINE OF  t_lfa1.
    End of SRR-22879 APARMAA
                            RANGES
                             CONSTANTS
    CONSTANTS:c_logo(5)     TYPE c VALUE  'R087',
              c_flag        TYPE c VALUE  'X',
              c_flag1       TYPE c VALUE  'x',
              c_010         TYPE p DECIMALS 6 VALUE '0.10',
              c_f           TYPE c VALUE  'F',
              c_debit       TYPE c VALUE  'H',
              c_xyz(3)      TYPE c VALUE 'XYZ',                 "SRR-17677
              c_waers      LIKE bsid-waers VALUE 'JPY',
    Begin of SRR-22879 APARMAA
              c_0to29(5)    VALUE '<30',
              c_30to59(5)   VALUE '31-60',
              c_60to89(5)   VALUE '61-90',
              c_90on(5)     VALUE '90+'.
    End of SRR-22879 APARMAA
                            SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_prctr  FOR cepc-prctr," Profit center
                    s_hkont  FOR bsik-hkont,"General Ledger Account
                    s_pprct FOR bfok_a-pprct. "Partner Profit Center
    SELECTION-SCREEN END OF BLOCK b1.
    Selection screen for ALV List displat
    SELECTION-SCREEN BEGIN OF BLOCK disp WITH FRAME TITLE text-004.
    PARAMETERS: p_grid RADIOBUTTON GROUP r2 DEFAULT 'X'
                MODIF ID abc, " Grid Display
                p_list RADIOBUTTON GROUP r2 MODIF ID abc.  " List Display
    SELECTION-SCREEN END OF BLOCK disp.
    Begin of SRR-22879 APARMAA
    SELECTION-SCREEN BEGIN OF BLOCK use_new WITH FRAME TITLE text-055.
    PARAMETERS: p_use AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK use_new.
    End of SRR-22879 APARMAA
    *Begin of SRR-17677
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-054.
    PARAMETERS: p_disp AS CHECKBOX DEFAULT 'X' MODIF ID xyz,
                p_expo AS CHECKBOX MODIF ID xyz.
    SELECTION-SCREEN END OF BLOCK b2.
    FORM f_valiate_profit_center .
      IF NOT s_prctr[] IS INITIAL.
    Local variable for profit center(s_prctr) validation
        DATA:v_prctr LIKE cepc-prctr.                           "#EC NEEDED
        SELECT SINGLE prctr FROM cepc INTO v_prctr WHERE prctr IN s_prctr.
                                                                "#EC *
        IF sy-subrc NE 0.
    Message please enter valid profit center
          MESSAGE e000(zfi) WITH   text-002.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_valiate_profit_center
    *&      Form  f_get_ebeln_from_rseg
    Purpose:To get the purchase doc number from the table rseg
    FORM f_get_ebeln_from_rseg .
    Select belnr,gjahr buzei ebeln fields  from rseg table
      SELECT belnr
             gjahr
             buzei
             ebeln
             bukrs
             FROM rseg INTO TABLE t_rseg
             FOR ALL ENTRIES IN t_bkpf
             WHERE belnr = t_bkpf-awkey+0(10) AND
                   gjahr = t_bkpf-gjahr       AND
                   bukrs = t_bkpf-bukrs .
    Sort and delete the adjacent duplicates from t_rseg table
      IF sy-subrc EQ 0.
        SORT t_rseg BY bukrs belnr gjahr .
        DELETE ADJACENT DUPLICATES FROM t_rseg COMPARING belnr gjahr bukrs.
      ENDIF.
    ENDFORM.                    " f_get_ebeln_from_rseg
    *&      Form  f_get_data_from_bfok_a
    Purpose:Get data from bfok_a table
    FORM f_get_data_from_bfok_a .
    Select data from bfok_a table
      SELECT bukrs
             belnr
             gjahr
             buzei
             auzei
             hkont
             shkzg
             dmbtr
             dmbe2
             prctr
             pprct
             korrk
             FROM  bfok_a
             INTO TABLE t_bfok_a FOR ALL ENTRIES IN t_ldb_data
             WHERE bukrs = t_ldb_data-bukrs AND
                   belnr = t_ldb_data-belnr AND
                   gjahr = t_ldb_data-gjahr AND
                   buzei = t_ldb_data-buzei AND
                   pprct IN s_pprct.
    Sort t_bfok_a table on fields bukrs belnr gjahr buzei
      IF sy-subrc EQ 0.
        SORT t_bfok_a BY bukrs belnr gjahr buzei auzei ASCENDING dmbtr
                                                       DESCENDING.
      ENDIF.
    ENDFORM.                    " f_get_data_from_bfok_a
    *&      Form  f_get_sum_from_bfok_a
    purpose:To get the sum of the line item field of dmbtr
    FORM f_get_sum_from_bfok_a .
    Line item counter
      DATA : l_index LIKE sy-tabix,  "To get the index
             v_counter TYPE i.       "Counter to store line items
      t_bfok_a2[] = t_bfok_a[].
    Get the sum of all the line items dmbtr(amount) field
      LOOP AT t_bfok_a2 .
    MOVE:t_bfok_a TO wa_bfok_a.
    Increment the line item counter
        v_counter = v_counter + 1.
        IF t_bfok_a2-shkzg EQ c_debit.
          t_bfok_a2-dmbtr = t_bfok_a2-dmbtr * -1.
          t_bfok_a2-dmbe2 = t_bfok_a2-dmbe2 * -1.
          MODIFY t_bfok_a2.
        ENDIF.
    Find the sum of dmbtr field at end of belnr
        AT END OF buzei.
          SUM.
          MOVE-CORRESPONDING t_bfok_a2  TO d_bfok_a.
          d_bfok_a-counter = v_counter.
          APPEND d_bfok_a TO t_bfok_a1.
          CLEAR: v_counter.
        ENDAT.
        CLEAR t_bfok_a2.
      ENDLOOP.
    Sort t_bfok_a1 on bukrs belnr gjahr buzei
      SORT t_bfok_a1 BY bukrs belnr gjahr buzei ASCENDING dmbtr DESCENDING.
      SORT t_ldb_data BY bukrs belnr gjahr buzei ASCENDING .
    SORT t_bfod_a1 BY bukrs belnr gjahr buzei.
      t_bfok_a[] = t_bfok_a2[].
      FREE t_bfok_a2[].
    Find the sum of line items having single line item
      LOOP AT t_bfok_a1 ASSIGNING <bfok_a1> WHERE counter = 1.
        l_index = sy-tabix.
        READ TABLE t_ldb_data WITH KEY bukrs = <bfok_a1>-bukrs
                                       belnr = <bfok_a1>-belnr
                                       gjahr = <bfok_a1>-gjahr
                                       buzei = <bfok_a1>-buzei
                                       ASSIGNING <ldb_data>
                                       BINARY SEARCH.
        IF sy-subrc = 0.
          MOVE-CORRESPONDING <ldb_data> TO t_final.
    *--SIR-07541 Begin
          READ TABLE t_t001 INTO wa_t001 WITH KEY bukrs = <bfok_a1>-bukrs.
          IF sy-subrc = 0.
            t_final-lwaer = wa_t001-waers.
          ENDIF.
          READ TABLE t_bkpf INTO d_bkpf WITH KEY bukrs = <bfok_a1>-bukrs
                                                  belnr = <bfok_a1>-belnr
                                                  gjahr = <bfok_a1>-gjahr.
          IF sy-subrc = 0.
            t_final-hwae2 = d_bkpf-hwae2.
          ENDIF.
    *--SIR-07541 End
    Begin of SRR-22879 APARMAA
    Move Vendor Name
          READ TABLE t_lfa1 WITH KEY lifnr = <ldb_data>-lifnr
                                     ASSIGNING <lfa1>
                                     BINARY SEARCH.
          IF sy-subrc EQ 0.
            MOVE:<lfa1>-name1 TO t_final-name1.
          ENDIF.
    Calculate Due Date
          CALL FUNCTION 'NET_DUE_DATE_GET'
            EXPORTING
              i_zfbdt = <ldb_data>-zfbdt
              i_zbd1t = <ldb_data>-zbd1t
              i_zbd2t = <ldb_data>-zbd2t
              i_zbd3t = <ldb_data>-zbd3t
              i_shkzg = <ldb_data>-shkzg
              i_rebzg = <ldb_data>-rebzg
              i_koart = 'K'
            IMPORTING
              e_faedt = t_final-duedate.
    Calculate Aging Details.
          v_aging = sy-datum - <ldb_data>-zfbdt.
          IF v_aging GE 0  AND
             v_aging LE 29.
            t_final-aging = c_0to29.
          ENDIF.
          IF v_aging GE 30 AND
             v_aging LE 59.
            t_final-aging = c_30to59.
          ENDIF.
          IF v_aging GE 60 AND
             v_aging LE 89.
            t_final-aging = c_60to89.
          ENDIF.
          IF v_aging GE 90.
            t_final-aging = c_90on.
          ENDIF.
    End of SRR-22879 APARMAA
          PERFORM f_check_debit_credit_indicator USING <ldb_data>-shkzg.
          READ TABLE t_bfok_a WITH KEY bukrs = <bfok_a1>-bukrs
                                      belnr = <bfok_a1>-belnr
                                      gjahr = <bfok_a1>-gjahr
                                      buzei = <bfok_a1>-buzei
                                      ASSIGNING <bfok_a>
                                      BINARY SEARCH.
          IF sy-subrc EQ 0.
    *--SRR-25731 Begin
            IF t_final-dmbtr ne <bfok_a1>-dmbtr.
              CATCH SYSTEM-EXCEPTIONS arithmetic_errors = 5.
    *For other break down line items the split amount is calculated as below
                t_final-wrbtr = ( <ldb_data>-wrbtr  * <bfok_a>-dmbtr )
                                     / <ldb_data>-dmbtr.
              ENDCATCH.
            ENDIF.
    *--SRR-25731 End
            v_amount_sum = v_amount_sum + t_final-wrbtr.
        Move dmbtr,bmbe2,korrk fields from t_bfok_a to t_final int table
            MOVE:<bfok_a>-dmbtr TO t_final-dmbtr,
                 <bfok_a>-dmbe2 TO t_final-dmbe2,
                 <bfok_a>-korrk TO t_final-korrk.
          ENDIF.
      Populate the status field to t_final int table
      Read t_bkpf table
          READ TABLE t_bkpf WITH KEY    bukrs    = <ldb_data>-bukrs
                                        belnr    = <ldb_data>-belnr
                                        gjahr    = <ldb_data>-gjahr
                                        ASSIGNING <bkpf>
                                        BINARY SEARCH.
          IF sy-subrc EQ 0.
    Read table t_rseg
            READ TABLE t_rseg WITH KEY bukrs =  <bkpf>-bukrs
                                       belnr =  <bkpf>-awkey+0(10)
                                       gjahr =  <bkpf>-gjahr
                                       ASSIGNING <rseg>
                                       BINARY SEARCH.
            IF sy-subrc NE 0.
    Populate status field with value 'F'
              t_final-status = c_f.
            ENDIF.
          ENDIF.
        PERFORM f_check_debit_credit_indicator USING <bfok_a>-shkzg.
          t_final-prctr = <bfok_a>-prctr.
          t_final-pprct = <bfok_a>-pprct.
          APPEND t_final.
          CLEAR:  t_final.  "t_bfok_a.
          DELETE t_bfok_a1 INDEX l_index.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " f_get_sum_from_bfok_a
    *&      Form  f_build_print_settings
      in_print
    FORM f_build_print_settings  USING in_print TYPE slis_print_alv .
      in_print-no_print_selinfos  = c_flag.
      in_print-no_print_listinfos = c_flag.
      in_print-no_coverpage       = c_flag.
    ENDFORM.                    " f_build_print_settings
    *&      Form  f_build_layout
       Purpose:To build ALV layout
          P_F_GRID_LAYOUT  -Grid layout
         P_V_TITLE         - Title
    FORM f_build_layout  USING  in_layout TYPE slis_layout_alv in_repid TYPE
    any.
      in_layout-zebra             = 'X'.
      in_layout-window_titlebar   = in_repid. "Put Report Name in titlebar
    in_layout-expand_fieldname  = t_slis_ev_item_data_expand.
      in_layout-colwidth_optimize = 'X'.       "Optimize column widths
    Set Grid display settings
      f_grid_settings-coll_top_p = c_flag1.
      f_grid_settings-coll_end_l = c_flag1.
      f_grid_settings-top_p_only = c_flag1.
      f_grid_settings-eol_p_only = c_flag1.
      in_layout-totals_text       = 'TOTAL:'(035).
      in_layout-subtotals_text    = 'SubTotal:'(036).
    ENDFORM.                    " f_build_layout
    *&      Form  f_build_events
         To build events
         P_T_EVENTS[]  ->events
    FORM f_build_events  USING    p_events TYPE slis_t_event.
      DATA l_f_events TYPE slis_alv_event.
      CLEAR l_f_events.
      l_f_events-name = 'TOP_OF_PAGE'.
      l_f_events-form = 'PREPARE_ALV_HEADER_G'.
      APPEND l_f_events TO p_events.
    ENDFORM.                    " f_build_events
    *&      Form  f_display_data
       To display data
    FORM f_display_data .
    BUILD FIELD CATALOG
      PERFORM f_fieldcat_build :
    Company code
      USING 'BUKRS' 'T_FINAL' ' ' ' ' ' ' 'Comp Code'(031)
    Customer
      USING 'LIFNR' 'T_FINAL' ' ' ' ' ' ' 'Vendor'(005)
    Account Number of the Branch
      USING 'FILKD' 'T_FINAL' ' ' ' ' ' ' 'Branch'(044)
    General Ledger Account
      USING 'HKONT' 'T_FINAL' ' ' ' ' 'X' 'Genderal Ledger Account'(027)
    Adjustment Account
      USING 'KORRK' 'T_FINAL' ' ' ' ' 'X' 'Adjustment Account'(053)
    Document Number
      USING 'BELNR' 'T_FINAL' ' ' ' ' ' ' 'Document Number'(006)
    Document date
      USING 'BLDAT' 'T_FINAL' ' ' ' ' ' ' 'Document date'(007)
    Document type
      USING 'BLART' 'T_FINAL' ' ' ' ' ' ' 'Document type'(008)
    Fiscal Year
      USING 'GJAHR' 'T_FINAL' ' ' ' ' ' ' 'Fiscal Year'(009)
    Line item
      USING 'BUZEI' 'T_FINAL' ' ' ' ' ' ' 'Line item'(010)
    Reference
      USING 'XBLNR' 'T_FINAL' ' ' ' ' ' ' 'Reference'(011)
    *--SIR-07541 Begin
    Local currency
      USING 'LWAER' 'T_FINAL' ' ' ' ' ' ' 'Local Currency'(040)
    *--SIR-07541 End
    Amount in local currency
      USING 'DMBTR' 'T_FINAL' ' ' ' ' ' ' 'Amount in local currency'(012)
      ' '  ' ' ' ' 'X' 'LWAER' '',
    Document Currency
      USING 'WAERS' 'T_FINAL' ' ' ' ' ' ' 'Document Currency'(013)
    Amount in document currency
      USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' 'Amount in document currency'(014)
      ' '  ' ' ' ' 'X' 'WAERS' '',
    *--SIR-07541 Begin
    2nd Local Currency
      USING 'HWAE2' 'T_FINAL' ' ' ' ' ' ' '2nd Local Currency'(041)
    *--SIR-07541 End
    Amount in Second Local Currency
      USING 'DMBE2' 'T_FINAL' ' ' ' ' ' '
      'Amount in Second Local currency'(015)
      ' '  ' ' ' ' 'X' 'HWAE2' '',
    Profit Center
      USING 'PRCTR' 'T_FINAL' ' ' ' ' ' ' 'Profit Center'(016)
    Partner Profit Center
      USING 'PPRCT' 'T_FINAL' ' ' ' ' ' ' 'Partner Profit Center'(017)
    Trading Partner
      USING 'VBUND' 'T_FINAL' ' ' ' ' ' ' 'Trading Partner'(018)
    Purchasing doc no
      USING 'EBELN' 'T_FINAL' ' ' ' ' ' ' 'Purchasing Document number'(019)
    USING 'AWKEY' 'T_FINAL' ' ' ' ' ' ' 'Reference key'(020)
    Status  field
      USING 'STATUS' 'T_FINAL' ' ' ' ' ' ' 'Status'(021)
    Clearing date
      USING 'AUGDT' 'T_FINAL' ' ' ' ' ' ' 'Clearing date'(022)
      ' '  'X' ' ' ' ' ' ' '',
    Document Number of the Clearing Document
      USING 'AUGBL' 'T_FINAL' ' ' ' ' 'X' 'Clearing Document No'(023)
      ' '  'X' ' ' ' ' ' ' '',
    Assignment
      USING 'ZUONR' 'T_FINAL' ' ' ' ' 'X' 'Assignment'(024)
      ' '  'X' ' ' ' ' ' ' '',
    Posting Date
      USING 'BUDAT' 'T_FINAL' ' ' ' ' 'X' 'Posting Date'(025)
      ' '  'X' ' ' ' ' ' ' '',
    Item Text
      USING 'SGTXT' 'T_FINAL' ' ' ' ' 'X' 'Item Text'(026)
      ' '  'X' ' ' ' ' ' ' '',
    Payment method
      USING 'ZLSCH' 'T_FINAL' ' ' ' ' 'X' 'Payment method'(028)
      ' '  'X' ' ' ' ' ' ' '',
    Payment Block Key
      USING 'ZLSPR' 'T_FINAL' ' ' ' ' 'X' 'Payment Block Key'(029)
      ' '  'X' ' ' ' ' ' ' ''.
    Begin of SRR-22879 APARMAA
      IF p_use EQ 'X'.
        PERFORM f_fieldcat_build :
    Vendor Name
         USING 'NAME1' 'T_FINAL' ' ' ' ' ' ' 'Vendor Name'(054)
    Due Date
         USING 'DUEDATE' 'T_FINAL' ' ' ' ' ' ' 'Due Date'(056)
    BEGIN OF SRR 25449
        USING 'AGING' 'T_FINAL' ' ' ' ' ' ' 'Aging Details'(057)
    Current
          Using 'WRBTR' 'T_FINAL' ' ' ' ' ' ' 'current'(061)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    31-60
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '31-60'(058)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    61-90
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '61-90'(059)
          ' '  ' ' ' ' ' ' 'WAERS' '',
    >90
          USING 'WRBTR' 'T_FINAL' ' ' ' ' ' ' '>90'(060)
          ' '  ' ' ' ' ' ' 'WAERS' ''.
    END OF SRR 25449
      ENDIF.
    End of SRR-22879 APARMAA
    BUILD SORT CATALOG
      PERFORM f_sortcat_build :
    SORT BY COMPANY CODE
      USING '01' 'BUKRS' 'T_FINAL' 'X' 'X',
    SORT BY Venodr Number
      USING '01' 'LIFNR' 'T_FINAL' 'X' 'X',
    SORT BY Document Number
      USING '01' 'BELNR' 'T_FINAL' 'X' ' ',
    SORT BY Fiscal Year
      USING '01' 'GJAHR' 'T_FINAL' 'X' ' '.
       IF p_list = 'X'.
    *GENERATE CLASSIC LIST LAYOUT
        PERFORM f_call_alv_list_view1.
      ELSEIF p_grid = 'X'.
    *--GENERATE CLASSIC GRID LAYOUT
        PERFORM f_call_alv_grid_viewer1.
      ENDIF.
    ENDFORM.                    " f_display_data
    *&      Form  f_fieldcat_build
      To build field catelog
    FORM f_fieldcat_build USING    l_fieldname TYPE slis_fieldname
                                   l_tabname   TYPE slis_tabname
                                   l_reftab    LIKE dd03p-tabname
                                   l_reffield  LIKE dd03p-fieldname
                                   l_outputlen TYPE any
                                   l_seltext_l LIKE dd03p-scrtext_l
                                   l_hotspot   TYPE c
                                   l_no_out    TYPE c
                                   l_no_zero   TYPE c
                                   l_do_sum    TYPE c
                                   l_cfldname  TYPE char30
                                   l_col_pos   LIKE sy-cucol.
    *LOCAL DATA
      DATA : l_wa_fieldcat LIKE LINE OF t_field_catalog.
      l_wa_fieldcat-fieldname     = l_fieldname.
      l_wa_fieldcat-tabname       = l_tabname.
      l_wa_fieldcat-outputlen     = l_outputlen.
      l_wa_fieldcat-hotspot       = l_hotspot.
      l_wa_fieldcat-no_out        = l_no_out .
      l_wa_fieldcat-no_zero       = l_no_zero .
      l_wa_fieldcat-do_sum        = l_do_sum .
      l_wa_fieldcat-cfieldname    = l_cfldname.
      l_wa_fieldcat-col_pos       = l_col_pos.
    *--SIR-07541 Begin
      IF l_fieldname = 'DMBTR'.
        l_wa_fieldcat-cfieldname = 'LWAER'.
      ENDIF.
      IF l_fieldname = 'WRBTR'.
        l_wa_fieldcat-cfieldname = 'WAERS'.
      ENDIF.
      IF l_fieldname = 'DMBE2'.
        l_wa_fieldcat-cfieldname = 'HWAE2'.
      ENDIF.
    *--SIR-07541 End
      IF NOT l_seltext_l IS INITIAL.
        l_wa_fieldcat-seltext_l     = l_seltext_l.
      ELSE.
        l_wa_fieldcat-ref_fieldname = l_reffield.
        l_wa_fieldcat-ref_tabname   = l_reftab.
      ENDIF.
      APPEND l_wa_fieldcat TO t_field_catalog.
      CLEAR l_wa_fieldcat.
    ENDFORM.                    " f_fieldcat_build
    *&      Form  f_sortcat_build
         To sort the catelog
    FORM f_sortcat_build USING l_spos      LIKE alvdynp-sortpos
                                 l_fieldname TYPE slis_fieldname
                                 l_tabname   TYPE slis_tabname
                                 l_up        TYPE c
                                 l_subtot    TYPE c.
    LOCAL DATA
      DATA:  l_sort TYPE slis_sortinfo_alv.
      l_sort-spos      = l_spos.
      l_sort-fieldname = l_fieldname.
      l_sort-tabname   = l_tabname.
      l_sort-up        = l_up.
      l_sort-subtot    = l_subtot.
      APPEND l_sort TO t_sortcat.
      CLEAR l_sort.
    ENDFORM.                    " f_sortcat_build
    *&      Form  f_call_alv_list_view1
        To call alv_list_display
    FORM f_call_alv_list_view1 .

    Hi-
    This might help you
    http://help.sap.com/saphelp_nw2004s/helpdata/en/2a/fa0115493111d182b70000e829fbfe/frameset.htm
    Chandra.

  • Using a single  file as a template for th whole site

    My Application.cfm file has the code that i am using as a
    template for the rest of my site. On the template, the title
    section looks like this. <cfif
    IsDefined('pagetitle')><cfoutput><title>#pagetitle#</title></cfoutput><else><title>Welcom e</title>
    and the title variable is set on the end page. lets just say
    test.cfm but when i view test.cfm the title is always Welcome. How
    can i fix this. and this also goes along with my content. On the
    application.cfm pge i have empty divs. on the test.cfm page i have
    the same divs only with all the page-relevant information in them,
    but they never show up. I know that this is how you do it in php.
    but how do you do it in ColdFusion

    Theres a few things you could do here... none of which I
    think is the perfect solution. It all depends on your preference as
    well as the needs of your application.
    -- Move your page title code to another file - call it
    Header.cfm or something along those lines -- and include it in
    every page after you set the pagetitle variable.
    -- Use Javascript to add the page title to some div at the
    top of the page when it loads. (not my favorite option here)
    -- Check out the CF tag cfsavecontent. You could save the
    generated HTML in test.cfm into a variable and output it later. Put
    your pagetitle code in OnRequestEnd.cfm, which is called AFTER
    every template is executed. Set your pagetitle variable in test.cfm
    and save the HTML into a variable, then in OnRequestEnd.cfm output
    the pagetitle followed by your generated content.

  • How to restrict languages in Java stack of SAP BW 7.0?

    Hello,
    we are using SAP BW 7.0 (SP 18) and like to show the results of BEx Web Templates in Portal only in English or German.
    A user can select a language via Personalize in Portal. This language is available within the Portal-variable "Request.language". We use iViews in the Portal to execute the Web Templates. Therefore we added "&language=<Request.language>" to all URL of the Web Templates in the iViews.
    We were able to restrict the ABAP stack of the SAP BW system to English and German by setting following parameters:
    zcsa/installed_languages  = DE
    zcsa/system_language     = E
    zcsa/second_language     = D
    Now the results of SAP BW system shown in the Portal contain only English or German texts for BEx Elements as query title, variable text, and text of InfoObjects in columns and rows.
    But other texts (as on buttons etc.) are in the Portal language. Because the result of the Web Template is created in the Java stack for the Portal, we think here we have to reduce the available languages.
    Is there a possiblitiy to restrict the language used in the Java stack in a way that the result in the Portal is only English or German?
    Best regards
    Norbert Matz

    Web Server tells you specifically which Update release in the string you quote (in your string you are running the original release of Web Server 7.0).
    My server is currently running Web Server 7.0 Update 7. The startup string looks like:
    [19/Jan/2010:11:18:27] info (15407): CORE1116: Sun Java System Web Server 7.0U7 B12/14/2009 22:58

Maybe you are looking for

  • My battery drains from 20% to 0% in seconds

    Hello, I am having a strange issue with my battery.  for some reason when my battery hits 20% charge remaining i get the warning message saying 20% charge then about 20 seconds later the phone dies.  Any ideas? i have been closing all extraneous apps

  • Pairing Apple Remote

    Hello. I bought a used MBP which didn't come with the Apple Remote. I have a remote from my Imac desktop. I tried to pair it to the MBP according to the instructions, without success. The batteries are good, the unit works fine with the IMac. Any sug

  • Safari doesn't show the keyboard on my webmail text field

    So..... I go away for a weekend - wonder which hardware to take - choose iPad - wifi at my mates place, can read email - fill in to and cc fields on the reply but bounce cursor to the text body - no keyboard. Errrrr how do I send an email - no key (I

  • How to change existing reports of sap with CR

    Hello Professionals, I need your help on the following matter: We recently updated one of our costumers from 2007 to SAP B1 version 8.8 So, now we are able to use the Crystal Reports-Viewer for most of existing standard-reports of SAP, such as the re

  • Curve 8530 and photos without media card?

    An acquaintance replaced her Curve 8530 with a Droid and wants to get her photos off the Curve. She has never installed BB Desktop nor backed up her photos before. She claims she has no media card in it but I wonder if you can save photos without one