How to join GRPO with AP invoice thru query ?

hi all,
How to join GRPO with AP invoice in sql query ?
Jeyakanthan

Hi Jeyakanthan
Are you using query in SAP Business One or outside the system? If you select the tables in SAP Business One as OPCH and OPDN then no inner join will appear, as the links sit on the line level. You will need PCH1 and PDN1. The link can be found in both directions, but bear in mind that 1 AP Invoice could be based on more than 1 Goods Receipt PO. For this reason the best approach is to start at the AP Invoice line level and use the BaseType and BaseRef fields to view which lines were pulled from which Goods Receipt PO's.
Kind regards
Peter Juby

Similar Messages

  • How to join gl_daily_rates with AR and SO and Customers

    Hi All,
    i need to populate the overall credit limit of the customer, if he has any SO backlog(not shipped) amount for all SO's and in AR not paid transactions for the customer, i need to convert the fuctional currency to foreign currency of the all types of amounts.
    1) how to link with daily rates table with AR and OM?
    2) how to get term name of the customer and Legal entity name?
    please help me asap.
    Thanks
    sreeni

    QuickTime X can join your two files. Edit menu "Add Clip to End..."

  • How can i work with getdate() in my query if i have a varchar datatype on where clause column ?

    Hi All,
    I have a column like lastdate with varchar datatype. now I want to work with lastdate column in where clause with getdate().
    Ex:  where
    getdate()  -  lastdate < 1
    when I use above one I got error like
    Error = Conversion failed when converting date and/or
    time from character string.
    I knew the datatypes for lastdate and getdate() are different...
    how can I use...
    Thanks,
    rup

    You need to convert the string date to datetime or date. See conversion examples here:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Example for the where clause:
    WHERE DATEDIFF(DD, convert(datetime, lastdate, 101), getdate() ) < 1
    Can you post sample string dates?
    Are you looking for today's records? Another option (depends on lastdate format):
    WHERE lastdate = convert(char(8), getdate(), 112)
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to join output of two or more query ?

    suppose a query :
    select count(id) COL1 from table_1 gives :
    COL1
    59and another query :
    select count(id) COL2 from table_2 gives :
    COL2
    23.
    HOW can i get this output :
    COL1 COl2
    59 23Edited by: bootstrap on Oct 14, 2011 2:08 PM

    get each count in the sub-query:
    SELECT
            SELECT
                COUNT(*)
            FROM
                job
        ) AS cnt_job,
            SELECT
                COUNT(*)
            FROM
                department
        ) AS cnt_department
    FROM
        dual;
    CNT_JOB                CNT_DEPARTMENT        
    51                     4                     

  • SAP QUERY(SQ03/02/02) - how to join tables

    Hi MM Wizards,
    I would like to know how to join tables EINE & A017 through SAP Query?
    Thanks,
    Kaveri

    Hi Kaveri,
    A017 is a pooled table.  SAP Query does not support joins against Pooled tables.  You should stick to transparent tables if you want to use Query.
    You can do a direct read of A017, but you will just end up with a glorified SE16 display.
    You could have a programmer write some ABAP and place it into the 'extras' section in SQ02 to grab the additional data that you want, but once you have decided to enlist the aid of an ABAPer, it is better just to write a custom Z program from scratch.
    Regards,
    DB49

  • How to join four tables in Update query??

    Please how to join four tables in a single query to update one table row??

    You can use this syntax to update. Here updation of 1 column to a constant value (50) in multiple rows in Table A based on an associated 'SOURCE' value in table B
    Table A joins to Table B based on the TableA.definition_id = TableB.Att_Def_id
    like..
    update TableA
    set value =50
    where
    TableA.definition_id = TableB.Att_Def_id
    and TABLEB.Source = 'NEWPRODUCT'

  • How can i join PO with GRPO

    Hi,
    I make query as belown to join PO with GRPO.I wnat to calculate Quantity from PO to GRPO but in my query it show duplicate record i also use distinct but useless.My query as below.
    SELECT T1.DocNum [PO No], T1.DocDate [PO Date], T3.ItemCode, T3.Dscription, T3.U_CostCentre, T3.DocEntry [GRN No], T0.DocDate [GRN Date],T3.Quantity'GRIR Quantity',T2.Quantity 'PO Quantity',
    T3.Quantity-T2.Quantity 'Balance Quantity'
    FROM OPDN T0 , OPOR T1, POR1 T2, PDN1 T3
    WHERE T1.DocEntry = T2.DocEntry
    and T0.Docnum = T3.Docentry
    and T3.BaseRef  =  T1.DocNum
    and T2.ItemCode = T3.ItemCode
    and T3.DocDate between [%0] and [%1]
    Can any body help in this regards.
    Sohail Anwar Ali

    Hi Sohail,
    As i understand, you want to know till now how much of quantity stills needs  to be delivered, in that case instead of trying joining two tables i would suggest to try this query which gives you
    Purchase Order Document No,
    Purchase Order Date,
    Vendor Name,
    Item Code,
    Item Description,
    Ordered Quantity,
    Received Quantity,
    Open Quantity.
    as the filed OpenQty stores the Quantity yet to receive for that particular Purchase Order. As this approach is much more flexible
    Query
    SELECT T0.DocNum, T0.DocDate, T0.CardName, T1.ItemCode, T1.Dscription, T1.Quantity,
    (T1.Quantity-T1.OpenQty) as "Recevied Quantity",
    T1.OpenQty FROM OPOR T0  INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T0.DocDate >=[%0] and
    T0.DocDate <=[%1]
    I hope this helps out your issue
    regards,
    Shreyas

  • How to reconcile AR down payment Request with AR Invoice?

    Dear All,
    SAP B1 2007A SP01 PL07 version.
    I have created one AR down payment Request with total amount 1000.00, and then post incoming payment to paid the AR down payment Request, and the AR downpayment request then closed.
    Then, I add one AR Invoice with amount 1000.00.
    After that, I want to add incoming payment , then I select both (AR downpayment request & AR invoice), but cannot add the incoming payment because the total amount is zero (1000.00 - 1000.00=0.00).
    How can I solve this problem?
    Thanks in advance for any help.

    Hi Kerstin,
    Thank you for you reply.
    I did test your solution, but its only work for SAP 8.8. But now i'm working in SAP 2007A version. For 2007A version, downpayment request cannot be drawn to invoice.
    Anyway, i find out one way. If I add the payment together with another invoice, thats mean the total payment is not zero, then its work. The solution is, make sure the total payment is not zero then it should be ok.
    Thanks to everybody for your fast reply. Thank you so much and really appreciate your help.
    Regards,
    Mat

  • How to link JE with A/R invoice

    I have generated an A/R invoice. After generation I want to give some discount to customer, so I generated a JE for discount.
    I want in customer ageing report the outstanding amount as bill amount less discount.
    How this can be done.
    Is there any way to link the JE to A/R invoice to show the correct outstanding amount.

    Hi Sandeep,
    as mentioned above, in 2007 it's not a problem since partial reconciliation on JE level is fully supported.
    In the lower version you may only reduce the total balance due when using a credit memo standing on the invoice.
    Should you be in a lower version you have several different options:
    1.) Internally reconcile the JE with the invoice
    -> disadvantage: Invoice is closed & will no longer appear in the ageing report
    - hence: Not recommended
    2.) Create the JE with the discounted amount & wait until remainder of invoice is paid, then reconcile partial payment with JE & invoice
    -> disadvantage: a lot of room for user error, a lot of data needs to be held in mind of operator, mistakes almost inevitable.
    -> Advantage: JE will appear in ageing report when run by journal entry.
    - hence: only use for isolated incidents
    3.) In incoming payments window, highlight invoice in question & use form settings to make column'Total discount' visible & active. Enter the discount amount in that field & notice that the amount in 'Total payment' has now been reduced by the discounted amount. Use Ctrl+B to pull this amount into the payment means & add the payment.
    -> advantage: all reconciliations are correct & the discounted amount is posted into the appropriate account.
    - hence: Recommended Procedure.
    In the scenario that you describe I would therefore recommend that you reverse the manual JE already crteated & then proceed according to option 3.
    All the best,
    kerstin
    All the best

  • HT1386 how can i sync only my contacts thru my computer but everything else with icloud

    I have XP, how can I sync only my contacts thru my computer (with Itunes) but keep everything on Icloud backup?

    1st make sure that iTunes will not sync iPhone automatically
    on iTunes go to Edit>preferences> Devices > check "prevent iDevice from syncing automatically"
    >connect iPhone to PC
    > on iTunes click your iPhone's name
    > then untick everything you don't want to be synced line music,movies,apps,calendars, mails
    leave 'sync contacts' ticked
    then you should be fine

  • How to Reconcile payment with invoice made gaainst down payment request

    Dear All,
    There is a down payment request against which an incoming payment has been made. The actual ar invoice is booked at a later date. Now How do I reconcile the payment made with this invoice. When I try to reconcile it with the invoice using internal reconciliation it gives an error, you cannot reconcile a payment made against down payment request from here.
    Please suggest if you know any solution for the same.
    Regards,
    Husein

    Hi Neeraj............
                   I think there is no need to reconcile as its already a linked with AR Invoice. WHen you do incoming payment on the basis of AR Down Payment then it that down payment reference you should give to AR Invoice. Have you given such link as its provision is there in SAP.......
    Regards,

  • How to join 1 datablock with 2 same datablocks??

    Dear Guys,,
    My Q. is how to create 2 relations between one data block (block1) with other 2 same data blocks (block2,block3)
    (2 same data blocks : reference to same physical tables) ??
    any thoughts?

    thx sara for quick reply :)
    I know how to join between datablocks,, the problem occurs when i want to join 1 details data block with two master data blocks that refer to the same table !!
    one relation breaks the other one !!
    thx

  • How to join navegational attributes with infoset

    Hi Experts,
    How to join navegational attributes with infoset? the infoset based on ODS and both having navigational attributes,
    my requirment is to join Vendor account group navigational attributes with infoset,
    or else plz
    povid stps to crete...
    In the infoset how to  join Info Object CHAR1 to the CHAR1 in the ODS object which makes all the attributes of CHAR1 accessible in the Infoset..
    plz suggest with steps,
    regards,
    Edited by: Sap-10564461 on Apr 20, 2010 11:34 AM

    Hi,
      Consider that you have a cube/ODS which has 0MATERIAL. Say you have switched on the nav attribute Material group in the cube.
    Now since an infoset acts on a table level, it cannot read nav. attributes directly. Hence you will not be able to find 0MATERIAL__MATGROUP in the infoset.
    Now if you want to get able to obtain MATGROUP, you need to add 0MATERIAL to your infoset. One you have added 0MATERIAL, you will be see the attributes of this infoobject as fields.
    Map 0MATERIAL from the cube to 0MATERIAL from the info object. Join type is inner join. Now check the MATGROUP field under the infoobject table indicating that this field needs to be fetched by the infoset.
    Now when you run a query on the infoset, you will be able to use MATGROUP from 0MATERIAL.
    Hope this helps.
    Regards.

  • How to join to window server with NIP policy

    how to join to window server with NIP policy?

    Since you refer to MySQL as the default database, I presume that you're talking about using PHP.
    Yes, you can link to MS SQL Server - as long as you're willing to code everything by hand. If you're looking for automated code generation, though, the answer is no.
    Even the default PHP/MySQL server behaviors are not really worth considering for professional web development. They're fine for quick prototyping, but they use deprecated functions that are not suitable for a production environment.

  • How to create sales return with multiple invoices

    Hi ,
    I am creating a sales order return with reference of billing document using FM SD_SALESDOCUMENT_CREATE, if i give one Billing document as a reference document it is creating document perfectly.
    But my Requirement is to create one Return sales order with multiple invoices.
    I tried to pass reference document no's in Item level , but it take first reference document number only , for that reference document only return is creating.
    Can you any one help me how to create this.
    Thanks in advance
    Swapna.

    Hello Venkat,
    As I know it is not possible to create a single return order for multiple invoices in the background.
    It is possible in the foreground by following the below steps.
    1) Goto VA01 --> enter the Sales order type and Sales area.
    2) Press F8 or click on create with reference, provide the first invoice.
    3) Now the main screen would appear, displaying line items from Invoice1.
    4) Without going back, again goto path, Sales document -> Create with reference
    5) Enter second invoice2. and the items from invoice2 will also appear in the Sales order line item.
    ------ Enter as many number of invoices by repeating the above step--------------------
    6) Press save, so one sales order is created for multiple invoices.
    Regards,
    Thanga

