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

Change code dynamically

ronaldo_aparecido
Contributor
0 Likes
613

Good Afternoon ABAPERS.

My company will change its name and must change all hardcodes all programs with the old name.

The problem is that some programs must be run with the old name.

The functional asked to run any program with hardcoded company name appear a screen where the user could choose the old or the new name and click 'ok' code change dynamically placing the name selected in the popup is old or new.

Is it possible?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
549

Since it is hard coded, then it must either be Z code or be in an exit.  So as long as you are in the foreground, it would be possible.  However, in the background, where many reports are run, that is not a possibility.

Here are some other possibilities:

  • A PID that contains the name Then depending what the PID is set to for the user, the name changes.  So you have two background users.  One for each name.
  • A Z table where each user can set the name that they want to be using. Keyed with say:user, program.  An interface that you would write would only let them create, change, delete for their own userid.
  • A tvarvc flag to tell which name is to be used.
  • many other permutations obviously apply.

Neal

3 REPLIES 3
Read only

Former Member
0 Likes
550

Since it is hard coded, then it must either be Z code or be in an exit.  So as long as you are in the foreground, it would be possible.  However, in the background, where many reports are run, that is not a possibility.

Here are some other possibilities:

  • A PID that contains the name Then depending what the PID is set to for the user, the name changes.  So you have two background users.  One for each name.
  • A Z table where each user can set the name that they want to be using. Keyed with say:user, program.  An interface that you would write would only let them create, change, delete for their own userid.
  • A tvarvc flag to tell which name is to be used.
  • many other permutations obviously apply.

Neal

Read only

0 Likes
549

Thanks

I use Z table for control

Read only

0 Likes
549

Feel free to request any detail that you feel is lacking...

Neal