2015 May 11 12:27 PM
Hello all,
Actual recently i got a very complex requirement. i have to developed bulk smart forms syntax check program. but i did not find and standard class or functional module for this purpose in sap.
we already developed mass syntax check program for SE38 reports objects but current requirement for SAP smart forms.
Currently my requirement is just find out any class or functional module which can check syntax errors in smart forms .
So please guide me to achieve this scenario.
thanks in advance.
2015 May 11 3:05 PM
Smartform can be checked using the object for the class CL_SSF_FB_SMART_FORM.
DATA: l_sform TYPE REF TO cl_ssf_fb_smart_form.
data: check_ob_global type ref to cl_ssf_fb_check.
data: l_ex_check type ref to cx_ssf_fb_check.
CREATE OBJECT sform.
formname = 'ZTEST_NP'.
CALL METHOD sform->load
EXPORTING
im_formname = formname
im_language = sy-langu.
try.
call method sform->check
exporting global_check_flag = 'X'
changing check_object = check_ob_global.
catch cx_ssf_fb_check into l_ex_check.
check_ob_global = l_ex_check->check_object.
"l_ex_check->ERROR_TABLE would have all the errors
endtry.
Regards,
Naimesh Patel
2015 May 11 12:54 PM
2015 May 11 1:02 PM
Hi Vipul,
can't you use the logic if the smartform is not active then there is error.for this u need to write code you can also search with tables STXF* to get the activation field..
just try it..if you get it do share...
vishnu
2015 May 11 3:05 PM
Smartform can be checked using the object for the class CL_SSF_FB_SMART_FORM.
DATA: l_sform TYPE REF TO cl_ssf_fb_smart_form.
data: check_ob_global type ref to cl_ssf_fb_check.
data: l_ex_check type ref to cx_ssf_fb_check.
CREATE OBJECT sform.
formname = 'ZTEST_NP'.
CALL METHOD sform->load
EXPORTING
im_formname = formname
im_language = sy-langu.
try.
call method sform->check
exporting global_check_flag = 'X'
changing check_object = check_ob_global.
catch cx_ssf_fb_check into l_ex_check.
check_ob_global = l_ex_check->check_object.
"l_ex_check->ERROR_TABLE would have all the errors
endtry.
Regards,
Naimesh Patel
2015 May 12 7:13 AM
2015 May 13 7:58 AM
thanks naimesh, its works
but how to read l_ex_check->ERROR_TABLE into internal table. bec i have to generate alv report on based on these errors
2015 May 13 1:54 PM
ERROR_TABLE would provide you all the information. You can get them like this.
data: l_ex_check type ref to cx_ssf_fb_check.
data: ls_error like line of l_ex_check->ERROR_TABLE.
loop at l_ex_check->ERROR_TABLE into ls_error.
"FORMNAME
lv_page_name = ls_error-page_node->get_name( ).
lv_element = ls_error-node->get_name( ).
"NAME
"FIELDNAME
"CLASS - message class
"MSG
ENDLOOP.
Regards,
Naimesh Patel
2015 May 15 5:30 AM
Hello Naimesh,
thanks for ur help.
actually i have one more issue, i also required some way to check obsolete statement in the smart forms, so there is any way for this.