cancel
Showing results for 
Search instead for 
Did you mean: 

BPC UJR_WRITE_BACK badi

naveen1241
Participant
0 Kudos

Hi folks!

I'm a newbie in BPC and would like to know if Write Back badi should be used only for modifying output in the CT_ARRAY? I've a requirement to update dimension attributes in addition. The data is not getting saved at all. I'm using implementing if_uja_member_manager & if_uja_dimension_manager methods. I found that the program is saving the record at some point and later marking as dirty record and reversing the changes made some where inside the standard code. Appreciate if someone could point me to the right direction.

Thank you

Naveen

Accepted Solutions (1)

Accepted Solutions (1)

former_member186338
Active Contributor
0 Kudos

Hi, Naveen!

What do you mean by "update dimension attributes in addition"? What logic do you want to implement?

Vadim

naveen1241
Participant
0 Kudos

Hi Vadim,

     Thank you for the quick response. I'm still getting comfortable infocube, dimensions, characteristics and other data warehouse related terminologies and could be using them at the wrong places and creating confusion .

Currently, I'm performing some disaggregation in the WRITE BACK BADI and it's updating the cube as intended. Now, in addition, I have a document dimension which has a document characteristic. I'm trying to change the status field value of master data table for a particular document number to 'POSTED'.  I read the required data using MBR_DATA_READ and in that I have the document status as 'DRAFT' which I'm trying to change to 'POSTED'. Hope this time I'm making some sense.

Thank you,

Naveen

former_member186338
Active Contributor
0 Kudos

Sorry, but you are going to the wrong direction! Even it's possible to change master data properties in some badi it will require dimension processing etc...

Look on

In general - don't change master data in write back badi! Don't create ERP system from BPC

Vadim

naveen1241
Participant
0 Kudos

Thanks Vadim for the details. If I've to still go with changing master data, the document mentions using custom logic badi and not the write back badi. Is that correct?

If yes, my next dumb question would be - Does it mean that master data change can never be accomplished with Write Back Badi.

I'm just 1 week in to the BPC domain and has always been working with ERP systems only so far. Hence I might be asking too much questions too.

Very much appreciate your help extended so far.

Thanks again,

Naveen

former_member186338
Active Contributor
0 Kudos

In BPC the idea to change master data in write back is absolutely wrong - it will slow down data saving dramatically and will create locking conflicts etc...

Simply try to use other logic!

Vadim

naveen1241
Participant
0 Kudos

Okay Vadim. Does that mean using custom logic badi?

Currently, the document creation and modification is done from input forms with the help of custom logic badi. Can you kindly cite some options w.r.t your advise for other logic usage it that's not too much to ask for?

Thanks again!

former_member186338
Active Contributor
0 Kudos

"Does that mean using custom logic badi?" - changing of master data properties is some very special case and I do not think you have to use it at all!

You have to clearly describe the business process you want to implement! In this case I may be recommend some solution!

Vadim

P.S. May be Work status and BPF will help you...

naveen1241
Participant
0 Kudos

Okay. Let me try to explain the scenario.

1. I create a document A and then another document B to start with. Both will get created as master data and have status as 'DRAFT'.

2. Subsequently, I perform certain business processes on document A. Say, I create 4 records that has reference to document A. Currently, I perform some disaggregations required for those 4 records using the write back badi.

3. The disaggregated data is written to a custom infocube. At this point in time, my business requirement is that the status of the original document A which has been referenced in step 2 above should get changed from 'DRAFT' to 'POSTED'. So that the document A will be

1) Prevented from being used again for any other activity and 2) Various other reasons not relevant and hence unknown to me as of now.

-- So far, I attempted performing the disaggregation using WRITE BACK badi and it's getting saved in the cube as intended. But the status of the master data is not getting updated as POSTED. The data is not getting saved at all. I'm implementing if_uja_member_manager & if_uja_dimension_manager methods. On debugging, I found that the program is saving the record at some point in time and later marking as dirty record and reversing the changes made some where inside the standard code.

Looking forward Vadim...

Meanwhile, Work Status & BPF is certainly food for thought for me. Quick question on Work Status - Is there a limitation on the number of different statuses that could be utilized? I am yet to gain information on these and just started digging based on your input.

Thank you so much for taking your time out!

former_member186338
Active Contributor
0 Kudos

Sorry, but still nothing related to the business process! Just some programmer view of things

Anyway, don't spend time for changing master data in write back. Useless!

For work status you can have a number of work status codes but I see no reason to have some significant number.

Vadim

naveen1241
Participant
0 Kudos

Vadim,

May be, being a programmer I'm unable to provide sufficient information in the requested way .

To me, it's just transfer of funds from one bucket to one or more different different fund bucket/s that refers to a particular document. Once a transfer is initiated, the document status changes from DRAFT to POSTED. End of story w.r.t my scope.

Would you be able to ask specific questions for which I may try to get answers?

From whatever communication we had so far, is it better to get the master data change done using custom logic badi instead of the write back badi given these two are the only options.

If possible, could you point me to some scn thread wherein similar questions/answers about business requirements came up and scenarios were explained clearly. If so, I guess I could begin thinking from a business process point of view rather than my technical biased thought process.

Thank you in advance,
Naveen

former_member186338
Active Contributor
0 Kudos

Ok,

Simple answer - BPC is not ERP! You are trying to implement ERP type processes in BPC... Wrong way. Don't change master data at all!

About business process: What do you want to plan or report? What model do you want to use (dimensions... etc...) How do you want users to enter data? What calculations will be performed...

Vadim

naveen1241
Participant
0 Kudos

Okay. Thank you. So there's no question of altering master data.

