Monthwise opening

In below given query, i get the opening stock details for the item AAA. But i get wrong results when accounting year is changed.
i.e when i change the condition AND S_ACNT_YEAR = 3, the output is wrong.
Note : - S_ACNT_YEAR = 4 is (APR-2010 - MAR-2011), and S_ACNT_YEAR = 3 is (APR-2009 - MAR-2010)
SELECT ITEM_CODE,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),3) THEN ROUND(OPSTK,2) ELSE NULL END)APR,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),4)THEN ROUND(OPSTK,2) ELSE NULL END)MAY,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),5)THEN ROUND(OPSTK,2) ELSE NULL END)JUN,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),6)THEN ROUND(OPSTK,2) ELSE NULL END)JUL,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),7)THEN ROUND(OPSTK,2) ELSE NULL END)AUG,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),8)THEN ROUND(OPSTK,2) ELSE NULL END)SEP,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),9)THEN ROUND(OPSTK,2) ELSE NULL END)OCT,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),10)THEN ROUND(OPSTK,2) ELSE NULL END)NOV,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),11)THEN ROUND(OPSTK,2) ELSE NULL END)DEC,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12)THEN ROUND(OPSTK,2) ELSE NULL END)JAN,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),13)THEN ROUND(OPSTK,2) ELSE NULL END)FEB,
       SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),14)THEN ROUND(OPSTK,2) ELSE NULL END)MAR
