Show TOC Start of Content Area

Background documentation Classification Application Service Operations  Locate the document in its SAP Library structure

Use

You use classification application service (ClassificationApplicationService) operations to query category and folder information of a classification assignment. The classification application service uses the entity service category service (CategoryService); the category service is used to store the folder structure of classification assignments.

For more information see, Category Service and Assignment.

Note

Application services distinguish between categories and folders in that categories can be assigned to an entity service type; whereas folders have to be assigned on the level of entity service instances.

Operations

You can use the following classification application service CRUD (create, read, update, delete) operations to define search criteria on classification assignments.

Note

In the following tables, DS stands for data structure.

Create Operations

Operation Name

Input

Output

Description

createCategory

String [1..1] name

String [1..1] description

Category DS [1..1]

Creates an instance in the category entity service with attribute isRoot=true.

createFolder

String [1..1] name

String [1..1] description

String [1..1] parentGuid

Folder DS [1..1]

Creates an instance in the classification entity service with attribute isRoot=false.

Read Operations

Operation Name

Input

Output

Description

getCategories

None

Category DS [0..n]

Returns all root folders. Calls the findByRoot method of the entity service with the query value set to true.

getAssignedFolderPaths

String [1..1] entity name

String [1..1] guid instance

String [0..n]

Returns all folders that are assigned to an entity service instance.

The returned values contain the entire path name for each folder so that it can be displayed in the UI pattern.

getFolderPath

String [1..1] guid folder

String [1..1]

Returns the names of all folders on the path from the root to a specific folder in a breadcrumb.

getSubfolder

String [1..1] guid

Folder DS [0..n]

Returns all subfolders for a certain folder.

assignCategory

String [1..n] guid category

String [1..1] entity name

boolean [1..n] mandatory

 

Assigns categories from a root folder to an entity service (not an instance).

Mandatory indicates that GUID category was assigned appropriately.

assignFolders

String [1..1] entity name

String [1..1] guid instance

String [1..n] guid folder

String [1..1] guid category

 

Assigns a list of folders of a certain category hierarchy to an instance of an entity service.

getAssignedCategories

String [1..1] entity name

Category DS [0..n]

Returns all root categories (not instances) that are assigned to specific service.

getAssignedFolders

String [1..1] entity name

String [1..1] guid

Folder DS [0..n]

Returns a list of folders assigned to the instance with the GUID  key of the service with name entityName.

parseFolderPath

String [1..1] path

String [1..1]

Parses the path of a folder and returns the GUID of the folder.

The path has to be specified by the names of folders starting with the root and separated by “->”.

getItemNames

String [1..1] guid

Names DS [0..n]

Returns names and descriptions of one category or folder in all languages.

setItemNames

NamesDS [0..n] names

String [1..1] guid

 

 

Stores names and descriptions of one category or folder in all languages.

checkAssignments

String [1..1] entity name

String [1..1] guid (entity key)

String [0..n]

Checks for an entity instance with the GUID key and name entityName if for each assigned category with a mandatory assignment, at least one folder is assigned to the instance.

An assignment is mandatory if it is stored in the entity service CategoryAssginment.

Returns a list of category GUIDs for which this check is not passed.

Delete Operations

Operation Name

Input

Output

Description

deleteCategory

String [1..1] guid

 

Deletes the instance of the classification entity service including all children recursively.

Additionally, the assignment of this category to the entity services is deleted.

deleteFolder     

String [1..1] guid     

 

Deletes the instance of the classification entity service including all children recursively

Additional Operations

Operation Name

Input

Output

Description

getEntityNames

 

 

String [0..n]

Returns list with names of classifiable business entities.

c_assignCategory

String [1..n] guidCat

String [1..1] entityName

 

Workaround method for working with CAF.

Create the guidCat in the following:

CategoryId + Delimeter + IsAssignmentMandatory

For example, 234920842&true.

Has the same functionality as assignCategory.

c_assignFolder

String [1..n] guidFolder

String [1..1] guidInstance

String [1..1] guidCat

String [1..1] entityName

 

Workaround method for working with CAF.

Has the same functionality as assignFolder.

isAssignmentMandatory

String [1..1] entityName

String [1..1] guidCat

Boolean [1..1]

Returns true if assignment is mandatory.

getServiceNameByEntityName

String [1..1] entityName

String [1..1]

 

 

Operations and Data Structures

CRUD Operations for Data Structures

Operation Name

Input

Output

Description

createCategoryDS

String [1..1] name

String [1..1] description

Category DS [1..1]

Creates an instance in the entity service category with attribute is-Root=true.

readCategoryDS

String [1..1] key

Category DS [1..1]     

Reads an instance from the entity service category.

updateCategoryDS

CategoryDS[1..1] ds0

 

Updates Category DS in the entity service category.

deleteCategoryDS

 

CategoryDS[1..1] ds0

 

Recursively deletes the instance of the classification entity service including all children.

Additionally, the assignment of this category to the entity services is also deleted.

createFolderDS

 

String [1..1] name

String [1..1] de-scription

String [1..1] key

String [1..1]

parent

Folder DS [1..1]

Creates an instance in the classification entity service with a specified name and description; attribute is-Root=false, parent key parent. Attribute key is ignored.

readFolderDS

String [1..1] key

Folder DS [1..1]

Reads an instance from the entity service category.

updateFolderDS

Folder DS[1..1] ds0

 

Updates Folder DS in the entity service category.

deleteFolderDS

 

Folder DS[1..1] ds0 

 

Recursively deletes the instance of the classification entity service including all children.

createNamesDS

 

String[1..1] key

Names DS [1..1]

Returns instance of Names DS. Creates language- dependent attributes.

Create Names DS for key in all CRUD operations as follows:

categoryKey+ Delimeter+Language

For example, 3134523&en.

readNamesDS

String [1..1] key

NamesDS [1..1]

Returns Names DS by encoded key.

updateNamesDS

NamesDS [1..1] ds0

 

Updates language-dependent attributes.

deleteNamesDS

CategoryDS[1..1] ds0

 

Deletes language-dependent attributes.

 

Data Structures Used by Application Services

CategoryDS

name

String [1..1]

description

String [0..1]

key

String [1..1]

isLeaf

Boolean [1..1]

 

FolderDS

name

String [1..1]

description

String [0..1]

key

String [1..1]

category

String [1..1].

Holds the key of the category that is associated with this folder.

isLeaf

Boolean [1..1]

parent

String [1..1]

Holds the key of the parent category.

 

NamesDS

language

String [1..1]

name

String [1..1]

description

String [1..1]

key

String [1..1]

Holds the key of the parent classification.

 

End of Content Area