Skip to Content
author's profile photo Former Member
Former Member

Date Formatted Search

I use the following Query to Transfer The Document Date in a Purchase order to Document Date in Purchase Invoice:

SELECT T0.[TaxDate] FROM OPOR T0 WHERE T0.[CardCode]=$[OPCH.CardCode]

Can anyone tell me please:

1. Do I need to change the syntax of the query to make it work?

2. I use the query to change the Document Date in the AR Invoice when I COPY (convert) the order to an Invoive. What would be the Refresh condition since no Fileds will be changing in the COPY process.

Thanks for your help

Robert

PS Without this Forum I would have given up on SAP but I am grateful for your contributions but I am getting there..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Mar 16, 2008 at 03:32 PM

    If you derive the invoice from only one purchase order, you can solve the problem

    1. First of all you can select the base order, from which the invoice was derived. You can use the Remarks field, that contains the order number (if you checked Base document number in the General documents setting)

    2. you can set autorefresh when the Remarks changes.

    3. in the query you should refer to the current remarks field by $\[OPCH.Comments]

    4. you should use the charindex, substring and cast or convert functions to get the numeric order number

    5. then you can get the document date from the order with this order number.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Istvan

      Thank you for the idea of placing a chagable field in the Remarks field. I will try this and I hope it works. However, in B1 2007 there is also a bug in the QPLD which causes the QPLD to behave strangely so I am a bit reluctant to activate QPLD for everyday work.

      I hope SAP will sort this out soon but i am not sure what is the best way of reporting a BUG, do you know?

      Thanks a lot

      Robert

  • author's profile photo Former Member
    Former Member
    Posted on Mar 17, 2008 at 08:09 AM

    Robert,

    You can try this query

    SELECT T0.TaxDate FROM [dbo\].[OPOR\] T0 WHERE T0.DocEntry=$\[PCH1.BaseEntry]

    Please make sure you have made the BaseKey column at the A/P Invoice rows visible (from Form Settings)

    This may work only when trigerred manually by highlighting the row and pressing Shift+F2

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.