Download - MIRO BADI for Value Date
09.02.2009 Page 1 of 5
Note 574583 - MIRO: BADI for value date
Note Language: English Version: 13 Validity: Valid from 14.12.2006
Summary
SymptomIn the logistics invoice verification, the system derives the value date(WWERT) from the posting date (BUDAT).However, the derivation should occurfrom the document date (BLDAT) or the posting date depending on the countrykey of the company code.
More TermsFI_TRANS_DATE_DERIVE (BAdI), cancellation, FI_DERIVE_WWERT, FB60, MIRO,MIR7, MR8M, MIR6, ERS, EDI, IDOC.
Cause and PrerequisitesThere are missing functions.
SolutionThe derivation of the value date can be implemented via an implementationwith the help of BADI FI_TRANS_DATE_DERIVE.The BADI is called via functionmodule FI_DERIVE_WWERT.The BAdI calls an implementation you have to define first.In thisimplementation, you have to define that the posting date or document dateshould be used for the determination of the value date depending on thecountry key of the company code.If no implementation exists or if the BADI does not return anything, thesystem equals value date and posting date as usual.
1. 4.6C - 4.70 Implement Note 575249 in your system.
2. In Release 4.6C, use transaction SE18 to define BADIFI_TRANS_DATE_DERIVE:
a) Call up transaction SE18.
b) Enter definition name FI_TRANS_DATE_DERIVE and choose 'Create'.
c) Enter 'Derive BKPF-WWERT from the other data of the documentheader' as a short text, set the 'Filter-depend.'
d) flag and enter INTCA as a filter type (the 'SAP-internal' and'Multiple use' flags MUST NOT be used).Choose the 'Interface' tab.Double-click the IF_EX_FI_TRANS_DATE_DERIVE interface name. Thenyou branch to the Class Builder.Confirm the query if you want tosave your entries (development class FBAS).
e) Assign method DERIVE_WWERT (type: instance method; modeledonly:SPACE, method type: Method type: SPACE, method type: SPACE,description: Derive value date).
f) Define the following parameters:
Parameter Type Pass by value Optional Typing
I_BUDAT Importing X X TypeI_BLDAT Importing X X Type
09.02.2009 Page 2 of 5
Note 574583 - MIRO: BADI for value date
FLT_VAL Importing X TypeE_WWERT Exporting X Type
Reference type Description
BUDAT Posting date in the documentBLDAT Document date in the documentINTCA Parameter FLT_VAL of method DERIVE_WWERTWWERT_D Conversion date
g) Save and activate your entries.Navigate back to the definition ofthe BADI. Save your entries.
3. Only Release 4.6C: Create function module FI_DERIVE_WWERT usingTransaction SE37.
Function group: FACSShort text : Determine conversion date
Import parameter:
Parameter name Type spec. Reference type Default value
I_BUDAT TYPE BUDATI_BLDAT TYPE BLDATI_BUKRS TYPE BUKRSI_WWERT TYPE WWERT_DI_INTCA TYPE INTCA
Optional Pass by value Short text
X Posting date in the document X X Document date in the document X X Company code X X Conversion date X X ISO code of the country
Export parameter:
Parameter name Typing Ref. type Pass value
E_WWERT TYPE WWERT_D
Short text
Conversion date
Save and activate the function module.
4. 4.6C - 4.70 Change function moduleMRM_HEADER_CHECK using transaction SE37:
a) Insert import parameter I_WWERT into function moduleMRM_HEADER_CHECK.
09.02.2009 Page 3 of 5
Note 574583 - MIRO: BADI for value date
Import parameter: Parameter name: I_WWERT Typing: LIKE Reference type: ACCIT-WWERT Optional: X Pass by value: X
b) Insert export parameter E_WWERT into function moduleMRM_HEADER_CHECK.Export parameter: Parameter name: E_WWERT Typing: LIKE Reference type: ACCIT-WWERT Pass by value: X
c) Save and activate the function module.
5. 4.6C - 4.70 Manually change the type group MRM as follows:
a) SE11: Select the menu option: "Utility -> Additional DictonaryObjects", enter 'MRM' for the type group and select 'Change'.Insert the selected line into type group MRM:
TYPE-POOL mrm....
* Dialog component FI-MM: fields for export from FIcomponentTYPES: BEGIN OF mrm_ac_vendor_comp_export. INCLUDE STRUCTURE acmm_vendor_comp..TYPES: okcode TYPE fcode, qsskz TYPE qsskz, qsfbt TYPE qsfbt, qsshb TYPE qsshb, wwert LIKE accit-wwert, <<<<< INSERT END OF mrm_ac_vendor_comp_export....
b) Save and activate your change.
6. 4.6C - 4.7 Implement the attached correction instructions in yoursystem.
7. 4.6C - 6.0 Use transaction SE19 to define an implementation and inmethod 'DERIVE_WWERT' of your implementation (your class), implementthe source code for calculating field E_WWERT. Note that if you wantyour implementation to run for transaction MIR7 as well, you mustcomment out the following rows in function module 'fi_derive_wwert':Call transaction SE37, enter function module 'fi_derive_wwert', F7,
function fi_derive_wwert.*"----------------------------------------------------------------------
09.02.2009 Page 4 of 5
Note 574583 - MIRO: BADI for value date
*"*"Lokale Schnittstelle:*" IMPORTING*" VALUE(I_BUDAT) TYPE BUDAT*" VALUE(I_BLDAT) TYPE BLDAT OPTIONAL*" VALUE(I_BUKRS) TYPE BUKRS OPTIONAL*" VALUE(I_WWERT) TYPE WWERT_D OPTIONAL*" VALUE(I_INTCA) TYPE INTCA OPTIONAL*" VALUE(I_BLART) TYPE BLART OPTIONAL*" EXPORTING*" REFERENCE(E_WWERT) TYPE WWERT_D*"---------------------------------------------------------------------- data: ls_t001 type t001, ls_t005 type t005. statics: g_exit_ref type ref to if_ex_fi_trans_date_derive.
* if not i_wwert is initial. >>> CHANGE* e_wwert = i_wwert. >>> CHANGE* exit. >>> CHANGE* endif. >>> CHANGE...endfunction.
Header Data
Release Status: Released for CustomerReleased on: 14.12.2006 11:41:48Priority: Correction with medium priorityCategory: Advance development
Main Component MM-IV-LIV Logistics Invoice VerificationAdditional Components:
FI-GL-GL-A Posting/Clearing
Valid Releases
Software Component Release FromRelease
To Release and Following
SAP_APPL 46C 46C 46C
SAP_APPL 470 470 470
SAP_APPL 500 500 500
SAP_APPL 600 600 600
Support Packages
Support Packages Release Package Name
SAP_APPL 46C SAPKH46C41
SAP_APPL 470 SAPKH47006
Related Notes
09.02.2009 Page 5 of 5
Note 574583 - MIRO: BADI for value date
Number Short Text
1156325 BAdIs in the Logistics Invoice Verification environment
885976 MIRO: Change doc type w/o calling BADI FI_TRANS_DATE_DERIVE
867170 MIRO: Value date for conversion
661354 MIRO: Incorrect tax base in local currency in BSET
619330 Document date instead of posting date in GR
599672 Workflow: Error SG105 in method PRELIMINARYPOST
577555 MIR4: Derivation of value date and exchange rate
575249 MIRO: Derivation of value date via BADI
554017 MIR4: Value date when changing documents
377124 MIRO, MR1M: Value date
Correction Instructions
CorrectionInstructions
Validfrom
Validto
SoftwareComponent
Type*)
ReferenceCorrection
LastChanged
495383 470 470 SAP_APPL C P6BK032455 16.12.2002 18:18:19
497307 46C 46C SAP_APPL C P9CK300390 20.12.2002 13:58:47
*) C Correction, B Pre-Implementation, A Post-Implementation, M Undetermined