Gyan Factory

Gyan Factory
SAP Technical Project Support
Showing posts with label Debugging. Show all posts
Showing posts with label Debugging. Show all posts

Sunday, January 17, 2016

Debugging A Background Job : SM37

Scenario: Suppose you scheduled a background job in SM36 and executed in SM37.
This background job is related to a Report and you want to debug it.
(Click on the Picture to see a Larger One)
Step1. Goto SE38, Open the report and Place a Breakpoint.





























Step2. Go to SM37, Provide the Job Name and click on execute button.




















Step3. Select the JOB and in the Command Box write 'jdbg' and hit the Enter Button.

















Step4. Press  F8 and the next breakpoint of the Report is triggered.























Step 5. The Report  breakpoint is reached.

Debugging a Pop Up Screen In SAP

Scenario: Some times in SAP we can come across a scenario, where a pop up screen needs to be debugged to find out the  exact cause of the error. The pop up screen doesn't have the command box as normal sap screen have. So SAP provides tricky but easy way of debugging the pop up screen. The below blog shows the same.

Step1. Go to Tcode- XD01 to create a customer master.









Step2.  The below pop up screen appears. The pop up screen doesn't have the command box, so we are unable to activate the debugger by '/H' command. So SAP provides us with a different way of debugging it.



























Step3. Create a text file(.txt) in your desktop screen with any name. Put the below mentioned code in it and save it. After that just drag the Text file and drop it on the Pop up Screen and it will activate the debugger for the screen.























Step4. The debugger is activated for the pop up screen .  Click on the continue button or hit Enter  key from keyboard.
































Step5. The debugger session is in process.































Step6. Finally the debugging screen appears.

Thursday, January 7, 2016

13.Smartfrom : How to debug a smartform?

Step1. Go to Tx- SMARTFORMS







   


 


Step2. Open the standard Smartform LB_BIL_INVOICE and display.



 

Step3. Double click on the Form Interface.Here we have import parameters. For demo we will mark how the structure LS_BIL_INVOICE is filled from the driver program and passed to the smartform. Click on the smartform TEST button.

  

Step4. Click on test button.

  

Step5. Here we have the smartform function module is is called from the driver program. Click on display.



Step6. Locate the subroutine PERFORM %GLOBAL_INIT. Put a break point.



 


Step7. Now go to Tx- NACE.



 

 


Step8. Select Application - V3 and select output types button.



 

Step9. Slect the output type- RD00 and double click on the Processing Routine.



 

Step10. Double click on the first line.



 

Step11.  This output type - RD00 uses the driver program - RLB_INVOICE & the smartform it calls as : LB_BIL_INVOICE. Double click on the program- RLB_INVOICE.



 

Step12. Find the Entry subroutine. Double click on the subroutine Processing.


  

Step13. The below screen appears.



 

Step14. Go to the function module call where  LS_BIL_INVOICE structure is filled .




  

Step15. Go to Tx- VF02 .



 

Step16. open any billing document.

  

Step17. Navigate from Goto->Header->Output.

  


Step18. The below screen appears.



 

Step19. Provide output type as - RD00 and save.



  

Step20. Provide the default printer name and go back.



 

Step21. Save it.



 

Step22. The below screen appears.



 

Step23. Navigate from Billing Document-> Issue to output.

  

Step24. Select the line and click on preview button.

  

Step25. The break point is triggered in the driver program.



 

Step26. The break point is triggered. Double click on the variable LS_BIL_INVOCIE.

  

Step27. The driver program sends all the information to the smartform. Click on F8.

  

Step28. Here the smartform debug point is triggered. Click on F5 button.

   

Step29. Click on the variable IS_BIL_INVOCIE.

  

Step30. The information send by the driver program is available in the form interface.



 

Step31. Click on F8 button.

  

Step32. The invoice output is generated.





--------------------------------------------------------------------------------------