Skip to Content
0

Syntax check FM RS_SYNTAX_CHECK is not working for function module

Oct 17, 2016 at 07:02 AM

334

avatar image

Hi Team,

I am creating a remediation tool.

In which I have to compile remediated code, for that I am using FM RS_SYNTAX_CHECK its working fine for Programs,Classes, but not working for function module.

example:

when running the same RS_SYNTAX_CHECK for any program with the below paramters
objname = ZHCL_ATC_TRANS_FRQ(main pgm)
sobjname = ZHCL_ATC_TRANS_L01(include)

CALL FUNCTION 'RS_SYNTAX_CHECK'
EXPORTING
i_global_check = 'X'
i_global_program = ls_final-objname
i_program = ls_final-sobjname
* I_WITH_DIALOG = ' '
IMPORTING
o_error_line = lv_error_line
o_error_message = lv_message
o_error_offset = lv_error_offset
TABLES
i_source = gi_content.

there is no error line and syntax check is successfull.
.when running the same RS_SYNTAX_CHECK for function modules with the below paramters
objname = ZDEMO_FUGR1,(function group)
sobjname = LZDEMO_FUGR1F01(function module)

CALL FUNCTION 'RS_SYNTAX_CHECK'
EXPORTING
i_global_check = 'X'
i_global_program = ls_final-objname
i_program = ls_final-sobjname
* I_WITH_DIALOG = ' '
IMPORTING
o_error_line = lv_error_line
o_error_message = lv_message
o_error_offset = lv_error_offset
TABLES
i_source = gi_content.

getting error line "You cannot use the statement "FUNCTION" in the current environment. However, you could use the similar statement "FUNCTION-POOL"."

Please suggest me the correct Function module or method to achieve this. Thanks,Surya

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Martin Shinks Oct 17, 2016 at 07:57 AM
2

You need to give the program name of the Function Group and not the function group itself. Program should begin with

'SAPL...'

Share
10 |10000 characters needed characters left characters exceeded
Surya Yadav Feb 03, 2017 at 06:58 AM
-2

resolved.

.

.

.

..

Share
10 |10000 characters needed characters left characters exceeded
Mayur Priyan Oct 17, 2016 at 09:34 AM
0

Hi,

Try using the Program name (Function Group) and Include ( Function Module) mentioned Attributes tab of that particular Function Module to get the actual technical value to be used in RS_SYNTAX_CHECK FM.

Regards,

Mayur Priyan. S

Share
10 |10000 characters needed characters left characters exceeded