Itemwise GRPO report with tax query.

Greetings of the day, Experts,
We require a report of the GRPO created for Item wise passed.  The report desired is Itemwise will all taxes, namely Excise Duty, HECess, EDCess, VAT4%, VAT5%, etc.  Though we did try to fetch but the same are being displayed in the row level and wish to have in the Column format where in distinctly indicating the values in the columns for the respective columns.
We have tried this but get the values displayed are all the same.
SELECT
T0.DocEntry,
T0.ItemCode,
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-90' and T1.DocEntry = T0.DocEntry), 0) 'Excise Duty',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-60' and T1.DocEntry = T0.DocEntry),0) 'Educ Cess',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-55' and T1.DocEntry = T0.DocEntry),0) 'HECess',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and  T1.StaCode = 'VAT4' and T1.DocEntry = T0.DocEntry),0) 'Vat - 4%',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and  T1.StaCode = 'VAT5' and T1.DocEntry = T0.DocEntry),0) 'Vat - 5%',
from PDN1  T0
Need your guidance.
Thanks and regards.

Hi........
Try this......
SELECT
T0.DocEntry,
T0.ItemCode,
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-90' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum ), 0) 'Excise Duty',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-60' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Educ Cess',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '-55' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'HECess',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and T1.StaCode = 'VAT4' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Vat - 4%',
ISNULL((select sum(T1.TaxSum) from PDN4 T1 where T1.staType = '1' and T1.StaCode = 'VAT5' and T1.DocEntry = T0.DocEntry And T4.LineNum=T1.LineNum),0) 'Vat - 5%',
from PDN1 T0
Regards,
Rahul

