cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Function module is not active

Astashonok
Participant
0 Likes
6,761

I cannot run VIEW_KUAGV FM, because it throws the error Function module VIEW_KUAGV is not active

however, I see that the module is active and moreover it is executed by system when creating sales order in VA01 for partner determination.

How that could be? Why it cannot be ran manually?

Accepted Solutions (1)

Accepted Solutions (1)

VeselinaPeykova
Active Contributor

I encountered the same problem with this FM and I think that I managed to fix it in a sandbox system. Still, I am not sure that this is the right way to handle the problem. Also, I have not tested the outcome very extensively (so far no problems encountered with order creation).

I found that the reason why the message that the function module is not active despite that it is shown in SE37 as active, was that in table ENLFDIR for VIEW_KUAGV the field ACTIVE was not 'X', while for the rest of the function modules in function group V05E ACTIVE was set to 'X'.

I came across note 781680 - SDCC/ SDCCN - Problems with function modules where they mentioned FM RS_FLIB_ENLFDIR_ACTIVE_CONSIST. I ran this FM with parameters UPDATE_ENLFDIR = 'X' and FUNCTION_GROUP = 'V05E', as a result of which now I can get to test mode of VIEW_KUAGV in SE37.

Edit: I forgot to mention - my system is ECC6, EHP4.

Sandra_Rossi
Active Contributor
0 Likes

It looks like a bug described and corrected by the note 2101855 - Function module cannot be tested after repair of a function group.

VeselinaPeykova
Active Contributor

sandra.rossi, yes, it makes more sense to implement correction notes instead of executing function modules to correct inconsistencies. Unfortunately, in my case SAP_BASIS is 701.

I am not sure that he root cause described in the note corresponds to what might have happened in my system. The chances of someone repairing manually multiple function groups where ENLFDIR entries were missing for some function modules, are quite low.

Still, using FUNC_OBJECT_ACTIVATE for the problematic function module also seems to fix the problem (to my surprise, it turned out that there are a few more function modules from other function groups with the same problem as described by the OP, so I was able to try the proposed workaround).

Astashonok
Participant
0 Likes

Thanks, Veselina, your approach worked brilliantly. I also have 7.01 system so my problem seems the same as yours.

Astashonok
Participant
0 Likes

BTW I have more than 1000 inactive FMs in table ENLFDIR, is it normal? Is ENLFDIR a generally accepted way of enabling-disabling the FMs or more like a dirty trick? Should I repair them all or forget it?

VeselinaPeykova
Active Contributor
0 Likes

Pavel AstashonokI cannot really say if 1000+ is normal, in our sandbox there are less inactive FMs.

I think that the use of FUNC_OBJECT_ACTIVATE is more of a "dirty trick" to fix an inconsistency. Just because there is an entry with an inactive FM in ENLFDIR it does not mean that there is some an inconsistency that needs to be fixed. My guess is that this is not the sole criterion that determines if there is a problem or not. Unfortunately, my knowledge on this subject is very limited (I am just a functional consultant). Maybe other community members can provide some insight how one can find out if there is an inconsistency.

In a real system I would probably use such approach only if SAP explicitly recommends it for a certain function module. For example, I do not dare touching RV_INVOICE_CREATE 🙂

Answers (2)

Answers (2)

RemiKaimal
Active Contributor

Try setting a break-point at the function module : RS_FUNCTION_ACTIVE_CHECK, and check what you get.
If you look at the attributes of the function module it says it’s “Not released”.

FredericGirod
Active Contributor

Not active is an attribute of hte code, meaning the last updated code has not been compiled (even if in abap there is no compiler).

Not released is a functional attribute of hte FM, meaning, if you are not SAP developper, you should not use it

Astashonok
Participant
0 Likes

PRICING module is also marked as Not released, but it is perfectly runnable programmatically as well as from SE37, so it's not the case.

kartikrajag
Participant
0 Likes

I'm testing this FM in S/4 HANA 1909 , its working for me.

Astashonok
Participant
0 Likes

yes, seems like relese-dependent issue