I think I got it completely wrong referring to the data as MASTER data throughout the thread.

Can I use IF_UJA_MEMBER_MANAGER~SAVE method in the write back badi for changing dimension data or any type of data? If not, where could this method be used?

Thanks,

Naveen

former_member186338
Active Contributor
0 Kudos

IF_UJA_MEMBER_MANAGER~SAVE method is the method to change master data. Then dimension has to be processed with PROCESS method.

And it's absolutely bad idea to use the mentioned methods in write back! I have told it already number of times.

naveen1241
Participant
0 Kudos

Okay. So, ideally this IF_UJA_MEMBER_MANAGER~SAVE and IF_UJA_MEMBER_MANAGER~PROCESS methods provisions from SAP are designed to be used from which places?


Sorry for making you repeat that these shouldn't be used in write back n number of times.

Thanks again,

Naveen

former_member186338
Active Contributor
0 Kudos

Please read once again:

In some special cases you need to allow users to create new members of some specific dimension without access to the dimension administration! To do it from Excel using DM package. Even in this case there is the risk of locking etc... if number of users will perform it simultaneously!

Vadim

naveen1241
Participant
0 Kudos

In my case this is done from excel, but with manual input. Only very limited users will have access and very minimal or NIL simultaneous usage. So, this IF_UJA_MEMBER_MANAGER~SAVE and IF_UJA_MEMBER_MANAGER~PROCESS methods can be used from custom logic badi only?

Thanks,

Naveen

former_member186338
Active Contributor
0 Kudos

Sorry, but your main idea with 'DRAFT' and 'POSTED' in member property is wrong! Please try to read some documents about BPC and BW concept.

Vadim

naveen1241
Participant
0 Kudos

Thanks Vadim.

But, currently I do not have a say on all these stuffs and I've a spec with me to get  completed just like a task. Unfortunately, running short of time to get a good idea about things and suggest something. Got stuck in between by being unable to save the member property in the process. Came in here hoping for getting quick comments/tricks. Getting an idea of all the concepts is going in parallel. 

Thanks for all the info & suggestions ....

Appreciate your timely real quick replies!!!

former_member185511
Active Participant
0 Kudos

So you want to update some master data items just by using ABAP without using WEB Admin ?

I did the same by using the standard methods, probably you forgot to send your "I" as your insert flag and "M" for modified flag during master data save for the required fields.

But you are talking two totally different things in same topic writeback is for transactional data.

naveen1241
Participant
0 Kudos

Thanks Bilen.

I tried with and without insert/modify flag. Something should be wrong somewhere and I'm clueless.

Even if it's not meant for, still If dimension member data is modified in Write Back, what happens?

Is it that it cannot be done at all or should not be done?

former_member185511
Active Participant
0 Kudos

Modifiying master data in the writeback method is not a good idea because if another process(lets assume a parallel process) tries to writeback records during processing the dimension you can get error message.

I understnat your scenario, probably  if user enter any transactional data for your document numbers, you will change their status to POSTED or DRAFT.

Better create a separate package for master data update or use default logic.

former_member186338
Active Contributor
0 Kudos

Hi Bilen,

I have told the same number of times already! Looks like the topic author do not understand the concept of BPC master data He have to rethink the whole scenario

Vadim

P.S. What do you mean by "default logic" in your proposal??? Same issue as with write back!

former_member185511
Active Participant
0 Kudos

hi Vadim, sorry my bad i didnt read whole discussion.

Yes same concept but on programming side and structure, default logic will be tidier. Processing master data takes some time (our WBS dimension has 100K+ records), everytime processing the dimension after save will make user crazy due to performance issues.

former_member186338
Active Contributor
0 Kudos

And unfortunately topic author is unable to explain the business process ...

Other solutions can be evaluated like:

- work status

- draft category or datasource

- saved/posted journals

etc...

Answers (2)

Answers (2)

naveen1241
Participant
0 Kudos

Thanks Vadim & Bilen ..

Vadim, my questions were more of curiosity rather than with intention to implement it wrongly.

Another related question in this regard. IF_UJA_DIM_DATA~READ_MBR_DATA is used to get master data, similarly if I want associated text table info, what would be the approach?

Thanks in advance!

former_member186338
Active Contributor
0 Kudos

I don't understand what do you mean by: "I want associated text table info"

But please read also:How To Migrate BPC 7.x BADIs to BPC 10 | SCN

Vadim

naveen1241
Participant
0 Kudos

Thanks a ton Vadim & Bilen . Getting this quick responses within a relatively small BPC community is simply amazing.

Everything sorted out as of now. Data save got done by passing the text table data in addition to the regular MBR data.

Getting text table info was just an importing parameter flag of the READ_MBR_DATA method.

naveen1241
Participant
0 Kudos

Thanks Vadim & Bilen.

I will check on how to deal with this and started exploring other options. There's one thing here I still don't get clarity.

I UNDERSTOOD that the update should NEVER be done from Write Back Badi. It's not at all recommended and never to be attempted.

My question is if I try to do that, leaving apart the performance and other better solutions, technically speaking, is it 100% sure that the master data cannot be saved? If you are unsure about this, you may answer that as well.

former_member185511
Active Participant
0 Kudos

Naveen i didint say we cannot save. We can save anytime. On my ongoing project i already created seperate screen for users just to create new heirarcies, master data, attributes etc without webadmin... and during saving and processing i am not checking backend if there is any calculation is ongoing.

former_member186338
Active Contributor
0 Kudos

Why do you need to ask questions?

If you want to do incorrect thing - just do it and look on results Based on the code sample in

it will take a normal ABAPER 2 hours maximum to create a working master data saving!

Then look how it will work

Vadim