Skip to Content
author's profile photo Former Member
Former Member

Minus Sign

Hi Group,

In designing I have one element with value 19- ,I need to conver it in to -19 ,

Can any body suggest how to do this using UDF.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 12:52 PM

    Hi swabap,

    best is to google with

    java split array

    if after the split

    array.length = 1 --> no minus wa found

    if

    array.length = 2

    then return = '-'+ arry[1].

    Regards Mario

    Regards Mario

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 08, 2007 at 12:56 PM

    Hi Swabap,

    you can do that with standard function "substring". Plz have a look to Standard" target="_blank">http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm">Standard Functions

    Regards,

    Udo

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 08, 2007 at 12:59 PM

    First use the java function ReplaceString("originalString","replacement") on your value and replace the Minus with "". Then use concat your "old"value with the minus: valNew = "-".concat(valOld);

    Hope this helps.

    Dominic

    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.