cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduled task for executing script

Former Member
0 Kudos

Hi,

is there a way to periodically execute a script? I know that there is an IAPI scheduled task type but apparently this requires a custom Java class to be deployed.

The client I'm working for requires all vendors to be updated automatically. For this, we need to be able to execute a custom script which loops through all vendors and executes some logic.

I know we can find a way to do this via reporting (meaning exporting the vendors, changing some fields and importing them again) but the logic we can develop in SQL is quite limited.

Thanks for your responses,

Bram

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Is there any document for this?

Former Member
0 Kudos

Thanks.

Is there any documentation on how to build and deploy that custom JAR?

Thanks in advance,

Bram

Former Member
0 Kudos

Hi,

If you are working on E-Sourcing 5.1 On premise, then please refer to the PDF available on Service marketplace. The steps are as follows:

Add Integration JAR File to SAP E-Sourcing:

The JAR file holds the specialized importers for materials, purchasing organizations, and suppliers. It also contains special processing capabilities for supplier export, supplier validation, and integration configuration.

Procedure

1. Start the configure utility.

For example, on Windows, run <FCIHOME>/bin/configure.exe.

2. Select the following options:

􀁸 Include Custom Jar File

􀁸 Update WAR and EAR Files

3. When you reach the Select Custom JAR Files screen, add the sapintegration.jar file.

The utility then rebuilds the EAR file.

Deploy EAR File

To deploy the EAR file to a SAP NetWeaver application server:

1. Start the SAP NetWeaver Administrator as follows. Use only the SAP NetWeaver Administrator to perform this task.

a. Log on to your host as user <sapsid>adm.

b. Start the SAP NetWeaver Administrator by entering the following command: cd /usr/sap/<SAPSID>/<JC00>/j2ee/admin ./go

2. Choose Server 􀄺 Services 􀄺 Deploy.

3. On the Runtime tab, choose Applications.

4. Verify that the application is not already deployed (at sap.com/fcsourcing). If it is, choose Remove.

5. Choose Deploy & Start.

6. Select the following file and choose OK. <fcihome>/fsapp/fcsourcing.ear

7. In the Deploy & Start dialog box, choose OK.

8. In the Deploy dialog box, choose OK.

The file is deployed.

Hope this helps.

Vikram Shukla

Edited by: Vikram Shukla on Dec 5, 2011 9:53 PM

Former Member
0 Kudos

Hi Vikram,

I am running a Scheduled Task to Import Contract attachments, the specified location on server has doc_mapping.csv and all the PDF attachments that needs to be imported, but when I check Setup>Administrative Reports> All Attachments, there is no new attachments displayed.

Please guide me how to debug this issue.

Thanks,

Saloni

Former Member
0 Kudos

Hi,

I need to create scheduled task to run custom functionality. How to create a customized jar file?

Please guide.

Thanks,

Saloni

0 Kudos

Hello,

In Sourcing 7.0, itu2019s not possible to call a script directly from a scheduled task. You would have to develop the code in a java class and deploy it as a custom jar. The custom jar can be called from the scheduled task. The scheduled task should be of type IAPI Execution Task.

Depending on your logic and data you want to update, you could also consider importing a vendor csv file through scheduled task and call the script import hooks.

In 9.0 (not out yet), I believe there may be ability to call a script from scheduled task, but in 7.0, one of the above options is probably the way to go.

Regards,

Vikram