cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax check FM RS_SYNTAX_CHECK is not working for function module

Suryaji26
Participant

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

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

'SAPL...'

Answers (2)

Answers (2)

Suryaji26
Participant
0 Kudos

resolved.

.

.

.

..

mayur_priyan
Active Participant
0 Kudos

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