cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with EDI invoice posting - cash discount not calculated

Former Member
0 Kudos
1,124

I am working on a process to post inbound edi invoices into SAP.

Invoices are posted, no errors, but cash discount is not calculated/displayed on the header.

I am using the standard edi setup

IDOC INVOIC01

Mess Type INVOIC

Process INVL

Discount Base Amount is mapped to E1EDS01 with qualifier 012

Discount Amount is mapped to E1EDS01 with qualifier 13

Discount terms are passed in E1EDK18

Dates are current (discount due date not passed).

Any help will be greatly appreciated

Thank you,

A.

0 Kudos

Hi,

I implemented this logic to update cash discount. When I go to MIR4, I see the amount in this field but when I go to edit mode, the amount disappears. Any idea how to fix it?

Thanks,

Punit

View Entire Topic
ralph_kndler
Discoverer
0 Kudos

Hi Aneta,

if you want to display the discount in the header (Fieldname WSKTO), then you have to use an customer-exit. Try it with enhancement MRMH0002 (TA CMOD), EXIT_SAPLMRMH_014. The following Coding helps:

*&---------------------------------------------------------------------*
*&  Include           ZXM08U25
*&---------------------------------------------------------------------*
*This Exit handles the discount (header) for Invoices of company code 1001
DATA: ls_e1eds01 TYPE e1eds01.
CLEAR:   ls_e1eds01.
IF e_rbkpv-bukrs = '1001'.
  IF i_idoc_data-segnam = 'E1EDS01' AND i_idoc_data-sdata(3) = '013'.
    ls_e1eds01    = i_idoc_data-sdata.
    e_rbkpv-wskto = ls_e1eds01-summe.
    e_change      = 'X'.
  ENDIF.
ENDIF.

In IDOC use the following mapping:

Discount Base Amount is mapped to E1EDS01 with qualifier 012

Discount Amount is mapped to E1EDS01 with qualifier 013

Hope it helps.

Ralph

Former Member
0 Kudos

Hi Ralph,

This issue was resolved internally (shortly before your post) using the same user exit and slightly different code. I appreciate your input.Thank you!

(Sorry for late reply...)

0 Kudos

Hi,

I implemented this logic to update cash discount. When I go to MIR4, I see the amount in this field but when I go to edit mode, the amount disappears. Any idea how to fix it?

Thanks,

Punit