cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Create objects in beanshell for impex?

0 Likes
553

Is there possible to create objects (objects for dynamically generating impexes) in beanshell? For example de snippet below:

#Exclusion shippings (holidays) - randomly set 1 of each per month for the next year (priority - 4)
INSERT_UPDATE CalendarShipping; code[unique = true]; deliveryMode(code); startDate[dateformat = dd-MM-yyyy]; endDate[dateformat = dd-MM-yyyy]; priority; exclusion(code)
"#%
 generate and import from beanshell the valueLines
";

The reason for wanting to do this is beacause the value lines if dynamically generated and imported from beanshell can be readuce a lot of boilerplate code.

Accepted Solutions (0)

Answers (2)

Answers (2)

StefanKruk
Active Participant

Please have a look at https://help.sap.com/viewer/9d346683b0084da2938be8a285c0c27a/1905/en-US/0dd7e302de0c4d5480336816386e...
Here the Data is migrated from Commerce Search to Adaptive Search. For this some transformations are needed to be done.
These Transformations are done via Beanshell.

This is a good example of how to set a specific value for a specific column based on a method that is called.

In general, in Beanshell you should be able to also create Objects with the ModelService that can be used afterwards.

I Hope you can archive your goal with this.

StefanKruk
Active Participant

Please have a look at https://help.sap.com/viewer/9d346683b0084da2938be8a285c0c27a/1905/en-US/0dd7e302de0c4d5480336816386e...
Here the Data is migrated from Commerce Search to Adaptive Search. For this some transformations are needed to be done.
These Transformations are done via Beanshell.

This is a good example of how to set a specific value for a specific column based on a method that is called.

In general, in Beanshell you should be able to also create Objects with the ModelService that can be used afterwards.

I Hope you can archive your goal with this.