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

Generate OBJECT_ID for inserting into archive link table

Former Member
0 Likes
3,060

Hi

We are using ARCHIV_CONNECTION_INSERT to insert an entry into archive link table. I want to know whether there is some general algorithm used by SAP to generate the field OBJECT_ID which is a unique index identifying SAP business object .

I have studied some business object types and for some object types it is obtained by adding zeroes to the left to obtain a 10 digit no ,and for some it is obtained by concatenating a SAP business object id with fiscal year. We want to generalize our ID generation algorithm for all SAP business object types.

So I want to know is SAP having some general method to generate OBJECT_ID field which we can use to generate our own generic algorithm.

Please help

Thanks in advance

Neha

1 ACCEPTED SOLUTION
Read only

athavanraja
Active Contributor
0 Likes
1,452

basically the object_id is the key of the object.

for example for cost center it will be

controlling area + cost center number.

how do you find the the key:

if you go to the business object(SWO1 transaction) enter the object and click display.

you would see a node called key fields. they form the object id in the same sequence.

Regards

Raja

Hi

We are using ARCHIV_CONNECTION_INSERT to insert an entry into archive link table. I want to know whether there is some general algorithm used by SAP to generate the field OBJECT_ID which is a unique index identifying SAP business object .

I have studied some business object types and for some object types it is obtained by adding zeroes to the left to obtain a 10 digit no ,and for some it is obtained by concatenating a SAP business object id with fiscal year. We want to generalize our ID generation algorithm for all SAP business object types.

So I want to know is SAP having some general method to generate OBJECT_ID field which we can use to generate our own generic algorithm.

Please help

Thanks in advance

Neha

3 REPLIES 3
Read only

athavanraja
Active Contributor
0 Likes
1,453

basically the object_id is the key of the object.

for example for cost center it will be

controlling area + cost center number.

how do you find the the key:

if you go to the business object(SWO1 transaction) enter the object and click display.

you would see a node called key fields. they form the object id in the same sequence.

Regards

Raja

Read only

Former Member
0 Likes
1,452

Thanks a lot Raja.

Is there any way to obtain the key fields of a business object type programmatically by running some query ? This will help us to create OBJECT_ID which can be further used to insert entry into Archive Link table.

Please help

With Regards

Neha

Read only

0 Likes
1,452

use FM

SWO_QUERY_KEYFIELDS

to get the key fields of a business object.

(SDN was slow thus the delay in reply. )

Regards

Raja