Application Development 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: 

ABAP : functional module is not activated

former_member226520
Participant
0 Kudos

Dear Friend,

There is a fictional module EXIT_SAPLKAEP_001 , I have to do some

coding in its include ZXKAEPU01.

but when I am activating then it is showing errors that FM is not open

and function module name is disabled .

and when I am clicking on change mode then source code then FM

name is visible .but again when I am activating this then it is

showing me error LXKAEPU01 in source code "Nesting not correct: The "ENDFUNCTION" statement has no open control structure"

"starting with "FUNCTION". "FUNCTION". "FUNCTION". "FUNCTION". "FUNCTION".

This error message is occured .

How can I solve this error .Please suggest.

Regards,

Rihan

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Rihan,

In the functional module  EXIT_SAPLKAEP_001 you will have the  Include ZXKAEPU01.

Please follow these steps :

1. Double click the Include.

2. You will get a warning message press ENTER

3. Need a Package

It will work

Thanks,

Pradeep.

12 REPLIES 12

former_member186491
Contributor
0 Kudos

Hi Rihan,

It seems that you are working on Customer-Exits.

If yes, this sort of errors can happen because you must be trying to get into Change-Mode once you are on the Screen - that shows this Include.

Actually, you need to proceed like this -

  1.)  Double Click on Include ZXKAEPU01 - DON'T TRY TO CHANGE THE MODE.

  2.) Info-Message in the Status-Bar will come.

  3.) You need to Press ENTER and this will give you Pop-Up to Save in Package.

  4.) Afterwards, you would be in the correct screen and that would be in Change Mode.

Here, you need to code and eventually Activate.

Please correct me if I am wrong.

Thanks.

Kumar Saurav.

0 Kudos

Dear ,

yes I am  working on Customer-Exits.I have done that as you said , but once the

error occurred , Now this error is not going , now how can I come out by this

error.

When I am going in this function module then the name of function module like this :

FUNCTION EXIT_SAPLKAEP_001 . is not displayed that's why this error is occurred .

so how can I come the name of function module name in source code.

Please suggest .

Regards,

rihan

0 Kudos

Hi,

showing me error LXKAEPU01 in source code "Nesting not correct: The "ENDFUNCTION" statement has no open control structure"

"starting with "FUNCTION". "FUNCTION". "FUNCTION". "FUNCTION". "FUNCTION".

This "Incorrect Nesting" problem usually happens when any Re-Usable Unit is defined within some Different Re-Usable Unit.

For Ex - If we are defining One FM and if we try to Define one Subroutine within that; then this creates such error.

going by Ex -

FUNCTION abc.

------

------

FORM xyz.

  ...........

  ...........

ENDFORM.

--------

--------

ENDFUNCTION.

If such requirement comes, we can go by this way instead -

FUNCTION abc.

------

------

PRFORM xyz.

--------

ENDFUNCTION.

and after ENDFUNCTION, we need to define Sub-Routine as below -

FORM xyz.

  ...........

  ...........

ENDFORM.

Please check if there is any re-usable unit within FUNCTION ........  ENDFUNCTION and if so, just rectify.

Hope this COULD BE one problem.

Please update.

Thanks.

Kumar Saurav.

Former Member
0 Kudos

Hi Rihan,

In the functional module  EXIT_SAPLKAEP_001 you will have the  Include ZXKAEPU01.

Please follow these steps :

1. Double click the Include.

2. You will get a warning message press ENTER

3. Need a Package

It will work

Thanks,

Pradeep.

0 Kudos

Dear Pradeep and Kumar,

You are not getting the requirment , this is customer exit , and this is not activate ,

this is not in edit mode then how can I write perform or form operation , if it will

be in editable node then I will put the fuction module name in starting with the function

and the error will be resolved .But when I am going se37 and I am giving the name of FM

EXIT_SAPLKAEP_001 and I am trying to activate then error occurs , no open structure

is for end function .and the name of the FM is disabled in source code , so when

I click on change mode then still i can not write anything it is not in editable mode ,

So before going to include I have to activate the FM,

Hope you have got to me .

Please help me.

Rihan

0 Kudos

In the function module attributes there is a check box EDIT LOCK . If its checked and if you are logging in different user you cannot able to go to edit mode.

0 Kudos

yes i am getting your point but if you can provide the actual screenshot it will be more good.

0 Kudos

yes Mr Pradeep.

there is a check box EDIT LOCK, but how can I remove this error now .and how can I activate my function module.

Regards,

rihan

0 Kudos

Hi,

U cannot activate the FM,as it is sap standard one it is always in active mode only. You can need  to activate only the include.If the FM is not active check for OSS notes.

Thanks

Vamshi

0 Kudos

I am sorry rihan... The problem might be simple i hope . But we need a clear screen shot of the functional module.

0 Kudos

The FM will always be in active status only. Only inside the ZX--- include you will put code and activate.

Please find the snapshot below.

0 Kudos

Dear Friend

the issue has been solved , the reason was I did the FM on change

mode for that a workbench request has been created , then I have released

the request and then activated the FM with the new request then

the error has gone and the problem has been solved.

one thing to remember that we have to write the code in include

so do not go to the change option of the FM

thanks a lot to all of you for your full support.

regards,

Rihan