GJ_LINK_GR_IR - Links between PO, GR, IR - PO History.


This function module links goods receipts and invoice receipts for each line of purchase order.

This function is used to link the goods receipts (GR) and invoice receipts (IR) within a line item of a purchase order.  If there is links set up between invoice receipts and goods receipts in the Purchase Order History, this function will just follow the links, creates a row for each GR/IR link, appends it into the assignment table.


If there is no links set up between invoice receipts and goods receipts, this function will do the following:

1. Clear all the negative amounts with its previous positive amounts for goods receipts and invoice receipts.
2. Map the goods receipts and invoice receipts in first come first serve basis.
3. Put all these mappings/links into the table assignment.


SYNTAX:

DATA: gt_ass   TYPE TABLE OF t8jvm01,
            gwa_ass  TYPE t8jvm01,


CALL FUNCTION 'GJ_LINK_GR_IR'
      EXPORTING
        bukrs         = gwa_ekko-bukrs
        po_nbr      = gwa_ekpo-ebeln
        po_line     = gwa_ekpo-ebelp
      TABLES
        assignment   = gt_ass
      EXCEPTIONS
        no_po        = 1
        no_doc       = 2
        missing_year = 3
        OTHERS       = 4.
    IF sy-subrc <> 0.
* Implement suitable error handling here
    ENDIF.

SCREENSHOTS:






Comments

Also Read...