Skip to Content
avatar image
Former Member

credit memo approval based on delivery date of the Batch in sap b1

Hi All,

Approval procedure query required on AR credit memo, when the batch in sales return document date is more than > 120 days of delivery date.

Items are managed by batches.

Anything less than 120 days of delivery date no approval is required.

Appreciated for your help


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 13, 2018 at 06:16 AM

    Hi San,

    I used to have a similar scenario - compare the dates between a credit note and a return. Your approval query may look like below.

    Please note that this is based on the hypothesis that you are using the Copy To/Copy From when converting a document to another, so the documents are related from one to another along the business flow. For example, a Delivery is copied to a Return, then the Return is copied to the AR Credit Note. If any of these documents is created manually, not based on another, it may not be captured in this query so the approval process will not be triggered. If that's the case, you may have to add the other conditions.



    INNER JOIN RDN1 ON RDN1.trgetentry = RIN1.Docentry and RDN1.LineNum = RIN1.Baseline and RIN1.itemcode=RDN1.ItemCode and RDN1.TargetType = 14

    INNER JOIN DLN1 ON DLN1.trgetentry = RDN1.Docentry and DLN1.LineNum = RDN1.Baseline and DLN1.itemcode = RDN1.Itemcode and DLN1.TargetType =16

    INNER JOIN ORDN ON ORDN.DocEntry = RDN1.DocEntry

    INNER JOIN ODLN ON ODLN.DocEntry = DLN1.DocEntry

    WHERE Datediff(dd,ORDN.DocDueDate, ODLN.taxdate) > 120

    Additionally, there will be other steps in setting up an approval process, you may refer to this link for more details:



    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 14, 2018 at 10:49 AM

    Thanks Jimmy,

    My scenario in breif

    Step 1 :Delivery note --> copy to A/R Invoice, relation ship closed here.

    Step 2: Stand alone Sales Return--> Copy to A/R Credit memo

    the links available from Sales returns to delivery note is batch number.

    I will be requiring, delivery date and batch number should check with Sales returns date and batch number.

    this is because same item can be delivered with different batch numbers.

    We should accept all items based on sales returns , but credit memo can be generated only after approval.

    The approval required for posting credit memo( sales return date) more than 120 days of delivery date

    Your logic works fine when there is no batch involved. can we get the same by linking with batch numbers.


    Add comment
    10|10000 characters needed characters exceeded