SAP® Documentation

Single view

/IWBEP/CL_SB_GEN_APC_GENERATOR - SB APC Generator

Vendor Master (General Section)   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

The Class /IWBEP/CL_SBMC_MPC_GENERATORclass generates the Model Provider Class. The MPC code generator will read/visit the domain model for the model node type and generate the corresponding MPC. The entry point for the MPC generation is from the SAP Gateway Service Builder.

  1. When the content developer selects the domain model for which MPC has to be generated, the ACCEPT_VISITOR method of the model interface would be instantiated with the reference of the MPC visitor class /IWBEP/CL_SBMC_GEN_MPC.
  2. The GENERATE method in turn would invoke the protected method ADAPT_MODEL which would adapt the domain model reference to internal table types.
  3. The GENERATE method then would invoke the private method VALIDATE to perform OData standard validations before actually generating the MPC classes.
  4. Once the validation is successful, the GENERATE method would invoke the private method GENERATE_MPC which would generate two classes ZCL_MPC & ZCL_MPC_BS.

The class names are decided by user inputs from service builder, the user input in this case is assumed to be ZCL_MPC. The base class name will be suffixed with "_BS" to the MPC class name passed from service builder.

The GENERATE_MPC method will use the code template /IWBEP/I_SBMC_MPC_GEN to generate the MPC classes for all the OData artifacts. The place holders in the code template will be filled with the model details populated in the internal table attributes of the class.

Class

ContentFormatDescription
MethodGenerateGenerates MPC
Implemented Class/IWBEP/CL_SBMC_MPC_GENERATORService Builder MPC Generator

Parameters

ParametersImport/ExportDescription
IO_PROJECTImportingThe selected Domain model-project from the SB for which the MPC has to be generated is imported
IV_MPC_BASE_NAMEImportingImports the MPC Base Class. We recommend not to modify this Class
IV_MPC_SEC_NAMEImportingImports MPC Secondary Class. This Class can be modified by the user.
IV_PACKAGEImportingImports the name of the package
IV_TRANSPORTImportingImports the transport request number
IV_OVERWRITE_BASEImportingImport s the changes made to the MPC Base Class
IV_OVERWRITE_ALLImportingImports the changes made to both all the Classes
ET_MESSAGESExportingExports any messages
ET_GENERATED_ARTIFACTSExportingExports the generated artifacts after the MPC generation
ET_TYPE_DETAILSExportingExports the generated Entity Type details

Example

Notes

Further information






ROGBILLS - Synchronize billing plans   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 4467 Date: 20190619 Time: 095352     sap01-206 ( 26 ms )

Our Service

Looking for Support? Questions?

The

Consolut

Callback-Service

Leave us your contact details and we will call you back. Panels marked with * are mandatory.