2007 Jul 18 7:38 AM
i have written a program where in using a table names ,and their corresponding field i search for the fields in all Z--object..
the problem here is ,wen i search the strings which are not the exact match are also listed
Eg: if search string is kunnr....... it_kunnr is also listed.....which i dont want ....
i have used read report and then search
i have written a program where in using a table names ,and their corresponding field i search for the fields in all Z--object..
the problem here is ,wen i search the strings which are not the exact match are also listed
Eg: if search string is kunnr....... it_kunnr is also listed.....which i dont want ....
i have used read report and then search
2007 Jul 18 7:42 AM
Hi,
Which operator you are using to search the string.
regards
Azad.
2007 Jul 18 7:43 AM
Hi
You can straight away get that sort of data from the standard tables
DD02L (all Sap Tables) and DD03L (table Fields)
use them and get the required Info
Use SCAN ABAP-SOURCE...command
Or use the fun module
RPR_ABAP_SOURCE_SCAN
<b>Reward points for useful Answers</b>
Regards
Anji
2007 Jul 18 7:45 AM
hi Renu,
in order to compare strings, you can use CO (Contains Only).
here is quote of help in SAP
CO (Contains Only):
c1 contains only characters from the string c2.
If c1 or c2 is of type C, the comparison takes into account the full length of the field, including blanks at the end.
comparison.
If c1 is of type STRING and empty, the result of the comparison is always positive.
If c2 is of type STRING and empty, the result of the comparison is always negative, unless c1 is also an empty string.
If the result of the comparison is negative, the field SY-FDPOS contains the offset of the first character in c1 which is not also included in c2.
If the result of the comparison is positive, the system field SY-FDPOS contains the length of c1.
The comparison is case-sensitive.
Examples:
'ABCDE' CO 'XYZ' is false; SY-FDPOS = 0.
'ABCDE' CO 'AB' is false; SY-FDPOS = 2.
'ABCDE' CO 'ABCDE' is true; SY-FDPOS = 5.
please award point if helps
eddhie
2007 Jul 20 11:23 AM
here but im not comparing two string .....
im searching many report for the desire string ......
so fingding out fdpos is difficult for me ,can u give me a better solution
2007 Sep 06 10:13 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |