hi all,
I have make three smart forms, which is being called by one coding. Scenario of my coding is that i have restrict these three forms by MOVEMNT TYPE.
for example:
for 1st SMART FORM MOVEMENT TYPE is 101,105 & 321
for 2nd SMART FORM MOVEMENT TYPE is 122 & 124
for 3rd SMART FORM MOVEMENT TYPE is 201 & 261
Problem which i m facing in my coding is that when i want to display 2nd SMART FORM with ELSEIF condition,it will display me but when i want to display 3rd SMART FORM with ELSE codition it give me error: NO OPEN IF STATEMENT.Even though i uses ENDIF key word but still the error exist.Following are the code:
ELSE.
IF int_mseg-bwart = '201' or
int_mseg-bwart = '261'.
endif.
data: ftname(30) type c.
call function 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZCCCL_GOODS_RESERVATION'
IMPORTING
FM_NAME = ftname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
call function ftname
Exporting
MKPF = int_mkpf
ekko = int_ekko
lfa1 = int_lfa1
makt = int_makt
aufk = int_aufk
RKPF = int_RKPF
RESB = int_RESB
TABLES
MSEG = INT_MSEG
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
ENDIF.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks & Regards,
sappk25