Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

error message not captured in call transaction

Former Member
0 Likes
1,389

hi all

i am using a call transaction statement to update a transaction.

call transaction "tcode' using bdcdata mode ctumode messages into messtab

mode is N and ctumode is S

some of the fields in the transaction have check tables associated with them. So in some of the cases if the data for that field is not valid transaction gives an error message. (entry does not exist in table so and so)

when i use mode A ( all screen ) i can see all these errors in messtab table, but when i run it in N mode i can not see these errors even though sy-subrc is not equal to zero.

Any idea/ suggestions?

thanks

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,060

Hello,

What do you mean by :

but when i run it in N mode i can not see these errors even though sy-subrc is not equal to zero.

In the table messtab you will have the MESSAGE TYPE, MESSADE Id and not the Message text. For the text you have to use the FM: MESSAGE_GET_TEXT.

BR,

Suhas

6 REPLIES 6
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,061

Hello,

What do you mean by :

but when i run it in N mode i can not see these errors even though sy-subrc is not equal to zero.

In the table messtab you will have the MESSAGE TYPE, MESSADE Id and not the Message text. For the text you have to use the FM: MESSAGE_GET_TEXT.

BR,

Suhas

Read only

Former Member
0 Likes
1,060

ya

even the message id and type are also not visible

Read only

former_member212005
Active Contributor
0 Likes
1,060

How did you write the codes for displaying error messages?

Try to execute in 'E' mode....are you getting any error.?

The 'N' mode means N - No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.

Refer the below link...it might be helpful

http://help.sap.com/saphelp_nw04/helpdata/en/fa/09715a543b11d1898e0000e8322d00/content.htm

In the below way you can get error texts..



*   Retrieve error messages displayed during BDC update
    LOOP AT messtab WHERE msgtyp = 'E'.
*     Builds actual message based on info returned from Call transaction
      CALL FUNCTION 'MESSAGE_TEXT_BUILD'
           EXPORTING
                msgid               = messtab-msgid
                msgnr               = messtab-msgnr
                msgv1               = messtab-msgv1
                msgv2               = messtab-msgv2
                msgv3               = messtab-msgv3
                msgv4               = messtab-msgv4
           IMPORTING
                message_text_output = w_textout.
    ENDLOOP.

*   Build error table ready for output
    wa_error = wa_ekko.
    wa_error-err_msg = w_textout.
    APPEND wa_error TO it_error.
    CLEAR: wa_error.

Read only

0 Likes
1,060

hi

when i run in E mode i am able to see the errors in messtab. but the problem is i can not run this in E mode as it requires user intervention. i going to use this BDC logic in a FM which will be called from a proxy

thanks

Read only

0 Likes
1,060

Hi Sudhakar,

This happens because if there are any minor errors in recording or in the coding to pass the data properly to the screen,,,!

BDC is a Automatic Update process,,, Only need to pass the values,,,

When you pass the values you will do recording with only that values,,,

Try to record your program once again properly and run you recording,,, If no errors then copy the code again to your program

and try to pass always the data of same type.

Thanks & regards,

Dileep .C

Read only

0 Likes
1,060

hi

what i have observed is, only I and S type messages are captured, no E type messages are getting captured. by the way we are using 4.6B version.

thanks