on 08-04-2014 12:14 PM
Hi Friends,
My requirement is , I need to create supplier contacts in a bulk by a schedule task which reads contacts details from CSV file.
I created an explicitly called script which is executed by schedule task. My doubt is, where can I store CSV file in sourcing ( similar to application server of standard SAP ) , so that the file can be read in the explicitly called script.
If possible, please provide code also to read the CSV file. Thank a lot.
Regards,
Ratnesh
Hi Ratnesh,
You can create a Data Import schedule task and can place the CSV file either in the Local Directory or in the FTP.You can get the directory or FTP details from your basis team. My doubt is why you need to create an explicit script and what exactly your script is doing?
Thanks
Kushagra A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I need code help on this issue.
I am using below code for this requirement but it's not working. Basically, I am creating a contact programatically in supplier number hardcoded in below code.
IBeanHomeIfc vendorHome = IBeanHomeLocator.lookup(session,VendorIBeanHomeIfc.sHOME_NAME);
VendorIBeanIfc vendor = ((VendorIBeanHomeIfc) vendorHome).findByExternalId("121414132");
VendorIBeanHomeIfc vendor_home = (VendorIBeanHomeIfc) vendor.getIBeanHomeIfc();
vendor_home.upgradeToEdit(vendor);
contactColl = vendor.getCollnContact();
if(contactColl.size()>1)
{
contactMbr = contactColl.create();
contactMbr.setFirstName("Dummy");
contactMbr.setLastName("Dummy");
contactMbr.setAddress1("Bangalore");
contactMbr.setCity("Bangalore");
contactMbr.setStateProvince("karnataka");
contactMbr.setPostalCode("560011");
contactMbr.setEmail("dummy.dummy@dummy.com");
contactMbr.setName(vendor.getExternalId());
contactMbr.setCountryObjRef(vendor.getCountryObjRef());
contactMbr.setCurrency(vendor.getCurrencyObjectRef());
contactMbr.setDisplayLanguage(vendor.getDisplayLanguage();
try
{
contactColl.add(contactMbr);
}
catch(Exception e)
{
logMsg.setLogMessage("test"+e.getMessage());
Logger.info(logMsg);
}
Please note that I am using above code in an explicitly called script and In my supplier contact, along with above mentioned setter methods, Time zone , Date Format, Excel Format, Decimanl Format field are mandatory.
Please provide me code(if possible) or hint on how to fix this issue.
Regards,
Ratnesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.