on 07-25-2008 2:02 PM
Hi,
I am giving a user-defined java code below, which we need to change. I understod that the fucntion is used to store values in memory. But my doubts are something else.
-
GlobalContainer gc = container.getGlobalContainer();
AbstractTrace trace = container.getTrace();
int j = 0;
for (int i = 0; i < ConnectEAN.length; i++) {
if (ConnectEAN<i>.equals("__cC_")){
j++;
if (PremiseID[j].equals("__cC_")){
j++;
}
} else {
trace.addInfo("EAN = " + ConnectEAN<i> + " Prem = " + PremiseID[j]);
gc.setParameter( ConnectEAN<i>, PremiseID[j] );
}
}
result.addValue("");
-
I need to know what ' equals("__cC_") ' means.??? whats the underscore doing there??
Also what does the below line doing?
trace.addInfo("EAN = " + ConnectEAN<i> + " Prem = " + PremiseID[j]);
Why do we need to add info to the trace? whats is its concept?
Please help.
Thanks,
John
hi John,
trace.addInfo("EAN = " + ConnectEAN + " Prem = " + PremiseID[j]);
This object enables you to transfer messages to the mapping trace. If the trace level is set correspondingly. then the trace is visible in message monitoring (transaction SXMB_MONI). The execution of the mapping is not interrupted when the entries are written to the trace.
so go to SXMB_MONI expend the tree and go to trace you can fond the corrosponding trace out there.
Trace object have the following Methods
1)void addInfo(String message); Adds a message message to the mapping trace with the trace level info.
2)void addWarning
(String message); Adds a message message to the mapping trace with the trace level warning.
3)void addDebugMessage (String message); Adds a message message to the mapping trace with the trace level debug.
regards,
navneet
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It means you are comparing the input string with the string _cC . if the input field has value _cC then only come inside if condition else the code inside if condition won't be executed.
Please see it is case sensitive. Only if the first alphabet is _ , second is small c and third capital C, this condition will be satisfied.
Hope this cleares your doubt.
Thanks
Amit
Hi John,
the UDF has an inputParameter named: ConnectEAN
The ConnectEAN is an StringArray. This means it has one or more entries.
Before this UDF was called another UDF - that you havent mentioned - was called.
This UDF wrote entires to the globalContainer, also in kind of a list with one or more entries.
The UDF you mentioned just reads the amount of ConnectEAN and PremiseID
and writes it for information into the trace.
Regards Mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.