cancel
Showing results for 
Search instead for 
Did you mean: 

Help needed on ABAP query - output not filtered correctly according to selection option

former_member367551
Participant
0 Kudos
144

Dear experts,

I have recently added a new field, "Critical Application" from CAWNT-ATWTB to an existing Infoset.

Codes were added to the Infoset's "Record Processing" section on the data retrieval logic for this new field.

Then, this new field is also added to the corresponding existing query - here, it is also selected as one of the fields to appear in the selection screen.

When testing the query, the query output looks alright if this new field, "Critical Application" is left blank in the selection screen. However, when a valid data is specified for "Critical Application" in the selection screen, then the query just returns the error message, "No data was selected" (this should not be happening, as some data should be displayed in the output).

How can I resolve this error?

(I have also adjusted and generated the query, but the issue still persists.)

P/S:

This is how the codes for it look like in "Record Processing":-

**Critical Application
if inob-cuobj is not initial.
  select single * from ausp where objek = inob-cuobj
                            and   atinn = '2127'.
  if sy-subrc eq 0.
    select single * from cawn where  atinn = '2127'
                              and    atwrt =  ausp-atwrt.
    if sy-subrc eq 0.
      select single atwtb into CTRAPPS from CAWNT
                            where atzhl = cawn-atzhl
                            and atinn = '2127'
                           and spras = 'E'.
    endif.
  endif.
endif.
Nikhil_Rao_ABAP
Participant
0 Kudos

Hi Deborah, have you tried running this snippet of code by adding leading 0's before the ATINN value.

former_member367551
Participant
0 Kudos

Hi..

When testing the query, the query output looks alright if this new field, "Critical Application" is left blank in the selection screen. The data for "Critical Application" can be seen in the query output as well.

However, when a valid data is specified for "Critical Application" in the selection screen, then the query will always return an error message, "No data was selected".

Any ideas on how I can fix this?

Accepted Solutions (0)

Answers (0)