Similar Messages

  • Crystal Reports with BEx Query using Custom Exit Variable

    Hi,
    We have BW BEx Query using Customer User Exit variable to derive  the Fiscal Week for Last Year (called it VAR2) based on another user input variable Current Fiscal Week (called it VAR1).
    VAR2 is derived from VAR1 in CMOD via some codings and thus it DOES NOT have the "Variable is Ready for Input" flag ticked in the BEx. VAR1 is user input variable, so it has "Variable is Ready for Input" flag ticked in the BEx.
    When we create a Crystal Reports with the BEx Query using variable VAR2, and when we run it we got an error message saying "Failed to execute query; '[]<java.lang.UnsupportedOperationException: No Selection State Support!ZP_MI_LYPUBWEEK>'. Redesign your query or contact the data source maintainer to solve the problem".  (note: ZP_MI_LYPUBWEEK is VAR2 in this case).
    Could anyone please assist? Surely, CR supports BEx customer user exit variables like the above, right?. I also refer to the forum below as it seems to have a similar issue (except mine with an error message), but it does not provide a solution in it.
    Crystal Reports with BEx Query using Custom Exit Variable
    Thanks,
    Andy

    Hi Vibhav,
    We have the SAP Crystal Reports for Enterprise XI4.0 Version 14.0.0. Not sure if SP0 or other SP, got to check with Basis Team later.
    We tried that "mandatory" option and did not work either.
    Anyway, SAP has now come back again saying it is something they will fix it in next release/version. We got a phone call from them and a reply below to our OSS.
    23.08.2011 - 08:20:49 CET - Info for Customer by SAP  
    I have raised this issue on the Idea#s Place as an enhancement request
    on the below link:
    https://cw.sdn.sap.com/cw/ideas/5586
    This ER contains the information of including the customer exit
    variables in the report without checking the #input for ready# option.
    This ER can be considered for being implemented in the future
    versions. You can refer to SAP Note: 1515837 - How To: Enhancement
    Request Process - "Idea Place" for more information regarding the Idea
    Place.
    Cheers,
    Andy

  • Single report with multiple queries OR multiple reports with single query

    Hello Experts,
    I have a confusion regarding Live Office connection for many days. I asked many people but did not get a concrete answer. I am re-posting this question here and expecting an answer this time.
    The product versions that I am using are as follows:
    FrontEnd:
      BOE XI 3.1 SP4 FP 4.1
      Xcelsius Enterprise 2008 SP4
    Backend:
      SAP BW 7.0 EHP1
    I have created a dashboard which is getting data from a webi report using LO connections.
    The webi report has five report parts which are populated by five different queries.
    Now my question is, when the five LO connections are refreshed, is the webi report refreshed five times or just once?
    If the report is refreshed five times, then I guess it is better to have five different webi reports containing single report part, because in that way we can prevent same query being executed multiple times.
    SO what is the best practice- to have a single report having multiple queries - OR - to create multiple webi reports with single query?
    Thanks and Regards,
    PASG

    HI
    I think Best Practice is Multiple reports with single query
    Any way If LO connections refresh 5 time the query will refresh 5 timesRegards
    Venkat

  • Report with multiple query

    Hi,
    I want to construct a report that consists of results from a number of different queries, I was just wondering how would acheive that if APEX only allows me to return one query?
    Thanks
    Candy

    "which tool does allow you to create one report out of multiple indipendant queries?"
    I don't know which tools allow me to do that, I was hoping there's something like that.
    The report I want to show is something like this, I have a table with a list of customers, each customer has a number of work request(an other table), where some of my team collegaues would spend X amount of time on the work request.
    the report should show something like this for the current week or month:
    company A Michael 5 hrs
    Pete 4 hrs 1 week ago 2 week ago
    total: 9 hrs 7 hrs 17 hrs
    I hope you can see what i am trying to show in my report, basically, it should show for each customer the name of the worker and the hrs he spent, and then the total, that i suppose i can do it with one query:
    select sum(wrs.time), con.first_name, c.full_name
    from customers c,
    work_request wr,
    work_request_state wrs,
    contacts con
    where wrs.request_id = wr.id
    and wr.customer_id = 27
    and c.cust_id = 27
    and wrs.time!=0
    and wrs.changed_date > trunc(next_day(sysdate -7, 'SUN'))
    and wrs.changed_by = con.cont_id
    and con.cust_id = 0
    group by con.first_name, c.full_name
    order by c.full_name;
    but i also want to find out one/two week ago, how many hours were spent, and that's when i need to do a separate query with different where clause.
    If you don't undersatnd my report, I can email the report template to you, so you can see it better in a table.
    Perhaps I just over looked the whole problem...

  • 5 reports with one query ....?

    Hi Guys,
    We  are on BI 7 and ECc 6...In one of our MM Report requirements we have one report with 5 work books ...i.e,
    The report is a set of 5 reports with the same selection criteria with different Key figures.
    All these reports can be separate work sheets in a workbook or displayed in multiple table items in a Web report
    So , I have made one Query with all the Key Figures...and saved it...Now my question is Do I need to create 5 queries for this / 1 query is ok ?I didnt understand how to finish this...We have all the fields that we need for 5 reports in this query...
    Can  any one advice on this
    regards

    Hi,
    U can also create structures of 1query and save, then similarly create 4 remainign strucutres,,so totally u hv 5structures for 1query, (Instead of maintaining a workbuk)
    u can compare the data thru excel.
    Also check these links for checking data consistency,
    R/3 - BW reconcilation
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/968dab90-0201-0010-c093-9d2a326969f1
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7a5ee147-0501-0010-0a9d-f7abcba36b14
    Reconsilation
    Please check this link for data reconcilation:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/7a5ee147-0501-0010-0a9d-f7abcba36b14
    Re: Reconcilation of data
    strategies and methods to reconcile sap bw data to source systems .
    http://bluestonestep.com/component/option,com_docman/task,doc_download/gid,7
    http://sap.ittoolbox.com/documents/popular-q-and-a/comparing-data-between-r3-and-bw-2741
    assign points if helped,.
    Thanks

  • BO Edge 3.1 run Crystal Report with sub query or Union

    I have some reports with subquery and union SQL Command and put them in SAP BO Edge 3.1 server. The results are very disappointed. I scheduled 3 instances of the same report to run at 5:30 a.m. . When I used the Crystal Report 2008 to run the report, it took only 3 minutes. One instance took several minutes but other two never came back. When I came back to the office at 8:30 a.m., they were still running. What is the problem with SAP BO Edge? Any solution? the reports are very important and I have to get up at 5:30 a.m. to check to see the result and re run as needed. Any suggestion?
    Thanks.

    Look at the errors in each instance to help determine the cause

  • Please help me to do Completed Tasks Excel Report with Odata Query

    Please help me to do Completed Tasks Excel Report with Odata Query

    Hello,
    If you use the link below in Internet Explorer you will find all of the properties and feeds for the Odata API:
    < site URL>/_api/ProjectData/$metadata
    That should help you find the data you need.
    For more details, see this post:
    https://pwmather.wordpress.com/2014/07/17/getting-started-with-projectonline-part-9-ps2013-office365-project-ppm-sharepointonline-pm-sp2013/
    Hope that helps
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Using Interactive Report with SQL query accessing tables via db link

    Is there a known issue with using the interactive report in version 3.1.2.00.02 with SQL that is accessing tables via a database link? I get the error 'not all variables bound', I do not get this error when using the standard report for the same SQL?
    Thanks,
    Edited by: [email protected] on May 26, 2009 2:59 PM

    Varad,
    Good question, failed to check that. In fact there are errors. Dump file c:\oraclexe\app\oracle\admin\xe\bdump\xe_s002_3640.trc
    Mon Jun 15 08:48:11 2009
    ORACLE V10.2.0.1.0 - Production vsnsta=0
    vsnsql=14 vsnxtr=3
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Windows XP Version V5.1 Service Pack 3
    CPU : 2 - type 586, 1 Physical Cores
    Process Affinity : 0x00000000
    Memory (Avail/Total): Ph:1051M/2038M, Ph+PgF:2273M/3934M, VA:1302M/2047M
    Instance name: xe
    Redo thread mounted by this instance: 1
    Oracle process number: 16
    Windows thread id: 3640, image: ORACLE.EXE (S002)
    *** ACTION NAME:(PAGE 2) 2009-06-15 08:48:11.743
    *** MODULE NAME:(APEX:APPLICATION 112) 2009-06-15 08:48:11.743
    *** SERVICE NAME:(SYS$USERS) 2009-06-15 08:48:11.743
    *** CLIENT ID:(ADMIN:232384011651572) 2009-06-15 08:48:11.743
    *** SESSION ID:(24.931) 2009-06-15 08:48:11.743
    *** 2009-06-15 08:48:11.743
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [ACCESS_VIOLATION] [_LdiDateFromArray+55] [PC:0x608B04F3] [ADDR:0x0] [UNABLE_TO_WRITE] []
    Current SQL statement for this session:
    select Stage,Procedure,Stp,FW,Reslt,MSG,date_run
    from bi_msg_VW@dwitnm
    order by 1
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    2FE1EA14 1207 package body SYS.DBMS_SYS_SQL
    2FE1F064 328 package body SYS.DBMS_SQL
    2ABDC520 5097 package body APEX_030200.WWV_RENDER_REPORT3
    2BD5E55C 1538 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
    2BD5E55C 366 package body APEX_030200.WWV_FLOW_DISP_PAGE_PLUGS
    335BDA88 11190 package body APEX_030200.WWV_FLOW
    2BDBD1C8 255 procedure APEX_030200.F
    2AB58D10 30 anonymous block
    ----- Call Stack Trace -----
    I didn't include the call stack, it is too large. Now I'm even more puzzled that the IR would work while a sql report would fail.
    Bob

  • Strange behaviour of Crystal report with BEx Query

    Hiii. All
    I have created a crystal report on top of BW-BEx query. My query contains a structure other than Keyfig.
    Thats why I am using BW-MDX query option to build my Report.
    i Have created a cross tab in my report taking the structure as Column and some key figures in Summarised fields.
    till here it works fine. but whenever I am dragging some fields say "Project Defination or Location" to  report header section, which are also coming frm BEx query. then my cross tab is not showing all colomn of the structure(Precisely it removing one column of the structure).
    Can anyone pls tell me  why is it happening. and how to proceed to solve this.
    Waiting for your reply..
    Thanks
    Anish

    Hi,
    Thanks for your reply.
    Yes it returning data . Structure contains total 13 columns .
    So It is suppose to return all 13 of them. and it is doing so till i don't drag-drop the field. once i do this its behaving strangely and returning me only 12 columns.
    CR 2008 Version : 12.3.0.601
    BO Version : BO XI  3.1
    Regards,
    Anish

  • Saving a report with two  query providers into .csv format

    Hi,
    I have developed a webi report which has two query providers. I have linked the objects from these two queries at the report level using merged dimensions. the report is running fine. When I save it in EXCEL or PDF it saves the same report, but when I try to save the report in .CSV format, the output of the second query provided is getting appened at the bottom of the report.
    Has anyone encountered similar problem is so whats the solution for it.
    For me business wants the report to be saved as .csv only as it acts as a source file to other application.

    Hi
    please take a look at the explanation area in the following note
    https://css.wdf.sap.corp/sap/support/notes/1417382
    When saving Web Intelligence document as Excel format, the result is saved based on the report design.
    When saving Web Intelligence document as CSV format, all data in the Data Provider are saved.
    I believe that the behaviour you described is by design so there is not much to do about it. You can open a case by SAP support though asking if this changed in a later service pack (actual service pack version for XI R2 is SP 6).
    Regards,
    Stratos

  • Benefits of SAP Business Warehouse Reporting compared with the Query-tools?

    Hello experts,
    I've been creating reports with SAP Query tools, but been faced with few problems. First of all, there are restricted possibilities in terms of joining tables, and thus I cannot include all the data required for the report.
    One solution for this would have been to create separate queries and join the data together in Excel. The problem with this is that there exists no common field that would make sense as for a selection criterion. If the selection criterion is different in different queries, there is the danger of combining false data together, which would eventually result with distorted data. 
    So I was wondering, could anyone briefly tell me if SAP Business Warehouse reporting would solve these problems? And what other benefits would it provide compared with the SAP Query? I'd urgently need to know if it would be a beneficial investment for the company, since I haven't found solutions for the problems occurred in the creation of reports.
    Thank you in advance for you help!
    Maria

    The answers are yes - and thousands of companies have gone down this route
    Puttingin BW is a strategic aim of the comapny and not to be thought about and discussed in a BI forum such as this
    The costs of implementation and hardware will no doubt make your eyes water.
    To be quite honest SAP BI is a "no brainer" as most of the new e-SOA and new R3 modules reply on BW for their reporting needs

  • SSRS report with tabular model – MDX query how to get the sum and count of measure and dimension respectively.

    Hello everyone,
    I am using the following MDX query on one of my SSRS report.
    SELECT NON EMPTY { [Measures].[Days Outstanding], [Measures].[Amt] } ON COLUMNS,
    NON EMPTY { ([Customer].[Customer].[Customer Key].ALLMEMBERS) }
    HAVING [Measures].[ Days Outstanding] > 60
    DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS
    FROM ( SELECT ( STRTOSET(@Location, CONSTRAINED)) ON COLUMNS
    FROM ( SELECT ( {[Date].[Fiscal Period].&[2014-06]}) ON COLUMNS
    FROM [Model]))
    Over here, the data is being filtered always for current month and for a location that is being selected by user from a report selection parameter.
    I would like to get the count of total no. of customers and sum of the amount measure.
    When I am using them in calculated members it gives incorrect values. It considers all records (ignores the sub-select statements) instead of only the records of current month and selected location.
    I also tried with EXISTING keyword in calculated members but there is not difference in output. Finally, I manage the same at SSRS level.
    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Can anybody please advise what are the ways to get the required sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension?
    Also, does it make any difference if I manage it as SSRS level and not at MDX query level?
    Hi Ankit,
    We can use SUM function and COUNT function to sum of [Measures].[Amt] and count of [Customer].[Customer].[Customer Key].ALLMEMBERS dimension. Here is a sample query for you reference.
    WITH MEMBER [measures].[SumValue] AS
    SUM([Customer].[Customer].ALLMEMBERS,[Measures].[Internet Sales Amount])
    MEMBER [measures].[CountValue] AS
    COUNT([Customer].[Customer].ALLMEMBERS)
    MEMBER [Measures].[DimensionName] AS [Customer].NAME
    SELECT {[Measures].[DimensionName],[measures].[SumValue],[measures].[CountValue]} ON 0
    FROM [Adventure Works]
    Besides, you ask that does it make any difference if I manage it as SSRS level and not at MDX query level. I don't thinks it will make much difference. The total time to generate a reporting server report (RDL) can be divided into 3 elements:Time to retrieve
    the data (TimeDataRetrieval);Time to process the report (TimeProcessing);Time to render the report (TimeRendering). If you manage it on MDX query level, then the TimeDataRetrieval might a little longer. If you manage it on report level, then the TimeProcessing
    or TimeRendering time might a little longer. You can test it on you report with following query: 
    SELECT Itempath, TimeStart,TimeDataRetrieval + TimeProcessing + TimeRendering as [total time],
    TimeDataRetrieval, TimeProcessing, TimeRendering, ByteCount, [RowCount],Source
    FROM ExecutionLog3
    WHERE itempath like '%reportname'
    Regards,
    Charlie Liao
    TechNet Community Support

  • Report with page items

    Hello all,
    I am using APEX 4.0.3 and I would like to create a report where I could have editable page items within it. My objective was having for instance a variable number with its characteristics displayed in the report and the in one column be able to choose one second from a select list to associate to the first one.
    In resume I need to have both a select list in the report, and I need to know how do I access the value of this item in each of this rows.
    Thank you,
    Mike

    You need to loop.
    Check out "Referencing Arrays,Referencing Values Within an On Submit Process" sections in following documentation.
    This should give you fair idea.
    http://download.oracle.com/docs/cd/E10513_01/doc/apirefs.310/e12855/apex_app.htm
    For example if you have report with following query
    SELECT APEX_ITEM.TEXT(1,column_name) FROM myTable;
    and if you have 10 rows in table, then 10 text items will display on your page.
    Since we have given the ID (p_idx) as 1, we can refer these text items using G_F01 global array. (If its 2 then G_F02 etc. we can have upto 50 dynamic item on one page)
    G_F01.COUNT gives us "number of items"
    G_F01(i) gives us value of i ^th^ text item value.
    Hope it helps
    Regards,
    Hari

  • BIP fails to render a pdf report with Read timed out

    Hi,
    If a run a report with large query/data, BIP after 2 minutes fails with this error: java.sql.SQLException: java.net.SocketTimeoutException: Read timed out.
    The BIP report run a OBIEE Query, and BI Server log return this:
    [2012-07-03T14:47:39.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 00i8cAKOjzl7Y7k5wzCCyW0002gS0001OO] [tid: 28f0] [nQSError: 43119] Query Failed:
    [2012-07-03T14:55:23.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 7a1d39a9491c6b05:-116dac4a:137a8e42d31:-8000-00000000000d1d0a] [tid: 2d7c] [nQSError: 46066] Operation cancelled. [[
    ExecutePhysical Exchange
    [2012-07-03T14:47:39.000+00:00] [OracleBIServerComponent] [ERROR:1] [] [] [ecid: 00i8cAKOjzl7Y7k5wzCCyW0002gS0001OO] [tid: 28f0] [nQSError: 17012] Bulk fetch failed. [[
    [nQSError: 17001] Oracle Error code: 1013, message: ORA-01013: user requested cancel of current operation
    at OCI call OCIStmtFetch.
    How can I run the report? ...If I try the Phisical Query that OBIEE wrote on log, its work fine.
    Thank you, R.

    up!

  • Crystal Reports and BW Query- Translation

    Hello,
    I'm trying to use Crystal reports with BW Query in the Hebrew Language.
    When i open the Crystal Reports and connect to SAP I'm putting the Hebrew language key in the logon screen. When the crystal report starts i can see the reports info objects but without the Hebrew description. I can see that in the formula fields the Language key is selected but shouldnt i get the info objects description as well?
    Thanks,
    David

    Hi David,
    when I create a new report (using the SAP toolbar) I always get the descriptions for the info objects on the field explorer according to the language I set when I logon on into the SAP system my query resides in. I tried with both english and german language and it works fine. I assume you have installed the hebrew language pack for CR and that the hebrew descriptions are maintained in your SAP system. I also assume that you are talking about creating a report here and not opening an existing one though. In this case the language at creation time defines which descriptions are displayed.
    If the above assumptions are valid, then you may face a hebrew language specific problem here. Opening a support case would probably make sense.
    Regards,
    Stratos

Maybe you are looking for

  • The problem about  integrate  Portal and R/3

    Hi everyone :    We want to achieve that our vendor can query R/3 report via our Portal. I had done SSO configuration.    But we had about 500 vendors, it is impossible that we create 500 R/3 users for our vendors,  because the cost is too much .   

  • Is Adobe "Support" an contradiction in terms?

    I have recently (now a month ago) purchased an upgrade of my exisiting Acrobat Standard 8 to Professional 9.  It downloaded OK, but it would accept not my exisiting serial munber as valid (it is, and I didn't mistype it!). Will Adobe help - Short ans

  • IPod/iTunes/iPod Updater Won't Recognize Connection

    I recently got my iPod serviced for this very issue. Neither iTunes nor my iPod nor iPod updater will recognize when I connect the iPod to either my PC or my laptop. I have noticed this problem isn't listed on the site or anything. I could really use

  • Communication Details Vendor Master SMART FORM Printing.

    Hi Could you please advice Functional module to extract SAP Vendor Master Communication Details for SMART FORM Printing. Thanks in Advance. Regards Ravi

  • Too much to ask? Windows 8 epub reader + Adobe DRM...

    Hello all, Is it just too much to ask to read an Adobe DRM protected epub document in a nice metro-friendly Windows 8 interface (which Adobe Digital Editions most certainly is not)? I have spent hours today looking for that little Holy Grail The only