How to make query base delivery monthly report  link with delivery return

Hi,
I have facing some problem in Sales delivery report monthly. Problem is:
1) When i make Monthly query delivery report without any delivery return and AR Credit memo, it is Fine.
2) When i make Monthly query delivery report with any delivery return and AR Credit memo, it is not showing proper. Its showing in report including return quantity or AR Credit memo quantity.
So, How to make query base delivery monthly report  link with delivery return and AR Credit Memo?
Please help me regarding this.
Mizan
Edited by: mizan700 on Dec 18, 2010 2:50 PM
Edited by: mizan700 on Dec 18, 2010 2:50 PM

Hi,
try this.
SELECT DISTINCt T1.CARDCODE, T1.CARDNAME , T1.DOCNUM DELIVERY#,T1.DocStatus 'DELIVERY STATUS', T1.DOCDATE 'DELIVERY Date', T1.DocTotal 'DELIVERY Total', T3.DOCNUM Return#,T3.DocStatus 'Return Status', T3.DOCDATE 'Return Date', T3.DocTotal 'Return Total',T5.DOCNUM Invoice#,T5.DocStatus 'Invoice Status', T5.DOCDATE 'Invoice Date', (T5.DocTotal-T5.VatSum-T5.TotalExpns-T5.DiscSum) 'Total Before Discount', T5.VatSum 'Tax', T5.TotalExpns 'Freight', (T5.DocTotal - T5.PaidToDate) 'Total Payment Due', T7.DOCNUM AS 'CREDIT MEMO#', T7.DOCDATE
FROM DBO.DLN1 T0
INNER JOIN DBO.ODLN T1 ON T1.DOCENTRY = T0.DOCENTRY
LEFT JOIN DBO.RDN1 T2 ON T2.BASEENTRY = T1.DOCENTRY
LEFT JOIN DBO.ORDN T3 ON T2.DOCENTRY = T3.DOCENTRY
LEFT JOIN DBO.INV1 T4 ON T4.BASEENTRY = T1.DOCENTRY
LEFT JOIN DBO.OINV T5 ON T5.DOCENTRY = T4.DOCENTRY
LEFT JOIN DBO.RIN1 T6 ON T6.BASEENTRY = T5.DOCENTRY
LEFT JOIN DBO.ORIN T7 ON T7.DOCENTRY = T6.DOCENTRY
WHERE  T1.DOCDATE >= [%0] AND  T1.DOCDATE <= [%1]
Thanks,
Joseph

