Fonction SAP BAPI_TEMPLATECO_CREATE - CreateFromData for Business Object TemplateCO

Paramètre Reférence Type Long. Valeur par déf. Facultatif Description
CONTROLLINGAREA_IMP BAPI_TEMPLATECO_COMMON-CO_AREA C 4 Controlling Area
ENVIRONMENT_IMP BAPI_TEMPLATECO_COMMON-ENVIRONMENT C 3 Template Main Environment
LANGUAGE BAPI_TEMPLATECO_COMMON-LANGU C 1 X R/3 System, current language
TEMPLATETEXT BAPI_TEMPLATECO_COMMON-TEMPLATETEXT C 30 X Template Text
TEMPLATE_IMP BAPI_TEMPLATECO_COMMON-TEMPLATE C 10 Template
TESTRUN BAPI_TEMPLATECO_COMMON-TESTRUN C 1 SPACE X General Flag

Paramètre Reférence Long. Facultatif Description
CELLFIXVALUES BAPI_TEMPLATECO_CELLFIXVALUE 81 Data Structure for Fixed Values of Cells for BO TemplateCO
CELLSOURCES BAPI_TEMPLATECO_CELLSOURCE 93 X Data Structure for Sources of Cells for BO TemplateCO
FLEXFUNCSOURCES BAPI_TEMPLATECO_FLEXFUNCSRC 85 X Data Structure for Flex. Func. Sources for BO TemplateCO
POSITIONS BAPI_TEMPLATECO_POSITION 39 Data Structure for Positions of BO TemplateCO
RETURN BAPIRET2 548 X Return Parameter

Functionality
You use this method to create a template from the values given asparameters.
The authorization object K_TEMPL is checked for the activity code 01(Create) with parameters Controlling Area, Environment, and Template.
Use the import parameters to define the template to read as follows:
- CONTROLLINGAREA_IMP : Controlling area
- ENVIRONMENT_IMP : Environment
- TEMPLATE_IMP : Template name
- TEMPLATE_TEXT : Template description
- LANGUAGE : Language
- TESTRUN : Test run
- POSITIONS : Definition of the visible lines of the template
- CELLFIXVALUES : Fixed values of the template
- CELLSOURCES : Sources of the template formulas
- FLEXFUNCSOURCES : Sources of the flexible functions of the template
Messages are returned with the parameter return.

Notes
Use BAPI_TEMPLATECO_GET_DETAIL to have a model of the values that youwant to use as parameters.

Description
Controlling area

Value range
This parameter implements the key field of the business object with thesame name.
See the documentation for the key field for more information about thisparameter.

Description
Environment

Value range
This parameter implements the key field of the business object with thesame name.
See the documentation for the key field for more information about thisparameter.

Description
Template language

Default
System language

Description
Template description

Value range
TEMPLATETEXT has type CHAR 30

Description
Template name

Value range
This parameter implements the key field of the business object with thesame name.
See the documentation for the key field for more information about thisparameter.

Description
Test run
Indicator showing whether validation is performed without saving theprocess structure.

Value range
" ": process template is saved if no error is found
"X": validation only, without saving

Description
Cell fixed values

Value range
CELLFIXVALUES is a structure:
- POSITIONNUMBER (NUMC 8) : Template item, reference to parameterPOSITIONS-POSITIONNUMBER
- COLUMN (CHAR 1) : Template column ID
- VALUE (CHAR 72) : Fixed value

Description
Cell formula sources

Value range
CELLSOURCES is a structure:
- POSITIONNUMBER (NUMC 8) : Template item, reference to parameterPOSITIONS-POSITIONNUMBER
- COLUMN (CHAR 1) : Template column ID
- SOURCELINEID (NUMC 8) : Control block number
- FLEXFUNCID (NUMC 4) : ID of the flexible function the formula refersto; reference to FLEXFUNCSOURCES if needed
- SOURCELINE (CHAR 72) : Source line

Description
Flexible functions formulas sources

Value range
FLEXFUNCSOURCES is a structure :
- FLEXFUNCID (NUMC 4) : ID of the flexible function
- QUAN_BOOL_FLAG (CHAR 1) : Q (Quantity) or B (Boolean), defines thepart of the flexible function formula
- SOURCELINEID (NUMC 8) : Control block number
- SOURCELINE (CHAR 72) : Source line

Description
Position: Visible rows of the template

Value range
POSITIONS is a structure:
- POSITIONNUMBER (NUMC 8) : Template item
- LINETYPE (CHAR 1) : Template row type
- LINE_OBJECT_TEXT (CHAR 30) : Text for the row

Description
Messages

Value range
Tables of the affected messages with parameter information. Rows andcolumns are given for table parameters.