Skip to Content
avatar image
Former Member

Is it possible to delete leading zeros of characteristic values with FOX Formula in BI-IP

Hi all,

Is it possible to delete leading zeros of characteristic values with FOX Formula in BI-IP?

Thanks in advance and best regards

Gerd

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 20, 2016 at 06:32 PM

    Hi Gerd,

    it should be possible with a combination of SUBSTR and DO. Something like the following (not tested).

    Best,

    Marc

    Product Management SAP HANA DW

    L = STRLEN( var ).
    N = 0.
    DO L TIMES.
      S = SUBSTR( var, 1, 1 ).
      IF S = '0'.
        N = N + 1.
        var = SUBSTR( var, 2, L - N ).
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 03, 2016 at 09:34 AM

    Thanks a lot

    Add comment
    10|10000 characters needed characters exceeded