Sometimes when we use BAPI that has return structure type BAPIRETURN we get incomplete message information in field BAPIRETURN-CODE
It happens if the length of message class greater than 2
For example if BAPI returns message 020 of message class MEPO then field BAPIRETURN-CODE contains value ME020
This is incorporated in standard source code
This is not convenient because we have cropped information on message
So I found the following solution for myself
Extended standard structure BAPIRETURN with APPEND-structure
consisting of two fields: message class and message number
With the help of implicit enchancement added some lines of code to standard form FILL_BAPIRETURN in program LMEWQF10
Now when I analyze return log of BAPI I get full length information about message class and number in my custom fields