Skip to Content
avatar image
Former Member

sy-fdpos??

hi guys,

what is sy-fdpos?? when can we use it in program??

how does it help??

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 17, 2008 at 09:30 AM

    Hi,

    When you are using string operations like CS or CA or COetc then you need to check if letters in other variable are present in first variable or not and if present position of that point is given by sy-fdpos.

    L1 = 'ABC?DGHI'

    L2 = ' ? '

    NOW if you check L1 CS L2 then

    sy-fdpos will return as 4 bcoz ? is at fourth position.

    Reward if useful.

    Madhura

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17, 2008 at 09:44 AM

    Hi

    SY-FDPOS is used the search the string.

    while searching in a string for a particular character, if that character is there in that strin sy-fdpos gives the position where that character is present in the string.

    SY_FDPOS is a system field which maintains the current position for the characters.

    for ex when u want to search a character or a string then sy-fdpos is useful for u.

    if helpful reward some points.

    plzz reard if it is useful....

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17, 2008 at 09:17 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17, 2008 at 09:19 AM

    The system field SY-FDPOS contains the length of Field.

    pls follow the below code.

    data:

    l_values(11) type c value '0123456789.'.

    if v_string co l_values.

    "Then your string variable V_STRING contains only 0-9 or dot'

    else.

    "Then the string variable V_STRIN contains at least one some other value"

    endif.

    If the comparison is true, the system field SY-FDPOS contains the length of <f1>. If it is false, SY-FDPOS contains the offset of the first character of <f1> that does not occur in <f2>

    reward if useful.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 17, 2008 at 09:38 AM

    sy-fdpos for Character strings gives offset in character string.

    Add comment
    10|10000 characters needed characters exceeded