cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Mapwthdefault at tiem level -Values Missing in Queue context

former_member452321
Participant
0 Kudos

Here is the logic

If (E1EDP19-IDTNR_EXTR is not empty and (E1EDP19-QULF)=001

map IDT_EXTR to target Buyerpart

else

    if E1EDP19-IDTNR is empty and E1EDP19-QULF=002

  if E1EDP01-MENEE IS NOT EQAUL TO AU

  map const (SEE_DESCRIPTION) to target

All context set to EDP01

Target is mandatroy field

1) data : If the 1st item level has the value IDTNR_EXTR and 2nd item level is not .

In the else condition also QUALF is not matching to 002 so not getting the value for else condition in second item level  .

So getting the error ItemDetail[2]/ns0:BuyerPartNumber. Values missing in queue context


How can we add mapwithdefault to not to fail for mandatory field


2 data I added mapwithdefault befoe else it worked for this data but failed for other test with 3 line items IDTNR_EXTR  values. 2nd line item was getting in target which is not


Thanks for your help

Accepted Solutions (1)

Accepted Solutions (1)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Mahesh,

The output (2nd display queue) above is fine. You just need another ifWithoutElse statement to check if the output is not equal to a blank to eliminate blanks in a context containing multiple values. Afterwards, use mapWithDefault again e.g

output of mapping -> equalsS -> not -> ifWithoutElse -> mapWithDefault -> targetField

constant ----------------------------> /            /

output of mapping --------------------------> /

PS: Sorry do not have an XI system at the moment.

Regards,

Mark

former_member452321
Participant
0 Kudos

Thank you


markangelo_dihiansan
Active Contributor
0 Kudos

Hi Mahesh,

Were you able to solve your problem?

Regards,

Mark

former_member452321
Participant
0 Kudos

Yes. It worked.But if the qualf value =2 is coming first  in queue it didnt worked. The out put value was coming blank.So I have added SORT after QUALF .Thanks for your help

Answers (2)

Answers (2)

Muniyappan
Active Contributor
0 Kudos

Use if function instead of ifs. I faced similar issue in the past.

former_member452321
Participant
0 Kudos

Here is udf i tried but not working as expected

String output = new String();

for (int i=0; i< qualf.length;i++)
{
  if(qualf[i].equals("001")&&(idntex[i]!=("")))
  {
      output =  idntex[i];
  }
    else
    {
     if((qualf[i].equals("002"))&&(idtnr[i]==(""))&&(manee[i]!=("AU")))
         {
             output =  ("Notes") ;
         }
            }
     result.addValue(output);

}

if item has only one value of idtnext and 2nd line item also it is displaying same value it should be blank

Thanks for your help