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

How to deal with a too long variable?

Hi all,

In ABAP programming editor, the length of a line is limitted. So if a variable is too long to show in one line the variable will be separated into more than one line. Then we'll not pass through the syntax check. My question is how to deal with this situation. Thank you!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2005 at 06:47 AM

    Hi Zhang,

    What version of SAP are you on? If you are on 4.6 or higher, use transaction SE80 to write your code. When in SE80, hit the following menu path: Utilities->Settings.

    Then click onthe "ABAP Editor" Tab, then the "Editor" sub tab. Now make sure you select the Front End Editor. This should change your ABAP editor to have the same lookand feel of a MS Word document. Hopefully when you are in this mode, you willbe able to compile your code.

    Otherwise let us know.

    Cheers,

    Pat.

    PS. Kindly assign Reward Points to the posts you find helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2005 at 06:49 AM

    Hi,

    If you want to assign a long text, more than 70 characters, to a char variable, then you can use CONCATENATE stmt.

    concatenate

    '70 chars'

    '70 chars'

    into field.

    Svetlin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Rusev,

      In fact, I'm not going to CONCATENATE a list of objects but there is such a long variable name that can't be fitted into one line. This situation may arise when the depth of a structure is too deep, which may look like root_structure-child_structure-structure_information....

      What's more, thanks for your attention!

  • author's profile photo Former Member
    Former Member
    Posted on Sep 13, 2005 at 03:47 AM

    Hi

    You can use field symbols as well

    Cheers.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 14, 2005 at 02:57 AM

    hi, you can achieve it like this, very simple.

    data: str(1000) type c value

    '1111111111' &

    '2222222222' &

    '3333333333'.

    thanks

    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.