SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a custome variant for a rate.

Former Member
0 Kudos
360

Hi All,

I am creating a custom variant for a rate step. The requirement is that the input should be an operand of type FACTOR and output should be a flag. I need to to set or reset the fla in the function module of the custome variant. I checked for some variants but did not find variant of this type. So can anybody let me know if this is possible /feasible?

If yes how can I set the flag. Should it be updated in structure x_op, x_ss or x_red?

Thanks in advance for your help.

Regards,

Sapsuchi.

11 REPLIES 11

ivor_martin
Active Contributor
0 Kudos
308

Hi,

Have you tried using the Variant INFACT07? If not, perhaps you should explore this Variant.

Regards,

Ivor M.

0 Kudos
308

Hi Ivor,

Thanks for your reply.

I have checked the variant IFACT07. In this variant operand of type flag is written to the installation. And the input to this variant is the same operand. So values for thid operand are not changed in the variant. In my case I want to populate the operand in my variant.

Please let me know if you have any suggestions.

Regards,

Sapsuchi.

0 Kudos
308

Hi,

The closest match for your requirement is INFACT07. You can make a custom var prg for this which will recieve the factor operand and the flag. Based on the condition you set or reset the flag and then write it in istln fact(use INFACT07 in this case).

Regards,

S

0 Kudos
308

Hi,

Thanks for your reply. But I do not want to write the flag on the installation. I just want to set or reset it. This flag will be my output variant. But I am not sure if it is possible to set / reset the output operand of type flag.

Kindly let me know.

Regards,

Sapsuchi.

0 Kudos
308

HI,

It seems that your requirement is a bit tricky. Instead of using a custom variant prg try to use two different flag as in case of reversal seperate handle needs to be there.

Try to use two different flag which will be using for setting n resetting of the flags respectively, Here you can use the std variant to check the factor and then set the corresponding flag.

N.B. Resetting is not permissible thru INFACT07.

Regards,

S

0 Kudos
308

Hi S,

Thanks for you reply. Could you please elaborate on your idea with an example. So that it will be clear to me.

Thanks in advance,

Regards,

Sapsuchi.

0 Kudos
308

Hi,

An example:

IF FACTOR > 100

SET FLAG DISC

ENDIF

IF FACTOR<100

SET FLAG NODISC

ENDIF

Although this is a very naive one but I belive it will help you to understand my concept.

Let me know if you need further help.

Regards,

S

0 Kudos
308

Hi S,

Thanks for the reply. The logic mentioned is similar to what I have thought of just with a little change. It might be that the factor operand may or may not be present on the installation. So my logic would be:

If entry present in x_op-t1, set flag X.

If not present, reset flag X

Or

If entry present in x_op-t1, set flag X.

If not present, set flag Y.

This logic is not possible through std variant. So I am opting for custom variant. What I want to know is, is there any macro for setting / resetting thr flag through code.

Thanks in advance for your reply.

Regards,

Sapsuchi.

0 Kudos
308

Hi there,

You could have a look at include program IEVARMAC as it stores most of the macros for billing variants.

May be you could exploit 'mac_output_ioper' for your purpose!

Cheers

Jignesh

0 Kudos
308

Hi Sapsuchi.:

Perhaps you can achieve the same effect of "flag", using an operand type "QUANT" for example. Thus you would not have that create a custom variant, so the logic would be:

IF03 1 FACTOR_A FACTOR_B " Evaluation

QUANTI09 1 QUANT=1 FACTOR=1 QUANT=1 " Flag active

ELSE

QUANTI09 1 QUANT=1 FACTOR=0 QUANT=0 " Flag not active

ENDIF

Regards,

David

Former Member
0 Kudos
308

You can set a flag in the rate category facts/rate facts with a checked status. Use this flag as your input for INFACT07. You can also have another flag with an unchecked status when you need to change the value back again.

INFACT07 SET_FLAG STATUSFLAG

INFACT07 UNSET_FLG STATUSFLAG