If I Order By Count, no data displayed

Hi!
I'm using JDeveloper 11g Release 2 (11.1.2.3.0).
I create a VO with SQL Query DataSource. The Query is the follwing one:
SELECT COUNT (*),
         Brand.BRA_NAME,
         Model.MOD_NAME
FROM Sale,
         Car,
         Brand,
         Model
WHERE ( (Sale.SALE_CAR_ID = Car.CAR_ID) AND (Car.CAR_BRAND_ID = Brand.BRA_ID)) AND (Car.CAR_MOD_ID = Model.MOD_ID)
GROUP BY Brand.BRA_NAME, Model.MOD_NAME;I want that when the data is displayed as a read-only table, it shows ordered By Count (Maximum count in first position and minimum count in last one).
If in my query, I put ORDER BY ""COUNT(*)"" DESC, no data is displayed in the table.
What am I doing wrong?
Thanks in advance!

Hi,
Marcccc wrote:
Hi!
I'm using JDeveloper 11g Release 2 (11.1.2.3.0).
I create a VO with SQL Query DataSource. What's a VO?
What am I doing wrong?Whenever you have a problem, post a complete test script that people can run to re-create the problem and test their ideas.
"ORDER BY COUNT (*)" works fine for me:
SELECT       COUNT (*)
,       job
FROM       scott.emp
GROUP BY  job
ORDER BY  COUNT (*)     DESC
;Output:
` COUNT(*) JOB
         4 CLERK
         4 SALESMAN
         3 MANAGER
         2 ANALYST
         1 PRESIDENTUsually, people give aliases (such as emp_cnt in the example below) to computed columns. Those aliases can be used in the ORDER BY clause, like this:
SELECT       COUNT (*)     AS emp_cnt
,       job
FROM       scott.emp
GROUP BY  job
ORDER BY  emp_cnt     DESC
;but that's not required.

Similar Messages

  • Creditreport that displays Sales Orders with Material Availability Date as

    Hi
    I need input if the following requirement can be met in FSCM credit mgmnt.
    Currently In FDK43 there is a total sales figure that represents the Sales that are consuming the Credit Limit assigned to the customer, unfortunately there is no drill down on this number to see which sales orders are responsible for the consumption of credit
    Do we have any sales report that displays Sales Orders with Material Availability Date as an output in conjunction with Credit limit .

    Not in standard provided. Custom program is required.
    Regards
    Hein

  • Finder date display- Yosemite

    My Macbook Pro has been having slowness problems, and I just noticed some folders have unusual date displays: 2014 M04 17:50.
    I have never seen the M, which must mean month before yesterday. Anybody have some light to shine on this?
    I have run MacScan for tracking cookies and spyware- found 2 Safari tracking cookies, but nothing else. Also ran Adwaremedic- nothing found.

    Mac users often ask whether they should install "anti-virus" (AV) software. The usual answer is "no." That answer is right, but it may give the wrong impression that there is no threat from what are loosely called "viruses." There is a threat, and you need to educate yourself about it.
    1. This is a comment on what you should—and should not—do to protect yourself from malicious software ("malware") that circulates on the Internet and gets onto a computer as an unintended consequence of the user's actions.
    It does not apply to software, such as keystroke loggers, that may be installed deliberately by an intruder who has hands-on access to the computer, or who has been able to take control of it remotely. That threat is in a different category, and there's no easy way to defend against it. AV software is not intended to, and does not, defend against such attacks.
    The comment is long because the issue is complex. The key points are in sections 5, 6, and 10.
    OS X now implements three layers of built-in protection specifically against malware, not counting runtime protections such as execute disable, sandboxing, system library randomization, and address space layout randomization that may also guard against other kinds of exploits.
    2. All versions of OS X since 10.6.7 have been able to detect known Mac malware in downloaded files, and to block insecure web plugins. This feature is transparent to the user. Internally Apple calls it "XProtect."
    The malware recognition database used by XProtect is automatically updated; however, you shouldn't rely on it, because the attackers are always at least a day ahead of the defenders.
    The following caveats apply to XProtect:
    ☞ It can be bypassed by some third-party networking software, such as BitTorrent clients and Java applets.
    ☞ It only applies to software downloaded from the network. Software installed from a CD or other media is not checked.
    As new versions of OS X are released, it's not clear whether Apple will indefinitely continue to maintain the XProtect database of older versions such as 10.6. The security of obsolete system versions may eventually be degraded. Security updates to the code of obsolete systems will stop being released at some point, and that may leave them open to other kinds of attack besides malware.
    3. Starting with OS X 10.7.5, there has been a second layer of built-in malware protection, designated "Gatekeeper" by Apple. By default, applications and Installer packages downloaded from the network will only run if they're digitally signed by a developer with a certificate issued by Apple. Software certified in this way hasn't been checked for security by Apple unless it comes from the App Store, but you can be reasonably sure that it hasn't been modified by anyone other than the developer. His identity is known to Apple, so he could be held legally responsible if he distributed malware. That may not mean much if the developer lives in a country with a weak legal system (see below.)
    Gatekeeper doesn't depend on a database of known malware. It has, however, the same limitations as XProtect, and in addition the following:
    ☞ It can easily be disabled or overridden by the user.
    ☞ A malware attacker could get control of a code-signing certificate under false pretenses, or could simply ignore the consequences of distributing codesigned malware.
    ☞ An App Store developer could find a way to bypass Apple's oversight, or the oversight could fail due to human error.
    Apple has taken far too long to revoke the codesigning certificates of some known abusers, thereby diluting the value of Gatekeeper and the Developer ID program. Those lapses don't involve App Store products, however.
    For the reasons given, App Store products, and—to a lesser extent—other applications recognized by Gatekeeper as signed, are safer than others, but they can't be considered absolutely safe. "Sandboxed" applications may prompt for access to private data, such as your contacts, or for access to the network. Think before granting that access. Sandbox security is based on user input. Never click through any request for authorization without thinking.
    4. Starting with OS X 10.8.3, a third layer of protection has been added: a "Malware Removal Tool" (MRT). MRT runs automatically in the background when you update the OS. It checks for, and removes, malware that may have evaded the other protections via a Java exploit (see below.) MRT also runs when you install or update the Apple-supplied Java runtime (but not the Oracle runtime.) Like XProtect, MRT is effective against known threats, but not against unknown ones. It notifies you if it finds malware, but otherwise there's no user interface to MRT.
    5. The built-in security features of OS X reduce the risk of malware attack, but they are not, and never will be, complete protection. Malware is a problem of human behavior, not machine behavior, and no technological fix alone is going to solve it. Trusting software to protect you will only make you more vulnerable.
    The best defense is always going to be your own intelligence. With the possible exception of Java exploits, all known malware circulating on the Internet that affects a fully-updated installation of OS X 10.6 or later takes the form of so-called "Trojan horses," which can only have an effect if the victim is duped into running them. The threat therefore amounts to a battle of wits between you and Internet criminals. If you're better informed than they think you are, you'll win. That means, in practice, that you always stay within a safe harbor of computing practices. How do you know when you're leaving the safe harbor? Below are some warning signs of danger.
    Software from an untrustworthy source
    ☞ Software with a corporate brand, such as Adobe Flash Player, doesn't come directly from the developer’s website. Do not trust an alert from any website to update Flash, or your browser, or any other software. A genuine alert that Flash is outdated and blocked is shown on this support page. Follow the instructions on the support page in that case. Otherwise, assume that the alert is fake and someone is trying to scam you into installing malware. If you see such alerts on more than one website, ask for instructions.
    ☞ Software of any kind is distributed via BitTorrent, or Usenet, or on a website that also distributes pirated music or movies.
    ☞ Rogue websites such as Softonic, Soft32, and CNET Download distribute free applications that have been packaged in a superfluous "installer."
    ☞ The software is advertised by means of spam or intrusive web ads. Any ad, on any site, that includes a direct link to a download should be ignored.
    Software that is plainly illegal or does something illegal
    ☞ High-priced commercial software such as Photoshop is "cracked" or "free."
    ☞ An application helps you to infringe copyright, for instance by circumventing the copy protection on commercial software, or saving streamed media for reuse without permission. All "YouTube downloaders" are in this category, though not all are necessarily malicious.
    Conditional or unsolicited offers from strangers
    ☞ A telephone caller or a web page tells you that you have a “virus” and offers to help you remove it. (Some reputable websites did legitimately warn visitors who were infected with the "DNSChanger" malware. That exception to this rule no longer applies.)
    ☞ A web site offers free content such as video or music, but to use it you must install a “codec,” “plug-in,” "player," "downloader," "extractor," or “certificate” that comes from that same site, or an unknown one.
    ☞ You win a prize in a contest you never entered.
    ☞ Someone on a message board such as this one is eager to help you, but only if you download an application of his choosing.
    ☞ A "FREE WI-FI !!!" network advertises itself in a public place such as an airport, but is not provided by the management.
    ☞ Anything online that you would expect to pay for is "free."
    Unexpected events
    ☞ A file is downloaded automatically when you visit a web page, with no other action on your part. Delete any such file without opening it.
    ☞ You open what you think is a document and get an alert that it's "an application downloaded from the Internet." Click Cancel and delete the file. Even if you don't get the alert, you should still delete any file that isn't what you expected it to be.
    ☞ An application does something you don't expect, such as asking for permission to access your contacts, your location, or the Internet for no obvious reason.
    ☞ Software is attached to email that you didn't request, even if it comes (or seems to come) from someone you trust.
    I don't say that leaving the safe harbor just once will necessarily result in disaster, but making a habit of it will weaken your defenses against malware attack. Any of the above scenarios should, at the very least, make you uncomfortable.
    6. Java on the Web (not to be confused with JavaScript, to which it's not related, despite the similarity of the names) is a weak point in the security of any system. Java is, among other things, a platform for running complex applications in a web page, on the client. That was always a bad idea, and Java's developers have proven themselves incapable of implementing it without also creating a portal for malware to enter. Past Java exploits are the closest thing there has ever been to a Windows-style virus affecting OS X. Merely loading a page with malicious Java content could be harmful.
    Fortunately, client-side Java on the Web is obsolete and mostly extinct. Only a few outmoded sites still use it. Try to hasten the process of extinction by avoiding those sites, if you have a choice. Forget about playing games or other non-essential uses of Java.
    Java is not included in OS X 10.7 and later. Discrete Java installers are distributed by Apple and by Oracle (the developer of Java.) Don't use either one unless you need it. Most people don't. If Java is installed, disable it—not JavaScript—in your browsers.
    Regardless of version, experience has shown that Java on the Web can't be trusted. If you must use a Java applet for a task on a specific site, enable Java only for that site in Safari. Never enable Java for a public website that carries third-party advertising. Use it only on well-known, login-protected, secure websites without ads. In Safari 6 or later, you'll see a padlock icon in the address bar when visiting a secure site.
    Stay within the safe harbor, and you’ll be as safe from malware as you can practically be. The rest of this comment concerns what you should not do to protect yourself.
    7. Never install any commercial AV or "Internet security" products for the Mac, as they are all worse than useless. If you need to be able to detect Windows malware in your files, use one of the free security apps in the Mac App Store—nothing else.
    Why shouldn't you use commercial AV products?
    ☞ To recognize malware, the software depends on a database of known threats, which is always at least a day out of date. This technique is a proven failure, as a major AV software vendor has admitted. Most attacks are "zero-day"—that is, previously unknown. Recognition-based AV does not defend against such attacks, and the enterprise IT industry is coming to the realization that traditional AV software is worthless.
    ☞ Its design is predicated on the nonexistent threat that malware may be injected at any time, anywhere in the file system. Malware is downloaded from the network; it doesn't materialize from nowhere. In order to meet that nonexistent threat, commercial AV software modifies or duplicates low-level functions of the operating system, which is a waste of resources and a common cause of instability, bugs, and poor performance.
    ☞ By modifying the operating system, the software may also create weaknesses that could be exploited by malware attackers.
    ☞ Most importantly, a false sense of security is dangerous.
    8. An AV product from the App Store, such as "ClamXav," has the same drawback as the commercial suites of being always out of date, but it does not inject low-level code into the operating system. That doesn't mean it's entirely harmless. It may report email messages that have "phishing" links in the body, or Windows malware in attachments, as infected files, and offer to delete or move them. Doing so will corrupt the Mail database. The messages should be deleted from within the Mail application.
    An AV app is not needed, and cannot be relied upon, for protection against OS X malware. It's useful, if at all, only for detecting Windows malware, and even for that use it's not really effective, because new Windows malware is emerging much faster than OS X malware.
    Windows malware can't harm you directly (unless, of course, you use Windows.) Just don't pass it on to anyone else. A malicious attachment in email is usually easy to recognize by the name alone. An actual example:
    London Terror Moovie.avi [124 spaces] Checked By Norton Antivirus.exe
    You don't need software to tell you that's a Windows trojan. Software may be able to tell you which trojan it is, but who cares? In practice, there's no reason to use recognition software unless an organizational policy requires it. Windows malware is so widespread that you should assume it's in every email attachment until proven otherwise. Nevertheless, ClamXav or a similar product from the App Store may serve a purpose if it satisfies an ill-informed network administrator who says you must run some kind of AV application. It's free and it won't handicap the system.
    The ClamXav developer won't try to "upsell" you to a paid version of the product. Other developers may do that. Don't be upsold. For one thing, you should not pay to protect Windows users from the consequences of their choice of computing platform. For another, a paid upgrade from a free app will probably have all the disadvantages mentioned in section 7.
    9. It seems to be a common belief that the built-in Application Firewall acts as a barrier to infection, or prevents malware from functioning. It does neither. It blocks inbound connections to certain network services you're running, such as file sharing. It's disabled by default and you should leave it that way if you're behind a router on a private home or office network. Activate it only when you're on an untrusted network, for instance a public Wi-Fi hotspot, where you don't want to provide services. Disable any services you don't use in the Sharing preference pane. All are disabled by default.
    10. As a Mac user, you don't have to live in fear that your computer may be infected every time you install software, read email, or visit a web page. But neither can you assume that you will always be safe from exploitation, no matter what you do. Navigating the Internet is like walking the streets of a big city. It can be as safe or as dangerous as you choose to make it. The greatest harm done by security software is precisely its selling point: it makes people feel safe. They may then feel safe enough to take risks from which the software doesn't protect them. Nothing can lessen the need for safe computing practices.

  • Total count to be displayed in subtotal ALV(GRID Display)

    Hello ,
    I want to display total count in subtotal.
                                 720 Mr JORGE 522,06
                                 720 Mr JORGE 566,23
                                 720 Mr JORGE 100,33
                                 720 Mr JORGE 123,33
                                 720 Mr JORGE 332,22     
    subtotal ->            720                  1644.2  Count 5
                                 888 Ms Mariam 100,00
    subtotal ->            888                    100,00 Count 1
    Is this possible?  Plz dont post same answers how to display subtotal. I am able to display subtotal , only  issue is to display  with count.
    Edited by: Vimalnair on Aug 19, 2009 9:37 AM

    Hi,
    You cannot have subtotal for particular number of rows of ALV,
    but if you want to get the total number of rows of the ALV data display
    you can describe your final internal table from which the data is
    getting displayed in ALV output and get it displayed in the header
    or footer area of the ALV output.
    For Eg:
    DATA V_LINES TYPE I.
    DESCRIBE TABLE IT_FINAL LINES V_LINES.
    DATA: it_header TYPE slis_t_listheader,
          wa_header TYPE slis_listheader.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
    *    I_INTERFACE_CHECK                 = ' '
    *    I_BYPASSING_BUFFER                = ' '
    *    I_BUFFER_ACTIVE                   = ' '
          i_callback_program                = sy-repid
          i_callback_pf_status_set          = 'PF_STATUS'
          i_callback_user_command           = 'COMM'
          i_callback_top_of_page            = 'TOP'   "This top will call the subroutine namely TOP
    FORM top.
      REFRESH it_header.
      wa_header-typ = 'S'.
      wa_header-key = text-001.
      wa_header-info = sy-repid.
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      wa_header-typ = 'S'.
      wa_header-key = text-002.
      wa_header-info = sy-uname.
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      wa_header-typ = 'S'.
      wa_header-key = text-003.
      wa_header-info = V_LINES.    "This will print the total number of lines in the header
      APPEND wa_header TO it_header.
      CLEAR wa_header.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary       = it_header
    *   I_LOGO                   =
    *   I_END_OF_LIST_GRID       =
    *   I_ALV_FORM               =
    ENDFORM.                    "TOP
    Hope it helps
    Regards
    Mansi

  • Data display on remote cube

    Hi Guru's
    I've created a generic ds using fm for direct access.creating virtual cube and mapped accordingluy with ds.
    Now when I do test extract on ds per a single posting day then it takes few secords to pull through the data and the no. of records are 45 on dev box.But I do data display on remote cub and it takes long and throughing a timed out error.
    I dont have any routines on transformaions.
    What could be the problem?
    Nagesh.

    HI
    here's the code in FM
    Example: DataSource for table SFLIGHT
      TABLES: BKPF,BSEG.
    Auxiliary Selection criteria structure
      DATA: L_S_SELECT TYPE SRSC_S_SELECT.
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    Starting point for each data package
             READ_NEXT LIKE SY-TABIX,
    Total Number of Extracted Records
             NO_RECS LIKE SY-TABIX,
    Number read so far
             TEMP_CNTR(9) TYPE N.
    cursor
    S_CURSOR TYPE CURSOR.
    Select ranges
      RANGES: R_BLDAT FOR BKPF-BLDAT,
              R_BUDAT FOR BKPF-BUDAT,
              R_CPUDT FOR BKPF-CPUDT,
              R_BUKRS FOR BKPF-BUKRS,
              R_GJAHR FOR BKPF-GJAHR,
              R_BELNR FOR BKPF-BELNR.
      DATA: GT_T_DATA LIKE ZFI_GL_4 OCCURS 0 WITH HEADER LINE.
      DATA: GT_BKPF TYPE TABLE OF BKPF,
            GS_BKPF TYPE BKPF.
      DATA: COUNTER(9) TYPE N.
      DATA: LV_MONAT(3).
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF I_INITFLAG = SBIWA_C_FLAG_ON.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        CASE I_DSOURCE.
          WHEN 'ZFI_GL_4'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE E009(R3). ENDIF.
    this is a typical log call. Please write every error message like this
            LOG_WRITE 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      I_DSOURCE   "message variable 1
                      ' '.                 "message variable 2
            RAISE ERROR_PASSED_TO_MESS_HANDLER.
        ENDCASE.
        APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
    Fill parameter buffer for data extraction calls
        S_S_IF-REQUNR    = I_REQUNR.
        S_S_IF-DSOURCE = I_DSOURCE.
        S_S_IF-MAXSIZE   = I_MAXSIZE.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF S_COUNTER_DATAPAKID = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BLDAT'.
            MOVE-CORRESPONDING L_S_SELECT TO r_bldat.
            APPEND R_BLDAT.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BUDAT'.
            MOVE-CORRESPONDING L_S_SELECT TO R_BUDAT.
            APPEND R_BUDAT.
          ENDLOOP.
          LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CPUDT'.
            MOVE-CORRESPONDING L_S_SELECT TO R_CPUDT.
            APPEND R_CPUDT.
          ENDLOOP.
             LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BUKRS'.
            MOVE-CORRESPONDING L_S_SELECT TO R_BUKRS.
            APPEND R_BUKRS.
          ENDLOOP.
             LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'GJAHR'.
            MOVE-CORRESPONDING L_S_SELECT TO R_GJAHR.
            APPEND R_GJAHR.
          ENDLOOP.
              LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'BELNR'.
            MOVE-CORRESPONDING L_S_SELECT TO R_BELNR.
            APPEND R_BELNR.
          ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
          SELECT * FROM BKPF INTO TABLE GT_BKPF WHERE BLDAT IN R_BLDAT
                                                  AND BUDAT IN R_BUDAT
                                                  AND CPUDT IN R_CPUDT
                                                  AND BUKRS IN R_BUKRS
                                                  AND GJAHR IN R_GJAHR
                                                  AND BELNR IN R_BELNR.
          LOOP AT GT_BKPF INTO GS_BKPF.
            SELECT * FROM BSEG WHERE BELNR = GS_BKPF-BELNR
                               AND   BUKRS = GS_BKPF-BUKRS
                               AND   GJAHR = GS_BKPF-GJAHR.
              MOVE-CORRESPONDING GS_BKPF TO GT_T_DATA.
              MOVE-CORRESPONDING BSEG TO GT_T_DATA.
              CLEAR LV_MONAT.
              CONCATENATE '0' GT_T_DATA-MONAT INTO LV_MONAT.
              CONCATENATE GT_T_DATA-GJAHR LV_MONAT INTO GT_T_DATA-FISCPER.
              CALL FUNCTION 'BWFIU_GET_DOCUMENT_ORIGIN'
                EXPORTING
                  I_AWTYP    = GT_T_DATA-AWTYP
                  I_AWKEY    = GT_T_DATA-AWKEY
                IMPORTING
                  E_REFBELNR = GT_T_DATA-AWREF
                  E_REFGJAHR = GT_T_DATA-AWGJA
                  E_REFBUKRS = GT_T_DATA-AWBUK
                  E_REFKOKRS = GT_T_DATA-AWKOK.
    Lcal currency calculations.
              IF GT_T_DATA-SHKZG EQ 'S'.
                GT_T_DATA-DMSOL = GT_T_DATA-DMBTR.
                GT_T_DATA-DMSHB = GT_T_DATA-DMBTR.
                GT_T_DATA-DMHAB = 0.
              ELSEIF GT_T_DATA-SHKZG EQ 'H'.
                GT_T_DATA-DMHAB = GT_T_DATA-DMBTR.
                GT_T_DATA-DMSHB = GT_T_DATA-DMBTR * -1.
                GT_T_DATA-DMSOL = 0.
              ENDIF.
    Foriegn Currency calculations.
              IF GT_T_DATA-SHKZG EQ 'S'.
                GT_T_DATA-WRSOL = GT_T_DATA-DMBTR.
                GT_T_DATA-WRSHB = GT_T_DATA-DMBTR.
                GT_T_DATA-WRHAB = 0.
              ELSEIF GT_T_DATA-SHKZG EQ 'H'.
                GT_T_DATA-WRHAB = GT_T_DATA-DMBTR.
                GT_T_DATA-WRSHB = GT_T_DATA-DMBTR * -1.
                GT_T_DATA-WRSOL = 0.
              ENDIF.
              APPEND GT_T_DATA.
            ENDSELECT.
          ENDLOOP.
          DESCRIBE TABLE GT_T_DATA LINES NO_RECS.
          READ_NEXT = 0.
          TEMP_CNTR = 0.
        ENDIF.                             "First data package ?
    Fetch records into interface table.
        IF ( READ_NEXT GT NO_RECS ) OR ( NO_RECS EQ 0 ).
          REFRESH GT_T_DATA.
          CLEAR:S_COUNTER_DATAPAKID, COUNTER, READ_NEXT, S_S_IF, NO_RECS.
          RAISE NO_MORE_DATA.
        ENDIF.
        COUNTER = 0.
        LOOP AT GT_T_DATA FROM READ_NEXT.
          COUNTER = COUNTER + 1.
          IF COUNTER GT S_S_IF-MAXSIZE.
            IF TEMP_CNTR EQ NO_RECS.
              CLEAR: S_COUNTER_DATAPAKID,COUNTER,READ_NEXT,S_S_IF,NO_RECS.
              RAISE NO_MORE_DATA.
            ELSE.
              READ_NEXT = READ_NEXT + COUNTER.
            ENDIF.
            EXIT.
          ENDIF.
          MOVE-CORRESPONDING GT_T_DATA TO E_T_DATA.
          APPEND E_T_DATA.
          TEMP_CNTR = TEMP_CNTR + 1.
          iF TEMP_CNTR GT NO_RECS.
            CLEAR GT_T_DATA.
            CLEAR: S_COUNTER_DATAPAKID, COUNTER,READ_NEXT, S_S_IF,NO_RECS.
            RAISE NO_MORE_DATA.
            EXIT.
          ENDIF.
        ENDLOOP.
        S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    If it's a code then why it's quick on rsa3?
    Nagesh.

  • Sales Orders Report - Requested Delivery date fails.

    Hello,
    If a customer orders Item A Quantity 10 with a requested delivery date as 10.09.2008
    In sales orders under Schedule line tab it will be displayed as below if schedule line fails
    Delivery date Order Qty Rounded Qty Confirmed Qty
    10.09.2008     10     10     0
    20.09.2008     0     0     10
    Customers get the goods not on his requested delivery date but some time later.
    My requirement is I need to get the list of sales orders (like as we get the list of incomplete sales orders in V.02) where the requested delivery date fails and confirms next delivery date.
    Is there any such standard report available???
    Thanks in advance.
    Regards,
    Vamsi

    Hi
    This is not available as a standard report. Consult your ABAPer to develop a Zreport. The system will compare the requested delivery date and the schedule line date and if the delivery date in the schedule line doesn't match with the requested delivery date, those schedule lines along with the details of the material, sales order number etc., will be displayed in the report. You have to give the ABAPer the details like..how the input screen should be, how the output screen should be and the proper logic for obtaining the required output.
    Thanks,
    Ravi

  • SAP R/3 table data display

    Hello All,
    In SAP R/3 in tcode SE11 when I display data for table EKBE, for few currencies amount is different in tabular layout and display mode of individual record. Let me expalin it in detail.
    In table EKBE when I display data for any particular purchase order then following values are displayed in tabular layout.
    DMBTR 100.05
    WRBTR 100.05
    But when I select this record and click on display button(F2 function key)
    DMBTR 100.05
    WRBTR 10005
    When I extract this data in BW I get
    DMBTR 100.05
    WRBTR 100.05
    Can anybody please help me to understand
    which value is correct ?
    why is there a difference in amount in tabular layout and display mode ?
    why only WRBTR is different as both are of CURR datatype and created using same Domain.
    In ME80FN Amount is displayed as 10005 and user is expecting this in BW output, when I checked in R/3 table I found discrepancy. Your help is greatly appreciated.
    Thanks for your help.
    Regards
    Shilpa

    Hi Simon,
    Thanks for your inputs.
    Why the amount is changed in display mode only for WRBTR and not for DMBTR as both are of CURR datatype and created using same domain. I fail to understand any logic behind this.
    I have even created a ABAP report on this table which displys fields DMBTR and WRBTR, and in the report output following values are displayed.
    DMBTR 100.05
    WRBTR 100.05
    If anybody else has come across this before and has any clue please help.
    Thanks and Regards
    Shilpa

  • Count of Rows Displayed after Filter Applied

    Hi,
    I have a WebI report where I am manually filtering the data displayed within the report based on user input. For example, a user enters a Max Value and I am filtering out all employees who have a total value (mulitple rows summed up) greater than the prompt value.
    The issue I am facing is displaying a row count at the top of the report in a free-standing cell. Normally I would simply use count(Field;All) but since the number of rows returned by the query is different from the number of rows actually displayed in the table, this option isn't available.
    Any ideas would be greatly appreciated.
    Thanks!
    Jeff

    Hi Jeff,
    Try creating a formula in the cell, or a variable with a "Where" clause and add the correct context, using "In" or "ForEach". Or you may be able to do it in the formula in the cell. Or you may need to use the "UserResponse" function, depending on what you are trying to do.
    Thanks
    Edited by: wavery on Feb 15, 2011 9:14 PM

  • SQL DISTINCT COUNT IN DATE RANGE

    Dear All
    Thanks for your attention.
    A table is storing the task summary of each order
    e.g.
    Date                            | Order Number    | Task Number
    2015-01-01 00:00:01   | ABC123456        | JOB001
    2015-01-01 00:01:02   | ABC123456        | JOB002
    2015-01-01 00:10:02   | ABC123444        | JOB001
    2015-01-01 10:12:59   | ABC123456        | JOB002   (Since the job002 is not done correctly, need to work again)
    2015-01-01 18:20:05   | ABC888888        | JOB001
    2015-01-01 20:22:42   | ABC789456        | JOB001
    2015-01-01 21:02:11   | BBB121212        | JOB002
    I would like to write a single query that get the distinct count of order number in sepcific date range
    result as expected in three columns:
    2015-01-01
    task_number            | AM | PM
    JOB001         | 2    | 2
    JOB002         | 1    | 1
    explain the figures here:
    JOB001 AM = 2 (ABC123456, ABC123444)
    JOB002 AM = 1  (two records of ABC123456 count as 1 since we would like to know the number of orders)
    JOB001 PM = 2  (ABC888888, ABC789456)
    JOB002 PM = 1  (BBB121212)
    I wrote a query get similar result but the count of order is not distinct
    SELECT task_number,
    AM=SUM(CASE WHEN date >= ('2015-01-01 00:00:00') AND date < ('2015-01-01 12:00:00') THEN 1 ELSE 0 END),
    PM=SUM(CASE WHEN date >= ('2015-01-01 12:00:00') AND date < ('2015-01-02 00:00:00') THEN 1 ELSE 0 END)
    FROM MyTable
    WHERE task_number = 'JOB001'
    Could anyone advise how to enhance this query to let the result become disintct of order number?
    Many Thanks,
    swivan

    Try
    select task_number,
    count(distinct case when datepart(hour, [date]) >=0 and datepart(hour, [date]) < 12 then [OrderNumbers] END) as AM,
    count(distinct case when datepart(hour, [date]) >=12 and datepart(hour, [date]) < 24 then [OrderNumbers] END) as PM FROM myTable
    GROUP BY Task_Number
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles
    Thank you very much,  short and good answer

  • Distinct count on date/time field...

    Hi,
    I am trying to a distinct count on this formula that takes a date/time field and converts it to a date in order to get a distinct count of dates.  However, it's not working... say, if I have two dates are the same (the times may be different), it's counted twice.  Any suggestions?  I tried to convert this to a string thinking the evaluation may change, but no dice.  Thanks!!
    if not isnull({AVAILABILITY.PAT_ENC_CSN_ID}) then
        cstr(cdate({AVAILABILITY.SLOT_BEGIN_TIME}))
    else

    You can use the following formula...
    DateAdd("d", DateDiff("d", #1/1/1900#, {TableName.YourDateTimeField}), #1/1/1900#)
    This will set each date value to 12:00 am of it's respective day...
    So 8/16/2010   3:01:20PM would become 8/16/2010  12:00:00AM
    Now you can group on this formula field and then simply do a count on the date at the appropriate group level.
    HTH,
    Jason

  • How to filter the data displayed in a datatable

    Is there a way to populate a datatable so that the data displays in a column only when it is different than the previous rows. For example if I have a List of InventoryItems that have properties State, WHouse, Widget, Count.
    And I want to display them something like this:
        GA    WH1    Widg1      255
                     Widg2      566
                     Widg3      999
              WH2    Widg1      100
                     Widg4       55
        FL    WH5    Widg1      687
              WH6    Widg5      566I hope the formatting comes out correct. The GA & FL should be in the first column. WHX in the second, WidgX in the third, and the count in the fourth.
    I hope someone has an idea how I can achieve this effect.
    Thanks

    Yes, binding to the rendered property the way you suggested should do the trick.
    FYI, here's an example that illustrates how the <if> component in JSFTemplating works:
    <foreach key="key" list={"A" "B" "C"}>
        <!if !(#{key} = B)>
            <staticText value="Not B, it's '<b>#{key}</b>'</br>" />
        </if>
    </foreach>If you cut / paste that code into a file called test.jsf and run it in a JSFTemplating enabled application (follow the directions on the www site to run the demo app, drop it in that app), it will show values not equal to 'B" (A and C). FYI (#2): the <staticText> component above has a short cut syntax, so it could also be written:
    <foreach key="key" list={"A" "B" "C"}>
        <!if !(#{key} = B)>
            "Not B, it's '<b>#{key}</b>'</br>
        </if>
    </foreach>FYI (#3): You can use any #{} you want in the <if> condition and can form complex boolean equations.
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • PO data display

    HI ,
    I have modified standard Purchase Order --> MEDRUCK Form.
    i am finding problems for service po
    1) Date Display is in mm/dd/yyyy format.
        this is occuring only for po starting with number 47..... series.
    I am getting for the rest of the PO's  as in dd/mm/yyyy format.
    which is correct and what i needed to display as.
    can any one suggest, how do i correct this problem.
    thanks in advance,
    krishna

    Hi,
    Just set date mask prior in your program lines and so that everyting will be in one format.
    set date mask =  'dd/mm/yyyy'
    Regards,
    Narendra.

  • Data display grid font selection

    Does anyone know how to change the font that's used on the "Data" tab when displaying the content of rows in a table?
    I'm trying to view chinese characters which are stored in UTF-8 unicode in the database. I have all the necessary fonts loaded on my machine and the correct NLS_LANG settings.
    I can see western characters, arabic, russian, greek OK in the data-grid, but not chinese or other far-eastern languages. Instead I see little squares instead of the symbols.
    I've checked for font setting in Tools -> Preferences but the only setting I can find is under the "Code Editor" section. This is set correctly (to Arial Unicode MS) and if I copy the "little squares" from the data grid and paste them into a code-edit tab I see the characters correctly displayed.
    So it seems that the "Font" setting for the code-edit tabs isn't used by the data-display tabs.
    Is there a way of making both code-editor window and data-display tab use the same font?

    i would create a standard report.
    i presume the air pressure and humidity are from one field? if not create a formula to display that.
    create groups
    1- a/p humidity field or formula
    2- time
    3- ref-measure- error
    not sure if they are the same field or different.
    you can then place your data in the groups (formulas calcs etc)
    then underlay the groups so they appear on the same line
    then draw boxes around them.
    hope this helps

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts,
    Is there any report for viewing Sales order no against delivery date & *actual GI date*
    Because in VL06F , i can only able to get planned GI.
    Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination .
    Regards,
    Sujit S.

    dear Hrishi,
    i followed your suggestion, but couldn't get desired results,
    here i can get planned GI date, where i wanted to get Actual GI date for complted deliveries,
    thanks for your valuable reply.
    @ G. Lakshmipathi ;-
    i think i will need to develop z-report for fetching the data from the tables
    VBAK (to get sale order reference) and
    LIKP (to get delivery and actual GI date)
    thanks for your reply,
    Regards,
    Sujit

Maybe you are looking for