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: 

Change Class content from a report

Former Member
0 Kudos
696

Dear friends,

The requirement is to replace some content "ABC" with "XYZ" in all classes (or even from a list of classes taken from user input.

Is it possible to do this programatically from a report?

Thanks!
Rohan

1 ACCEPTED SOLUTION

retired_member
Product and Topic Expert
Product and Topic Expert
481

What is "class content"? If it is source code why don't you simply read SAP's documentation and especially all the warnings there. Since it seems that you are not too experienced with that stuff, I'd say: Hands off!

8 REPLIES 8

retired_member
Product and Topic Expert
Product and Topic Expert
482

What is "class content"? If it is source code why don't you simply read SAP's documentation and especially all the warnings there. Since it seems that you are not too experienced with that stuff, I'd say: Hands off!

0 Kudos
481

Thanks, Horst. And, thanks for the warning!

bertrand_delvallee
Active Participant
481

Hello,

That seems a desperate solution but it's doable.

Please, have a look at this thread :

https://archive.sap.com/discussions/thread/90787

Whatever solution you will choose, you should really consider changing "XYZ" by a call to a static method / class constant instead of a raw value.

Best regards

0 Kudos
481

Thanks, Bertrand. Will follow up that trail.

Former Member
481

I would go further and instead of modifying this value direct in code, modify the method to read from a table or something like that and then you would not need to change this in the code afterwards.

matt
Active Contributor
0 Kudos
481

Yes. If a global change like this is required, it's an indication of poor programming to begin with.

0 Kudos
481

<grins> and ducks.....

0 Kudos
481

I know, I know. This is for a poc we're working on, where we're trying to switch frameworks. Just an option that must eventually be struck off, but not before knowing the possibilities.