‎2009 Oct 29 7:06 AM
Hi Friends,
I have requirement where i need yo find all the internal table declarations in my programe and check whether they start with it_.
Thanks,
Urmila.T
‎2009 Oct 29 7:15 AM
Hi,
Use this statement for getting all declarations and keywords used in a report
SCAN ABAP-SOURCE report
TOKENS INTO tokens_all
STATEMENTS INTO statements
LEVELS INTO levels
KEYWORDS FROM keywords
WITH ANALYSIS
Regards,
Lakshman.
Edited by: Lakshman N on Oct 29, 2009 8:15 AM
‎2009 Oct 29 7:13 AM
So whats your question here? Except manually scanning the program i dont think there is any other way
‎2009 Oct 29 7:15 AM
Hi,
Use this statement for getting all declarations and keywords used in a report
SCAN ABAP-SOURCE report
TOKENS INTO tokens_all
STATEMENTS INTO statements
LEVELS INTO levels
KEYWORDS FROM keywords
WITH ANALYSIS
Regards,
Lakshman.
Edited by: Lakshman N on Oct 29, 2009 8:15 AM
‎2009 Oct 29 7:15 AM
READ REPORT... is the statement used to read the contents of ur program into an internal table.Press F1 on it for syntax and documentation.
Now loop that internal table and for each line check whether it conatins the string(CS) type standard table of... if so the check whether the internal table name begins with it_ or not for this u can split that particular line at space into different variables or any internal table and then u can check it.
Regards,
Shafivullah Mohammad
‎2009 Oct 29 7:16 AM
Use program RPR_ABAP_SOURCE_SCAN and SEARCH for the string you required.
‎2009 Oct 29 7:22 AM
and how would you specify that it has to look for internal tables NOT starting with 'IT_'?
‎2009 Oct 29 7:31 AM
Thats why even i dint suggest RPR_ABAP_SOURCE_SCAN. Lets see what Gautam has to say
‎2009 Oct 29 7:16 AM
‎2009 Oct 29 9:08 AM
Internal tables data declarations start with "begin of"or have a statement with "occurs" in the data declaration.
You can scan your report(s) on those statements.
regards, Léon Hoeneveld
‎2009 Oct 29 9:29 AM
Not if you first declare table types and then declare the internal tables referencing the table types.
What the OP wants to do might be covered by the code inspector naming convention check, tx SCI.
Thomas
‎2009 Nov 02 11:43 AM
‎2009 Nov 02 12:28 PM