on 05-27-2013 1:44 PM
Hi Experts,
I have add UDF according to the thread of Amit in my mapping in order to produce runtime exception as below:
public void CheckMandatory(String[] var1, String[] IDocNr, String[] FeldName, ResultList result, Container container) throws StreamTransformationException
{
for(int i=0;i<var1.length;i++)
{
if(var1[i].equals(""))
{
throw new RuntimeException("The Field " +FeldName[0]+ " in "+"IDoc: "+IDocNr[0]+" is missing");
}
else
result.addValue(var1[i]);
}
}
In the Mapping Test Module it works fine and give the exception as belows:
Exception:[java.lang.RuntimeException: The field XXX in IDoc: 0000000027180117 is missing] in class com.sap.xi.tf._MM_ORERS_ORDERS05_to_InsertOrders_ method CheckMandatory[[Ljava.lang.String;@6b237f5b, [Ljava.lang.String;@677e6650, [Ljava.lang.String;@1b6f4345, com.sap.aii.mappingtool.tf7.rt.ResultListImpl@25a97515, com.sap.aii.mappingtool.tf7.rt.Context@1845c904]
But, in the Runtime Workbench, I send the same message over "Message Test".
It gives the normal Error in the SXMB_MONI:
<SAP:Stack>Während des Anwendungs-Mappings com/sap/xi/tf/_MM_ORERS_ORDERS05_to_InsertOrders_ ist eine RuntimeException aufgetreten. com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping /ns0:INSERT_Orders/StatementPosition/dbTa~</SAP:Stack>
And the alert has the same texts as above.
Could anyone give me tips?
Thanks a lot!
Regards
Rene
actually, it does no matter, wheher the correct exception is visiable in SXMB_MONI. It's more important, that they are in the alert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should find the full error message in SXMB_MONI, under SOAP Header of the message, in the Trace.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Martin,
I have found the position of the Trace, but I cannot really find my own exception in the Trace.
It could be with the Trace Level to do? since I see a sentence in the Trace: ***TRACE TRUNCATED (for more details see Visual Administrator -> LogViewer)***
with ccBPM I can catch this field with a container variable and to check whether it is empty. If empty, I will send it per Mail Adapter.
But it is too troubsome.
I have tried to generate an Alert by using to RFC Lookup of Function Module "SALERT_CREATE". But I do not know how to call it in UDF and parse it.
Could anyone help me?
Thanks in advance!
Rene
Alert configuration is done in runtime workbench and transaction ALRTCATDEF. You will find lot's of info here on SCN, blogs etc.
Alternatetively, as different approach, you could insert a condition in receiver determination to check for the field, and if missing, send a message to a mail receiver.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.