Skip to Content
0
Former Member
May 31, 2017 at 03:25 PM

Debugging program containing EWAWA01 Generates Sy-Subrc code 1001 when run in background.

189 Views Last edit Jun 07, 2017 at 01:38 PM 10 rev

After a system update EWAWA01 no longer posts data in Background.

Sy-Subrc code 1001 occurs when run in background.

I need to identify the part of the transaction code that triggers this.

  • I can run via SE80 in N mode and it will post successfully.
  • I can run via SE80 in P mode, and and it will post successfully.
  • I can run via SE80 A mode and it will post successfully.
  • I can run via SM37 with JDBG and it will not post successfully, instead there is a Sy-SUBRC = 1001 error.

Based on some digging around the Internet it seems that a software update changed some screen design elements. Since the program was probably partially made using SHDB to record screen interactions, the change in screen design has rendered the elements made from this recording unusable.

  1. How do I identify which element is problematic?
  2. What do I gain to use Call Transaction with mode "P", processing without display of the Screens? I still only know that SY-SUBRC equals 1001, I don't know how to work backwards from there to find where that value was generated other than somewhere inside EWAWA01.

Suspected problematic code is below.

CALL TRANSACTION 'EWAWA01' WITHOUT AUTHORITY-CHECK
 using bdcdata_tab OPTIONS FROM opt MESSAGES INTO lt_return.
 loop at lt_return into ls_return.
 if ls_return-type NE 'E'
 and ls_return-type NE 'A'.
 else.

 if SY-subrc ne '0' .

        Write:  / 'Fehler:',

                / sy-subrc,

                  sy-MSGID(5),

                  sy-MSGTY,

                  sy-MSGNO,

                  sy-MSGV1,

                  ls_return-type,

               / file_cont.

        else.

          Write:  file_cont.

        endif.

       if SY-Batch eq space.

            DELETE DATASET p_path .

       endif.