cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To answer my own question:

  • The program was written using SHDB to record that actions taken using EWAWA01. After an update the location of some of the required fields for the execution of the transaction were moved. As a result, the automated fulfilling of data fields began to fail, something which doesn't occur when one runs the program manually.
  • The fix: The fix appears to be to rerun the transaction EWAWA01 using SDHB to record that actions and use the ensuing data fields to modify the existing program.

Answers (0)