Wednesday, March 05, 2008

SAP and ABAP random notes

Date Formatting
BEGDA should be TYPE DATS. Strangely enough, if BEGDA is declared as TYPE DATE, the date formatting using WRITE won't work. That had baffled me for 30 long minutes.

BEGDA = '20080303'.

WRITE BEGDA DD/MM/YYYY.


Result:-
03.03.2008

Static Method
How to identify static methods in a class?
1. Use TCODE: SE24, to study the class definition
2. Go to Methods tab, and look at 'Level' column. It should be 'Static'.

Use the following syntax to call a static method:-

Observe that it is '=' instead of the conventional '-'.

classname=>get_pernr( ).


OR

CALL METHOD classname=>get_pernr( ).


How to do class Definition Load?

Before a static method can be accessed, the class it is associated with must be loaded into the stack for the compiler to understand it.

class classname definition load.


SAPConnect
How to add the email addresses that should be sent to, in SAPConnect administration, from SAP.

1. SOST - Administration of External Send Processes
2. SCON - SAPConnect : Administration (system status)
3. Double click on the node under INT
4. Click on button for 'Internet'
5. In the 'Address Area', add in the email required or use '*@domain.com'.