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

Save BDC Log

Former Member
0 Likes
461

Hi,

I have developed a BDC and encountered some error during the execution. For futher analysis, i want to save the BDC log into a spreadshheet or local file. Is it possible to do this in SHDB without the use of Ctrl+Y??

3 REPLIES 3
Read only

Former Member
0 Likes
402

By Default it logs and reports you in SHDB itself.

AFter your recording you can choose the Recording name , and Press Process Button

and now if every thing over you can check the log.

it is a alv report

and also you can download the log also.

Read only

0 Likes
402

It is not a ALV reoport and i can't find the export to spreadsheet button

Read only

RoySayak
Active Participant
0 Likes
402

Hello Dear,

You can capture BDC message like this:

DATA: it_msgtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.

FORM bdc_msg.

  DATA: l_v_mstring(480).

IF it_msgtab[] IS NOT INITIAL.                                        
  SELECT * FROM t100 INTO TABLE it_t100
    FOR ALL ENTRIES IN it_msgtab
    WHERE sprsl = it_msgtab-msgspra
    AND   arbgb = it_msgtab-msgid
    AND   msgnr = it_msgtab-msgnr.

ELSE.
  WRITE:/ text-003.
ENDIF.


  LOOP AT it_msgtab.                                       
    READ TABLE it_t100 INTO wa_t100 WITH KEY sprsl = it_msgtab-msgspra
                                             arbgb = it_msgtab-msgid
                                             msgnr = it_msgtab-msgnr.
    IF sy-subrc = 0.
      l_v_mstring = wa_t100-text.
      IF l_v_mstring CS '&1'.
        REPLACE '&1' WITH it_msgtab-msgv1 INTO l_v_mstring.
        REPLACE '&2' WITH it_msgtab-msgv2 INTO l_v_mstring.
        REPLACE '&3' WITH it_msgtab-msgv3 INTO l_v_mstring.
        REPLACE '&4' WITH it_msgtab-msgv4 INTO l_v_mstring.
      ELSE.
        REPLACE '&' WITH it_msgtab-msgv1 INTO l_v_mstring.
        REPLACE '&' WITH it_msgtab-msgv2 INTO l_v_mstring.
        REPLACE '&' WITH it_msgtab-msgv3 INTO l_v_mstring.
        REPLACE '&' WITH it_msgtab-msgv4 INTO l_v_mstring.
      ENDIF.
      CONDENSE l_v_mstring.
      WRITE: / it_msgtab-msgtyp, l_v_mstring(250).
    ELSE.
      WRITE: / it_msgtab.
    ENDIF.
  ENDLOOP.

ENDFORM.                    " bdc_msg

Best Regards,

Sayak...