Just for fun, you can make sap talk to the user or, for more serious work, you can give hearing aids to alert the users for some event or to help them be more aware of what is happening.
As a final thought, I should say that, this is a simple example. As most of the times, you have plenty of room to improve.
Don't forget that this is an instanciation of a windows object. It will only work with SAP Gui for windows.
Remark: depending on the security settings of your SAP GUI configuration, a popup can appear asking for authorization to instanciate a windows object.
Friday, October 25, 2013
Thursday, October 24, 2013
Batch Input with Objects
Some times, we get such a requirement that forces us to use batch input for creation/changing of some SAP object/document.
Usually, the resulting code isn't that elegant.
In this post, I'll show how to use a ABAP Class to process call transaction and allow to future improvements that afects every program that uses it, without the need to change those same programs.
Those improvements could be:
1 - Create an ABAP Class in transaction SE24, select an apropriate package:
2 - Create the following attributes:
3 - Create these methods:
4 - Pick the relevant code for the each method:
Those improvements could be:
- Create Batch input in DB for latter processing
- Create Enhanced Logs
- Start Workflows
- Etc
1 - Create an ABAP Class in transaction SE24, select an apropriate package:
2 - Create the following attributes:
3 - Create these methods:
4 - Pick the relevant code for the each method:
5 - Save and activate the class.
6 - To help generate the code, the following program can be used:
The input for this program is the SHDB record and the program variable name.
7 - Example:
8 - Program Input
9 - Generated Code:
Final remarks:
As you can see, the code is more understable and simplier to use.
The SHDB record name, must be unique, since it is selected by name.
With the generated code, you must add the coding for variable selection and remove unecessary inputs. The program only creates code for the relevant batch input lines.
6 - To help generate the code, the following program can be used:
The input for this program is the SHDB record and the program variable name.
7 - Example:
- SHDB Record:
Final remarks:
As you can see, the code is more understable and simplier to use.
The SHDB record name, must be unique, since it is selected by name.
With the generated code, you must add the coding for variable selection and remove unecessary inputs. The program only creates code for the relevant batch input lines.
Friday, December 31, 2010
Tuesday, April 6, 2010
Thursday, March 11, 2010
SAP Texts Transport
An simple way of transport SAP texts is to use the program RSTXTRAN.
First, you must create a transport order, check if the task is of development/correction type.
After that, take not of the task number (not the request), and introduce it in the program, together with the text name, type and language.
Wednesday, February 24, 2010
Hello world!
One of the simpliest programs that you can create in abap, is the famous Hello World.
report y_hello_world.
write:/ 'Hello World!'.
report y_hello_world.
write:/ 'Hello World!'.
Thursday, February 18, 2010
Scan string in ABAP programs
As with sapscript, sometimes we need to find certain strings present in abap source code. For this, sap provides us with an interesting program: RPR_ABAP_SOURCE_SCAN
Subscribe to:
Posts (Atom)