Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BAPI_OBJCL_CREATE_KEY

Former Member
0 Likes
2,121

hi,

what is the purpose of this bapi BAPI_OBJCL_CREATE_KEY?? b4 i will use this, is there any pre-requisite?

thanks,

bryan

4 REPLIES 4
Read only

Former Member
0 Likes
1,343

Functionality

This BAPI creates a classification with assigned values, if it does not yet exist. The classification is defined by the required fields object key (ObjectKey) and class name (AllocDetail-Class_Num). The characteristics and their values are transferred in different tables, according to type. Numeric, time, and date characteristics are transferred in table AllocValuesNum, character and boolean characteristics in table AllocValuesChar, and currency characteristics in table AllocValuesCurr. If the BAPI runs successfully, table RETURN contains no messages of type 'E'.

Caution

This BAPI does not change the database. To do this, BAPI BapiService.TransactionCommit must be called afterward. This BAPI can only be used with objects that are not classes. The values processed in this BAPI are for classification only, not for configuration.

Also check this link.

http://abap.wikiprog.com/wiki/BAPI_OBJCL_CREATE_KEY

Regards,

Maha

Read only

Former Member
0 Likes
1,343

Hi,

Please refer to the document:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/348f9990-0201-0010-b784-eb0...

There you will find the neccessary information.

Regards

Renjith Michael.

Read only

Former Member
0 Likes
1,343

Functionality

This BAPI creates a classification with assigned values, if it does not yet exist. The classification is defined by the required fields object key (ObjectKey) and class name (AllocDetail-Class_Num). The characteristics and their values are transferred in different tables, according to type. Numeric, time, and date characteristics are transferred in table AllocValuesNum, character and boolean characteristics in table AllocValuesChar, and currency characteristics in table AllocValuesCurr. If the BAPI runs successfully, table RETURN contains no messages of type 'E'.

Notes

The object key ObjctKey can be generated from the key fields object, object table, and class type by BAPI ObjectClassification.GetKeyOfObject. If these fields are defined and only one function module is to be used, use function module BAPI_OBJCL_CREATE. This skips the conversion to the object key.

Caution

This BAPI does not change the database. To do this, BAPI BapiService.TransactionCommit must be called afterward. This BAPI can only be used with objects that are not classes. The values processed in this BAPI are for classification only, not for configuration.

Import

AllocValuesChar

AllocValuesCurr

AllocValuesNum

ChangeNumber

ClObjectkeyNew

ClassNumNew

KeyDate

NoDefaultValues

StandardClass

Status

_

Export_*

ClassifStatus

Return

Changing

Pattern

CALL FUNCTION 'BAPI_OBJCL_CREATE_KEY'

EXPORTING

CLOBJECTKEY_NEW =

CLASSNUM_NEW =

" STATUS = '1'

" STANDARDCLASS =

" CHANGENUMBER =

" KEYDATE = SY-DATUM

" NO_DEFAULT_VALUES = ' '

" IMPORTING

" CLASSIF_STATUS =

TABLES

" ALLOCVALUESNUM =

" ALLOCVALUESCHAR =

" ALLOCVALUESCURR =

RETURN =

.

Read only

0 Likes
1,343

hi,

can you give me an example on how to use this FM.