FROM
       SELECT S_ITEM, DT,
              SUM(DECODE(R_I,'R',1,'I',-1)*QTY OPSTK
       FROM   STOCKLEDGER, ITEMS
       WHERE  S_ITEM = I_ITEM
       AND    I_ITEM = 'AAA'
       AND    S_ACNT_YEAR = 4
       GROUP BY S_ITEM, DT
GROUP BY S_ITEM
ORDER BY S_ITEMKindly suggest how i can also get the openeing balance / stock of previous accounting years correctly.
Also, i want the monthwise opening in rows instead of columns.
Sanjay
Edited by: user12957777 on 2 Jan, 2011 7:16 PM
Edited by: user12957777 on 2 Jan, 2011 7:50 PM

Hi,
When s_acnt_year is 3, rather than 4, does dt tend to be a year earlier? If so, then the 2nd argument to all you ADD_MONTHS calls may need to include some expression including s_acnt_year.
Post a little sample data (CREATE TABLE and INSERT statements for both tables) and the results you want from that data, both for s_acnt_year 3 and 4. (You should post sample data like this, and the results you want from that sample data, whenever you have a question.)
Getting the results in rows rather than columns should actually simplify the query quite a bit.
Instead of 12 expressions like this:
SUM(CASE WHEN DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),3) AND  THEN ROUND(OPSTK,2) ELSE NULL END)APR,you'll have one expression more or less like this:
ROUND ( SUM ( SUM (opstk)
         ) OVER (ORDER BY TRUNC (dt, 'MONTH')
      , 2
      )You'll want to GROUP BY TRUNC (dt, 'MONTH'), and adjust the WHERE clause to get the right values of dt. I can't show you exactly until you post the sample data and the results you want from that data.
I see from the way that SYSDATE is used in your code that you want different results depending on when the query is run. For each set of sample results, say what SYSDATE is to produce those results. it would be best if you posted results for a couple of different dates, in different years.
Do you really want to ROUND the values before you SUM them? Most people would compute the SUM first, then ROUND the final total only. It's more accurate and more efficient, but it's possible that you actually need it the other way. If so, include an example or two in the sample data where when you do the rounding is significant.

Similar Messages

  • How to get monthwise opening qty / value for previous years

    I do not get the month wise opening quantity and values for the items for the previous years using the below query. How i can modify this query to get opening qty / value of any year less than current year.
    Yogesh
    SELECT OPN_ITEM_CODE,
    ---------------------------------------OPENING QTY---------------------------------------------------
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),3)THEN ROUND(OPSTK,3) ELSE NULL END)APR_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),4)THEN ROUND(OPSTK,3) ELSE NULL END)MAY_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),5)THEN ROUND(OPSTK,3) ELSE NULL END)JUN_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),6)THEN ROUND(OPSTK,3) ELSE NULL END)JUL_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),7)THEN ROUND(OPSTK,3) ELSE NULL END)AUG_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),8)THEN ROUND(OPSTK,3) ELSE NULL END)SEP_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),9)THEN ROUND(OPSTK,3) ELSE NULL END)OCT_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),10)THEN ROUND(OPSTK,3) ELSE NULL END)NOV_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),11)THEN ROUND(OPSTK,3) ELSE NULL END)DEC_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12)THEN ROUND(OPSTK,3) ELSE NULL END)JAN_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),13)THEN ROUND(OPSTK,3) ELSE NULL END)FEB_OPQ,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),14)THEN ROUND(OPSTK,3) ELSE NULL END)MAR_OPQ,
    ---------------------------------------OPENING VALUE----------------------------------------------------
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),3)THEN ROUND(OPVAL,3) ELSE NULL END)APR_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),4)THEN ROUND(OPVAL,3) ELSE NULL END)MAY_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),5)THEN ROUND(OPVAL,3) ELSE NULL END)JUN_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),6)THEN ROUND(OPVAL,3) ELSE NULL END)JUL_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),7)THEN ROUND(OPVAL,3) ELSE NULL END)AUG_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),8)THEN ROUND(OPVAL,3) ELSE NULL END)SEP_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),9)THEN ROUND(OPVAL,3) ELSE NULL END)OCT_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),10)THEN ROUND(OPVAL,3) ELSE NULL END)NOV_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),11)THEN ROUND(OPVAL,3) ELSE NULL END)DEC_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),12)THEN ROUND(OPVAL,3) ELSE NULL END)JAN_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),13)THEN ROUND(OPVAL,3) ELSE NULL END)FEB_OPV,
    SUM(CASE WHEN SL_DT < ADD_MONTHS(TRUNC(SYSDATE,'YEAR'),14)THEN ROUND(OPVAL,3) ELSE NULL END)MAR_OPV
    FROM( SELECT SL_ITEM_CODE OPN_ITEM_CODE, SL_DT,
    SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_QTY_BU/IU_CONV_FACTOR/IU_MAX_LOOSE_1)OPSTK,
    SUM(DECODE(SL_RCVD_ISSD,'R',1,'I',-1)*SL_VAL_1)OPVAL
    FROM OS_STK_LEDGER, OM_ITEM_UOM
    WHERE SL_ITEM_CODE = IU_ITEM_CODE
    GROUP BY SL_ITEM_CODE, SL_DT
    GROUP BY OPN_ITEM_CODE

    it think you need to look for [lag and lead|http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm#sthref1753]

  • Opening and Closing Stock Monthwise

    hi,
    I need to display month wise Stock details like below
    month-year Opening-Stock STock-In Stock-Out closing-Stock
    I have made the query, but this query gives only monthwise stock-in and stock-out. How do i get Opening-Stock and closing-Stock.
    SELECT e.STORE, months.month,
    SUM( (CASE WHEN trunc(e.MAT_IN_DATE,'MM') = months.month THEN MVALUE ELSE 0 END) )
    Mat_Rcvd,
    SUM( (CASE WHEN trunc(E.MAT_OUT_DATE,'MM') = months.month THEN MVALUE ELSE 0 END) ) Mat_Out
    FROM
    SELECT STORE,ITEM_CODE, SUM(NVL(MQTY,0)) M_QTY, SUM(NVL(MVALUE,0)) MVALUE,
    MAT_OUT_DATE, MAT_IN_DATE
    FROM
    SELECT GD.TO_STORE STORE , GD.ITEM_CODE,
    GD.QUANTITY MQTY, GD.AED_RATE * GD.QUANTITY MVALUE, NULL MAT_OUT_DATE , GRN_DATE MAT_IN_DATE
    FROM GRN_DETAILS GD , GRN_MASTER GM
    WHERE GD.GRN_NO = GM.GRN_NO
    UNION ALL
    SELECT MI.STORE, MI.ITEM_CODE, (NVL(MI.QUANTITY,0)) MQTY,
    MI.QUANTITY * UNIT_RATE MVALUE , mi.ISSUE_DATE MAT_OUT_DATE , NULL MAT_IN_DATE
    FROM MATERIAL_ISSUE MI , MINR_MASTER MM
    WHERE MI.MIN_NO = MM.MIN_NO
    WHERE STORE='ABC'
    GROUP BY STORE, ITEM_CODE, MAT_OUT_DATE, MAT_IN_DATE
    ) E ,
    (SELECT add_months( date '2007-07-01', level ) month,
         FROM dual
    WHERE add_months( date '2007-07-01', level ) < SYSDATE
    CONNECT BY level <= 30 )months
    GROUP BY e.STORE, months.month
    ORDER BY MONTH
    /

    Please consider the following when you post a question. This would help us help you better
    1. New features keep coming in every oracle version so please provide Your Oracle DB Version to get the best possible answer.
    You can use the following query and do a copy past of the output.
    select * from v$version 2. This forum has a very good Search Feature. Please use that before posting your question. Because for most of the questions
    that are asked the answer is already there.
    3. We dont know your DB structure or How your Data is. So you need to let us know. The best way would be to give some sample data like this.
    I have the following table called sales
    with sales
    as
          select 1 sales_id, 1 prod_id, 1001 inv_num, 120 qty from dual
          union all
          select 2 sales_id, 1 prod_id, 1002 inv_num, 25 qty from dual
    select *
      from sales 4. Rather than telling what you want in words its more easier when you give your expected output.
    For example in the above sales table, I want to know the total quantity and number of invoice for each product.
    The output should look like this
    Prod_id   sum_qty   count_inv
    1         145       2 5. When ever you get an error message post the entire error message. With the Error Number, The message and the Line number.
    6. Next thing is a very important thing to remember. Please post only well formatted code. Unformatted code is very hard to read.
    Your code format gets lost when you post it in the Oracle Forum. So in order to preserve it you need to
    use the {noformat}{noformat} tags.
    The usage of the tag is like this.
    <place your code here>\
    7. If you are posting a *Performance Related Question*. Please read
       {thread:id=501834} and {thread:id=863295}.
       Following those guide will be very helpful.
    8. Please keep in mind that this is a public forum. Here No question is URGENT.
       So use of words like *URGENT* or *ASAP* (As Soon As Possible) are considered to be rude.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Opening stock for meterial monthwise

    hi experts ...
    I m developing a report , in which i need any of opening  stock or closing stock.
    plz tell me from which table i can get any of this two fields. if there is any calculation to done ,plz give me the formula for this stocks.
    thank you.

    Hi Ankita
    check MSEG table
    i could not post full code please understand this logic
      IF IT_FINAL[] IS NOT INITIAL.
    IF THE USER DOEN NOT SELECT SPECIAL STOCK
          IF P_CHK IS INITIAL.
            SELECT MBLNR BWART ZEILE MATNR WERKS LGORT SHKZG ERFMG ERFME
           FROM MSEG INTO CORRESPONDING FIELDS OF TABLE IT_QUAN FOR
              ALL ENTRIES IN IT_FINAL WHERE MATNR = IT_FINAL-MATNR AND
                                            WERKS IN S_WERKS
                                            AND LGORT IN S_LGORT
                   AND SOBKZ NOT IN ('E','K','M','O','P','Q','V','W','Y').
          ELSE.
            SELECT MBLNR BWART ZEILE MATNR WERKS LGORT SHKZG ERFMG ERFME
           FROM MSEG INTO CORRESPONDING FIELDS OF TABLE
             IT_QUAN FOR
              ALL ENTRIES IN IT_FINAL WHERE MATNR = IT_FINAL-MATNR AND
                                            WERKS IN S_WERKS
                                            AND LGORT IN S_LGORT.
          ENDIF.
        ENDIF.
        IF IT_QUAN[] IS NOT INITIAL.
    GETTING THE MATERIAL DOCUMENTS FOR SPECIFIED PERIOD
          SELECT MBLNR BUDAT FROM MKPF
                     INTO CORRESPONDING FIELDS OF TABLE IT_BUDAT
                     FOR ALL ENTRIES IN IT_QUAN
                     WHERE ( BUDAT GE DATE1 AND BUDAT LT DATE2 )
                     AND MBLNR = IT_QUAN-MBLNR.
          SELECT MBLNR BUDAT FROM MKPF
                     INTO CORRESPONDING FIELDS OF TABLE IT_BUDAT1
                     FOR ALL ENTRIES IN IT_QUAN
                     WHERE MBLNR = IT_QUAN-MBLNR
                     AND BUDAT LT DATE1.
        ENDIF.
        CLEAR INDEX.
        LOOP AT IT_FINAL.
          INDEX = SY-TABIX.
          LOOP AT IT_QUAN WHERE MATNR = IT_FINAL-MATNR
                            AND WERKS = IT_FINAL-WERKS
                            AND LGORT = IT_FINAL-LGORT.
            IF SY-SUBRC = 0.
    IF IT IS IN CALCULATE QUANTITY
              IF IT_QUAN-SHKZG = 'S'.
    check the unit if it is gram then devide by 1000.
                IF IT_QUAN-ERFME = 'G'.
                  IT_QUAN-ERFMG = IT_QUAN-ERFMG / 1000.
                ENDIF.
                IN_QTY = IN_QTY + IT_QUAN-ERFMG.
              ENDIF.
    IF IT IS OUT CALCULATE QUANTITY
              IF IT_QUAN-SHKZG = 'H'.
                IF IT_QUAN-ERFME = 'G'.
                  IT_QUAN-ERFMG = IT_QUAN-ERFMG / 1000.
                ENDIF.
                OUT_QTY = OUT_QTY + IT_QUAN-ERFMG.
              ENDIF.
            ENDIF.
          ENDLOOP.
          IT_FINAL-IN = IN_QTY.
          IT_FINAL-OUT = OUT_QTY.
    for closing stock
        LOOP AT IT_FINAL.
          IT_FINAL-CLOS_QUAN = IT_FINAL-OPEN_QUAN +
                                       IT_FINAL-IN - IT_FINAL-OUT.
          MODIFY IT_FINAL INDEX SY-TABIX.
          CLEAR IT_FINAL.
        ENDLOOP.
    reward points to all helpful answers
    kiran.M

  • Open and cancelled Quote Report

    Hi,
    Can anyone give me the information  for getting open and cancelled Quote Report?

    I hope you are using reason for rejection for cancelling quotations. If that is the case, you can use transaction VA25 to view the list of quotations. Here you can filter on two columns status and reason for rejection to view the report as per your requirement.
    Regards,
    GSL.

  • Find open and close smart quotes

    Dear scripter,
    Here I am trying find whether all the open double smart quotes(") are closed with close double smart quotes("). Here is my small work to find how many open and close quotes.
    myopenqu=app.activeDocument.search("^{", false, false, "^{");
    myclosequ=app.activeDocument.search("^}", false, false, "^}");
    myopenqulength = myopenqu.length;
    myclosequlength = myclosequ.length;
    if(myopenqulength!=myclosequlength)
    alert("Quotes not matched\n"+ myopenqulength +" Open quotes found\n" + myclosequlength +" Close quotes found")
    It works well, the script just alert if I have 25 open quotes and 23 close quotes
    Quotes not matched
    25 Open quotes found
    23 close quotes found
    Now I want to find the quote set where the 24,25th set close quotes are missing?
    Is there any way to find the misisng quotes
    Thanks in advance
    regards
    a r u l
    vpublish.net

    You'd have to look for unmatched quotes, in this case two cases of two open quotes without an intervening closed quote. This is difficult to script in CS2 because it doesn't have GREP natively and because of footnote problems. In CS3/4 it should be possible. But even then it will work only if you don't have quotes within quotes.
    Peter

  • Same EPM Excel Report takes time to open and refresh on 1 system while it opens and refreshes faster on other system

    Hi All ,
    I am facing an issue where the EPM Excel Templates on SERVER ROOT FOLDER take time to open on 1 system . It also takes great amount of time to REFRESH . While on an another system the same Report opens rather quickly and refreshes also quickly .
    Regards,
    SHUBHAM

    Hi Shubham,
    Now day excel problems are due to some MS update.  Not sure but  have a look at below note.
    2107965 - Issues in EPM Add-in after installing Microsoft updates

  • Help my safari doesnt open and gives me a crash report

    help my safari doesn't open and gives me a crash report ever since i downloaded a file from the internet. I have a macbook air (early 2014) with running os x yosemite version 10.10.1

    There is no need to download anything to solve this problem.
    You may have installed the "Genieo" or "InstallMac" ad-injection malware. Follow the instructions on this Apple Support page to remove it.
    Back up all data before making any changes.
    Besides the files listed in the linked support article, you may also need to remove this file in the same way:
    ~/Library/LaunchAgents/com.genieo.completer.ltvbit.plist
    If there are other items with a name that includes "Genieo" or "genieo" alongside any of those you find, remove them as well.
    One of the steps in the article is to remove malicious Safari extensions. Do the equivalent in the Chrome and Firefox browsers, if you use either of those. If Safari crashes on launch, skip that step and come back to it after you've done everything else.
    If you don't find any of the files or extensions listed, or if removing them doesn't stop the ad injection, then you may have one of the other kinds of adware covered by the support article. Follow the rest of the instructions in the article.
    Make sure you don't repeat the mistake that led you to install the malware. Chances are you got it from an Internet cesspit such as "Softonic" or "CNET Download." Never visit either of those sites again. You might also have downloaded it from an ad in a page on some other site. The ad would probably have included a large green button labeled "Download" or "Download Now" in white letters. The button is designed to confuse people who intend to download something else on the same page. If you ever download a file that isn't obviously what you expected, delete it immediately.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates
    if it's not already checked.

  • I click on itunes but doesnt open and says send error report or dont send

    i click on itunes but doesnt open and says send error report or dont send

    You will need to provide more details as we cannot see your computer screen. Does this happen every time you launch LabVIEW? What version of LabVIEW are you using? What version of Windows? Does LabVIEW crash? If so, what were you doing at the time it crashed?

  • My MF will not open and I get a report:- Platform v.9 is not compatible with min version 7 max version 7

    I have used MF for years, and have done nothing to the application directly to stop it opening. Have I messed up by deleting something on my PC, please?

    If you use ZoneAlarm Extreme Security then disable Virtualization and reinstall Firefox.
    *http://kb.mozillazine.org/Browser_will_not_start_up#XULRunner_error_after_an_update
    See:
    *[[/questions/880050]]

  • How Open And Print Proc C Genrated Text File Based Report ON Browser

    Dear Sir
    I have my old 6i forms from which i runs some Pro*c programmers with the help of HOST() command ,and then that generates a normal text file as a resultant report like file name "kha10"
    which i can easily open with any text client ,,,
    now what i want is that, to open this file on browser like web Report on my forms 10g like report builder 10g
    can anyone help me as it will be a gr8 help otherwise i would have to develop approx 100 reports.....
    any solution or any technique plzz help me

    bro my work is almost done apart from this virtual directory , how to make a virtual directory so that is dosent comes under
    http://........../form/
    i mean where to put my
    <virtual-directory virtual-path="/procrepo" real-path="c:\" />
    as my original file looks like bellow
    <?xml version="1.0"?>
    <!DOCTYPE orion-web-app PUBLIC "-//ORACLE//DTD OC4J Web Application 9.04//EN" "http://xmlns.oracle.com/ias/dtds/orion-web-9_04.dtd">
    <orion-web-app
         deployment-version="10.1.2.0.2"
         jsp-cache-directory="./persistence"
         temporary-directory="./temp"
         servlet-webdir="/servlet/"
    >
    <context-param-mapping name="configFileName">D:\DevSuiteHome_1/forms/server/formsweb.cfg</context-param-mapping>
         <virtual-directory virtual-path="/html" real-path="D:\DevSuiteHome_1/tools/web/html" />
         <virtual-directory virtual-path="/java" real-path="D:\DevSuiteHome_1/forms/java" />
         <virtual-directory virtual-path="/webutil" real-path="D:\DevSuiteHome_1/forms/webutil" />
         <virtual-directory virtual-path="/jinitiator" real-path="D:\DevSuiteHome_1/jinit" />
         <session-tracking cookies="disabled" />
    <!-- Uncomment this element to control web application class loader behavior.
    <web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
    -->
    <security-role-mapping name="administrators">
    </security-role-mapping>
    </orion-web-app>
    plzzzzzzzzzzz help

  • MB5B Report table for Open and Closing stock on date wise

    Hi Frds,
    I am trying get values of Open and Closing stock on date wise form the Table MARD and MBEW -Material Valuation but it does not match with MB5B reports,
    Could anyone suggest correct table to fetch the values Open and Closing stock on date wise for MB5B reports.
    Thanks
    Mohan M

    Hi,
    Please check the below links...
    Query for Opening And  Closing Stock
    Inventory Opening and Closing Stock
    open stock and closing stock
    Kuber

  • HELP to Open and Print automatic a REPORT

    Hello, I'm a Portuguese Developer, and i've a challenge, that is, i want to open REPORT by FORMS in RDF format and i want to open and print automatic way, i do not want to open, and then have to go print button to pint them.
    I want to open by FORM way and print automatic and close imediatly.
    HEP ME PLEASE!
    Thank you

    Aslam o Alikum (Hi)
    Ofcourse you can do this by specifing system parameters like DESTYPE=Printer and DESNAME=PrinterName
    Replace PrinterName with you printer name
    See System Parameters in Reports Under Data Model

  • If image file not exist in image path crystal report not open and give me exception error problem

    Hi guys my code below show pictures for all employees
    code is working but i have proplem
    if image not exist in path
    crystal report not open and give me exception error image file not exist in path
    although the employee no found in database but if image not exist in path when loop crystal report will not open
    how to ignore image files not exist in path and open report this is actually what i need
    my code below as following
    DataTable dt = new DataTable();
    string connString = "data source=192.168.1.105; initial catalog=hrdata;uid=sa; password=1234";
    using (SqlConnection con = new SqlConnection(connString))
    con.Open();
    SqlCommand cmd = new SqlCommand("ViewEmployeeNoRall", con);
    cmd.CommandType = CommandType.StoredProcedure;
    SqlDataAdapter da = new SqlDataAdapter();
    da.SelectCommand = cmd;
    da.Fill(dt);
    foreach (DataRow dr in dt.Rows)
    FileStream fs = null;
    fs = new FileStream("\\\\192.168.1.105\\Personal Pictures\\" + dr[0] + ".jpg", FileMode.Open);
    BinaryReader br = new BinaryReader(fs);
    byte[] imgbyte = new byte[fs.Length + 1];
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dr["Image"] = imgbyte;
    fs.Dispose();
    ReportDocument objRpt = new Reports.CrystalReportData2();
    objRpt.SetDataSource(dt);
    crystalReportViewer1.ReportSource = objRpt;
    crystalReportViewer1.Refresh();
    and exception error as below

    First: I created a New Column ("Image") in a datatable of the dataset and change the DataType to System.Byte()
    Second : Drag And drop this image Filed Where I want.
    private void LoadReport()
    frmCheckWeigher rpt = new frmCheckWeigher();
    CryRe_DailyBatch report = new CryRe_DailyBatch();
    DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter ta = new CheckWeigherReportViewer.DataSet1TableAdapters.DataTable_DailyBatch1TableAdapter();
    DataSet1.DataTable_DailyBatch1DataTable table = ta.GetData(clsLogs.strStartDate_rpt, clsLogs.strBatchno_Rpt, clsLogs.cmdeviceid); // Data from Database
    DataTable dt = GetImageRow(table, "Footer.Jpg");
    report.SetDataSource(dt);
    crv1.ReportSource = report;
    crv1.Refresh();
    By this Function I merge My Image data into dataTable
    private DataTable GetImageRow(DataTable dt, string ImageName)
    try
    FileStream fs;
    BinaryReader br;
    if (File.Exists(AppDomain.CurrentDomain.BaseDirectory + ImageName))
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    else
    // if photo does not exist show the nophoto.jpg file
    fs = new FileStream(AppDomain.CurrentDomain.BaseDirectory + ImageName, FileMode.Open);
    // initialise the binary reader from file streamobject
    br = new BinaryReader(fs);
    // define the byte array of filelength
    byte[] imgbyte = new byte[fs.Length + 1];
    // read the bytes from the binary reader
    imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length)));
    dt.Rows[0]["Image"] = imgbyte;
    br.Close();
    // close the binary reader
    fs.Close();
    // close the file stream
    catch (Exception ex)
    // error handling
    MessageBox.Show("Missing " + ImageName + "or nophoto.jpg in application folder");
    return dt;
    // Return Datatable After Image Row Insertion
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Using SQVI to generate report of open and released delivery schedule lines

    All,
    I'm using SQVI  to generate an excel spreadsheet for some buyers to show open released schedule lines because they are a 1 line item per scheduling agreement company.
    I used the logical database MEPOLDB instead of a table joint and pulled fields from EKKO(vendor, SA #,&purchasing group), EKPO(Material Number), EKEH(schedule line type), and EKET(delivery date, scheduled qty,previous qty).
    Does this sound like I'll get the results I want on paper as long as I use the right selection criteria, because the report I'm getting isn't quite what I expect? I am unable to identify which lines are authorized to ship vs. trade-off zone, planning, etc. in the report thus far.

    Hi Mark,
                 I have faced same requirement. I am not sure about transporting to TST and PROD. I done by this way.
    After generating SQVI program in DEV , I assigned that program  to a transaction and tested in DEV. Later i have regenarated SQVI in Production. then I assigned the generated Program to same transaction in DEV. And transported the Tcode assignment of program to Production..
    About authorization , if its not sensitive report, BASIS can restrict at transaction level.
    Regards,
    Ravi.

Maybe you are looking for

  • Aspect Ratio Problem with Onlining

    Hi, I checked the old posts and couldn't find an answer. I'm using Ken Stone's article to online my project. I followed the instructions except for the point right after the new online file is created and just before you capture footage. He says to c

  • Audio Quality

    Hey folks, We've got a client who is looking for better audio quality than we've previously been able to get out of LCCS. Looking into it a bit, it looks like the Flash microphone class has two main quality settings: encodeQuality and rate. The Micro

  • Getting itunes error 7 windows error 999

    Hi, please help! I began to get above message every time I tried to open itunes. Finally uninstalled it and reinstalled it - still getting same message. Uninstalled Virus Protection (MacAfee) and also Quicktime and still getting same message. Finally

  • How to upgrade ios 5 in ipad 2

    How to upgrade ios 5 in ipad 2?

  • Cannot download an app I've received via mail as a present

    My sister sent me an app as a gift via the App Store but when I use the link in the mail I get directed to the App Store and nothing happens. Am I the only one in this situation?! Not only, I tryed to send an app as gift to her and she has the same p