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

obj_key

Former Member
0 Likes
1,015

Hi all.

my requirement is i have obj key with length 70

obj_key is combination of 4 fields with lengths as follows BUKRS-4

BELNR-10

GJAHR-4

BUZEI -3

how to fetch these field values exactly from objkey into different variables as i dont know where exactly these fields occur in the length 70.

5 REPLIES 5
Read only

former_member242255
Active Contributor
0 Likes
867

you have to check the value of one OBJKey and take the offsets as the lenght of the fields correspondingly whether they are from right -> left or left -> right in the OBJKEY value.

Read only

0 Likes
867

but i dont have any sample value of obj_key.

plz provide OBJ_KEY sample values if you are have in any server in the table FDM_DCOBJ

Read only

Former Member
0 Likes
867

Hi,

You need to find the occurrence and

Check this Code..

Bukrs = obj_key(4).
belnr = obj_key+5(10).
GJHAR = obj_key+15(4).
BUZEI = obj_key+19(3).

Read only

Former Member
0 Likes
867

Use Offset like

year = sy-datum+0(4)

Month = sy-datum+5(2)

day = sy-datum+7(2)

Regards

Shashi

Read only

Former Member
0 Likes
867

Hi,

Sample objkeys will be like this....



300001000007552008001
300001000007772008001
300001000007712008001
300001000007312008001

Hope its helps