2013 Jul 16 8:48 PM
Hi Experts,
I am working on a requirement where a charge is needed to be calculated based on some logic. I am planning to create a zvariant to incorporate this logic and use it in my rate steps. The problem is: the logic (zvariant) does not need any I/P from any of the executed schema step, however, I definitely need the Output (which will be a factor value, calculated at runtime in zvariant FM) from it, since this factor value will be used in other rate steps. I know its not possible to define an output without defining an Input in variant.
So, I decided to choose another way where i planned to populate the factor value in run time operand during the zvariant execution. The problem i am facing here is i am not able find any way to update run time operand within the z variant FM.
Can any one assist me on how to update the run time operand in zvariant FM without passing the value as O/P to the variant.
Thanks!!!
2013 Jul 17 10:02 AM
Hi Kavita,
Although in the requirement, no I/P is required or used still you can create a factor=1(example) operand as an input(this I/P will be working as dummy in that zvariant) and then in that zvariant you can put the required logic to calculate the new factor value which is to be determined as an O/P operand to be used in subsequent rate steps.
Hope it helps.
Thanks,
Rakesh
2013 Jul 17 1:37 PM
Hello Kavita,
Use macro MAC_OUTPUT_IOPER to update your operand within the z-variant.
Please see the below sample code snippet.
* Preparing the output processing
out_oper-ab = wpara-ab.
out_oper-bis = wpara-bis.
out_oper-qnt_new = wpara-qnt_new.
out_oper-qnt_old = wpara-qnt_old.
mac_output_ioper x_op-o1 .
Here X_OP-O1 should have your operand name.
Hope it solves your problem.
Regards,
Rajesh