Hi everyone..
We plan on making heavy use of AIF 3.0 in our new SAP implementation of version 1605(perhaps 1610).
I have a fair amount of experience with v2.0 and I want to make sure we put sufficient thought and design into the new interfaces.
Concentrating on inbound interfaces for now.. I want to ensure maximum reusability of posting code.
Typically, our Actions follow a pattern such as:
- Enrich Data
- Validate Data
- Post Data
Where "Post Data" may contain 1 to many document posting steps.
My plan is to create a super class for every BAPI we use and include a method to map data to each structure that the BAPI can accept.
For example, we are using 'BAPI_ACC_DOCUMENT_POST'. I have created a super class with the following mapping methods:
- HEADER_MAPPING
- ACCT_GL_MAPPING
- VENDOR_MAPPING
- CURRENCY_MAPPING
- TAX_MAPPING
- EXTENSION_MAPPING
I want to make sure those super classes are interchangeable so that my AP class can be used anywhere in AIF when I need to create an AP document.
My plan is to inherit the super class into subclasses and perform interface-specific mappings there.
However, I'm coming across a stumbling block.. In order to make the super class fully re-usable, in what format should I pass data to it? Each Action could possibly contain a different DDIC structure.
I guess I could declare the data blob as Type Ref To ANY in the super class attributes. Then when I inherit it out to a subclass, I can cast that blob into the interface-specific structure format defined in the subclass? Then map it to the BAPI?
Does that sound right?