Hi!
In BAPI what is that IF 1 = 2 concept.
Can u pls explain.
I give an eg.
SELECT SINGLE aufnr
FROM afko
INTO l_aufnr
WHERE aufnr = BAPI_ORDER_STATUS_IMPORT-orderid.
IF sy-subrc NE 0.
CLEAR message.
message-msgty = 'E'.
message-msgid = 'Z3'.
message-msgno = '000'.
message-msgv1 = BAPI_ORDER_STATUS_IMPORT-orderid.
PERFORM set_return_message USING message
CHANGING return.
IF 1 = 2.
The only reason to include this statement, that will obviously
never execute, is that it will create a referecence so that you
can find out where a particular message is being used. This
functionality is used by the BAPIs programmed by SAP
MESSAGE e000(z3).
ENDIF.
ENDIF.
CHECK return IS INITIAL.
.................................
................
Thanks