on 10-28-2013 11:00 AM
mapping error in the targer field mapping due to the mapping field d_387 PLEASE ANY one explain me is any error in the bellow java
code as i am just new for the code
SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_DESADV_ANDA_IDOC_To_ASNEDIFile_New_;
com.sap.aii.mappingtool.tf7.MessageMappingException: Runtime exception when processing target-fieldmapping
/LIST/S_ISA/S_GS/S_ST/G_SHL/S_HL/S_TD5/D_~</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
/LIST/S_ISA/S_GS/S_ST/G_SHL/S_HL/S_TD5/D_~
public void populateD387(String[] route, String[] partner, String[] name1,
String[] constantval, String[] filterVal1, ResultList result, Container container) throws StreamTransformationException{
if (route[0].indexOf("ZUPS")>-1){
result.addValue(constantval[0]);
}else{
for(int i=0;i<partner.length;i++){
if(partner[i].equals( filterVal1[0]) && route[0].indexOf("ZLTL")>-1){
result.addValue( name1[i]);
}
}
}
Hi Murali,
Looking at the structure of this java code then my guess is that you are hitting this else block:
else{
for(int i=0;i<partner.length;i++){
if(partner[i].equals( filterVal1[0]) && route[0].indexOf("ZLTL")>-1){
result.addValue( name1[i]);
}
}
And in this else block my guess is that within the loop you never add a result because the conditions of the if statement are never met. If that is the case and you have a required field on the target side then you will get an exception in your mapping while it is executing.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
This might be the result of conditions being false and target node (mandatory) not being created.
As Anupam said, we would need source payload and screenshot of mapping to decipher the issue.
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
Can you explain what you are trying to do through this UDF. BTW , below condition will be always true
if (route[0].indexOf("ZUPS")>-1)
so check all constantval values were in input .
Thanks
Hari.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
Take the inbound payload from sxmb_moni. Using test tab put the payload in mesage mapping. Execute the mapping in test tab. This will provide you detailed reason for error.
The exact reason for error and inbound payload is necessary to answer your query.
If possible also include source and target message structure screen shots.
Regards
Anupam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.