cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP BPC, write_back

Former Member
0 Likes
865

Hi all,

I'm using the   if_ujo_write_back-> write_back in order to write some records into a model that is not  my starting one

The write_back works but the problem is that, if for some reasons, one ore more record are rejected it writes the other records

This result is very misleading because we’ve a partial result

Just to clarify, some examples of reason to reject records:

- the user is not authorized to some values

- the target cube is in status "planning not allowed"

- some dimensions are not correct

So I'd like to make a preventive check on the data I'm going to write and in case of errors send a log with the detail

I'd tried to use the write_back with the parameter EXECUTE_BADI empty but it doesn't work and the correct values are written

Do you have any idea on how to perform a complete check before actually writing the values?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Likes

Hi Stefania,

Just think that without badi user will also have the errors:

- due to work status lock

- write to parent

...

It's a general rule: write what is possible and show rejected!

Why do you need to use explicit write_back? Just prepare ct_data with all records and the system will do the rest!

Vadim

Former Member
0 Likes

hi Vadim,

thanks for your fast answer

I'll try to explain my problem: I've 2 cubes one for the values (let's call it cube A) and one for the status of a cost center (let's call it cube B).

After posting the values in cube A I've to change the status in cube B

After changing the status, the user is no longer allowed to perform the posting again in cube A

So I need to stop the procedure if something goes wrong when writing in cube A without writing anything

thanks

former_member186338
Active Contributor
0 Likes

Sorry, but not clear "I've to change the status in cube B"? What do you mean?

Former Member
0 Likes

Hi,

I mean that the cost center can't be changed any longer if there is a specific record in cube B (this is a functional requirement)

So I need to be sure that everything was fine in  cube A before changing this "status" the cube B

former_member186338
Active Contributor
0 Likes

Strange idea! Why not to use work status functionality in cube A??

Former Member
0 Likes

it was for some issues with the reporting but if we don't consider the specific case is there any option to run a complete test of the values I'm going to write without actually writing?

thanks

former_member186338
Active Contributor
0 Likes

Unfortunately no! You have to write and then analyze returned status, rejected records etc...

Vadim

Former Member
0 Likes

thanks

former_member186338
Active Contributor
0 Likes

And in general I recommend you to rethink the functional requirements and use standard locking methods...

Former Member
0 Likes

Can't you do what Vadim suggested initially: in your BADI analyze of there was an error in writing to cube A and in that case do not update cube B?

Yes, you'll have partial results in cube A, but use can still fix remaining records. After all of them are written back correctly you can change record in cube B.

Former Member
0 Likes

yes, In conclusion I'll follow this suggestion but if it was possible I'd rather not to write anything in cube A because it would be a partial result

Plus if the cube A is in loading mode the WRITE_BACK doesn't highlight the error

former_member186338
Active Contributor
0 Likes

If you test something before performing actual write there is no warranty that when you write the conditions will not change

Answers (0)