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

ABAP datatype..

Hello,

I am doing following operation.

temp_buzei = '001'.

i_output-buzei = temp_buzei.

w_buzei = temp_buzei + 1.

w_buzei is defined same as temp_buzei.

I want '002' in w_buzei but I am getting on '2'. How can I get '002' even after addition ?

Regards,

Rajesh.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Aug 04, 2008 at 03:16 PM
    data: temp_buzei(3) type n,
           w_buzei(3) type n.
    
    temp_buzei = '001'.
    i_output-buzei = temp_buzei.
    w_buzei = temp_buzei + 1.
    write w_buzei.
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2008 at 02:33 PM

    Hi

    It depends on how temp_buzei is defined: it should be TYP N of 3 chararcters:

    TEM_BUZEI(3) TYPE N.

    Max

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2008 at 03:01 PM

    hi,

    you can use conversion_exit_alpha_output.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 04, 2008 at 03:12 PM

    Hi

    DATA :

    w_n1(3) TYPE n VALUE '001',

    w_n2(3) TYPE n .

    w_n2 = w_n1 + 1.

    WRITE :

    / w_n2.

    Regards

    Pavan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 04, 2008 at 03:16 PM

    SHIFT w_buzei right deleting TRAILING space.

    TRANSLATE w_buzei USING ' 0'.

    Amit.

    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.