Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10473

Re: How to check return result when call transaction XK02(Without BDC)

$
0
0

Hi Tran,

 

Call transaction method doesn't handle error, So we should handle the error explicitly using BDCMSGCOLL structure .

 

CALL TRANSACTION 'XK01' USING BDCDATA MODE N UPDATE S MESSAGES INTO BDCMSGCOLL.

 

DATA V_MSG(255) TYPE C.

READ TABLE I_MSG WITH KEY MSGTYP = 'E'.

IF SY-SUBRC = 0.

  CALL FUNCTION 'FORMAT_MESSAGE'

   EXPORTING

     ID              = I_MSG-MSGID

     LANG            = 'E'

     NO              = I_MSG-MSGNR

     V1              = I_MSG-MSGV1

     V2              = I_MSG-MSGV2

     V3              = I_MSG-MSGV3

     V4              = I_MSG-MSGV4

   IMPORTING

     MSG             = V_MSG.

 

Similarly for Success Also.

 

Regards



Viewing all articles
Browse latest Browse all 10473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>