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

How do I leave a line?

I have this code.

-


LOOP AT ZLES_INT_ITAB INTO WA_B.

WRITE 'The object id '.

WRITE WA_B-ID.

WRITE ' is mandatory'.

ENDLOOP.

-


I am suppose to have an output of like this:

The object id 4 is mandatory.

The object id 5 is mandatory.

However my output is like this:

http://img255.imageshack.us/img255/4567/errorbp3.png

How am I suppose to get the output that I want?

I will reward any answers that can sort of solve my problems

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 02:54 AM

    Hi,

    Write as follows:

    LOOP AT ZLES_INT_ITAB INTO WA_B.

    WRITE: / 'The object id ', WA_B-ID, 'is mandatory'.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 03:07 AM

    I tried using this code:

    -


    LOOP AT ZLES_INT_ITAB INTO WA_B.

    WRITE: / 'The object id ', WA_B-ID, 'is mandatory'.

    ENDLOOP.

    -


    It leave a line but there is a spacing there.

    My output: http://img405.imageshack.us/img405/9264/error2hc7.png

    How am i suppose to get rid of that spacing?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      If WA_B-ID is a character field then CONDENSE the data (removing the spaces). Can you tell me what is the legth of the field (WA_B-ID)?

      Do as follows:

      LOOP AT ZLES_INT_ITAB INTO WA_B.

      CONDENSE wa_b-id NO-GAPS.

      WRITE: / 'The object id ', WA_B-ID, 'is mandatory'.

      ENDLOOP.

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 02:55 AM

    Add a New line feed before the first write

    LOOP AT ZLES_INT_ITAB INTO WA_B.

    WRITE : / 'The object id ' , WA_B-ID , ' is mandatory'.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:05 AM

    Juz,

    1. check the field type of object id .If it is char

    DATA : v_string(200).

    CONCATENATE 'The object id ' WA_B-ID

    'is mandatory' INTO v_string SEPARATED BY SPACE.

    LOOP AT ZLES_INT_ITAB INTO WA_B.

    WRITE: / 'The object id ', WA_B-ID, 'is mandatory'.

    ENDLOOP.

    2. If it is integer

    DATA : v_string(200),

    v_char (take length of object id).

    MOVE : WA_B-ID TO v_char.

    CONCATENATE 'The object id ' v_char

    'is mandatory' INTO v_string SEPARATED BY SPACE.

    LOOP AT ZLES_INT_ITAB INTO WA_B.

    WRITE: / 'The object id ', WA_B-ID, 'is mandatory'.

    ENDLOOP

    Don't forget to reward if useful.....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2008 at 04:09 AM

    Hi,

    Write this inside the loop to get the desired results.

    WRITE :/ 'The object id '.

    WRITE WA_B-ID.

    WRITE ' is mandatory'.

    Cheers,

    Ira

    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.