cancel
Showing results for 
Search instead for 
Did you mean: 

How to do an error in Data Services?

Former Member
0 Kudos
85

Hi guys!

I´m novice with Data Services. I have one question very simple.

I have a Query mapping with a SAP table and a flat file with information to do a WHERE clausule with the table. If my query does´t has any results, how can i do an error in log to abort the JOB?

For example:

Error 1001: The Query doesn´t find the variable BURKS.

Thanks!!

Edited by: Albertoe on Dec 21, 2010 6:48 PM

View Entire Topic
paul_kessler
Active Participant
0 Kudos

The raise_exception() function should do what you want. See details in theTechnical Manuals, DS Reference Guide, Functions and Procedures.

Paul

Former Member
0 Kudos

Thanks Paul!

Could you pease give me one example using this funtion?

I´m very novice

paul_kessler
Active Participant
0 Kudos

This example checks the BUKRS field. If the field is not empty then value is carried forward and the job continues to run. If the field is empty then an exception is raised and the job is terminated.


ifthenelse(length(BUKRS) > 0, 
     BUKRS,
     raise_exception('The BUKRS field is empty.',
)

The message defined in the function will be written to the log file.

Paul

Former Member
0 Kudos

Perfect

Thanks