Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CHECK BADi - looking for an efficient way to retrieve runtime data in RFC call

matteo_montalto
Contributor
0 Kudos

Hi all gurus,

my scenario: an SRM system configured to work in extended classic scenario with plenty of backends.

In order to evaluate some custom data, I have basically to retrieve some data from backend at runtime; an RFC call could do the job, but since there's no way, afaik, to run this RFC only on the first time that BBP_DOC_CHECK_BADI is triggered on a document... This would lead to an RFC call each time the BADi is triggered, just to get the same data (yes, they ARE specific for a document but they're also invariant in short time)... system performance are surely affected by this procedure.

I was looking for an effective and efficient solution to get RFC data only once (e.g. on the first BADi run) and store them so that each following iteration of BBP_DOC_CHECK_BADI could easily access them. Is there any ABAP facility that could be useful for the task, maybe memory areas reservation or something like a buffer I can work on? Thanks in advance.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Can you do this outside of this BADI?

Rob

5 REPLIES 5

Former Member
0 Kudos

Can you do this outside of this BADI?

Rob

0 Kudos

Hi Rob,

I'd like to find a spot in which I could do that RFC call instead of doing it in the CHECK BADi... This spot should be executed every time a document is loaded, so that I can make a unique RFC call and use the retrieved data in the BADi.

Unfortunately, I'm not aware such spot exists without breaking the standard code. There's also another difficulty; supposing I could find a spot/enhancement in which I can make the RFC call, how can I then pass these data to the BADi without breaking the standard interface?

0 Kudos

Did you look into temporarily buffering the results of the first RFC call inside the BADI, e.g. via static data declarations, or export to memory or database? You could then first check if the data is already present, and only if not, do the RFC call.

Thomas

0 Kudos

Another useful hint, thanks. I'm actually considering the idea of getting these data via RFC "on demand" directly from BADi; as far as requirement are going to be more detailed, we point out that these data retrieved from RFC call are NOT necessary in every CHECK BADI run, but only under specific assumptions.

Given that we should make some performance tests, it seems reasonable to me retrieving data only when needed directly in the BADi via RFC; furthermore, as these checks should lead to an error message, we assume the user will fix it asap so that subsequent BADI executions will not meet the criteria that led to the errors.

Any hint or comment on the above solution is highly appreciated, thanks again.

Former Member
0 Kudos

Hi,

You can use shared memory objects to control your RFC call. Keep your data from RFC call in shared memory with time stamp or device any other logic to control your RFC call directly from the BADI itself.

I think this will be an efficient way.

Resources:

http://help.sap.com/saphelp_nw70/helpdata/en/c5/85634e53d422409f0975aa9a551297/content.htm

http://scn.sap.com/docs/DOC-13500

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/307d791b-3343-2e10-f78a-e1d50c7cf...

I hope this will work for you.