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

Sapscript alignment

Hi experts,

How can we give a space between each character of a word in sap script output?

Regards

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 Sep 12, 2007 at 07:47 AM

    Hi Ravi,

    Split the word using the "Split" command before insert to an internal table.

    To split a character string into two or more smaller strings, use the SPLIT statement as follows:

    SPLIT <c> AT <del> INTO <c1> ... <cn>.

    The system searches the field <c> for the separator <del>. The parts before and after the separator are placed in the target fields <c1> ... <cn>.

    To place all fragments in different target fields, you must specify enough target fields. Otherwise, the last target field is filled with the rest of the field <c> and still contains delimiters.

    If all target fields are long enough and no fragment has to be truncated, SY-SUBRC is set to 0. Otherwise it is set to 4.

    SPLIT LA CA USA AT ' ' INTO <c1>

    Thanks,

    Reward If Helpful.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 12, 2007 at 07:59 AM

    Ravi,

    If you want to give a space between &itab-matnr& and &itab-maktx& when displayed in the scripts output then you can use the TABS in PARAGRAPH FORMATS.There you can mention how many tabs should be equivalents to a space,you can define a single tab mean a space of 2 characters for example

    then ,, will give a two charcter space between those two text elements.

    &itab-matnr&,,&itab-maktx&.

    If any doubt revert it.

    K.Kiran.

    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.