Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SYNTAX-CHECK

Former Member
0 Likes
1,286

Hi Experts,

How to use SYNTAX-CHECK statement with in the function module?

Thanks,

Vickee.

10 REPLIES 10
Read only

Former Member
0 Likes
1,240

This message was moderated.

Read only

0 Likes
1,240

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.

Read only

Former Member
0 Likes
1,240

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

Read only

0 Likes
1,240

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."

Read only

0 Likes
1,240

That error will come if your function group is not activated.!

Read only

0 Likes
1,240

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

Read only

0 Likes
1,240

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.

Read only

0 Likes
1,240

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.

Read only

Former Member
0 Likes
1,240

T.code SLIN

Read only

ThomasZloch
Active Contributor
0 Likes
1,240

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