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

Problem with Function Pool

Former Member
0 Likes
1,898

Hi All,

As per some new requirement I've copied one standard function pool into my own function pool.when I'm calling one subroutine defined in this fuction pool through a user exit , it's not behaving the same way as when the same subroutine is called defined in the standard function pool.

While calling the subrouting using the copied function pool, the vaules are not getting passed and it's taking initial values.

Any help would be greatly appreciated.

Thanks.

Alok Varma

15 REPLIES 15
Read only

Former Member
0 Likes
1,741

They may be having values due to a previous call to another function module in the same function pool, in the standard one and when you copied it, that other call may be missing.

Can you tell which function pool you copied and if you copied all the function modules in there or just one or some? Also, verify the flag "global" on the attributes tab of the function modules copied. May be one or some of them needed to be global parameters.

Srinivas

Read only

0 Likes
1,741

The Function Pool, I copied is SAPLL03A.I copied all the function module inside this function pool.

Thanks

Alok

Read only

0 Likes
1,741

If a function module of the copied version calls a function module of the same function group somewhere in the code, and you haven't changed it to call the "Z" version, then there could be a problem.

Regards,

RIch Heilman

Read only

0 Likes
1,741

Hi Alok,

As I said before, I see that many of the function modules in this pool have the "Global" flag set in the attributes tab.

Please make that change in your copied function modules as well and see if that resolves your issue. For example, function module L_TO_PREPARE_ITEM_INT has this box checked. Check your copy of it and set the flag. Normally when you copy function modules, this flag is not copied. You have to do it. To make your parameters global parameters, you need to go to SE37, enter your copied function module name, go in change mode. In the menu, "Edit>Interface>Globalize Parameter" will achieve this.

Srinivas

Read only

0 Likes
1,741

For example, function module L_TO_CONFIRM_ITEM_CHECK_INT eventually calls function module L_TO_MODIFY_CHECK_INT. These are in the same function group. So, if you copied the function group and all of the function modules, you probably have "Z" versions of the function modules.

Z_L_TO_CONFIRM_ITEM_CHECK_INT

Z_L_TO_MODIFY_CHECK_INT

But Z_L_TO_CONFIRM_ITEM_CHECK_INT is still calling

function module L_TO_MODIFY_CHECK_INT. You will need to make sure that you change the code to call the "Z" version of this.

Make sense?

Regards,

RIch Heilman

Read only

0 Likes
1,741

Thanks Rich and Srinivas for the valuable suggestions..

I've changed all the calling function modules with the copied 'Z*' FM at the required places. Also I checked the global parameter settings in the FMs.

Still it's not passing the value rather it's passing initial values.

Any further clue ?

Regards,

Alok

Read only

0 Likes
1,741

Any further idea Rich !!

Regards,

Alok

Read only

Former Member
0 Likes
1,741

hi, SAPLL03A include many FM, and which FM does not go well in your side?

I find the there is some FM has the 'Global' attribute in the interface definition. They are global vaule in the whole Function group.If they has been called formerly, these value exist in memory.

And as Srinivas Adavi said, there is some FM, they rely on other FM. Assume there are FM1 FM2, if you want to call FM2 successfully, you need to call FM1 before it. Because sometime, FM2 using some thing FM1 get from system, but they don't return to outside only store in the Function Group memory. I have met this situation recently.

Hope it will be helpful

thanks

Read only

0 Likes
1,741

Hi,

This function pool is being called in one user exit. There is one subroutine LAGERPLATZFINDUNG_1,defined in the function pool SAPLL03A, is being called in this user exit.After copying the standard function pool into new function pool,this subroutine is passing the initial values for one field whereas it's passing the actual value with the standard function pool. I've set the global parameter flag for all the FMs which were set as globalized parameter in the original Function Pool.Checked everything but it's not giving the desired result.

Any further help would be greatly appreciated.

Thanks

Alok

Read only

0 Likes
1,741

Have you copied the subroutine includes in your function pool. How are you calling the subroutine LAGERPLATZFINDUNG_1 from your user exit. Are you calling it as an external subroutine ??? Please be more specific on what exactly you are doing and how have you coded for it.

Cheers

Read only

0 Likes
1,741

Sanjay,

I've copied all the includes in the Function pool into the new Function pool. The subroutine which I'm using is defined in one of those includes which I've already copied. I'm calling one subroutine defined in one include LL03AF9J externally in the user exit include program.I'changed the earlier code for calling this subroutine to

PERFORM LAGERPLATZFINDUNG_1(SAPLZF05) USING L_SAV_NLTYP

I_LTAP-NLBER

I_T331

I_LTAP-VSOLM

E_NLPLA

L_HLP_PLPOS.

earlier this code was

PERFORM LAGERPLATZFINDUNG_1(SAPLL03A) USING L_SAV_NLTYP

I_LTAP-NLBER

I_T331

I_LTAP-VSOLM

E_NLPLA

L_HLP_PLPOS.

Any clue on this ?

Thanks

Alok

Read only

0 Likes
1,741

Which parameter is not passsing corrrectly or is it that all the parameters are not passing any value . Have you tried to debug the user exit and the see values in parameter in the user exit and then inside the subroutine.

Cheers.

Read only

0 Likes
1,741

I checked in the debug mode. The value exists in the user exit till the time it calls the subroutine but once it goes into the subroutine this value gets disappeared whereas when i use the standard function pool the same value remains inside the subroutine also.

Still I'm not able to figure out .

Any help would be greatly appreciated.

Thanks

Alok

Read only

0 Likes
1,741

Hi Alok,

This would mean there is a different FM from the same Func Group that is used prior to the userexit that is setting the value to the variable (and stays in the global memory of the original Func group). When the Z FM is executed, the value is missing. Now trace back to the other FM and replace it with the corresponding Z FM for your new Func Group.

Read only

0 Likes
1,741

Are you saying that

L_SAV_NLTYP

I_LTAP-NLBER

I_T331

I_LTAP-VSOLM

E_NLPLA

L_HLP_PLPOS.

do have a value in user exit but when you press F5 the values are not transferred in the subroutine parameters .

You are not clarifying which variable is not having data .

Cheers.