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

Leading zeros are removed when uploading excel

Hi All,

I have created a program to send an email with an excel attachment but the leading zero's in excel are removed. can anybody suggest what can be done other than replace since that exceeds 255chars so i cant concatenate.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 07:43 AM

    Hi

    Try adding the character ' (single quote) before the actual value. Excel then treats the value as-is whithout conversion

    • character type for columns

    data: h_columns TYPE ole2_object,

    h_cell TYPE ole2_object.

    CALL METHOD OF excel 'Columns' = h_columns

    EXPORTING

    #1 = 'F:K'.

    set property of h_columns 'NumberFormat' = '@'.

    CALL METHOD OF excel 'Cells' = h_cell

    EXPORTING

    #1 = 14

    #2 = 7.

    SET PROPERTY OF h_cell 'Value' = '0001'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 23, 2007 at 07:32 AM

    Hi Shruthi,

    Use FM CONVERSION_EXIT_<Conversion Routine>_INPUT & CONVERSION_EXIT_<Conversion Routine>_OUTPUT on that field.

    Coversion Routine can be found at domain level of the field.

    Regards,

    Satish

    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.