Hi Sap All.
i have got a requirement where in an Idoc To File Interface ,i need to check two IF conditions and then pass the result of any one of IF Condition(if it is TRUE) to the target.
If /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/E1EDP01/E1EDP05/KSCHL = ‘’PAT’ then /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/E1EDP01/E1EDP05/KRATE-> ‘gross_cost_excl’ when /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/BSART is ‘ZRIC’ or ‘ZRUC’ or ‘ZUC’ or ‘ZIC’
or
If /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/E1EDP01/E1EDP05/KSCHL = ‘’TODD’ then /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/E1EDP01/E1EDP05/KRATE-> ‘gross_cost_excl’ when /ZRPA_ORDERS01/IDOC/Z1EDRPAORDCR1/E1EDK01/BSART is ‘ZRIC’ or ‘ZRIM’ or ‘ZC’ .
i have tried to use the Boolen 'OR' Condition but i couldnt get it right as it was not accepting the normal input values(output of IFTHEN Condition) (other than true or false ).so is there any way that i still can use the boolean IF Condition or can i go for the User Defined condition)
i have also tried with UDF by submitting the output of 2 IFTHENWithoutElse conditions but still i couldnt get the right values in the target according to the Context.
the source code of usd is as follows :
public void OR(String[] a, String[] b, ResultList result, Container container) throws StreamTransformationException{
if(!a.equals(""))
{
result.addValue(a);
}
if(!b.equals(""))
{
result.addValue(b);
}
will be waiting for the quick answer.
regards.
Varma