‎2011 Jul 21 8:40 AM
Hi i am getting Statement not accessible syntax error at the Call Function Statement,(bold line) for the following code. Can somebody clarify me why this is happening. Thanks in advance.
PROGRAM ZHR_FEATURE_RLPGR .
TABLES : PERNR.
TABLES : T74HG, PSKEY, T5UB3, T5UB9, T5UBT, T5UBA .
infotypes:0001,0021.
*
*
CALL FUNCTION 'EXIT_SAPLHRBEN00FEATURE_029'
EXPORTING
_PERNR = PSKEY-PERNR
_BEGDA = PSKEY-BEGDA
_ENDDA = PSKEY-ENDDA
_BAREA = T5UB3-BAREA
_BENGR = T5UBT-BENGR
_BSTAT = T5UB9-BSTAT
_BPLAN = T5UBA-BPLAN
_SUBTY = PSKEY-SUBTY
_OBJPS = PSKEY-OBJPS
IMPORTING
_RLPGR = T74HG-RLPGR
EXCEPTIONS
EVALUATE_FEATURE = 1
CUSTOMER_ERROR = 2
OTHERS = 3
‎2011 Jul 21 8:44 AM
‎2011 Jul 21 8:46 AM
Have created a project in cmod for enhancement PBEN0029 actived it..?
Nabheet
‎2011 Jul 21 9:41 AM
‎2011 Jul 21 8:48 AM
‎2011 Jul 21 9:17 AM
have you written any form .. endform.. before CALL FUNCTION.. ??
‎2011 Jul 21 9:42 AM
‎2011 Jul 21 9:47 AM
Can you take the object list and check if anything related to it is inactive ?
‎2011 Jul 21 10:03 AM
Hello Aksha,
BTW are you trying to call this "exit module" is a custom code? Why?
BR,
Suhas
‎2011 Jul 21 10:21 AM
Hi Suhas,
Its a pre-written program. I am working checking this as a part of upgrade from 4.6 to 6.0.
‎2011 Jul 21 10:35 AM
Hi,
Try with as below.
CALL FUNCTION 'EXIT_SAPLHRBEN00FEATURE_029'
EXPORTING
_pernr =
_begda =
_endda =
_barea =
_bengr =
_bstat =
_bplan =
_subty =
_objps =
iscobra =
_nontx =
IMPORTING
_RLPGR =
EXCEPTIONS
EVALUATE_FEATURE = 1
CUSTOMER_ERROR = 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.
Ram.
‎2011 Jul 21 12:00 PM
Hi,
Statement not accessible is no syntax error. It just means that the logic of the program will under no circumstances process the statement. If you put an EXIT before the statement, then this is the reason.
Additionally, if you call an active function defined in an active project defined and activated in transaction CMOD project in a Z program, this does not make much sense. I don't even know if this is allowed by the enhancement framework.
Do better: Create you own Z function that may be called by your Z program or in the EXIT function.
Regards
Clemens