SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Different discount date from that of due date without using payment terms

paresh_vanjara
Participant
0 Kudos
796

Hi,

We would like have separate discount due date from due date without using payment terms for each invoice.

We wants to modify ERDK-FAEDS but unable to find suitable event/exit for the same.

So can anyone suggest any event where this can possibly be achived.

Regards,

Paresh

14 REPLIES 14

Former Member
0 Kudos
548

Can you elaborate your business scenario little bit?

Discount is invoice item that is usually calculated based on invoice items or based on total invoice amount.

Due date for discount is same as it is for all invoice items since it is defined on invoice header level.

Br,

Mario

0 Kudos
548

Hi,

We are using continuous days for working out due date from document date.

But for discount due date business sought to provide only working days (say 7 days) from document date.

So as to satisfy this requirement, I had adopted event R436 where system intially takes values provided but somehow it gets cleared in below lines. So I am unable to find a workaround to resolve this issue.

PERFORM get_user_exit_function USING 'R436'.
  LOOP AT t_fbstab WHERE funcc <> 'ISU_SAMPLE_R436'.
    tmp_erdk = p_iiu-print_doc-erdk.
    tmp_erdz[] = p_iiu-print_doc-t_erdz[].
    CALL FUNCTION t_fbstab-funcc
      EXPORTING
        x_invoice_param    = p_param
        x_invoice_unit     = p_iiu
      TABLES
        xy_printdoc_lines  = tmp_erdz
        y_new_bill_lines   = tmp_new_bill_lines
      CHANGING
        xy_printdoc_header = tmp_erdk
      EXCEPTIONS
        error_message      = 1.

Regards,

Paresh

0 Kudos
548

This is structure for Print Document/Header Data. Changing due date here will influence only  printed due date what is wrong you need change of real due date of invoice - dfkkinvdoc_h-faeds.

Use fq-event: 2640    INV: Determination of Due Date of Invoicing Document

paresh_vanjara
Participant
0 Kudos
548

Hi,

Thanks for your update.

I have copy FM 2640 and assigned it in FQEVENTS with hardcoded break point and executed EA19 but it doesn't stop at subject event.

any ideas.

Regards,

Paresh

0 Kudos
548

Hi Paresh,

Have you checked event R417.

In this event you can redetermine the bill due date, based on the transferred data.

Here you can make changes in the field FKKOP-FAEDS, which ultimately will have an impact on the  discount due date of the invoice.

Hope it helps...

Thanks,

Amlan

0 Kudos
548

Tough problem you got here

Why dont you try to maintain payment terms?

paresh_vanjara
Participant
0 Kudos
548

Hi,

Thanks fo your update.

I was also working parallely on R417 but in vain.

I was thinking that if I would update ERDK than FKKOP would follow but it ain't working.

So far I have work with 2640, R417, R436, R431 (closest to resolution) and 1330.

Thanks for trying.

Regards,

Paresh

0 Kudos
548

Hi Paresh,

I think you should be updating the field FKKOP-FAEDS for the FICA document which is related to invoicing rather than updating the print document cash discount due date ERDK-FAEDS.

The rationale behind this is the payment comes and clears the FICA document.

I checked Event R417 which in turn calls Event 1330 internally.

In both these events you can set the field FKKOP-FAEDS.

I think these events get triggered during invoicing, can you let me know what issue are facing with these two events.

Thanks,

Amlan

0 Kudos
548

Hi,

What I have observed in event R417 and 1330 is that due date and discount due date goes hand in hand and therefore it is not possible to change only discount due date.

So current approach still doesn't work.

Regards,

Paresh

0 Kudos
548

Of course, its natural. Why would you like to differentiate it?

Discount isn't separate document it's part of invoice and due date should be invoice due date.

Maybe you should change logic for invoice due date determination to correspond to "discount due date" determination?!?!

paresh_vanjara
Participant
0 Kudos
548

Hi,

It has got other repurcussions, one of them being eveytime in account maintenance or payment clearing cash discount field get selected which is not required.

So is there a workaround that despite cash discount settings in payment terms at OBB8, system won't populate those fields then it could also work.

Regards,

Paresh

0 Kudos
548

Hi,

Upon debugging we found that R417 is internally calling 1330 so whichever data we are updating in R417 (FKKOP-FAEDS) is getting cleared through 1330 (XY_FAEDS).


In below code is we are facing issue.


LOOP AT t_fbstab.

    CALL FUNCTION t_fbstab-funcc (****it contains 1330 event - ISU_DUE_DATE_DETERMINE)
      EXPORTING

        i_fkkvkp           = x_fkkvkp
        i_bldat            = wa_vkk_doc-fkkko-bldat
        i_budat            = wa_vkk_doc-fkkko-budat
        i_cpudt            = sy-datlo
        i_xguth            = guth

      IMPORTING

        e_faeds            = xy_faeds
        e_sktpz            = xy_sktpz
        e_faedn            = xy_faedn

      EXCEPTIONS

        not_found          = 1
        zahlkond_incorrect = 2.

So I think we have to modify both these events so as to make it work.

Any comments?

Regards,

Paresh

0 Kudos
548

Yes - to do anything customer-specific such as your requirement - you will need to adopt the events and maintain your own logic for them to determine the right values.  The events themselves only control where it is done per standard function, which this is not.

regards,

bill.

0 Kudos
548

Also - see for more information on how to implement your requirements.