Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Statement Not Accessible for a FM

Former Member
0 Likes
1,334

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

11 REPLIES 11
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
1,159

Have you activateed the enhancement in CMOD SMOD..?

Nabheet

Read only

0 Likes
1,159

Have created a project in cmod for enhancement PBEN0029 actived it..?

Nabheet

Read only

0 Likes
1,159

Hi Nabheet

Yes its done and is active.

Read only

Former Member
0 Likes
1,159

***

Edited by: GuruCharan on Jul 21, 2011 1:18 PM

Read only

lijisusan_mathews
Active Contributor
0 Likes
1,159

have you written any form .. endform.. before CALL FUNCTION.. ??

Read only

0 Likes
1,159

Hi,

No " Form--endform" bfore that.....

Read only

0 Likes
1,159

Can you take the object list and check if anything related to it is inactive ?

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,159

Hello Aksha,

BTW are you trying to call this "exit module" is a custom code? Why?

BR,

Suhas

Read only

Former Member
0 Likes
1,159

Hi Suhas,

Its a pre-written program. I am working checking this as a part of upgrade from 4.6 to 6.0.

Read only

Former Member
0 Likes
1,159

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.

Read only

Clemenss
Active Contributor
0 Likes
1,159

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