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

ANY FUNCTION MODULE TO ADD LEADING ZEROS FOR A CHARACTER FIELD

THE CHARACTER FIELD IS OF LENGTH 40 AND IT HAS 5 NON NUMERIC CHARACTERS

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Nov 22, 2007 at 01:36 PM

    You can use OVERLAY statement.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 01:41 PM

    Hi

    CONVERSION_EXIT_ALPHA_INPUT

    use this fm

    Regards

    Sreenivas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 01:41 PM

    Hi Rajitha,

    User FMs CONVERSION_EXIT_<Conversion Routine>_INPUT and CONVERSION_EXIT_<Conversion Routine>_OUTPUT.

    Regards,

    Satish

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 02:02 PM

    Hi ,

    Try this

    DATA : c4(40).

    data : P_FIELD(40) TYPE N.

    UNPACK P_FIELD to c40.

    <b>Reward Points if useful</b>

    Regards

    Saket Sharma

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 02:07 PM

    Run your field thru CONVERSION_EXIT_ALPHA_INPUT FM.

    
    
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         =  itab-matnr  "your field 
     IMPORTING
       OUTPUT        =   itab-matnr
              .
    
    

    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.