2008 Jan 17 9:14 AM
hi guys,
what is sy-fdpos?? when can we use it in program??
how does it help??
Thanks
2008 Jan 17 9: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
hi guys,
what is sy-fdpos?? when can we use it in program??
how does it help??
Thanks
2008 Jan 17 9:17 AM
Hi,
check the below link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3516358411d1829f0000e829fbfe/content.htm
Regards,
Nagaraj
2008 Jan 17 9: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.
2008 Jan 17 9: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
2008 Jan 17 9:38 AM
sy-fdpos for Character strings gives offset in character string.
2008 Jan 17 9: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....
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |