2015 Apr 15 8:49 AM
hello all,
in the below function module i am passing POSID to get PSPNR...
if lv_posid is NOT INITIAL.
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_INPUT'
EXPORTING
INPUT = lv_posid
IMPORTING
OUTPUT = lv_pspnr
EXCEPTIONS
NOT_FOUND = 1
OTHERS = 2
endif.
my question is if lv_posid = 'E-B'
then it is throwing error
how do i catch this error (its not possible to c atch with sy-subrc)...
thanks in advance....
2015 Apr 15 9:49 AM
Hi - Please check the below code, especially line no 10
DAta : v_message TYPE char255.
IF sy-subrc <> 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = '-D'
no = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = v_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
* HERE you can take the V_MESSAGE
ENDIF
ENDIF
endif
2015 Apr 15 9:49 AM
Hi - Please check the below code, especially line no 10
DAta : v_message TYPE char255.
IF sy-subrc <> 0.
CALL FUNCTION 'FORMAT_MESSAGE'
EXPORTING
id = sy-msgid
lang = '-D'
no = sy-msgno
v1 = sy-msgv1
v2 = sy-msgv2
v3 = sy-msgv3
v4 = sy-msgv4
IMPORTING
msg = v_message
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
* HERE you can take the V_MESSAGE
ENDIF
ENDIF
endif
2015 Apr 16 7:56 AM
2015 Apr 15 12:04 PM