ā2012 Dec 28 7:27 PM
We need modify these badi to in case we use Subsequent Credit, in case to use
"Different Invoicing Party", use pay terms last one and not use Purchase Order pay terms.
Bellow the coding, but the problem it that the pays terms and condition are reseting with the PO records and not load the Different Invoicing Party pays terms records !!
Have you any suggesting?
Thanks in advance!
the coding badi MRM_PAYMENT_TERMS are:
DATA: z_zfbdt TYPE dzfbdt.
data: v_zterm type lfm1-zterm.
v_bukrs = 'KRTZ'.
SELECT single zterm into v_zterm FROM lfm1 WHERE lifnr EQ i_rbkpv-lifnr.
i_rbkpv-zterm = v_zterm.
*--- fill all export-parameter ----------------------------------------*
e_zfbdt = i_rbkpv-zfbdt.
e_zbd1t = i_rbkpv-zbd1t.
e_zbd1p = i_rbkpv-zbd1p.
e_zbd2t = i_rbkpv-zbd2t.
e_zbd2p = i_rbkpv-zbd2p.
e_zbd3t = i_rbkpv-zbd3t.
e_zlspr = i_rbkpv-zlspr.
call function 'FI_TERMS_OF_PAYMENT_PROPOSE'
exporting
i_bldat = i_rbkpv-bldat
i_budat = i_rbkpv-budat
i_cpudt = sy-datlo
i_zfbdt = sy-datlo
i_zterm = v_zterm
importing
e_zbd1t = i_rbkpv-zbd1t
e_zbd1p = i_rbkpv-zbd1p
e_zbd2t = i_rbkpv-zbd2t
e_zbd3t = i_rbkpv-zbd3t.
i_rbkpv-zterm = v_zterm.
endmethod.
ā2012 Dec 31 10:09 AM
Hi
Have you checked if V_ZTERM is initial when the BADI is running? See NOTE 944164 (EDI: terms of payement from the first PO) for other userexit (for an IDOC) and how SAP is using this FM ( FI_TERMS_OF_PAYMENT_PROPOSE ).
Check also these notes
Note 1156325 - BAdIs in the Logistics Invoice Verification environment
SAP Note 1559443 - Changing baseline dates for payment terms for Spain (related with MIRO)
I hope this helps you
Regards
Eduardo