2014 Apr 30 2:47 PM
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
2014 Apr 30 9:00 PM
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
2014 May 01 6:27 AM
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
2014 May 01 6:54 AM
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
2014 May 01 7:44 AM
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
2014 May 01 8:10 AM
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
2014 May 01 8:52 AM
Tough problem you got here
Why dont you try to maintain payment terms?
2014 May 01 8:29 AM
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
2014 May 01 9:52 AM
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
2014 May 03 8:11 AM
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
2014 May 03 10:17 AM
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?!?!
2014 May 01 9:44 AM
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
2014 May 01 2:22 PM
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
2014 May 01 2:49 PM
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.
2014 May 01 2:52 PM