Hello, Experts.
I implemented custom logging in RSROA_VARIABLES_EXIT to store Input Variable values from I_T_VAR_RANGE into a Z table.
The issue occurs when a user changes a variable value within the same session. For example:
As a result, the log history becomes:
A → A → B
instead of the expected:
A → B
During debugging, I found that the BAdI is triggered when the user opens the variable screen, before the new value is confirmed. At that moment, I_T_VAR_RANGE still contains the previous value (A), which is logged again. After the user confirms the new value, the BAdI is called once more and the new value (B) is logged.
My questions are:
Any suggestions or best practices would be appreciated. Thanks.
Request clarification before answering.
Hi,
Yes, it's standard. I read the caller in an S/4HANA 2023 system (embedded BW, function group RRS0). The BAdI is reached through function module RRS_VAR_EXIT from three places, one per step:
So the reliable way to tell "screen opened" from "values confirmed" is I_STEP: write the log only in step 3. Then you get A, then B.
Two things that can bite:
GET BADI ... FILTERS iobjnm = i_iobjnm. In step 3 IOBJNM is empty, so an implementation filtered on one InfoObject never gets that call. The logging has to sit in an implementation whose filter accepts an empty IOBJNM.For a query on a CDS view, RRS_VAR_VALUES_EXIT_CHECK takes another branch (RSRTS_CDS_VAR_CHECK). I didn't follow that one.
I read all this in the code. I didn't run a query in Analysis Office, so I haven't seen the call sequence there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.