Skip to Content
0
Former Member
Nov 30, 2009 at 08:31 AM

BADI MRM_PAYMENT_TERMS

332 Views

Hi Experts,

I have issue with this BADI MRM_PAYMENT_TERMS.

After I activated this badi, everytime I create invoice through MIRO.. the baseline date in payment tab always blank. I tried to fill the baseline date manually, then I enter, it's back to blank.

Then I use FM 'FI_FIND_PAYMENT_CONDITIONS' to assign the baseline date. And I found out the net due date in MIRO screen, tab payment (below baseline date) is not correct.

This is my coding in the BADI

DATA: z_zfbdt TYPE dzfbdt.

  IF sy-tcode = 'MIRO'.
    IF i_rbkpv-beznk GT 0 AND i_rbkpv-beznk EQ i_rbkpv-rmwwr.
      e_zlspr = 'D'.
    ENDIF.
  ENDIF.

  CALL FUNCTION 'FI_FIND_PAYMENT_CONDITIONS'
    EXPORTING
      i_zterm = i_rbkpv-zterm
      i_bldat = i_rbkpv-bldat
      i_budat = i_rbkpv-budat
      i_cpudt = sy-datlo
    IMPORTING
      e_zfbdt = z_zfbdt.
  IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

  e_zfbdt = z_zfbdt.

Please help me.

Thanks,

Melissa