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

how to restric length of string

hi

i m getting name of vendor from table i want to restrict upto 15 character

is there any keyword to restrict length up to 15 character .

if any solution than suggest me.

thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 07:44 AM

    use the offset option for display upto 15 characters .

    <b>write:/ name+0(15).</b>

    regards,

    vijay.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2007 at 07:43 AM

    Offset.

    If u want to take 6from matnr.

    v_matnr = mara-matnr+0(6).

    U can use <b>+0(15)</b>

    DATA: string(30) TYPE STRING VALUE 'Test this_program'.
    
    DATA: v_string(10) TYPE STRING.
    
    v_string = string+0(10).
    
    Write:/ v_string.

    Output will be:

    <b>Test this_</b>

    Reward points if this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 07:50 AM

    JUST DECLARE THE VAR

    DATA : NAME(15).

    NOW TAKE THE DATA IN NAME IT WILL TAKE ONLY FIRST 15 CHAR AND REST WILL BE TRUNCATED.

    IN DISPALY IF YOU WANT TO SHOW.

    WRITE : /(15) ITAB-NAME1.

    REGARDS

    SHIBA DUTTA

    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.