Archive

Posts Tagged ‘ABAP API’

ABAP Email Traditional API

January 7th, 2010 No comments

SAP provides several function modules to send email to the external world. The interfaces of them are more or less the same, just with some minor difference.

Function Group: SOI1 – API Function Modules for Externals

Function Module:

SO_DOCUMENT_SEND_API1 – SAPoffice: Send new document with attachments using RFC
SO_NEW_DOCUMENT_SEND_API1 – SAPoffice: Send new document
SO_NEW_DOCUMENT_ATT_SEND_API1 - SAPoffice: Send new document with attachments using RFC

In the implementation, all above function modules will call another function module ‘SO_OBJECT_SEND’ to send email.

Differences among these function modules:

SO_DOCUMENT_SEND_API1 - In this FM u can specify the sender address. Means u can hardcode any ID and system will display that sender only irrespective of who is running the report.

SO_NEW_DOCUMENT_SEND_API1 – Through this system will pick sender based on from which id running the program. This function module also enables you to send a new document, which has not yet been created, internally and externally. During the send process the document is created, along with the attributes and content that is to be transferred.

SO_NEW_DOCUMENT_ATT_SEND_API1 - This function module enables you send a new document including any existing attachments. The document and the attachments are transferred in the same table. They are created when sent and can also be placed in the sender’s outbox.

Except these function modules, SAP provides a simplified one named HR_FBN_GENERATE_SEND_EMAIL. If you check the function module interface, you will find it is quite easy to use.

I will give some useful examples with actual scenario recently. But above function modules are more or less not state of the art and difficult to handle. Meanwhile, SAP introduced the BCS (Business Communication Services), a much more flexible and future-oriented OO attempt to Mail. We will discuss it later.

ALV Tips – Display column as Icon

December 30th, 2009 2 comments

We may need to display traffic light or some other icons in the ALV output to highlight some lines. Here is an example.

To use icons, you need to use types-pool: icon or include the include file <ICON> in the program.

Read more…

ABAP and Email – General

December 28th, 2009 No comments

I plan to write a series of posts about abap and email. As we all know,email is a very convenient tool to communicate with others in working enviroment. Using SAP to send emails seems to become a common requirement for ABAPer. In this tutotial, I would like to introduce it in below topics:

1. SMTP Protocol

2. Set Up SAP Enviroment

3. ABAP Email Traditional API

4. BCS(Business Communication Service)

5. Examples – Send Email with Attachment

6. Trouble Shooting

Stay tuned and hope you will enjoy these topics. :-)

APIs for Logistics

November 29th, 2009 No comments

Application Programming Interfaces (APIs) are program interfaces to applications in the SAP System. You can use APIs to transfer data between an external system and the SAP System. You can transfer data between applications in the SAP System without having to use dialog.

APIs are grouped together according to their function. We distinguish between:

●     General APIs

●     APIs for Variant Configuration and Classification

●     APIs for BOMs and Engineering Change Management

General APIs

Group: Log

Function group CALO

(APIs for logging)

The function modules in this group are cross-application APIs for logging API calls. These APIs allow you to define parameters for the logging process, read the log, and save the data you require to the log.

APIs for Variant Configuration and Classification

The APIs for variant configuration and classification are in development class CL. The function groups in this application area are as follows:

Group: Read Variant Configuration Data

Function group CARD

(Configurator APIs for Reading Data)

The APIs in this group give you direct read-only access to classification and variant configuration data such as characteristics, classes, objects, object dependencies, and tables.

Group: Read Characteristics Data

Function group CACTR

The APIs in this group allow you to read characteristic data, for example, indicators, values, and assigned object dependencies.

Group: Read Class Data

Function group CACLR

The APIs in this group allow you to read class data, for example, characteristics of a class, and characteristics, or their values, that have been overwritten.

Group: Find Objects

Function group CASE

(Finding objects via classes)

The APIs in this group allow you to find classified objects.
(set for future development)

Group: Classification

Function group CACL

(Classification)

The APIs in this group allow you to create new object assignments and value assignment records, and change existing object assignments and value assignment records.

Function group CACL cannot be called in the “Object dependencies” area.

Group: Maintain Variant Configuration Data

Function group CAMA

(Maintenance)

The APIs in this group allow you to create and change master data for variant configuration such as configuration profiles, tables, and object dependencies.

Group: Maintain Characteristics Data

Function group CACTM

The APIs in this group allow you to maintain characteristic data, for example, creating, deleting, changing, and assigning object dependencies.

Group: Maintain Class Data

Function group CACLM

The APIs in this group allow you to maintain class data, for example, creating, changing, deleting, and assigning object dependencies to characteristics and characteristic values.

The APIs in the following CAVC_ function groups replace the APIs of function group CACO.

Group: Initialize and Close Configuration

Function group CAVC_OBJECTS

The APIs in this group allow you to initialize and close variant configuration. In other words, they process the objects for which variant configuration can be used (such as sales order items).

Group: Handle Complete Configuration

Function group CAVC_CFG

The APIs in this group handle the configuration as a whole (for example, BOM explosion or list of all instances).

Group: Handle Individual Instances

Function group CAVC_INST

The APIs in this group only handle one instance. All APIs in this group have the instance number as an input parameter.

Group: Dialog Functions

Function group CAVC_DIALOG

The APIs in this group use the SAPGUI to process dialog.

Read more…

SAP BC Extended Applications Function Library

November 15th, 2009 No comments

I don’t know how SAP organizes its documentation for some important API(function modules). I found a very comprehensive document for some of these function modules. If you know more about this, please kindly let me know.

BC Extended Applications Function Library

http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa013c493111d182b70000e829fbfe/frameset.htm