Showing posts with label Tricks. Show all posts
Showing posts with label Tricks. Show all posts

SAP ABAP Tricks

Posted by Krishh Webworld | 6:05 PM | | 1 comments »

In this section you will find some Tricks in ALV, Classical Report, Smartforms...


ALV

Move Cursor to next Row by Pressing Enter in OO ALV
Describes how to move the cursor to next row on Enter (like Excel) in the ALV created by class CL_GUI_ALV_GRID.

Moving Cursor to Next row by pressing Enter in Classcial ALV
Describes how to move the cursor to next row on Enter (like Excel) in the ALV created by REUSE_ALV_GRID_DISPLAY.

Classical ALV: Change Subtotal
Eloborates how to change the subtotal values in the output generated by the FM REUSE_ALV_GRID_DISPLAY.

OO ALV: Disable DELETE key on keyboard in ALV grid
Describes a way to disable the DELETE key on the keyboard in the Editable OO ALV generated using the CL_GUI_ALV_GRID to prevent users to delete any record from the ALV.

ALV: Disable DELETE key on keyboard in Classical ALV grid
Eloborates a way to disable the DELETE key on the keyboard in the editable Classical ALV grid generated by using the FM REUSE_ALV_GRID_DISPLAY.



Classical ABAP

Remove Header on Last Page in Classical Report
Shows how to remove the Header Generated by the TOP-OF-PAGE in the classical report.

Radiobutton Values using CASE
Code snippet to show how to access radiobutton values using CASE statement. To make performance efficient program, we can consider this option.

MM02 BDC: Select Specific Material Master View
Shows how to remove the Header Generated by the TOP-OF-PAGE in the classical report.



Smartforms

Dynamic Background Colors in Smartforms
Eloborates how to create dynamic background colors in Smartforms.

Smartforms: Breakpoints
Shows how to put a breakpoint in Smartforms in more efficient way.



Miscellanous

SAPConnect: Email with Formatting
Describes a way to send Rich Formatted Email from SAP (SAPConnet) using HTML.

Preserve Downloaded data formatting in Excel
Eloborates how to prevent the data formatting when we download the data from SAP and open it in Excel.

SAP Smartforms: Breakpoints

Posted by Krishh Webworld | 5:56 PM | , | 0 comments »

Debugging is necessary when we have program lines node in our Smartforms and the code in the program lines node is not working as per our expectation. Currently, we don't have the Breakpoint button as what we have in the ABAP code Editor in the Workbench. So, what are the options to put a break point in Smartforms:

1. Hardcode the BREAK-POINT: We just have to put the BREAK-POINT statement whereever we want to stop the code and look inside in Debugger. This is good option when we are developing the Smartforms. But we all, as per the Human nature, forgot to remove those BREAK-POINTs from the program lines and Users would have to face the debugger at each and every break-point and would start shouting..!! This is what we all don't want. So, this option is not good.

2. Breakpoint using BREAK user-name: We can put the break point using the statment user name addition to the break command, for example BREAK NAIMESH. These break points would not stop any other users who would run this Smartform. Still it has some disadvantages: Everytime the developer who has put the break point will stop i n the Debugger. It is fine, if we have only one or two, but we have many than it would be a problem. So, this makes the option less powerful.

3. Breakpoint on the fly: To put a break point on the fly, we can follow these simple steps to put a breakpoint as required.

Step1: Open your Smartform and Copy the text as which you want to put a break point and press the Test Button. It will bring you the Function Builder.



Step 2: Press the dispaly button to open the code of the function.

Step 3: Press the Find (control+F) button.
Step 4: In the find screen, paste the copied text (control+V) in the Text.
Select the option "In main Program"
Press Enter
Step 5: From the hit list, go to the source code by doing doubleclick on the search results. Now, put a Cursor on the line and press the "Set Breakpoint" button.
That's it. So, when you run the application it will stop to this break point.
It seems to be the lengthy steps, but they are effective.

Archives

Subscribe Now: Feed Icon