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

offset

0 Likes
638

Dear Friends,

I have a variable of length 10.

Say v1 = 'abcdefghij'.

Now i want to seoerate 'efghij' from v1.

Can you kindly give the syntax for the same. Thank you.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
620

Hi,

DATA : v2 type char6.

v2 = v1+4(6).

Regards,

Farheen

5 REPLIES 5
Read only

Former Member
0 Likes
621

Hi,

DATA : v2 type char6.

v2 = v1+4(6).

Regards,

Farheen

Read only

Former Member
0 Likes
620

DATA: V1(10) TYPE C,

V2(10) TYPE C.

V1 = 'abcdefghij'.

V2 = V1+4(6).

V1 = V1(4).

Max

Read only

Former Member
0 Likes
620

Hi sree,

REPORT ZTEST22222.

DATA: V1(10) TYPE C,

V2(10) TYPE C.

V1 = 'abcdefghij'.

V2 = V1+4(6).

write /: v2 ,v1 .

try to execute this.

plz reward if helpful.

thanks ,

Srikanth .T

Read only

Former Member
0 Likes
620

Hi Sreeram,

This Example might help u out..

move foff1(len1) to goff2(len2).

a = ‘abcdefghi’.

b = 'ABCDEFGHI'

move a5(4) to b4(4).

b will be ABCDfghiI

Reward if helpful.

Thankyou,

Regards.

Read only

Former Member
0 Likes
620

hI Sreeram,

Copy and Execute the below code then ur problem is solved ok.

DATA: STR TYPE STRING VALUE 'abcdefghij',

STR1 TYPE STRING.

STR1 = STR+4(6).

WRITE: / STR1.

Award points if helpful.

Kiran Kumar.G.A