This blog is created to throw some lights on SAP CPI concepts, which experienced in my journey. Trying to explore more about HCI/Cloud platform integration/SCPI and sharing the contents to help you. Thanks for all Users your support. Please give your comments below ...
Friday, 12 March 2021
Script to pick the week day
import com.sap.it.api.mapping.*;
import java.util.Date;
import java.util.Calendar
import java.text.SimpleDateFormat
def String customFunc(String arg1){
//Calendar cal = Calendar.getInstance();
//int dayOfMonth = cal.get(Calendar.DAY_OF_WEEK);
//arg1 = String.valueOf(dayOfMonth);
Calendar cal = Calendar.getInstance();
int day = cal.get(Calendar.DAY_OF_WEEK);
if (day >= Calendar.MONDAY && day <= Calendar.THURSDAY){
arg1 = true;
}else{
arg1 = false;
}
return arg1
}
Subscribe to:
Post Comments (Atom)
Excellent blog SAP Training in Chennai
ReplyDelete