cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPS Query

former_member1244799
Participant
0 Kudos

Hi All,

1 . A file event can be used to move multiple files(e.g, *.xml) or only one file from source directory to destination directory in a single raise?

2. How can I do return code mapping for non sap jobs?. For SAP jobs there is return code mapping on the SAP system.

3. Could you help where can I see the CPS tables or views. The tables are not visible in the Scripting-->.Tables in the CPS GUI.

Thank you in advance.

Regards,

Ramana

Accepted Solutions (1)

Accepted Solutions (1)

nanda_kumar21
Active Contributor
0 Kudos

hi Ramana,

1.Its not recommended to placed multiple files that match the search pattern of the file event, the reason being, the event gets raised multiple times ("pending" status). The jobs dependent on that event will be submitted mulitple times, unless thats what you want.

To answer you question, yes the file event should move the file to a different directory if the option to move it to a directory is selected, and the directory exists, and the platform agent user has write access in that directory.

2. Which non-SAP jobs are you talking about? there are plenty. For types of CMD, *.sh, *.py, you can use proper error handling in your script to throw error, for example, you can use %errorlevel% check or/and set exit code in batch scripts in CMD.

3.Go to Monitoring-->Monitoring Tree-->expand system and dig through Database to check the tables. You can check the tables at the DB too, the tables have "JCS_" as prefix.

If you are looking for information on tables, the admin guide is the best place. You can download the admin guide for your CPS version from the "i" information button located at the top right corner.

thanks

Nanda

former_member1244799
Participant
0 Kudos

Thank you Nanda.

We have a scenario where three files(*.txt) are created in a directory at the same time. Can a file event moves all the three files in a single shot or it raises three times for all the three files?. We have a ftp job which has to trigger for every file present.

When I expand the database in the monitor tree. I can see only the tables which starts with "BC_"but not "JCS_"

I also did a search on JCS_ in the admin guide.  But not able to find them. I came to know that apidocs.zip lists the tables which I need to ask my manager about the zip file.

Regards,

Ramana

nanda_kumar21
Active Contributor
0 Kudos

hi Ramana,

It raises three times and moves the files one by one and triggers the FTP jobs three times.

What version of CPS are you using?

When you expand System-->Database-->Tables, you will get to see the data model, which is what you need to write Redwood scripts.

In order to view the actual database tables, open the DB studio manager, and then navigate under the SID DB-->tables-->JCS_*

thanks

Nanda

h_carpenter
Active Contributor
0 Kudos

Hi Ramana,

1. Nanda has already clarified this. You can use GLOB to match one of the three files and have a platform job that calls jftp to send the files to an FTP server and delete/move the files once the the files have been successfully sent.

2. For return code mapping, you can either script the proper return code or if you want to ignore a return code, use the options on the Job Status tab of the job definition editor.

Note that in CMD job definitions, you check %ERRORLEVEL% immediately after a call, in BASH/KSH you use

<command> || exit <n>

where <command> is the program to run and <n> is the exit code you want to use if the call to the program fails. Do not use return codes > 127.

3. You do not access the database tables directly, you use a data model. See the "Data Model" topic in the reference section of the Administration guide.

Never touch the database, as the database tables will change without prior notice - as is written in the data model topic.

The Scripting > Tables overview in the user interface is for your tables - here you can create your own tables.

Regards,

HP

former_member1244799
Participant
0 Kudos

Thank you so much Nanda and Carpenter for clarifying the questions.

In the Monitoring-->Monitor tree. It lists only the tables but not the rows. It looks still I need to find the API documentation for the type of data which I need to get from the database as I don't have access to the databse.

Thank you very much for patiently giving the answers:-)

I am now making progress in learning CPS.

Regards,

Ramana

Answers (0)