Skip to Content
0
Former Member
Jul 30, 2007 at 03:03 PM

Debug ABAP program

23 Views

Hello:

I have a WebService and I followed the instructions in order to call it from the ABAP side. So now I have a proxy.

I created a simple ABAP program to test this WS call but it seems it's not working quite well. For external debug purposes, on the WS side I write text files. Those logs indicate me that the WS is indeed being called and exited succesfully.

The WS returns an array of Objects which I assume is translated as a table on ABAP.

I also have some "write" statements on the ABAP program and they indicate me that no exceptions are being thrown. However, when I set the breakpoint just after the call, the table shows it has no "rows" in it, as if the WS retuned something empty.

This is the code:

*&---------------------------------------------------------------------*
*& Report  Z_WS_EXTERNAL_TES
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT  Z_WS_EXTERNAL_TES.
DATA: MDM_PROXY TYPE REF TO ZEXTERNALCO_MDMWEB_SERVICES_VI .
TRY.
    CREATE OBJECT MDM_PROXY
      .
  CATCH CX_AI_SYSTEM_FAULT .
ENDTRY.
data: OUTPUT type ZEXTERNALGET_CANDIDATES_OUT_DO .
data: INPUT type ZEXTERNALGET_CANDIDATES_IN_DOC .
TRY.
write 'Step 1 '.
    CALL METHOD MDM_PROXY->GET_CANDIDATES
      EXPORTING
        INPUT  = input
      IMPORTING
        OUTPUT = output.
write 'Step 11 '.
  CATCH CX_AI_SYSTEM_FAULT .
    write 'Step 2 '.
  CATCH CX_AI_APPLICATION_FAULT .
    write 'Step 3 '.
write 'END'.
ENDTRY.

The outcome of the program prints:

Step 1 Step 11 END

The breakpoint is set on the line that Prints the string "Step 11". The debug stops there, I click on GLOBALS and the OUTPUT structure doesn't have anything inside..

Any ideas?

Thanks