Maybe you are looking for

  • Can I use a substitute for the Sample Clock?

    I have three different analog inputs coming from one device (PCI-6221).  Two inputs are running at the same sample rate while the third needs a faster sample rate and a trigger.  I have these seperated as two seperate tasks but my problem is they bot

  • Copy Key figure data between two planning area with different storage bucket profile

    Hi, I have a DP planning area ' PA1' with monthly storage bucket profile data view 'PA1M' ( monthly TBF) and I want to copy the data to another planning area 'PA2' whose storage bucket is weekly. This would need me to write a custom program which wil

  • Loss of quality of photos when importing from iphoto to imovie

    A question... When I import high resolution photos from iphoto and look at the preview on imovie HD, the quality is the same great quality that I can see on iphoto. Once I import the photo clip onto imovie, however, the quality is very poor on the im

  • Simple network programming, question ...

    Hello I'm a beginning learning student from the Netherlands. My clientcode looks like this: import java.io.*; import java.net.*; import java.util.*; public class ConsumerClient private static InetAddress host; private static final int PORT = 1234; pu

  • Hundreds if not thousands of FOLIOS in one App

    Hello - we have purchased Adobe DPS Enterprise Edition and are developing a custom storefront for our App. The purpose of the App is going to be an artbook bookstore. My question is, we were told by our sales reps that beginning with v22, we would be