cancel
Showing results for 
Search instead for 
Did you mean: 

DSO dataload Fail on particular condition

Former Member
0 Kudos

Hi Friends,

I have the following requirement and I couldnt find the solution. Kindly help me.

There is a transformation to DSO in which "Cost center" is a read Master data from "Material".

The client will be changing the master data of material at times.

So the requirement is, for a particular material say "180005" if the cost center is "5001", then the dataload should be successful. If the costcenter is other than "5001", then the dataload should fail. And it should indicate "Master Data has been changed" in the error message.

I dont have an clue how to acheive this.

Kindly give your inputs.

Regards,

Guru

Accepted Solutions (1)

Accepted Solutions (1)

former_member186445
Active Contributor
0 Kudos

change the read master data to a routine.

first in the start routine select the costcenters from 0material for all entries in the source package

then in the field routine read the internal table to check the costcenter. according to the reselt set the sy-subrc of the routine; if the sy-subrc is not null, enter a message in the message tab of the routine.

M.

Former Member
0 Kudos

Hi M Tibollo,

Thanks for the quick reply and valuable time.

if the sy-subrc is not null, enter a message in the message tab of the routine.

Can you please elaborate on this.

I understood the following from your sugesstion,

1. The Master data of material (costcenter) is read through start routine.

2. Conditional check is done in field routine of costcenter.

(IF Material = '180005' and Costcenter = '5001'.

sy-subrc = 0.

else.

sy-subrc = 1.

ENDIF.)

3. IF sy-subrc <> 0.

here how to enter a message in message tab of the routine. I never had done it before.

My doubt is will the data load also fails?

Regards,

Guru

former_member186445
Active Contributor
0 Kudos

hi,

if you want to issue a error message, this means that you flag the lines as incorrect and hence it will not be updated to the target. it will go to the error stack (if you activate the stack).

for more info:

when you create a routine (and you get in the coding part), on one of the button lines you a button with a question mark and text routines info --> push it; you get a popup. on this screen choose 'Routine for key figures or characteristics'. here you get more info with a useful example

M.

Former Member
0 Kudos

Hi,

You can use the raise exception in transformation, you can write below code in the IF condition of the routine.

**to cancel update process

raise exception type CX_RSROUT_ABORT.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Guru,

The same thing can be achieved by using a Start Routine. asper your requirement hte master data is keep on changing. so you must have a lookup on the P table of the material (/bic/P/Material ) and you can check for the corresponding Cost center values and you can allow only those records to the target otherwise you can pass them to the Errorstack table.

hope it helps.

Thanks,

Ashok

Former Member
0 Kudos

Hi Ashok,

Thanks for the quick reply.

I have few doubts from your answer. I never had worked on errorstack. So, kindly help me to resolve this.

1. In start routine, after doing lookup from P table of material, the condition is checked.

2. If the condition is satisfied, the pass the record.

3. Else the record is sent to errorstack.

Is my understanding correct?

Now my doubts.

1. Is it possible to send the entire dataload to error stack(instaed of those records alone)?

2. And how to display error message like "Master data is changed".

Kindly give your thoughts.

Regards,

Guru.