Skip to Content
author's profile photo
Former Member

Declaration of a character Variable of size 100 with '-' Character.

Hi All,

How can I declare a character variable of size 100 filled with ‘-‘ characters .

Data : customline(100) type C.

This variable should have only ‘-‘ without any spaces.

I want to make a line of this. To print at particular places.

If anyone has any idea, please revert .

Thanks

Mayank

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    author's profile photo
    Former Member
    Sep 29, 2005 at 08:07 PM

    Mayank,

    Pls reward me points if you find the solution given by me is as per your expectation.

    cheers

    Alok

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 09:53 AM

    data i_count type i,

    while i_count < 100

    concatenate customline '-' into customline.

    i_count = i_count + 1.

    endwhile.

    cheers,

    sasi

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 09:55 AM

    Hi

    Please try this & let me know.

    data: c(100) type c.

    c = sy-uline.

    This should work ! This is an efficient way of doing it !!

    regards,

    Pavan.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 29, 2005 at 09:59 AM

    Then u can use

    <b>

    WRITE: sy-uline.

    </b>

    U want to underline at some places know.

    Specify this at the place where u need to do so.

    Hope this helps.

    Kindly reward points for the answer which helped u.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 10:00 AM

    Try thhis.

    Data : customline(100).

    customline = sy-uline(100).

    Istead of declaring variable you can always use <b>sy-uline(100)</b>.

    Svetlin

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Sep 29, 2005 at 08:00 PM

    Hi Mayank,

    You can use WRITE statement for this.

    it should be like below-

    write at m(n) sy-uline.

    m from where (column number) you want to start the line and 'n' is till which column number you want this.

    I hope it should help you.

    Cheers

    Alok Varma

    Add comment
    10|10000 characters needed characters exceeded