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

OPEN HUB EXTRACTION AND LEADING ZERO

Hello Experts,

I need your help for solving an issue. I have to extract data from an open hub. one of ma fields has as properties Character string, Lenght= 25 and conversion routine= ALPHA.

When i do the extraction, in this fields, I have some leading zero in the file ( such as " 000024"), the issue is that I don't want this leading zero.

How Can I Do ???

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Oct 02, 2012 at 07:49 PM

    Hi,

    Please use LEFT DELETING LEADING in your transformation (Field routine) to handle leading zero's. Sample code is given below.

    DATA: VAR1 TYPE C LENGTH 25.

    VAR1 = SOURCE_FIELDS-XYZ.

    SHIFT VAR1 LEFT DELETING LEADING '0'.

    RESULT = VAR1.

    Thanks,

    Ranga.

    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.