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: 

Retrieve Transient Value in BAdI running in V1 Update Task (posting)

wridgeu
Participant

Hi all,

kind of a strange "requirement" or thing to ask, but maybe someone can give a bit more insight here. I'll first paint the picture of what is happening and what I'd like to archive. If what I ask for is stupid or unreasonable so be it, I'm just curious. I myself think that it is not possible but maybe someone else knows better!

We're within a custom, let's say report (doesn't really matter) and run through a process which registers some further processing in Update Task (not controlled by us so we cannot just hand over our values, registered by SAP Standard). We do not use "SET UPDATE TASK LOCAL". So a new separate session will be created. So far so good. Now after ending the main/previous session, the Update Task is executed. Somewhere down the line within this Update Task we run into a BAdI Implementation. In this BAdI I'd like to retrieve a value which existed in the previous session (the one that registered the Update Task to begin with).

Now the question: Is there a chance to retrieve this value without previously persisting it somewhere? MEMORY ID, PARAMETER ID and things like trying to use a STATIC or Function Group "globals" (i.e. Top Include) won't work. Which makes perfect sense because we're in a separate session without any connection to what happened before and not just any kind of session as well. I wonder if there is any trick that'd work here?

Haven't used much Shared Memory Objects before but as far as I understood they wouldn't be the best solution either (due to: what if you have multiple Appl. servers).

Any thoughts?

BR

Marco

2 REPLIES 2

Sandra_Rossi
Active Contributor
Now the question: Is there a chance to retrieve this value without previously persisting it
somewhere?

No.

Just pass the value as parameter of an update function module and persist it (global variable, static attribute...) Call it before the update function module which needs it.

wridgeu
Participant

Hey sandra.rossi, thank you so much! I guess this was a classic case of where the question itself was more complex than the answer. I tried so many different things but this one. 😆 Works like charm. Again, thank you lots! 🙂