cancel
Showing results for 
Search instead for 
Did you mean: 

Import Lifecycle event scripting context

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Can anyone explain it by giving examples of some scripts?

Former Member
0 Kudos

Thanks But I already have this guide and I have gone through it. I need information on this particular scripting context "Import Lifecycle Event".

kushagra_agrawal
Active Participant
0 Kudos

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

Former Member
0 Kudos

Thanks

kushagra_agrawal
Active Participant
0 Kudos

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