‎2010 Mar 02 9:27 AM
Hi Experts,
How to use SYNTAX-CHECK statement with in the function module?
Thanks,
Vickee.
‎2010 Mar 02 9:29 AM
‎2010 Mar 02 9:44 AM
Hi Nehruu,
Thanks for your quick response. I need to check syntax for a dynamic select query with in FM; I donu2019t have any report or program. How to achieve this?
Thanks,
Vickee.
‎2010 Mar 02 9:47 AM
Hi,
Please see below,
C195_TEST_SYNTAX_CHECK
C1F0_PHRID_SYNTAX_CHECK
CHECK_FORM_ITF_SYNTAX
RS_DISPLAY_SYNTAX_DIAGRAM
RS_CUA_INTERNAL_SYNTAX_CHECK
SEO_CLASS_CHECK_INCLUDE_SYNTAX
SEO_CLIF_GET_SYNTAX_INFO
EDITOR_SYNTAX_CHECK
‎2010 Mar 02 10:11 AM
I have no idea about this.I just want to use SYNTAX-CHECK statement to validate a dynamically generated select query.
Code:
APPEND 'DATA dir TYPE trdir.' TO itab.
APPEND 'SELECT SINGLE *' TO itab.
APPEND 'FROM trdir' TO itab.
APPEND 'INTO dir' TO itab.
APPEND 'WHERE name = sy-repid.' TO itab.
SYNTAX-CHECK FOR itab MESSAGE mess LINE lin WORD wrd.
When I run this ,it through the following error " REPORT/PROGRAM statement missing, or program type is INCLUDE."
‎2010 Mar 02 10:14 AM
That error will come if your function group is not activated.!
‎2010 Mar 02 10:54 AM
Hi pradeep,
Now I activated the group and FM. It gives " Statement is not accessible." error.
I checked wiht the code it is correct.What may be the reason.
Thanks&Regards,
Vicky
‎2010 Mar 02 11:43 AM
Hi Vicky,
It is a syntax error. That error comes when compiler is not able to understand a specific line of code. May be because some keyword or some event is missing.
‎2010 Mar 02 5:37 PM
Vicky,
It seems you are missing the 1st statement from the sample program. Add
APPEND 'PROGRAM test.' TO itab.at the beginning and see if that helps.
‎2010 Mar 02 10:16 AM
‎2010 Mar 02 5:56 PM
Next time, please decribe your problem in detail right away and use a meaningful subject line. Your initial description does not allow others to come up with a matching solution, instead everybody is guessing around, wasting time this way. My money is on Fred's reply. Thomas