cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Formula Parameter D0 for calculated Char

former_member184536
Active Contributor
0 Kudos

Hi All

How we can user formula parameter D0 which uses function module QEFC_FORMULA_CALC_EXAMPLE.

Main concern is that how to pass char no to above mentioned function module. As when try to pass char no. 10 as D00010 then i get an error.

Variable D00010 in items 0 and 6 can not be identified

Message no. RN011

So  how can we pass char no. to function module.

regards

Manish

Accepted Solutions (1)

Accepted Solutions (1)

former_member42743
Active Contributor
0 Kudos

When are  you getting this error?  Can you send a screen shot?  Note that you should only pass a characteristic number that is using a sampling procedure into the D0 parameter.

D0 and the FM you specified is only to provide an example.  You should copy the FM and modify it as you need to and then assign it to a Z0 parameter in config. 

FF

former_member184536
Active Contributor
0 Kudos

Hi

I am getting this error while assigning the D00010 to the calculated char in inspection plan. I have tired with Z0 but couldn't succeed. Well my main concern is how to pass characteristic number to function module as i am getting error. See the below screenshot.

regards

Manish

former_member42743
Active Contributor
0 Kudos

Manish,

What I would do first is change your formula as a test.  For instance, Try the formula C00010 + C00020.  That should add the values of characteristic 10 and 20.  That should work if everything is set up right.  If it works, the issue must be with the FM being used for D0.  Not your basic data setup.

D0 should work as is however.  You don't have to config it to Z0.  I was only suggesting that because you want your custom objects to be in the Y or Z namespace.  SAP could someday decide to change D0 and wipe out your customization via a hotpatch or upgrade.

If the test above works using C0 than you'll need to get a ABAP'er to troubleshoot the FM you are using.  Something is not right with it.

FF

former_member184536
Active Contributor
0 Kudos

Hi

I did what you have suggested and i didn't get any error. It's fine with C00010+C00020.

I used D0 without any characteristic number with standard function module attached with it. It returns 1 as a result. But my question is that whatever function module is attach with formula parameter D0 or Z0, how will i do the calculation  as for calculation i have to pass char number what i am not able to do that.

regards

Manish

former_member42743
Active Contributor
0 Kudos

In the FM you have to provide all the logic you need to.  The structures are all there. 

You don't pass in a characteristic number to the FM.  Your FM just looks up whatever characteristic you want it to.

FF

former_member184536
Active Contributor
0 Kudos

Hi

If i have to do the complex calculation in the function module on value of particular char. Then how would i able to access the value of that char without passing char number.

regards

Manish

former_member42743
Active Contributor
0 Kudos

The structures provided give you all the information you need.

In the FM, if you want to use the PH value, you look up the PH value via the structures.  If you want to use the ASSAY value, you look up the assay value. 

If you want to do something unique say like doing a complicated calculation using ten different characteristics, then you sup your plan so you know exactly where those characteristics are in the plan.  I.e. you always put them in the plan as characteristics 800 - 809 and in the FM you call up the values for characteristic 0800 through 0809.

FF

former_member184536
Active Contributor
0 Kudos

Hi

I have gone through function module QEFC_FORMULA_CALC_EXAMPLE, here only parameters are defined where I able to access only current char.Can you tell me in which structure I would be able to access the all char values on the basis of char number.

regards

Manish

former_member42743
Active Contributor
0 Kudos

From what I can see you have a number of structures imported including QALS, QAMKR, and QAPO which should provide enough info to look up anything you're missing.

I'm not a programmer.  So I can't give you all the details.  But I have had programmers work with this to develop custom calculations.  They never seemed to have many questions around it.

FF

former_member184536
Active Contributor
0 Kudos

Thanks

I got the values on these structures.  Now I can consult to technical guy to put custom logic by using that function module.

Answers (0)