SAP ABAP Message Storage

Selain menggunakan syntax MESSAGE, pesan yang ingin ditampilkan ke user bisa menggunakan message storage, dimana pesan yang munculkan bisa lebih dari satu sekaligus.

*Inisialisasi, pengosongan data storage. 
*--------------------------------------. 
CALL FUNCTION 'MESSAGES_INITIALIZE'. 

*Set message yg akan ditampilkan di message storage. 
*--------------------------------------------------. 
CALL FUNCTION 'MESSAGE_STORE' 
  EXPORTING 
    arbgb = 'AQ' 
    msgty = 'E' 
    msgv1 = 'Message Error 1' 
    msgv2 = 'cash advance flag' 
    txtnr = '003'.

*message yang ditampilkan bisa lebih sari satu, 
*hanya tinggal memanggil function 'MESSAGE_STORAGE' 
*berkali-kali. 
*--------------------------------------------------. 
CALL FUNCTION 'MESSAGE_STORE' 
  EXPORTING 
    arbgb = 'AQ' 
    msgty = 'E' 
    msgv1 = 'Message Error 2' 
    msgv2 = 'already exist' 
    txtnr = '003'. 

*Menampilkan message ke dalam storage. 
*------------------------------------. 
CALL FUNCTION 'MESSAGES_SHOW' 
  EXPORTING 
    show_linno = space.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s