Using BAPI upload excel file for t-code AS02 in SAP

Using BAPI " BAPI_FIXEDASSET_CHANGE " create a zprogram to upload excel file for mass change fixed asset in SAP. REPORT  ZAS02_ASSET_CHANGE_UPLOAD . TYPE-POOLS :  truxs . " Structure for Excel data TYPES :  BEGIN  OF  ty_excel ,          anln1  TYPE  anln1 ,          bukrs  TYPE  bukrs ,          kostl  TYPE  kostl ,          werks  TYPE  werks ,          prctr  TYPE  prctr ,         END  OF  ty_excel . DATA :  lt_excel     TYPE  TABLE  OF  ty_excel ,       ls_excel     TYPE  ty_excel ,     ...

Message Types in SAP ABAP

In every programming language has message types which is used to provide information to the users.
In ABAP there are a few types of message which is used to provide information to the users.
Message types are:

Type A (Abend - abnormal end of task ):
Type A (Abend – abnormal end of task) means termination of the program. The message appears in a dialog box and the program terminates. The user is not able to make any further entries. The task is terminated and the system returns to a high-level menu. Messages of type A should be issued only in extraordinary circumstances, such as serious system errors. A-messages should be avoided, if possible.

Type E (error):
Type E is for error messages. An error message appears and the program stops. These messages are wide used. They can prevent the user from creating inconsistent records. They can point to a prerequisite to be fulfilled.

Type I ( information ):
Messages from type I are information only. The program is executed and information is displayed. After the user confirms the message, the program continues.

Type S ( Success , Status):
Type S (success, status) messages only give information about the execution of the program. The only display the status of the program.

Type W ( warning ) :
Waring messages are with type W. They are used to display information for the user, which warns the user for possible problems, but they don’t stop the program. The user can than perform corrections.

Type X (exit ):
Messages from type X (exit) are the popular ABAP short dumps. The program terminates and the detailed information can be found in transaction ST22, searching by the user and the time of the error.

Syntax:

The syntax for message is MESSAGE <message> TYPE <message type>.

For example if we want to display a warning message:

MESSAGE ‘Successfully you save data.’ TYPE ‘S’.

Comments

Popular posts from this blog

New commodity code create in SAP S/4 Hana

BAPI to Change STO PO/ PO Delivery date in SAP

Decimal remove in a smartforms report