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

explsnstion of given sentence that is wat is +2(5) in

ASSIGN CFELD25+2(5) TO <FS1>.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Mar 01, 2007 at 11:20 AM

    +2(5) means you are extracting 5 chracters from a string starting from 2nd position.

    if cfeld = '1234567890',

    then cfeld+2(5) will be '34567'

    REgards,

    Ravi

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 01, 2007 at 11:21 AM

    It is an offset of CFIELD. A 5 character string starting from the next position after the 2nd character.

    ~Suresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 11:21 AM

    hi,

    this is nothing but offset declaration

    here <fs1> will have data which is 2 characters away and its length is 5 from 2nd position onwards.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 11:21 AM

    Hello,#

    This mean ofset and length Specification

    Offset/Length Specifications 
    No length specifications less than or equal to zero 
    
    For offset/length access to fixed-length fields, length specifications less than or equal to zero are not allowed. 
    
    Error message in ABAP Objects if the following syntax is used: 
    
    MOVE f+off(0) TO g. 
    MOVE f+5(-2) TO g. 
    
    Reason: 
    
    The length of a field section is always a positive amount. Fields with a fixed length of zero are not supported in ABAP. A fixed-length field always has a minimum length of one. 
    
    Note: 
    
    As of Release 4.6A the data types STRING and XSTRING for variable-length character or byte sequences are available. Empty character and byte sequences have a length of zero. Offset/Length accesses with zero length specifications have not been implemented yet for character and byte sequences. 
    
    

    If useful reward.

    Vasanth

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 01, 2007 at 11:22 AM

    this is using OFFSET

    From 2nd character of length 5 it will store in field symbol

    IF CFIELD25 is '0123456789'

    <FS> will contain 23456

    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.