Document Path Query

Hi All
Can Someone please supply me with a query to tract the path of a AP ducment from the PO up to the invoice.
Thanks alot

Hi Jaco Erasmus,
IF you need to tract the path from the Purchase Order(PO) up to the A/P Invoice. try to use below join query.
SELECT T0.DocNum AS 'PO_NO', T0.DocDate AS 'PO_DATE', 
T2.DocNum AS 'GRPO_NO', T2.DocDate AS 'GRPO_DATE', 
T4.DocNum AS 'INV_NO', T4.DocDate AS 'INV_DATE'
FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OPDN T2 ON T2.DocEntry = T1.TrgetEntry
INNER JOIN PDN1 T3 on T3.DocEntry = T2.Docentry
INNER JOIN OPCH T4 ON T4.DocEntry = T3.TrgetEntry
INNER JOIN PCH1 T5 on T5.DocEntry = T4.Docentry
GROUP BY
T0.DocNum, T0.DocDate, T2.DocNum, T2.DocDate,  T4.DocNum, T4.DocDate
Else, If need to Tract PO, GRPO and A/P Invoice Header & Rows details. Try this (sample)Query,
SELECT  T0.DocNum as 'PO. No.',
T0.DocDate as 'PO. Date',
M.DocNum as 'A/P Invoice No.',
M.DocDate as 'Inv. Date',
M.CardName as 'Vendor Name',
M.NumAtCard as 'Bill No. & Date',
ISNULL(L.ItemCode,'Service Item') as 'Item Code',
L.Dscription,
L.Quantity,
M.DocTotal as 'Total (Rs.)'
FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OPDN T2 ON T2.DocEntry = T1.TrgetEntry
INNER JOIN PDN1 T3 on T3.DocEntry = T2.Docentry
INNER JOIN OPCH M ON M.DocEntry = T3.TrgetEntry
LEFT OUTER JOIN PCH1 L on L.DocEntry=M.DocEntry
WHERE M.DocDate >= '[%0]' AND M.DocDate <= '[%1]'
GROUP BY
T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity, M.DocTotal
ORDER BY
T0.DocNum,T0.DocDate,M.DocNum,M.DocDate,M.CardName,M.NumAtCard,L.ItemCode,L.Dscription,L.Quantity,M.DocTotal
Regards,
Madhan.

