Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

FI-ABAP : how to calculate payment date using a module function ?

Former Member
0 Likes
2,005

Hello,

I would like to calculate the payment date using the document date (BLDAT) and the payment terms (ZALDT).

I think there is one standard module function which do it but I do not know which one.

Could you please help me ?

Regards,

Francis

Hello,

I would like to calculate the payment date using the document date (BLDAT) and the payment terms (ZALDT).

I think there is one standard module function which do it but I do not know which one.

Could you please help me ?

Regards,

Francis

10 REPLIES 10
Read only

Former Member
0 Likes
1,614

check fm...

<b>FM_RECERTIFIED_PAYMENT_DATE</b>

Read only

Former Member
0 Likes
1,614

Hi,

Chk the link below

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCBMTWFMFI/BCBMTWFMFI.pdf

Reward points if helpful.

Regards,

Harini.S

Read only

andreas_mann3
Active Contributor
0 Likes
1,614

hi,

use fm DETERMINE_DUE_DATE

(look example in abap RFITEMAP)

Andreas

Read only

0 Likes
1,614

Hi Andreas,

I have tried to look for DETERMINE_DUE_DATE and I cannot find it, even in the RFITEMAP Abap program.

Are you sure of the name of the function ?

Regards,

Francis

Read only

0 Likes
1,614

sorry Francis,

this will run:

REPORT zforum101 .

TABLES: faede, bsid, bsega, t052.

PARAMETERS : p_zterm LIKE t052-zterm DEFAULT '1400'.
PARAMETERS : bldat TYPE sy-datum DEFAULT '20060801'.

SELECT SINGLE * FROM  t052
       WHERE  zterm  = p_zterm.

CLEAR faede.
MOVE-CORRESPONDING t052 TO faede.
MOVE: t052-ztag1 TO faede-zbd1t,
      t052-ztag2 TO faede-zbd2t,
      t052-ztag3 TO faede-zbd3t.

MOVE bldat TO faede-bldat.
faede-koart = 'D'.

CALL FUNCTION 'DETERMINE_DUE_DATE'
     EXPORTING
          i_faede = faede
     IMPORTING
          e_faede = faede
     EXCEPTIONS
          OTHERS  = 1.

bsega-netdt = faede-netdt.

WRITE bsega-netdt.

A.

pls reward useful answers

Message was edited by: Andreas Mann

Read only

0 Likes
1,614

Hello,

Thanks a lot for your example. but it only works for one condition term... For the others, it returns the same date.

I will check deeply to see why.

Regards,

Francis

Read only

0 Likes
1,614

Andreas,

I have check and it does not work, the date I get is not the correct one.

I think your affectations to "faede" are not correct.

Regards,

Francis

Read only

0 Likes
1,614

Andreas,

Here is not sufficient :

"MOVE: t052-ztag1 TO faede-zbd1t,

t052-ztag2 TO faede-zbd2t,

t052-ztag3 TO faede-zbd3t."

You also have to put the correct data for faede-zfbdt.

I think there is another function that uses directly T052-ZTERM... but I do not know which one.

Regards,

Francis

Read only

0 Likes
1,614

I have the solution : first use FI_FIND_PAYMENT_CONDITIONS to get "zfbdt" value (if you do not have it) and then, you can use "DETERMINE_DUE_DATE".

Regards.

Francis

Read only

Former Member
0 Likes
1,614

Hi Francis

Check the FM,

J_1A_SD_CI_DUEDATE_GET

It takes the

Invoice Number(IV_VBELN),

Payment Term(IV_ZTERM)

Regards,

Samson