Skip to Content
0
Former Member
May 16, 2008 at 12:38 PM

Problem in for all entries

42 Views

Hi Friends:

Plz see the code below:

  • Interanl Tables

DATA t_bdcps LIKE bdcps OCCURS 0 WITH HEADER LINE.

DATA : t_bdcp LIKE bdcp OCCURS 0 WITH HEADER LINE,

t_bdcps1 LIKE bdcps OCCURS 0 WITH HEADER LINE.

SELECT *

INTO CORRESPONDING FIELDS OF TABLE t_bdcps

FROM bdcps

WHERE mestype IN r_mestyp

AND process = space.

SORT t_bdcps BY mestype.

loop at t_bdcps where mestype = p_mat.

append t_bdcps to t_bdcps1.

endloop.

SELECT *

FROM bdcp

INTO CORRESPONDING FIELDS OF TABLE t_bdcp

for all entries in t_bdcps1

WHERE cpident = t_bdcps1-cpident.

endif.

The data is coming in first select query. also through the loop the records are transferred in t_bdcps1. now the second select query is not fetching any data while the data is there in the table.

Please help me friends on this problem. I dont think that there is any problem with my select statement

Suitable points will be rewarded for help.

REgards:

Gaurav