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

call transaction

Former Member
0 Likes
612

i have got err msgs on to mess_tab (bdcmsgcoll) but i need to interpret the description of the message available at msg-id 004. where to look up. Is there any FM available for the same

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
559

Hi,

u can look for the messages using FM Format_Message or u can see them directly in database table T100.

4 REPLIES 4
Read only

Former Member
0 Likes
559

hi Uma,

Use <b>FORMAT_MESSAGE</b> FM for the same


loop at messtab where MSGTYP = 'E' or type = 'A'.
     call function 'FORMAT_MESSAGE'
         exporting
              id   = messtab-msgid
              lang = '-E'
              no   = messtab-msgnr
              v1   = messtab-msgv1
              v2   = messtab-msgv2
              v3   = messtab-msgv3
              v4   = messtab-msgv4
         importing
              msg  = %_list-line.
    append %_list.
    clear: %_list.
  endloop.

Regards,

santosh

Message was edited by: Santosh Kumar P

Read only

Former Member
0 Likes
559

Hi,

Check the field MSGTYP in the BDCMSGCOLL internal table..If it is E or A then it is not successfull..

use the function module MESSAGE_PREPARE for the corresponding Message id, message number, MSGV1,V2, V3,V4 to get the text.

Thanks,

Naren

Message was edited by: Narendran Muthukumaran

Message was edited by: Narendran Muthukumaran

Read only

Former Member
0 Likes
560

Hi,

u can look for the messages using FM Format_Message or u can see them directly in database table T100.

Read only

shishupalreddy
Active Contributor
0 Likes
559

Hi ,

See the below code

FORM call_transaction .

DATA: w_mode VALUE 'N'.

DATA:w_errors type i.

data:l_vbeln like vbak-vbeln.

data:l_text1(110).

CLEAR g_r_rb17va31.

  • Exucute transaction via Call Transaction

CALL TRANSACTION 'VA31'

USING bdcdata

MODE w_mode

UPDATE 'S'

MESSAGES INTO t_msg .

  • IF sy-subrc eq 0.

IF sy-subrc EQ 0.

READ TABLE t_msg WITH KEY msgtyp = 'S'

msgid = 'V1'.

*&New Scheduling Agreement

g_r_rb17va31-vbelnn = t_msg-msgv2.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = g_r_rb17va31-vbelnn

IMPORTING

OUTPUT = g_r_rb17va31-vbelnn

.

*&Get New Scheduling Number and Update the same into /RB17/VA31 Table

UPDATE /rb17/va31

SET vbelnn = g_r_rb17va31-vbelnn

WHERE vbelno = g_t_ovbeln-vbelno .

COMMIT WORK.

  • endif.

ELSE.

  • * Check for all error messages

LOOP AT t_msg.

IF t_msg-msgtyp = 'E'.

ADD 1 TO w_errors.

l_arbgb = t_msg-msgid.

l_msgnr = t_msg-msgnr.

l_vbeln = g_t_ovbeln-vbelno.

CALL FUNCTION 'RP_READ_T100'

EXPORTING

ARBGB = l_arbgb

msgnr = l_msgnr

  • MSGV1 = ' '

  • MSGV2 = ' '

  • MSGV3 = ' '

  • MSGV4 = ' '

  • SPRSL = SY-LANGU

IMPORTING

TEXT = l_text

EXCEPTIONS

NO_ENTRY_FOUND = 1

OTHERS = 2

.

t_itab-status = l_text.

t_itab-vbeln = l_vbeln.

append t_itab TO g_t_err_log.

ENDIF.

endloop.

CONCATENATE l_vbeln l_text INTO l_text1.

MESSAGE I899

WITH l_text1.

You can also use MESSAGE_PREPARE AND FORMAT_MESSAGE fms TO CAPTURE THE MESSAGE TEXT .

REGARDS,