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: 

Assign the output variable to an operand

ricky_shaw
Contributor
0 Kudos

Hello,

 

In my variant program, i need to export an integer variable(holds months) to an output operand which of INTEGER type. This Output operand should update the Installation facts history.

I tried writing using macro’s :    mac_output_ioper x_op-o1,

                                                  MAC_FACTS_WRITE X_OP-O1-OPERAND X_OP-O1-OPTYP

but they are NOT working.

Also tried updating izone strcuture but in vain.

I have XY_OBJ & SY_SOBJ as changing parameters. Do i need to update in one of them?

Can anyone suggest me how do I do that?

Thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Ricky,

Make sure your config in billing schema & rates are correct and also if you are using correct macros in thr variant program that you are writing.

For example, in your case mac_output_ioper x_op-o1 should work as below:


clear out_ioper.

  out_oper-ab = x_ss-ab.

  out_oper-bis = x_ss-bis.

  out_oper-qnt_new = months_diff_variable.

if you want to append to a structure out_ioper :

append out_oper to out_ioper

then clear use :

clear out_oper.

else it may throw error.

Take a look at XY_OBJ parameters and change/update the values only if you need.

The macro MAC_FACTS_WRITE X_OP-O1-OPERAND X_OP-O1-OPTYP should be updating to the installation facts for sure.Make sure your opernads are coming into the program in x_op-o1-operand.

View solution in original post

1 REPLY 1

Former Member
0 Kudos

Ricky,

Make sure your config in billing schema & rates are correct and also if you are using correct macros in thr variant program that you are writing.

For example, in your case mac_output_ioper x_op-o1 should work as below:


clear out_ioper.

  out_oper-ab = x_ss-ab.

  out_oper-bis = x_ss-bis.

  out_oper-qnt_new = months_diff_variable.

if you want to append to a structure out_ioper :

append out_oper to out_ioper

then clear use :

clear out_oper.

else it may throw error.

Take a look at XY_OBJ parameters and change/update the values only if you need.

The macro MAC_FACTS_WRITE X_OP-O1-OPERAND X_OP-O1-OPTYP should be updating to the installation facts for sure.Make sure your opernads are coming into the program in x_op-o1-operand.