cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice line and Credit Memo line in the same Invoice Header/Document

0 Kudos

Hi,

We have the following business requirement.

In the same invoice header we need to create two lines, one invoice and one credit memo, both referring to same PO line item.


When the Invoice is created, the invoiced quantity of the line item must be updated accordingly(PO srm screen->Related documents tab).

We completed the following technical steps.

Step 1:

Enable PO field and PO Item field on invoice by creating ZENH_INV_POFIELDENABLE implicit enhancement in method
/SAPSRM/IF_PDO_META_CONF_BO~GET_BO_ITM_FIELD_METADATA.

Please see attachment Image 1

Step 2:

After PO and PO item Field Enablement on Invoice screen add Credit line
to invoice as shown below.

Invoice Line no 1 entered using ADD Button
Credit line no 2 entered manually by providing PO number

Please see attachment Image 2


Step 3:

PO Screen->related Documents tab.

Ideally Invoiced quantity should be 15 because of Credit line but
Invoiced quantity is 20 as shown below.

Please see attachment Image 3


Possible Issues found through debugging where Invoiced quantity is not
getting updated for credit line in invoice:

ISSUE 1:

In Include LBBP_PDF19 (LBBP_PDF19 will call LBBP_PDF18) It_delta_item[]  table has delta values (i.e. invoice open quantity minus Invoiced
quantity and invoiced open value – invoiced value).


We have created implicit enhancement in LBBP_PDF18 where we have
reduced Invoiced quantity by 1 (assuming invoice has quantity 1) but still Invoiced quantity was not updated in related documents tab of PO.

And also after Invoice creation from above step , if we delete invoice manually ,Invoiced quantity in related documents tab of PO was
updating with random negative value because of the change we have done.


ISSUE 2:

In DOC_CHANGE_BADI ,IT_ITEM[] TABLE has SRC_OBJECT_TYPE and SRC_GUID field values are blank for 2nd Credit Line.


But for the first line Item , SRC_OBJECT_TYPE and SRC_GUID has values.





Please check and provide a solution to enable debit and credit lines in
the same invoice header. Please note that we need similar solution for
Credit Memo header also.


Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

please reply