07-06-2006 10:09 AM
Hi !
Is in abap a function that calculate Payment date
given the invoice date and the payment term code ( LFM1-ZTERM )? .
please give the name of that function and other detail
about the function. how to use it ? restriction etc ?
thanks
moshe
07-06-2006 10:18 AM
07-06-2006 10:24 AM
Hi,
Check the function module 'WLF_INVOICE_DETERMINE_DUEDATE', this might help,
Rgds,
07-06-2006 10:51 AM
use the funtion mod 'DETERMINE_DUE_DATE'.
u also need to pass the Account type ( KOART ) along with the invoice date n payment term..
07-06-2006 12:47 PM
Hi !
First thanks for your answer.
I need a function that determine the invoice due-date of
MM - purchse order not of sales and distribution.
The field ZTERM contain the code payment term to which field of the function parmetr, do i have to set the ZTERM field ?
07-06-2006 1:31 PM
Hi Solman,
i think its irrelevant for the function module as to whether its for PO or sales, becasue, wen u mention the Account type, it talks about Vendor or customer...so in case of Purchase Order, it ll be a Vendor that u need to pass,ie, 'K'.
07-09-2006 1:17 PM
Hi Bikash!
How do i find the proper zbldt from the payment term.
I want to use function 'DETERMINE_DUE_DATE' and i don't
know how suply the proper ZBD1T. I have the value of
the payment term (ZTERM), but i don't know how to get appropiate ZBD1T! is there a function the get ZTERM
and return the appropiate ZBD1T ?
thanks
moshe
07-09-2006 1:26 PM
Hi Moshe,
You can code something like this.
data: faede type faede.
Select single * from BSAD
into wa_bsad
where belnr = wa_intit-belnr.
move-corresponding wa_bsad to faede.
faede-koart = C_D.
CALL FUNCTION 'DETERMINE_DUE_DATE'
EXPORTING
I_FAEDE = faede
IMPORTING
E_FAEDE = faede
EXCEPTIONS
ACCOUNT_TYPE_NOT_SUPPORTED = 1
OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
move faede-netdt to gv_netdt.
or
due_date = bseg-zfbdt + t052-ztag1.
Here ztag1 is obtained from table t052 using bseg-zterm.
Hope this will help.
Regards,
Ferry Lianto
Please reward points if helpful.
07-09-2006 3:47 PM
Hi !
In my report am working with PO Tables : RBKP, RSEG, EKKO, MKPF, MSEG.
What is the relationships(foreign key relationship) between those table and BSAD?
Can you tell me please how do i join between BSAD
and those tables ?
( I tried BSAD-belnr to mseg-belnr
or to rbkp-belnr however it isn't
OK relationships ).
Thanks
Moshe
07-09-2006 4:33 PM
Can you check whether this releation exits
BSID-XBLNR = MKPF-BELNR?
Regds
Manohar
07-10-2006 9:57 AM
Hi Manohar !
The relation you suggested doesn't exist. table MKPF doesn't have field named BELNR but MBLNR or XBLNR, and
this fields are not foreign key fields for Bsid-XBLNR.
Is in SAP other relationships keys between the tables ?
or is there other function that calculate due date of
MM-PUR invoice given payment terms ?
Thanks
Moshe
07-10-2006 10:12 AM
Hmm...now you check this relationship.
MKPF-MBLNR = BSID-AUGBL
MKPF-MJAHR = BSID-GJAHR
MKPF-BLDAT = BSID-AUGDT
MKPF-XABLN = BSID-BELNR
Regds
Manohar
08-07-2006 8:40 AM
Hello,
As you, I would like to get the payment date using the doc date and the payment term.
Have you found the module function and do you know how to use it properly ?
Thanks,
Regards,
Francis
08-20-2006 9:45 AM
Hi Ferry Lianto !
Thanks for your answer.
I recognazie that in SAP there are two type of payment term.
One type use t052-ztag1 field, and the secound type use
the fields t052-ZFAEL(days) t052-ZMONA(month) for calculating the due date.
Do you know a function to calculate due date that use the
secound type of payment term ( given t052-ZFAEL(days) t052-ZMONA(month)) ?
thanks
moshe
07-14-2010 6:50 AM
Hi ,
Find the Invoice due date with payment terms use the below function module.
J_1A_SD_CI_DUEDATE_GET
Below the logic.
DATA : g_dzfbdt TYPE dzfbdt .
CALL FUNCTION 'J_1A_SD_CI_DUEDATE_GET'
EXPORTING
iv_vbeln = '0911000030' " Pass the invoice #
iv_zterm = 'Z180' " Invoice payment terms
IV_RATNR = 1
IMPORTING
ev_netdate = g_dzfbdt " Due date
EXCEPTIONS
FI_DOCUMENT_NOT_FOUND = 1
PAYMENT_TERMS_INCOMPLETE = 2
INVOICE_NOT_FOUND = 3
OTHERS = 4.
IF sy-subrc eq 0.
write : g_dzfbdt .
ENDIF.
Thanks,
Iyankannu