SAP Database - The Unofficial SAP Knowledge Base

Hi Guest!
You can contribute to SAP Database on any topic. SAP Database might be the right place for your Ideas/Opinions to reach a larger audience.

SAP Forums

New to SAP Database? Register Now
Already a member? Login
Social Bookmarks:

How to Modify the code in Quality or Production Systems?

Print This Post Email This Post Written by admin on Mar 31st, 2008 | Filed under: SAP General, Tips & Tricks

How to modify any code in Quality or Production without the need for a access key.

Imagine, you are doing a unit test for a object in QA, suddenly a test case fails and oh! come one you have to change this one line again in development and move it to Quality to test. That will take definetly at least 5 minutes to 30 minutes, depending on how your system is configured. How about changing the code directly in quality and continuing the testing. One little suggestion before we proceed with the tutorial, always use this trick only in quality and not in production or it may create chaos. I work on 4.6c and have not used this trick in all the other sap versions. Please try it and let me know your comments.

When you click on the change button in quality, you will get a screen like this saying ‘Error in Object Editing’.

Error in editing object

Now, we will work out a way to skip this message and make the change to the code. You will need this handy debugger to start the debugger from a popup.

Drag the debug tool and place it on the above popup. then, Click Continue or Press Enter. This will take you into ABAP Debugger. Click on Call stack button –> double click on Function TRINT_CORR_CHECK. ABAP Debugger
Now click on Fields button and then set a break point on the line LV_SUBRC = SY-SUBRC ( see image below) after the call to the function module ‘TRINT_CORR_CHECK’.

ABAP Debugger 2

Press F8 and the code will stop on the line ‘LV_SUBRC = SY-SUBRC’. Double click on SY-SUBRC and the value must be ‘12′ now change the value to ‘0′. Now, press F8 again, this should bring you back to the editor with change mode.

Wait, there is an another step to it. Once you edit the code and make the changes and press activate. The program will again bring you to the same window saying ‘Error in Editing Object’.
Error in editing object

Now, again drag and drop our little Debug Tool. Then click continue or press enter. This will take you to the ABAP Debugger, well this is a similar code, but it’s a different include so you have to carry the steps again. Click on Call stack button –> double click on Function TRINT_CORR_CHECK. Now, you will get a screen like below.

ABAP Debugger 3

Now, set the break-point at line ‘When 0′. Press F8 and now change the value of SY-SUBRC from ‘12′ to ‘0′.

Press F8(execute) and now the program will going through a set of break-points set by you. Change the value everytime from ‘12′ to ‘0′ and press F8. Finally after three or four execute sy-subrc changes, the program will finally get activate and you will have the new modified code available to execute.

Do you know about the syntax ‘INSERT REPORT‘. We can also modify the code using it.

Copyright SAP Database : This article can be reproduced as long as this line stays.

If you like this post, you may as well like these too:

  1. Source Code: Few simple examples 1 2 3 4 5 6 7 8 9 10 11 1
  2. SAP Quality Management Collection of all the SAP
  3. Unicode based Code Pages Drawbacks of SAP Character
  4. Quality Certificates You will learn about Crea
  5. Quality Inspections Understand about Use QM M



One Response to “How to Modify the code in Quality or Production Systems?”

  1. It works! Now i can play a lot in the QA system.

    Reply

Leave a Reply