cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Routine ?

Former Member
0 Kudos

Hi ,

I need to write a simple routine in my Update Routine (BW 3.5) whereby only updated the data to the cube if the field 0COUNTRY='GB'

The rest should not be loaded.

Please advice

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try this one in your start routine.

  • fill the internal tables "MONITOR" and/or "MONITOR_RECNO",

  • to make monitor entries

DELETE DATA_PACKAGE WHERE COUNTRY NE 'GB'.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

Former Member
0 Kudos

Praveen,

I actually need a range to exclude,

So the code should be Country NOT EQUAL to GB, FR, RU

Can you please update the code below and send me back

[code]$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

DELETE DATA_PACKAGE WHERE 0COUNTRY NE 'GB'.

  • result value of the routine

RESULT = .

  • if the returncode is not equal zero, the result will not be updated

RETURNCODE = 0.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.[/code]

Former Member
0 Kudos

Chris ,

Looks like you are writing this code in your update rules , thats not the right place .

Goto the start routine and paste the code which Praveen has provided already.

if u find any difficulty let us know

Jagadeesh.

Former Member
0 Kudos

Okay,

I shall use it in the Start Routine.

However, please change this code and advice me how to exclude other countries apart from 'GB'

Thanks mate !

Former Member
0 Kudos

Try this

DELETE DATA_PACKAGE WHERE COUNTRY NE 'GB' and 'FR' and 'RU'.

Assign points if its helpful!

Jagadeesh.

Former Member
0 Kudos

Thanks Jag,

For a bit, if I may...

Would you please also advice how can I define the code to say such that only LOAD if Country = 'GE'

Waiting for ur advice.

Former Member
0 Kudos

Hi Chris,

If you want to load only one country information (eg: Country = 'GE')

DELETE DATA_PACKAGE WHERE COUNTRY NE 'GE'.

Here you can change 'GE' to any value which you want to load. (GB or GE)

If you want to load multiple countries

DELETE DATA_PACKAGE WHERE COUNTRY NE 'GB' AND 'FR' AND 'RU'.

If you want to add one more country, you can achieve this by adding <b>AND '<country>'</b> at the end.

Cheers

Praveen

Former Member
0 Kudos

Hi Chris ,

sorry for the delay.

if u want to load any specific country then you can write it as

DELETE DATA_PACKAGE WHERE COUNTRY NE 'COUNTRYNAME'.

Here country name can be replaced with any country which you want to pass.

Answers (1)

Answers (1)

Former Member
0 Kudos

yup praveen advice will work fine .....