Similar Messages

  • How to make a CheckBox for a report parameter?

    Hi,
    How to make a CheckBox for a report parameter?
    thanx

    design ur parameters forms using forms and call ur report form there

  • How to download the output of a report along with column header

    Hi,
    Could someone please tell me on how to download the output of a report along with column header to .txt format. A download option needs to be given to the user using physical and logical file names .The report basically contains header details and item details and requirement is to download the same format into an .txt format.

    Hello,
    Try this FM:
    Data: being of itab occurs 0,
    matnr like mara-matnr,
    maktx like makt-maktx,
    end of itab.
    data:begin of fld_tab occurs 0,
    fld_name(20),
    end of fld_tab.
    fld_tab = 'Material'.
    append fld_tab.
    fld_tab = 'Material Desc'.
    append fld_tab.
    CALL FUNCTION 'WS_DOWNLOAD'
       EXPORTING
            BIN_FILESIZE            = ' '
            CODEPAGE                = ' '
             FILENAME                = 'C:\1.txt '
             FILETYPE                = 'DAT'
            MODE                    = ' '
            WK1_N_FORMAT            = ' '
            WK1_N_SIZE              = ' '
            WK1_T_FORMAT            = ' '
            WK1_T_SIZE              = ' '
            COL_SELECT              = ' '
            COL_SELECTMASK          = ' '
            NO_AUTH_CHECK           = ' '
       IMPORTING
            FILELENGTH              =
         TABLES
              DATA_TAB                = itab
              FIELDNAMES              = fld_tab
       EXCEPTIONS
            FILE_OPEN_ERROR         = 1
            FILE_WRITE_ERROR        = 2
            INVALID_FILESIZE        = 3
            INVALID_TYPE            = 4
            NO_BATCH                = 5
            UNKNOWN_ERROR           = 6
            INVALID_TABLE_WIDTH     = 7
            GUI_REFUSE_FILETRANSFER = 8
            CUSTOMER_ERROR          = 9
            OTHERS                  = 10
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Naimesh

  • How to open a jsf page on a link with a record . Link is in email

    Respected Friends ,
    I am facing a need for sending a email link to users for opening a form for processing a record . I have created a servlet for forwarding the user to the desired page on which we need to render a perticualr record. The servlet forwards the user to the required page but when the page is rendered it gives
    java.lang.NullPointerException     at iffco.wf.view.servlets.UserLinkRedirectServelt.getApplicationModule(UserLinkRedirectServelt.java:143)     at iffco.wf.view.servlets.UserLinkRedirectServelt.doPost(UserLinkRedirectServelt.java:125)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:712)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:369)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:865)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:447)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:215)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)     at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.1) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)     at java.lang.Thread.run(Thread.java:595)
    Please help me ,
    I want to know how i can load a page from a link with a perticular record .
    I am using jdeveloper 10.1.3 . Also when i acess the current application module from the servlet it gives me the null pointer exception.
    Thanks in advance

    HI FRANK THANKS FOR THE QUICK REPLY I AM PASTING THE CODE OF MY SERVLET..
    frank can you please provide me how to pass parametres along with jspx link and how to acess them in the managed bean .this will also solve my problem.
    package iffco.wf.view.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import iffco.wf.view.backing.LoginPageBean;
    import iffco.wf.view.utils.ADFJSFUtils;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import iffco.wf.model.wf_servicesImpl;
    import javax.faces.context.FacesContext;
    import javax.faces.el.ValueBinding;
    import oracle.adf.controller.v2.context.LifecycleContext;
    import oracle.adf.controller.v2.lifecycle.PageController;
    import oracle.adf.model.BindingContext;
    import oracle.adf.model.binding.DCDataControl;
    public class UserLinkRedirectServelt extends HttpServlet {
        private static final String CONTENT_TYPE = "text/html; charset=windows-1252";
        public void init(ServletConfig config) throws ServletException {
            super.init(config);
        /**Process the HTTP doGet request.
        public void doGet(HttpServletRequest request,
                          HttpServletResponse response) throws ServletException,
                                                               IOException {
            String var0 = "";
            String var1 = "";
            String var2 = "";
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>UserLinkRedirectServelt</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a GET. This is the reply.</p>");
            out.println("</body></html>");
            out.close();
            System.out.println("Inside doget method of servlet");
            LoginPageBean LoginBeanInstance = new LoginPageBean();
            System.out.println("Login bean initiated--->" + LoginBeanInstance );
            String nextJSP = "/faces/LoginPage.jspx";
            RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
            dispatcher.forward(request,response);
        /**Process the HTTP doPost request.
        public void doPost(HttpServletRequest request,
                           HttpServletResponse response) throws ServletException,
                                                                IOException {
            String var0 = "";
            String var1 = "";
            String var2 = "";
            response.setContentType(CONTENT_TYPE);
            PrintWriter out = response.getWriter();
            out.println("<html>");
            out.println("<head><title>UserLinkRedirectServelt</title></head>");
            out.println("<body>");
            out.println("<p>The servlet has received a POST. This is the reply.</p>");
            out.println("</body></html>");
            out.close();
            System.out.println("Inside post method of servlet");
            LoginPageBean LoginBeanInstance = new LoginPageBean();
            System.out.println("Login bean initiated--->" + LoginBeanInstance );
            String        amDef = "iffco.wf.model.wf_services";
            String        config = "wf_servicesLocal";
            wf_servicesImpl service = (wf_servicesImpl)Configuration.createRootApplicationModule(amDef,config);
            System.out.println("service created --> "+ service);
            ViewObject vo=service.getLoginVO();
            System.out.println(vo);
            vo.setNamedWhereClauseParam("p_personal_no","109128");
            vo.setNamedWhereClauseParam("p_password","abc");
            vo.executeQuery();
            System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
            ADFJSFUtils newHelperClass = new ADFJSFUtils();
            System.out.println("New Helper Class Initated -->"+newHelperClass);
            ApplicationModule currentAM = newHelperClass.getDataControlApplicationModule("wf_servicesDataControl");
            System.out.println("Current AM is -->"+currentAM);
            ViewObject vo = currentAM.findViewObject("LoginVO");
            System.out.println(vo);
            vo.setNamedWhereClauseParam("p_personal_No","109128");
            vo.setNamedWhereClauseParam("p_password","abc");
            vo.executeQuery();
            System.out.println("View Object has -->"+vo.getEstimatedRowCount()+" Rows");
            System.out.println("Before method");
            wf_servicesImpl wfser=getApplicationModule();
            System.out.println("after method value got-->"+wfser);
            String nextJSP = "/faces/LoginPage.jspx";
            RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(nextJSP);
            dispatcher.forward(request,response);
        public wf_servicesImpl getApplicationModule() { 
                 FacesContext context = FacesContext.getCurrentInstance(); 
                 System.out.println("context --"+context);
                 ValueBinding vb = context.getApplication().createValueBinding("#{data}"); 
                 BindingContext bc = (BindingContext) vb.getValue(context); 
                 DCDataControl dc  = bc.findDataControl("wf_servicesDataControl"); 
                 return (wf_servicesImpl) dc.getDataProvider(); 
        private void redirect(
            ResponsePage aDestinationPage, HttpServletResponse aResponse
          ) throws IOException {
            String urlWithSessionID = aResponse.encodeRedirectURL(aDestinationPage.toString());
            aResponse.sendRedirect( urlWithSessionID );
          private void forward(
            ResponsePage aResponsePage, HttpServletRequest aRequest, HttpServletResponse aResponse
          ) throws ServletException, IOException {
            RequestDispatcher dispatcher = aRequest.getRequestDispatcher(aResponsePage.toString());
            dispatcher.forward(aRequest, aResponse);
    }

  • "how to use Query include one month "

    Hi all expert,
    How to make a request how to add table "QTYSALES one month yesterday"
    so that I can compare with this month.
    Query me this:
    SET ARITHABORT OFF
    SET ANSI_WARNINGS OFF
    SELECT T0.ItemCode, T0.Dscription,T1.OnHand, convert(varchar,SUM(T0.BaseQty*T1.NumInSale)) AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END)))AS 'TURN OVER IN MONTH'
    ,round(convert (varchar,(t1.onhand/(SUM(T0.BaseQtyT1.NumInSale)/DAY(GetDate()) Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END))),4)* 30 AS 'Turn Over Days'
    FROM DBO.INV1 T0 INNER JOIN DBO.OITM T1 ON T0.ItemCode = T1.ItemCode
    WHERE Month(T0.DocDate) = Month(GetDate()) AND Year(T0.DocDate) = Year(GetDate())
    GROUP BY T0.ItemCode,T0.Dscription,T1.OnHand
    union
    SELECT T1.ItemCode, T1.itemname,T1.OnHand, '' AS 'Qty Sales',DAY(GetDate()) as 'Days',
    Case WHEN Month(GetDate()) in (1,3,5,7,8,10,12) THEN 31 WHEN Month(GetDate()) in (2,4,6,9,11) THEN 30 ELSE 28 END AS 'Total days'
    ,'No Sales' AS 'TURN OVER IN MONTH'
    ,NULL
    FROM DBO.OITM T1
    WHERE T1.ITEMCODE NOT IN (SELECT ISNULL(ITEMCODE,0) FROM INV1)
    GROUP BY T1.ItemCode,T1.itemname,T1.OnHand
    ORDER BY 1
    thanks for all
    Edited by: rachelhel on May 20, 2009 8:06 AM

    haiiii allll pls help...thankss
    Hi consulatant B1
    How to use Query
    My goal is to create a table to see * The number of sales in a month yesterday *
    I want to make a request showing the amount of sales at the end of the month.
    For example this month is on May 25, so I want to show the Quantity of one month April 25
    I have tried several times, but still just wrong.
    I need expert help to solve the problem for me.
    thanks

  • How to make new column of Interactive Report permanent

    Hi,
    after changing the query of an interactive report (adding a new column) you have to add the column from the Actions Menu -> Select Columns function of the report.
    But this change isn't permanent. After i logout and login again, or a user goes to the specified report, the column isn't visible.
    Is it possible to make this permanent, because the only solution i have found it to recreate the report, which is not a good idea.
    Thank you.
    Teo
    Edited by: temm on Sep 14, 2011 11:21 AM

    Hi,
    Login to Apex builder. Run page where you have IR.
    Select columns you like display. Then from action menu save report default layout.
    Regards,
    Jari
    Edited by: jarola on Sep 14, 2011 11:23 AM
    See documentation
    http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt.htm#sthref1287

  • How to make business content available for reporting

    The business content is loaded.The version is 3.5.3 SP2 which we have and BW version is 3.5
    I can see the business content going thru RSA1 for e.g for Sales 0SD_O01 etc
    Now how can i make the content available for reporting.When I go in modeling and click on infoprovider, infoobject it doesnt show me anything.Its blank.
    Do i have to connect R/3 to BW for reporting or load data to BW from R/3 and do reporting.Why the content is not showing in modeling?How can i make it available for reporting

    Hi,
    First you need to install the Businesscontent object first...right side window in the business content will give you the option.once it is installed then u can view it in modeling then load data and do reporting...
    If you need any details..feel free to post..If u satisfied upto some level..exibhit it by awarding points..

  • How to make data base link from oracle 11g r2 to microsoft sql 2008 express

    I need to make data base link from oracle 11g r2 to microsoft sql 2008 express to make replication between then
    please help me !
    I didn't know what is the user and password in the command which create database link

    To replicate data you can ude Database Gateway for ODBC or Database Gatewy for MS SQl Server. Please use the search engine of this forum if you ant to get more details about each product.
    Some SQl Servers are set up to use Windows authentication only. In this case you won't be able to connect to the SQL Server as Windows authentication isn't supported with the gateways. You have to make sure your SQL server is supporting username and password authentication - a common user is the "sa" user. Regarding the username/password, please get in touch with your SQL Server Admin.

  • How to make crosstab cell value become hot link which can link to other?

    Dear Gurus:
    I am using Bi beans in a project, i create a crosstab in one .jsp file,the crosstable can display data correctly,but i want to make every cell value become hot link which point to a url,this url contains measure info and all dimension info,how can i do? Thanks a lot!

    Hi Tomsong,
    We will post a BI Beans Sample that does that to OTN next week.
    In the mean time, look at the following BI Beans Help topic (under Jdeveloper BI Beans Help)
    Handling Drill-Out Events in HTML-Client Applications
    Hope this helps
    Katia

  • How do I submit a Report link with a URL for one of the values

    Hi -- I have a Report link on a column, and I want to set an item to one of the report columns which contains URL values (like "http://...."). If I do that, the URL ends up in the hyperlink and is not escaped, so the colon confuses things. How do I get the report column to be escaped?
    Thanks

    You can convert the colon to whatever you like in your select statement but you cannot supply a colon as part of an item value field in an f?p URL.
    Scott

  • How to make my display be the main view with my mac Book Pro

    How to set up my external display automatically work as the main display when plugged into my MacBook Pro. I had it set up to work this way on my old MBP but I got a new MBP with Mountian Lion and the Display set up seen different and I can figure out how to make my Apple HD display (about 3 years old) be the main display when I turn on my MBP. Mirror is off when I look at
    System pref’s – Display – Arrangement I just get to pick which display is left and right. I cant remember how it was set up on my old MBP. Mirroring does me no good. Any help will do!!!
    Thanks Brad

    Drag the menu bar in the picture to the picture of the other display.

  • How to make a photo half black and white with select colours

    Hey,
    Can anyone give me step by step instructions on how to make a photo black and white with abit of colour like the one attached... on CS4?
    Cheers

    Haven't seen you attached file as it takes a long time for attachments to load on this forum.  Try little camera icon instead.
    EASIEST way to have B&W in areas is to add Hue and Saturation adjustment layer.  Use sliders to make B&W.  Next paint on layer MASK, with black, to restore color in areas you want to show color.

  • How far away from base station can I get with Wi-Fi?

    I want to know how far away from my base station I can get with my iPod touch's Wi-Fi. I can't test it out since it is still shipping, but I would like to know, since I will be travelling a lot with it. I know you can connect it to hotels, restaurants, etc. that have Wi-Fi, but say there's none of them around (since I live in central Nebraska). How far do you really think I can go?

    I hope you only 'travel' around your house. That's about as far as you can go before losing your wifi connection. Alright, might work in the backyard. Seriously, check the range of your router. Mine covers 200 feet, more than enough for my apartment. Certainly not enough to travel and remain connected.

  • How to make round curves when you are animatting with the Rec mode?

    Hi! I am making a project in motion. I recored a freind writing words and stuff in the roof of my house with two flashlights. My plans was to follow the lights with motion traking: Analize move or match move. And then add a particle emmite for making something like this: http://www.youtube.com/watch?v=MZf2W3S7gV0&feature=fvw . When i tried to make the match move it was imposible. So i desided to make it manually with the REC button. And it work perfectly, the only problem is that it can's achive the round cruves (bezier like). I can only make squared like turns and it looks awful. I have also tried bezier as a path but i don't know how to make the particle emmiter follow it with different speeds, becouse the movement of the flashlight is inconstant.
    What can i do to make a round curved path and make a particle emmiter follow it with the rec button with the different speeds of the flashlights? Please help me!!!! I have to deliver this work for tuesday!
    Thanks for you time y hope you can help me out as soon as possible.
    Juan Javier.
    PD Sorry for my english! jajajaja.

    Juan Javier Ibarra Pitts wrote:
    When i tried to make the match move it was imposible.
    Hi
    Why was it impossible?
    It sounds like tracking is the only way your going to achieve what your after given the way you've shot your footage and the spatial and temporal nuances therein.
    You'll find comprehensive instructions on how to track particles to footage starting on page 49 of this document:
    http://manuals.info.apple.com/en/MotionSupplementalDocumentation.pdf
    Regards.

  • How to make a page break in report

    Hi,
    I want a page break on the basis of the query. Is it possible to write SQL Plus Command like 'BREAK' in report? Is there any other way to make it? Is there any way using 'P_MAX_ROWS' attribute? I know in CSS2 there are some element 'page-break-before' and 'page-break-after' , but I do not understand how to implement those. Anybody can help me?
    Thanks
    Sumita

    Hi,
    You can do this in the display options tab of the report. You can break on maximum three columns. The sum which you specify in the column formatting section will be calculated for each break.
    Thanks,
    Sharmila

Maybe you are looking for

  • File content conversion for Receiver File

    Hi, I am using SAP PI 7.1 i am facing an error in the receiver file when using FCC. my file structure is as below: MT_file             1.....1   Itab_out          0.....1      item             0.....unbounded       STR            0....1 so in the rec

  • Calling report from a button based on parameters

    Hi, I want to call a report from a custom button based on some parameters. Suppose I have a form based on dept table and I have created a custom button which should take the value of the selected deptno and pass as a parameter to the report to get al

  • Quicktime export question

    hey guys i know that quicktime export is the best for dvd because it is the same source coming out as it was going in. my one video i exported was roughly 17 minutes long...i exported it and it came to about 300mb i then exported a video that was onl

  • My VScrollBar applied on List ignores my custom Skin

    I'm trying to customize the skin of a List. The code looks like this: <s:List id="selector" x="670" height="327" itemRenderer="components.GalleryThumbnailRenderer" borderVisible="false" contentBackgroundAlpha="0" focusAlpha="0" horizontalScrollPolicy

  • Changing Country to Bahamas in Itunes

    So for about a two weeks now I have been attempting to change my country from the US to the Bahamas. However, with every attempt made it continues to tell me that "payment processing is unavailable, and that I should try again later." Is there any ad