Hello,
In my ONREQUEST event I have the following FORM
FORM REPLACE_STRING USING STRING TEMPLATE NEW.
CALL FUNCTION 'SDIT_REPLACE_STRING'
EXPORTING
IN_STRING = STRING
NEW = NEW
TEMPLATE = TEMPLATE
IMPORTING
OUT_STRING = STRING.
ENDFORM. "REPLACE_STRING
However when running a check on the code I get the error:
"Statement ENDMETHOD is missing"
Is it not possible to use a FORM in the event handler in a BSP?
Your problem is that your BPS page is actually an ABAP OO class. All the event handlers are actually methods of this class. Therefore anything you program in these event handlers has to follow the rules for ABAP OO. Forms are not really valid constructs inside ABAP OO Methods. What you are trying to do is similar to trying to declair a new form within an existing form.
Form Test1.
Form Test2.
endform.
endform.
Add a comment