on 01-08-2014 6:55 PM
Hi guys,
i'm developing a variant function for extend the product configuration with IPC.
In our environment we have the last relase of IPC 5.0 and CRM EHP2, so we are facing with the last version running on VMC.
I follow this link
http://help.sap.com/saphelp_crm700_ehp02/helpdata/en/1a/2d9a3ecd744135ad27078554403974/content.htm
and referenced note to implement a very simple Variant Function.
I first create a new function in product model with two parameters (one input and one output) and referenced this function as Function Formula dependency.
After that, following the note 870201 and this other link Variant Functions - Configuration Engine - SAP Library i develop my class
This is my code where ZZ_TEST_CONF is the name of the function created in the product configuration
package com.sap.sce.user;
import com.sap.sce.engine.*;
public class ZZ_TEST_CONF implements sce_user_fn {
ZZ_TEST_CONF MyClass;
public boolean execute(fn_args args, Object obj) {
String TipoRic = args.get_value("ZZTIPORICHIESTA");
sce_user_fn_logging MyLog = new sce_user_fn_logging();
MyLog.writeLogError(MyClass, "SONO IO");
return true;
}
}
As you can see it is a very simple code just only to make all work. I uploaded the JAR without error and check the presence of my class with SM53.
I simulate the configuration of new product guessing that the my Variant Function should be triggered selecting the value of my input parameters.
But i can't figure out how to check the log, to see if my program execute correctly. In the pdf attached to the note 870201 there is this stament
"For tracing the following API can be used to make trace-entries. You will find your traces under the location com.sap.sce.user.sce_user_fn_logging." but there is no way for me to find this location. Neither in SM53 or AL11 or file system on the server.
Have you any suggestion or some tips about all the procedure to develop this Variant Function. I noticied that there are very few documentation about this topic and since the last revision of IPC introduce big chenges, many documentaion and topic are out of date.
Thanks in advice for any suggestion!
Hi Marco,
I never did varian configuration using java, but I dealt with the pricing exits, and tracing logs is a pain...did you try to go SM53/log administrator/log configuration and copy paste "com.sap.sce.user.sce_user_fn_logging" and press the transfer button? make sure the value ALL or DEBUG is selected in the dropdown before pressing transfer.
Then you should be able to see the logs on the log display
Cheers!
Luis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Luis,
thanks for your suggestion, i correctly add the new location. And now i can select it from Log Display Tree.
Now the problem is that seem that my function didn't execute, since there are no log entry.
Could anyone confirm or not that my assumption about the triggering of the function is correct or not?
Thanks
Hi Pisačić,
at the end i was able to run a personal pfunction but without logging functionalities. The customer wanted to call an RFC inside PFunction, but after raised an incident to sap to help us, SAP answer that is not supported doing this thing.
At the moment i also change project and i working in other environment at all.
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Little update.
I still not able to see logs or traces, but using a statemnt like this in the code
args.set_value("ZZCONSUMO", 60);
i'm able to check that my function is correctly triggered, since this value is correctly set.
But now, since i want also read prameters, when i use the statment
ddb_inst inst = args.get_instance();
during the simulation i get this error when the function is triggered
"You have tried to set the following values for non-existent instance 1: 20"
Where "20" is the numeber i manually insert in my input parameters during the simulation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.