2025 Mar 05 10:53 AM
Hello!
I'm trying to create a substitution exit. The functional consultant has set up the rules in ggb1, and I am supposed to just make the exit. We've transported everything to the test environment, but the field that is supposed to be substituted isnt being substituted.
The idea is that for a specific company code and document type, one value needs to be changed to something else. In OBBH it shows that the substitution is active, and we have run RGUGBR00 in the test environment. I've put a breakpoint in both the form declaration and the implementation, and somehow it does go into the declaration but not in the implementation.
Does anyone have any idea where the mistake could be? Is it in the abap code, could it be in something not being activated
This is what the rules look like:
And these are the parts of the code, first where I declare the exit, and then where i implement it.
And this is what the substitutions look like in GGB1:
Thank you for any help in advance!
Cheers,
Romy
Hello!
I'm trying to create a substitution exit. The functional consultant has set up the rules in ggb1, and I am supposed to just make the exit. We've transported everything to the test environment, but the field that is supposed to be substituted isnt being substituted.
The idea is that for a specific company code and document type, one value needs to be changed to something else. In OBBH it shows that the substitution is active, and we have run RGUGBR00 in the test environment. I've put a breakpoint in both the form declaration and the implementation, and somehow it does go into the declaration but not in the implementation.
Does anyone have any idea where the mistake could be? Is it in the abap code, could it be in something not being activated
This is what the rules look like:
And these are the parts of the code, first where I declare the exit, and then where i implement it.
And this is what the substitutions look like in GGB1:
Thank you for any help in advance!
Cheers,
Romy
2025 Mar 05 11:09 AM
Questions
Also
2025 Mar 05 11:31 AM
Thank you so much for your response, Raymond!
If by include, you mean ZGGBS000, yes, it has been activated.
The substitution should also have been activated, as it shows up in OBBH.
There are no warnings or errors in the import log.
The way I did the coding part, that's supposed to work like that, right? As in, I don't need to loop over a table to get to the field that needs a different value?
And how else would you have done this, without a user exit? From what Ive been told, we shouldnt update the BSEG table manually, so then I had to use a user exit instead.
And the rule was defined at step 006. Should I have done something else with that step, defined it somewhere?
2025 Mar 05 11:33 AM
Oh I did hesitate whether to use c_exit_param_none or one of the other two options, could that be it? The document type and company code are checked, and if its true, then a specific field in BSEG (that wasnt available first, which is why I needed the user exit) needs to be changed to a constant value.
Kind regards,
Romy
2025 Mar 05 1:59 PM - edited 2025 Mar 05 2:03 PM
Forget my 'step' I shoud have written 'Call Point' (lost in translation)
BSEG fields (including ZZ fields) should be already available in substitutions. Look at table GB01 (view GB01C) or VWTYGB01 (SM30) there is an exclude flag to deactivate if required, in this case correct and execute RGUGBR00. Check also KBAs such as 3351552 - Usage of fields in Substitution and Validation in connection with GB01 transparent table (but for customer fields no problem)
conceptually use of field = 'constant' in the rule or create an exit routine where field = 'constant' does not change anything?
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |