CL_GNR_NAMESPACE - System generation namespace

ROGBILLS - Synchronize billing plans   RFUMSV00 - Advance Return for Tax on Sales/Purchases  
This documentation is copyright by SAP AG.

Namespace and Package Concept (3.0)

Namespace concept

The generation component of the CRM middleware introduced a namespace concept for the generated objectsto avoid name clashes. Without the name space concept the generation could overwrite SAP objects, partner objects or customer objects.

Name clashes between SAP objects, customer objects can only be avoided, if SAP and customers have adifferent namespaces and if these namespaces are only used for generated objects. Therefore we havetwo generation namespaces: a SAP namespace and a customer namespace. The namespace names are contained in the table TGN_NS:

Namespace ID

SAP namespace

Customer namespace

CRMMW

/1CRMG0/

/CRMGEC/

If a developer wants to create a new generator which uses an other namespace he has to enter a newnamespace ID and the new namespace names for SAP and customer objects. Further the developer must createa new namespace class derived from the super class CL_GNR_NAMESPACE. Therein he candefine, how he wants to use the new namespaces for the repository objects. Then the new namespace class must be assigned to a generator with help of the generator builder.

The customer or partner can enter for /CRMGEC/ his own namespace name.

Remark:Because the namespace /CRMGEC/ is delivered by SAP, the customer creates a repairtask if he generates transportable objects, which indicates that he makes a modification. If the customer uses his own licenced namespace, a normal development task is created.

Concept for objects which are transported

For objects which are transported we add different namespaces for customer and SAP objects. Customer objects get the customer namespace, SAP objects get the SAP namespace.

Message structure

The message structure gets the namespace of the system where it is first generated (origin principle). In a customer system it gets the customer namespace, in a SAP system it gets the SAP namespace. Themessage structure name is stored in the table SMOG_MAPTR. The table entry is transported together withthe corresponding BDoc Type. We call the namespace of the message structure also BDoc Type namespace, because this namespace indicates the origin of the BDoc Type.

If the message structure is generated a second time, then the name in the table SMOG_MAPTR which contains also the namespace is used.

Example:SAP delivers the BDoc Type ABC to a customer system where the customer hasalready created a structure with name ABC and a BDoc Type with name ABC. After the generation the SAPand customer message structure names differ trough the namespace: /1CRMG/ABC and /CRMGEC/ABC and are different from the structure ABC.

Segment structure and table type for segment structure.

SAP objects get always the namespace /1CRMG0/: The BDoc Modeler enters the name with the namespace /1CRMG0/ into the table SMOG_SEGM in a SAP system. For the generation the name in this table is used.

Customer objects get the customer namespace: The old BDoc Modeler does not enter a namespace into thefield TR_SEMANT of table SMOG_SEGM. Therefore the generation component adds the namespace of the system,in which the object is first generated, to the object name. This object name with the namespace isstored in the table SMOG_MAPSG. The new BDoc Modeler fills the name with namespace into the field TR_SEMANTand also fills the table SMOG_MAPSG. If the object is generated a second time the object name is readfrom SMOG_MAPSG. Because the table entry is transported with the BDoc Type, the object is generated with the same namespace in different systems.

Example: Customer changes a segment of a partner BDoc. Let the segment name be ZABCand let the customer have already a BDoc Type with structure /CRMGEC/ZABC. Before the change of theBDoc Type the structures have different namespaces: /PART/ZABC, /CRMGEC/ZABC. Because the table entriesin SMOG_MAPSG are copied during the modification of the BDoc Type the changed segment is generated with the old name /PART/ZABC.

Concept for objects which are not transported

  1. BDoc type objects get the BDoc Type namespace (CL_GNR_BDOC_NAMESPACE).
  2. Replication objects get the corresponding BDoc Type namespace (CL_GNR_REPLI_NAMESPACE).
  3. For publication objects the namespace is determined from the table SMOHPUBL (CL_GNR_PUBLI_NAMESPACE).

Remark:There are objects which depend on more than one BDoc Type or more then one publicationobject. These objects get the namespace of the local system, i.e. in the SAP system they get the SAPnamespace, in the customer system they get the customer namespace and in the partner system they getthe partner namespace. This is not a problem, because in a not transportable package different namespaces are allowed and the customer does not create own function modules with the generation namespace.

Example: Customer has created a BDoc Type ABC, afterwards Partner delivers a BDoc Typewith the same name ABC, then SAP delivers a BDoc Type with the same name ABC. On the customer systemthe objects of the customer, partner and SAP which are not transported are generated in the different namespaces /CRMGEC/, /PART/, and /1CRMG0/.

Package concept

The package into which the runtime objects are generated are determined via the namespace: In the tableTGN_PACKA a transportable package and a not transportable package are assigned toeach namespace. If the runtime object is transported then it is generated into the transportable package, if it is transported then it is generated into the not transportable package.

Namespace

Transportable package

Not transportable package

/1CRMG0/

/1CRMG0/STRUCTURES

$SAP_MSAGEN

/CRMGEC/

/CRMGEC/STRUCTURES

$SAPMSAGEN

Note: The namespace of the objects must be equal to the namespace of the transportable package.

The two namespaces /1CRMG0/ and /CRMGEC/ and the transportable packages /1CRMG0/STRUCTURES and /CRMGEC/STRUCTURESare delivered by SAP. The customer can enter for /CRMGEC/ his one namespace name and for /CRMGEC/STRUCTUREShis own package name. This is especially relevant for partners which want to deliver own developed BDoc Types to the customers.

Note:If the partner uses its own namespaces the changed entries in the tables TGN_NS and TGN_PACKA must be transported to the customer.



General Material Data   General Material Data  
This documentation is copyright by SAP AG.


Length: 6942 Date: 20120526 Time: 130429     triton ( 18637 ms )