on 09-26-2014 12:01 PM
Can anyone please explain all about Import Lifecycle event scripting context as to how, when and where can we use it? I am new to scripting and it would be very helpful if you can help me out.
Can anyone explain it by giving examples of some scripts?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks But I already have this guide and I have gone through it. I need information on this particular scripting context "Import Lifecycle Event".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Isha,
If the script Context is "Import Lifecycle Event" then the script will run at the time of Data imports and you can target a particular Class. If you go to the Guide you will find number of events which you can target depending upon your requirement.
Small Example:
if you want to get a user name of a particular user from a workbook which you are importing for class User Account(104) then you can write a below code:
import com.sap.odp.api.usermgmt.masterdata.NewUserAccountIBeanHomeIfc;
name=import_record.getField("Name");
// name will contain the first record in the workbook under "Name" field
the above code Target Event is: Pre-Process Row
Likewise you can choose the Target Even depending upon your requirement. Go through the Section 2.1.3 in the guide you will get more insight.
Hope it helps.
Thanks
Kushagra A
Hi Isha,
Kindly go to below link, it covers basics of scripting and will give you some insight:
Scripting and Workflow Guide for SAP Sourcing
Also you can download this guide from SAP Marketplace.
Hope it helps.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.