Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

Community

Ask a Question Write a Blog Post Login

Former Member
July 2, 2014
| 1 minute read

Display BDCMSGCOLL Log (


BDCMSGCOLL / BAPIRET2 )
 2  3  12,443
Follow

As a developer, we frequently come across BDC / BAPI developments. When we have


 Like BDC and BAPI, Error Handling plays a crucial rule.

Recently, I was engaged in a development of BDC. And when it comes to BDC.


 RSS Feed BDCMSGCOLL plays a crucial role when opting for ‘CALL TRANSACTION’ method.

Here, in my case, I need to simply display a meaning full messages that are returned
after ‘Call Transaction’ into BDCMSGCOLL.

Instead going pillar to post, a simple combination of function modules does the entire job
required. The output and sample coding as in below.

Function Modules Used :

CONVERT_BDCMSGCOLL_TO_BAPIRET2
RSCRMBW_DISPLAY_BAPIRET2

*  messages of call transaction

DATA:   messtab TYPE STANDARD TABLE OF bdcmsgcoll,

             bapiret2 TYPE STANDARD TABLE OF bapiret2.

****************************SOME BDC Here************

   PERFORM bdc_field   USING ‘BDC_CURSOR‘   ‘DF05B-PSBET(01)‘.

   PERFORM bdc_field   USING ‘RF05A-ABPOS‘   ‘1‘.

   ct_params-defsize = ‘X‘.

https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 1/6
08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

   ct_params-updmode = ‘L‘.

   ct_params-dismode = p_mode.

   CALL TRANSACTION ‘FB05‘ USING bdcdata

   OPTIONS FROM ct_params

   MESSAGES INTO messtab.

*Convert BDCMSGCOLL to BAPIRET2

CALL FUNCTION ‘CONVERT_BDCMSGCOLL_TO_BAPIRET2‘

   TABLES

   imt_bdcmsgcoll = messtab[]

   ext_return  = bapiret2.

*Display messages from BAPIRET2

   CALL FUNCTION ‘RSCRMBW_DISPLAY_BAPIRET2‘

   TABLES

   it_return = bapiret2.

With Combination of above two function modules, following desired out put
obtained with out any custom code.

Output:

➕ Always giving a simple search into utility function modules from the standard
SAP Repository is quite a rewarding. you will come out clean with no bug-fixing
and formatting almost every time. 🙂

*with SAP_ABA 731

Alert Moderator

Assigned Tags
https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 2/6
08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

ABAP Development

bapiret2

bdcmsgcoll

Similar Blog Posts 


Massive changes to Withholding tax code using CMD_EI_API class
By
Jhon Jairo Teran Salazar Nov 07, 2013

Executing BDC through Web Dynpro ( BDC Call transaction in Web Dynpro )
By
Former Member Oct 17, 2013

XPRA - Execute ABAP Program Automatically After Transport Request Import


By
Clemens Li Jun 16, 2016

Related Questions 
call transaction
By
Former Member Jul 05, 2007

Problem using BDCMSCCOLL


By
Former Member May 26, 2010

call transaction
By
Former Member Aug 14, 2007

Join the Conversation 


SAP TechEd
Tune in for tech talk. Stay for inspiration. Upskill your future.

SAP BTP Learning Group


SAP Business Technology Platform Learning Journeys.

Coffee Corner
Join the new Coffee Corner Discussion Group.

https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 3/6
08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

2 Comments

You must be Logged on to comment or reply to a post.

Former Member
July 2, 2014 at 9:51 am

To display the contents bapiret2 more interesting module FINB_BAPIRET2_DISPLAY

Also do not need to work to form a correct parameter string MESSAGES

Like 1 | Share

Clemens Li
July 11, 2016 at 9:15 am

Thank you for sharing these functions. I also tried FINB_BAPIRET2_DISPLAY.

RSCRMBW_DISPLAY_BAPIRET2:

No information about message class and number, Type can be guessed from icon
color with ivalid header text 'T'.

Uses obsolete TABLES parameter

Message text displayed only if present in message table.

https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 4/6
08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

No navigation at all.

Judgement: Disappointing. Please do not use.

FINB_BAPIRET2_DISPLAY:

- Displays an annoying column ITEM

- Displays the (shortened) message text derived from parameters in message table

- Displays details and message text in full length on double-click

- Forward navigation from technical details possible

Judgement: Quite OK. Please use.

I prefer to store my messages using SAP application log. FUNCTION


'BAL_DSP_LOG_DISPLAY' does the best job. Quite similar to
FINB_BAPIRET2_DISPLAY, but no ITEM column in the display.

The great advantage is if you can navigate to the message definition, then do a
where-used-list to find the source code where the message was issued.

Regards Clemens

Like 0 | Share

Find us on

https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 5/6
08/04/2022 16:33 Display BDCMSGCOLL Log ( BDCMSGCOLL / BAPIRET2 ) | SAP Blogs

Privacy Terms of Use

Legal Disclosure Copyright

Trademark Cookie Preferences

Newsletter Support

https://blogs.sap.com/2014/07/02/display-bdc-messages-bdcmsgcoll-bapiret2-log/ 6/6

You might also like