Similar Messages

  • JS CS4 splitting the document path

    I'm trying to split the document file path so I may navigate up one or two folders and then into a specific subfolder.
    When I try to split the "myDoc.filePath" it errors. If I split "myDoc.name" it works correctly.
    var myDoc = app.activeDocument;
    var myDocPath = myDoc.filePath;
    var mySplit = myDoc.name.indexOf ("_");
    var myFileName = myDoc.name.slice (0,mySplit);
    var myPdfFolder = myFileName + "pdf";
    var mySavePath = myDocPath
    var mySplit2 = myDoc.filePath.indexOf (myFileName);
    var myFinalPath = myDoc.filePath.slice (0,mySplit2) + myFileName + "/" + myPdfFolder;
    alert(myFinalPath);
    Can someone shed light on how to split the document path?
    Thanks,
    John
    Document path: ~desktop/N123456/working/N123456_01
    Note: the last folder name does not always exist. Often the "working" folder is the last folder. Working folder and N123456pdf reside on the same level.
    Goal is to change the save to document path: ~desktop/N123456/N123456pdf

    Here's some code I wrote recently to find a folder named "Snippets" starting from the location of a document. It first looks in the same folder and then its parent and on up until it reaches the top of the file hierarchy:
    //DESCRIPTION: Search for Snippets folder from Document location
    (function() {
        if (app.documents.length > 0) {
            var myFolder = locateRelatedFolder(app.documents[0].filePath, "Snippets");
            if (myFolder == null) {
                alert("Unable to locate Snippets folder");
                return;
            } else {
                alert("Snippets folder is: " + myFolder);
        function locateRelatedFolder(folder, name) {
            while (folder != null) {
                var relatedFolder = Folder(folder + "/" + name);
                if (relatedFolder.exists) return relatedFolder;
                folder = folder.parent;
        } // end locateRelatedFolder
    I've enclosed the code in an anonymous function. Don't let that put you off. You could just delete the first line after the description and the last line.
    Dave

  • How to get the document path of the pictures uploaded for products?

    Hi Gurus,
    How to get the document path of the pictures uploaded for products uploaded through tcode COMMPR01?
    Many Thanks,
    Neeraj

    client path.
    I need to get the client path in order to download files form server to client.
    Best regards,
    Huy.

  • Full Document Path on the MAC

    Has anyone tried to use the PIGetDocumentName on the macintosh. It gives back only the Document title. On windows we get the entire file path with PIGetDocumentName. Is there another way to get the full path of the front document on the mac.
    thanks and regards,
    Pawan

    Hi Pawan,
    I am also looking for a way to get a document path on MAC's PS.
    Have you found a way to do it yet?
    Thank you in advance,
    Anatoly

  • An error occurred: Save document failed / An error occurred while saving the document: PATH (HDB 00055)

    Hello Colleagues, I am creating an analysis in build 576, everything goes well, the algorithm calculates the needed values, but when I try to save the analysis, I receive the following error message: "An error occurred: Save document failed / An error occurred while saving the document: <PATH> (HDB 00055)".
    Does anyone know what could cause this error message?
    Thanks a lot for any hint.
    Sergey

    Hi Henry,
    I am using PA 1.0.11 and received this error; any update on this fix for SAP PA. Does this happen for a particular data source.
    I am currently using Excel as source and whenever I try to use this data; I get this even if I move the data to a new file or rename a file. I tried to check the same issue with a different file and it works fine. This file worked fine a day back.
    Please let me know if this is unusual for this version.
    Regards,
    Arvind E

  • Retrive document path from R/3 system

    I'm trying to retrive the document path (FILEP) from DRAW table in r/3 system to be displayed in my report
    i'm using remote cube and all other column are displayed perfectlt but when i choose this (FILEP) I'm getting the following error.
    <b>Error value "(hex.") of characteristic contain invalid characters</b>
    Hope someone give me a hand on this
    thank you in advance

    many BW systems have 'ALL_CAPITAL' written in the RSKC tcode.I believe it allows capital letters of all languages.
    goto tcode RSKC..
    u might already see a list of characters there.
    Just add '\' at the end of the string.Dont put comma or a blank.
    Then click on save.then click on execute.
    now try to reload data.I think it will go GREEN.
    cheers,
    Vishvesh

  • Document Path in Layout Set

    Hi all,
    I'm trying to get a documents path to display as a property in a layout set. Is there a command I can put in the Displayed Properties of the Collection Renderer to get the documents path to display?
    Thanks
    Richard

    Hi Richard,
    Try configuring the property "cm_rnd_path" in displayed properties for the collection renderer that is being used in your layout set.
    Cheers, Akhilesh

  • How to feed a query using a variable defined as Replacement Path-Query

    Scenario description : BI NetW 2004S - InfoCube with the following characteristics Customer, OrderDate, OrderYear and the following KeyFigure Number of Pieces.
    Objective: I need a query "QB" that shows how many pieces a set of customers has ordered in the year 2008. The set of customers is defined as all customers that in the previous years (the user can select one or more years) have ordered more than 500 pieces within the same year.
    Implementation: In general terms the idea is to build a query "QB" with the characteristic "Customer"  that is restricted (filtered) using a variable that is fed by another query "QA" (Replacement Path-Query).
    In order to have the selection of customers that for each of previous years (2007, 2006, 2005,...) have ordered more than 500 pieces, in the query "QA":
    - I put OrderYear as filter and defined a variable in order to ask the user which year/s he wants to analyse to define the selection
    - I put Customer and OrderYear in row
    - I put the KeyFigure Number of Pieces in column
    - I've defined the following condition: Number of Pieces > 500 with the option Caracteristic Assignment = All Characteristics in the Drilldown Indipendently
    Now if I run the query "QA" it works correctly showing me all customers that in the selected years have ordered more than 500 pieces within of the same year.
    If I run the query "QB" it shows a correct result only if I enter only one year (for example 2006) in the OrderYear field (coming from the query "QA"); if I enter more than one year (for example 2006 and 2007) the selection of customers showed is not the same defined by the first query "QB": I was expecting to see all customers defined from the first query less all customers that have no ordered any piece in 2008.
    Questions
    1) Why is query "QA" working on a different selection of customers when the user selects more than one year?
    2) Cosidering the scenario and the objective described above do you have any other idea?
    Thanks
    Ciao
    Roberto

    Hi Christophe,
         it's ok for me if I consider the customer only once in the final selection of customers that feeds the final query, this is my objective.
    However as test I've created 2 "input" queries, one related to 2006 and one related to 2007, and then in my destination query I've tried to restrict the customer using 2 variables of type replacement path-query (one attached to the 2006 query and one attached to the 2007 query). Unfortunately when I try to check and save the destination query, Query Designer tells me it is not possible to restrict the characteristic in this way.
    Could you please describe me steps you run in to order to restrict a characteristic using more than one variable of type replacement path-query?
    Thank you in advance for your answer.
    Ciao,
    Roberto

  • How do I...Conditionally control Replacement Path Query execution?

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path query variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is, if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

    Hello SDN:
    We are on BW 3.5 SP16.
    We are currently using a replacement path Query(RP) with variables
    to populate a variable in another Query(T).
    The problem we are having is with performance.
    The entry of variables in replacement path Query(RP) is optional (This is necessary there cannot be required values)
    When results from Replacement Path Query are small performance is fine. (e.g. 10 seconds)
    When results from Replacement path query are large performance suffers. (e.g. 1+ minutes)
    Users are free to leave the replacement path query variables empty resulting in a large set of data to be replaced. This is the worst performance case.
    We would like to discover a way to conditionally execute the replacement path query. That is, if users do not enter values for the replacement Query(RP) variables do not execute the replacement path query(RP).
    Does anyone know if this is possible within reason and in customer exit space?
    We have reviewed the situation from all angles and the requirement for the replacement path FUNCTIONALITY and the freedom for the user to leave variable values blank remains.
    I've been searching and reading SDN and SAP notes for about a week and do not find threads which address this situation.
    We are also exploring Customer variable exits to mimic replacement path functionality
    (different topic subject="How do I...Mimic Replacement Path with Query using Customer Variable Exits?")
    Any help will be appreciated
    Many thanks
    David Schuh

  • Replacement path -query level

    Hi Friends,
         1)       I have designing the two queries on query designer,  customer characteristics restricted for top 2
    customers (how to restricted the characteristics for top 2 )
    2)       second query revenue  values come to first query  customer used to replacement path  option ,how to
    do it.
    Thanks.

    Hello,
    For first query you can use the "Condition" where u can defined Top 2 customer.
    & for second query just go thru this link,
    http://www.sd-solutions.com/documents/SDS_BW_Replacement%20Path%20Variables.html
    Hope it helps u,
    Best Regards,
    Santosh

  • Passing Blanks instead of  ' # ' in Replacement Path query.

    Hi Experts,
    I have a main query which gets its cost center values from another query with replacement path variable.
    The variable should return BLANK to the main query inorder to display all costcenters. But blank is interpreted as '#' and the main query returns No application data found as it treats blank as '# /Not Assigned' instead.
    How to achieve this.
    Please suggest if anyone has done this before. This is we a Web report Not Excel.
    Thanks
    Sarah

    Thanks Arun, I understood the logic now for blanks.
    But,
    1) How to pass 'ALL' for the filter values.As the sub query returns no application data found instead of all cost centers. This is because in the data in ODS is
    <b>UserID CostCenter</b>
    A                   
    B        11234
    C        12345
    D     
    (Blank- representing all costcenters)
    2) Another option was thinkin to have the client fill in the ztable based on which the generic Datasource is made with costcenter values for each user instead will that help.
    Appriciate your help.
    Thanks
    Sarah

  • Execute SQL Task - FOR XML PATH query error

    I have the following query
    SELECT pl.Id,
    pl.StartTime,
    pl.EndTime,
    pl.PackageName,
    pl.Computer,
    pl.Operator,
    CASE WHEN (CHARINDEX('stack trace', pl.ErrorDescription) > 0) Then
        SUBSTRING(pl.ErrorDescription, 0, CHARINDEX('stack trace', pl.ErrorDescription))
        ELSE
        pl.ErrorDescription
        END as ErrorDescription
    ISNULL(ErrorFile,'') as ErrorFile,
    'Not Applicable' as SourceSystem
    FROM etl.PackageLog as pl
    WHERE pl.Processed = 0
    ORDER BY pl.StartTime, pl.PackageName
    FOR XML PATH('Row'), ROOT(N'FieldingCounts')
    in a Execute SQL Task and i get the following error:
    [Execute SQL Task] Error: Executing the query "SELECT pl.Id,
    pl.StartTime,
    pl.EndTime,
    pl.Package..." failed with the following error: "An invalid character was found in text content.
    ". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    The query execute without problem in database and in the ssis package doens't run because of the column
    CASE WHEN (CHARINDEX('stack trace', pl.ErrorDescription) > 0) Then
        SUBSTRING(pl.ErrorDescription, 0, CHARINDEX('stack trace', pl.ErrorDescription))
        ELSE
        pl.ErrorDescription
        END as ErrorDescription
    Any help to overcome the problem?
    Thanks

    Hi,
    It looks like that you must be trying to set the result of the query to some variable from the Execute SQL Task. If yes, make sure that the target variable is of the correct data type where XML string  can fit into. Considering that in SSIS, we have
    some limit for XML strings.
    Please let me know if it doesn't help.
    Thanks,
    Nimit

  • How to document a query/report from HR-Infoset

    Hi,
    we developed some queries from our own HR-Infoset. As our users are not
    allowed to work directly on this infoset or its queries every query has its
    generated report. The users call these reports through a transcation code.
    Unfortunately we have not found a solution to make some documentation for
    each query. As the reports are generated, documentation is not allowed there.
    If i press F1(Help) on a report of personnel administration (e.g. S_PH9_46000216 jubilee list)
    a browser is opened with an appropriate description of the pa-reports.
    Do you know any possibility to document a self developed query/its generated report?
    Thanks in advance.
    Harald

    Found it..Query name is P2. It was in a different query area..Standard area and not custom area where I was initially looking at.
    Edited by: Shareen Hegde on Aug 22, 2008 5:14 PM

  • Setting document Path in file system document store

    hi,
    Is it possible to have the basic path defined in
    ctx_ddl.set_attribute, and all the subfolders in the
    basic path defined in along with the document name
    in the database.
    for eg:
    begin
    ctx_ddl.create_preference('docname','FILE_DATASTORE');
    ctx_ddl.set_attribute('docname','PATH','c:\temp\');
    end;
    In the table (mydocs)
    mydocid doc_name
    1 loc1\test.doc
    2 loc2\recs.Pdf
    3 loc1\oracle9i.doc
    It should now take the path as
    c:\temp\loc1\test.doc
    Also is it possbile to just give the path in ctx_ddl.set_attribute as c:\temp\
    and all the sub folders under it are searched.
    Database: ORacle 9i windows.
    thanx.
    cheers
    sam

    As far as I know, you either have to specify all of the paths using ctx_ddl.set_attribute with only the file names in your mydocs.doc_name or don't use the ctx_ddl.set_attribute and provide the full paths in your mydocs.doc_name.

  • InDesign export PDF path should follow document path

    I love InDesign totally. Well, almost...
    I often work on several documents over the course of a day, or sometimes I won't work in InDesign for several days. In either case, InDesign exports the PDF to the last path exported to rather than following the path of the document I am working on. I find this mildly annoying to highly aggravating, depending on my work load. (I can't say how many times I have "lost" a PDF I just exported, only to find some time later that it saved to the last export location, which often has nothing to do with the document I'm exporting from.)
    Is there any setting I can change for this? I don't mind mucking in the registry if I have to.
    Thank you,
    Bruce

    I'm pretty sure that would be scriptable. I don't write scripts myself, but I had Dave do one for me last year for correcting homework. It does all sorts of neat stuff like locking existing layers, adding a new one, changing the default text color and saving a new version of the file into the old directory so pretty much all I need to do is run it and type my comments.
    Post on the scripting forum for more help.

Maybe you are looking for

  • DMS via JCO - BAPI_DOCUMENT_CHECKOUTVIEW2

    Hi All, I'm trying to download a file from DMS in Web Dynpro. I wrote a simple Java app that works when run from the command line. I set: JCO.setMiddlewareProperty("jco.middleware.allow_start_of_programs", "sapftp;saphttp"); and input.setValue("SAHTT

  • Frozen on the "Do not disconnect" window

    My computer didnt recognise my ipod and it wasnt showing up on my desktop, so I restarted the computer but now my ipod is frozen on the "Do not disconnet window" Any ideas?

  • Schema owner identified externally

    I have an oracle 11g, apex 3, OHS implement. The schema assigned to my workspace has owner, identified externally. I can find no workspace/schema relation administering Oracle-XE. Looks like the database username that logs in to the Administration Ho

  • Error 1935 Upgrading from BO XI 2.0 to BO XI 3.1

    Hello, I'm new with the Business Objects environment, just had the Administration and Security training. I was given the mandate to upgrade our BO XI 2.0 to BO XI 3.1 BO test server runs on Windows 2003 SP2 When upgrading the server with version 3.1,

  • SIP_VoIP_3_x_Settings_v2_0_en.sis

    To get full SIP configuration support I have to install this package from Nokia website SIP_VoIP_3_x_Settings_v2_0_en.sis After that I was able to configure VoIP as I needed.