Skip to Content
author's profile photo Former Member
Former Member

production issue -help needed

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 01:42 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jul 25, 2008 at 01:40 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      You forgot to answer my question.

      i only asked two questions.

      1. whats the concept of writing something to trace.?

      2.whats the meaning of writing "_CC_" inside the brackets of the 'equals' function?

      Thanks,

      John

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.