Month: October 2015

SET/GET parameters and usage areas

Within a main session, when ever you start an application program, it opens up an internal sessions with in the main session. The internal session has a memory area that contains the ABAP program and its associated data. So when ever you want to pass data between two internal sessions, then you can use ABAP Memory (i.e import, export).
When comes to SAP memory (also known as global memory), if the data has to be passed b/w two main sessions, we can use SAP Memory(SPA/GPA Parameters). SAP Memory can also be used to pass data b/w internal sessions. SAP memory is a memory area to which all main sessions within a SAPGUI have access.

send email with attachment from an ABAP program

CL_BCS class is aimed ABAP’ers to execute office operations, lets say Business Communication Service, from ABAP. Recently, i had need to send email from SAP with an attachment excel file. CL_BCS class used with CL_DOCUMENT_BCS has the required method to implement this functionality. I have created a demo program to send selected materials to selected users’ mail adresses. Users’ mail adresses are gathered from SU01 mail adresses over ADR6 and USR21 tables. Below is the sample code.

timestamp field with search help and conversion input

There are tables which holds timestamp data instead of date and time seperately. In order to query these tables you have to define timestamp fields in your screens. While defining these timestamp fields you can use CTS_TIMESTAMP domain as reference. Either create a new data element with CTS_TIMESTAMP or use existing ones like CPET_TIMESTAMPFROM,CPET_TIMESTAMPTO etc.