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

Eliminating first to spaces

Hi All,

I am getting LV_WDELINUM by concatinating ideli-vbeln and ideli-ddeli. ideli-ddeli is 10 char field and first 2 spaces are zero's. If the value is '0031496750' I have to only concatinate '31496750', how can I eliminate first to spaces.

concatenate ideli-vbeln ideli-ddeli into lv_wdelno.

Thanks,

Veni.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 06:19 PM

    Hi,

    You can use below code :

    loop at ideli.
      SHIFT ideli-ddeli  LEFT DELETING LEADING '0'.
      modify ideli.
      clear ideli.
    endloop.
    

    Thanks,

    Sriram Ponna.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 06:20 PM

    Use 'SHIFT' command and deleting trailing zero.

    Read help on Shift. You can do that with the help.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 31, 2008 at 06:34 PM

    You can use the function module CONVERSION_EXIT_ALPHA_OUTPUT to remove the leading zeros, likewise you can use the function module CONVERSION_EXIT_ALPHA_INPUT to add them back.

    Regards,

    Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      The function module CONVERSION_EXIT_ALPHA_OUTPUT is preferable when your field may contain alpha numerics with significant leading zeroes. Serial number fields come to mind.

      Example:

      '00123' gets converted to '123'

      '00123A' gets converted to '00123A'

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.