Application Development and Automation 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: 
Read only

Creating substitiution exit

RomyA
Explorer
0 Likes
3,542

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: 

RomyA_0-1741171487550.png

And these are the parts of the code, first where I declare the exit, and then where i implement it. 

RomyA_2-1741171612072.png

RomyA_1-1741171560373.png
And this is what the substitutions look like in GGB1:

RomyA_3-1741171694754.png
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: 

RomyA_0-1741171487550.png

And these are the parts of the code, first where I declare the exit, and then where i implement it. 

RomyA_2-1741171612072.png

RomyA_1-1741171560373.png
And this is what the substitutions look like in GGB1:

RomyA_3-1741171694754.png
Thank you for any help in advance!

Cheers,
Romy

 

 

 

4 REPLIES 4
Read only

RaymondGiuseppi
Active Contributor
3,528

Questions

  • Has the include been activated (manual)
  • Has the substitution been activated
  • Are there warning/error in import log

Also

Read only

0 Likes
3,514

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?

Read only

0 Likes
3,513

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,455

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?