Skip to Content

Issue with STRLEN

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

Sans titre2.png (15.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    Posted on Aug 29, 2013 at 01:45 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 01:27 PM

    Hi Amine,

    could you try :

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

    ?

    regards

    Fred

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 01:35 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2013 at 01:35 PM

    Hi,

    try this:

    lgn = strlen(antec) - 1.

    antec+lgn(1) = 0.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 01:59 PM

    Hi Amine,

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

    strlen( antec )

    Marcus

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 29, 2013 at 02:04 PM

    Thanks guys.

    I found in the meantime my answer in this thread:

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

    Assigned points anyways 😊

    Amine

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.