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

Issue with STRLEN

Former Member
0 Likes
1,272

Hi experts,

I am facing an issue with an abap code on BW. I am trying to modify the last disgit of a record with '0'. For this i used function STRLEN but it doesen't work.

Thanks for your support.

Amine

1 ACCEPTED SOLUTION
Read only

former_member185177
Contributor
0 Likes
1,229

Hi Amine,

After the lgn = strlen(antec) - 1.

again you have to assign the value to antec.

              antec = antec+0(lgn).

Then concatenate the values as i said in earlier.

Please go through the link.

http://scn.sap.com/thread/3414620

Regards,

Krishna.

8 REPLIES 8
Read only

FredericGirod
Active Contributor
0 Likes
1,229

Hi Amine,

could you try :

MOVE '0' to antec+lgn(1).

?

regards

Fred

Read only

marcelogb
Participant
0 Likes
1,229

Hi Amine,

Why is it not working? Any error?

Which is the value of SOURCE_FIELDS_RULE-/BIC/ZBPN?

Anyway, if you already know the length of type /BIC/OIZBPN then you already know which is the last digit of the var.

Regards

Read only

Former Member
0 Likes
1,229

Hi,

try this:

lgn = strlen(antec) - 1.

antec+lgn(1) = 0.

Read only

former_member185177
Contributor
0 Likes
1,230

Hi Amine,

After the lgn = strlen(antec) - 1.

again you have to assign the value to antec.

              antec = antec+0(lgn).

Then concatenate the values as i said in earlier.

Please go through the link.

http://scn.sap.com/thread/3414620

Regards,

Krishna.

Read only

0 Likes
1,229

Hi Krishna,

I tried it but it doesen't work.

Normally STRLEN has to be in blue, which means it's reconized as a SAP function.

Any other options to bypass this issue please?

Thanks.

Amine

Read only

0 Likes
1,229

Hi Amine,  STRLEN( ANTEC ).  make sure there should be a space at start and end of your variable between the brackets.  Regards, Krishna.

Read only

Former Member
0 Likes
1,229

Hi Amine,

strlen is a function, you need spaces between the brackets:

strlen( antec )

Marcus

Read only

Former Member
0 Likes
1,229

Thanks guys.

I found in the meantime my answer in this thread:

http://scn.sap.com/thread/880269

Assigned points anyways

Amine