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

Convert all CSKS-OBJNR value

Former Member
0 Likes
823

Hi Everybody,

i am new to sdn.i got one requirement on CO that is Convert all CSKS-OBJNR

value that is gotten csks table.

Change KS(first 2 byte) to KL and set "*" at the last of the letter is refer to below example.

[Example]

"KSZ001AA001358 " (CSKS-OBJNR) u2192 "KLZ001AA001358 *" (ONRKL-OBJNR).

Now i would like to know that how would be our approch.

Regards,

sud

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
616

Hi,

define a variable to get length of the string say LV_LEN. (type integer)

Define a variable to move the changed contents of CSKS_OBJNR say GV_OBJNR. (type char)


if length of CSKS_OBJNR is not fixed.
LV_LEN = strlen ( CSKS_OBJNR ).
LV_LEN = LV_LEN - 2. "excluding first 2 characters.
ENDIF.

else u can hardcode all offsets.

GV_OBJNR+0(2) = 'KL'.
GV_OBJNR+2(LV_LEN) = CSKS-OBJNR+2(LV_LEN).
GV_OBJNR+length of string(1) = '*'.

Regards,

Mrunal

Hi Everybody,

i am new to sdn.i got one requirement on CO that is Convert all CSKS-OBJNR

value that is gotten csks table.

Change KS(first 2 byte) to KL and set "*" at the last of the letter is refer to below example.

[Example]

"KSZ001AA001358 " (CSKS-OBJNR) u2192 "KLZ001AA001358 *" (ONRKL-OBJNR).

Now i would like to know that how would be our approch.

Regards,

sud

2 REPLIES 2
Read only

Former Member
0 Likes
617

Hi,

define a variable to get length of the string say LV_LEN. (type integer)

Define a variable to move the changed contents of CSKS_OBJNR say GV_OBJNR. (type char)


if length of CSKS_OBJNR is not fixed.
LV_LEN = strlen ( CSKS_OBJNR ).
LV_LEN = LV_LEN - 2. "excluding first 2 characters.
ENDIF.

else u can hardcode all offsets.

GV_OBJNR+0(2) = 'KL'.
GV_OBJNR+2(LV_LEN) = CSKS-OBJNR+2(LV_LEN).
GV_OBJNR+length of string(1) = '*'.

Regards,

Mrunal

Read only

0 Likes
616

Hi Mrunal,

Thanks a lot giving answer.

Regards,

sud