cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with EDI invoice posting - cash discount not calculated

Former Member
0 Kudos
1,126

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

Accepted Solutions (1)

Accepted Solutions (1)

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aneta,

Looks like,program does not use the value with qualifier 13 at all.

may be you should change the qualifer and try .

<b>010 Net invoice value

011 Billed value

012 Amount qualifying for cash discount</b>

let me know if that helps you.

Former Member
0 Kudos

Hi Karun,

Thank you for looking into this problem.

I already use qualifiers that you listed together among with 013 for discount amount, and it doesn't work

010 Net invoice value

011 Billed value

012 Amount qualifying for cash discount

013 Discount amount

I noticed that 013 is not used in the program, but 012 (base amount for discount) is. Invoice payment terms are processed correctly too, so the program has all the data to calculate the discount amount, even if it is not read from IDOC.

Is there any setting in invoicing that affect discount amount calculation?

Thx,

A.