Application Development 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: 

RS_TOOL_ACCESS for program edit through program

Madhurivs23
Participant
0 Kudos
893

Hi Team,

I want to make use of this FM to modify the custom program in certain cases. For e.g. - if there is a statement "Break-point" then need to comment that and get this change in the Transport request.

Have anyone used this FM for this requirement?changing custom program through custom program (programatically)

Can anyone please send me sample code if its available as this is urgent

thanks

Madhuri

6 REPLIES 6

gregorw
Active Contributor
0 Kudos
256

I've updated the tag of your question to "ABAP Development" as this would be more accurate. You might check how abapGit does export and import programs, classes and function groups.

Sandra_Rossi
Active Contributor
256

You could configure Code Inspector to prevent BREAK-POINT keyword, and configure the transport to check Code Inspector at release time.

If you want to change a source code, use the ABAP statement INSERT REPORT ("for internal use only").

matt
Active Contributor
0 Kudos
256

Programmatically changing programs in the background in this way is a bad idea. Far better to highlight it as an error and make the programmer change it.

DoanManhQuynh
Active Contributor
0 Kudos
256

That function module purpose is:

General interface for all tools of the Abap Development Workbench

so, if you send operations 'EDIT', it will call SE38 to show your program in edit mode only.

Suggestion: instead of develop a new program to edit others program, you can use SCI, which is standard transaction, to scan them and do the manual work, it easier and quicker.

If you still want to do it with your own program, using READ REPORT to load program source code, change it and use GENERATE SUBROUTINE POOL, INSERT REPORT...read more in F1 help

Madhurivs23
Participant
0 Kudos
256

Hi thanks all for the reply.

Hi Quynh Doan Manh,My purpose basically is during s4 hana migration. ( if not wrong during brownfield implementation)to auto change the previous program to make it compatible with S4 HANA.For eg. if somewhere, matnr has been declared as char18 then change it to declare as with data element matnr to match up with the char40 declartion. like that.so my approach is, first scan the custom program, fill up some table with the "wrong" or "incompatible" tags and the line number and through this FM, go to that line and change that line. or comment the line and copy the "compatible" line and get all this in one TR.I will try your approach and get back 🙂
thanks a lot!regards,Madhuri

Madhurivs23
Participant
0 Kudos
256

Hi Gregor,

Thanks , will take a look at abapGit