Hola Brian,
Aquí está el fragmento de código que estás buscando.
<b>Suposición:</b>
El tipo de retorno de la BAPI es un String. Ejemplo: <b>"Lunes 31 de mayo de 2007"</b>
String day = "Lunes 31 de mayo de 2007";
String year = day.substring(day.lastIndexOf(" ")+1, day.length());
String month = day.substring(day.indexOf(" ") 1, day.indexOf(" ") 4);
String date = day.substring(day.indexOf(" ") 5, day.indexOf(" ") 7);
Calendar cal = Calendar.getInstance();
int current_month = 0;
if(month.equals("Ene")){
current_month = 0;
}else if(month.equals("Feb")){
current_month = 1;
}else if(month.equals("Mar")){
current_month = 2;
}else if(month.equals("Abr")){
current_month = 3;
}else if(month.equals("May")){
current_month = 4;
}else if(month.equals("Jun")){
current_month = 5;
}else if(month.equals("Jul")){
current_month = 6;
}else if(month.equals("Ago")){
current_month = 7;
}else if(month.equals("Sep")){
current_month = 8;
}else if(month.equals("Oct")){
current_month = 9;
}else if(month.equals("Nov")){
current_month = 10;
}else if(month.equals("Dic")){
current_month = 11;
}
cal.set(Integer.parseInt(year), current_month, Integer.parseInt(date));
cal.add(Calendar.DATE, 1); //Martes
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 1); //Miércoles
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 1); //Jueves
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 1); //Viernes
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 1); //Sábado
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
cal.add(Calendar.DATE, 1); //Domingo
System.out.println(cal.get(Calendar.MONTH));
System.out.println(cal.get(Calendar.DATE));
System.out.println(cal.get(Calendar.YEAR));
Debes agregar la salida según tu conveniencia.
Espero que esto te ayude.
Saludos,
Rekha Malavathu