2006 Mar 11 6:51 AM
Hi all,
I had written following code, but it is giving dump error in the module RSQL accessing database interface .
Please help to find out error .
TYPES: BEGIN OF TY_ITAB ,
RSNUM LIKE RESB-RSNUM,
RSPOS LIKE RESB-RSPOS,
RSART LIKE RESB-RSPOS,
END OF TY_ITAB .
DATA I_ITAB TYPE STANDARD TABLE OF TY_itab
WITH NON-UNIQUE DEFAULT KEY
INITIAL SIZE 0
WITH HEADER LINE.
SELECT RSNUM RSPOS RSART
FROM RESB
INTO CORRESPONDING FIELDS OF TABLE I_ITAB
WHERE WERKS EQ '0300'.
WRITE : / I_ITAB.
2006 Mar 11 7:01 AM
HI Sridhar,
what does the analysis in ST22 say..
having used the field names .. why do you use into corresponding fields of in your select statement..
just use..
SELECT RSNUM RSPOS RSART
FROM RESB
TABLE I_ITAB
WHERE WERKS EQ '0300'.you can use
loop at i_itab.
endloop.instead write i_itab.
did you debug the code..
regards
satesh
2006 Mar 11 7:02 AM
Hi sridhar,
1. very minor mistake,
2. see in bold
REPORT abc.
TYPES: BEGIN OF ty_itab ,
rsnum LIKE resb-rsnum,
rspos LIKE resb-rspos,
rsart LIKE <b>resb-rsart,</b> <----
END OF ty_itab .
DATA i_itab TYPE STANDARD TABLE OF ty_itab
WITH NON-UNIQUE DEFAULT KEY
INITIAL SIZE 0
WITH HEADER LINE.
SELECT rsnum rspos rsart
FROM resb
INTO CORRESPONDING FIELDS OF TABLE i_itab
WHERE werks EQ '0300'.
WRITE : / i_itab.
regards,
amit m.
2006 Mar 11 7:56 AM
hi sridhar,
1. is your problem solved?
2. As per the forum etiquette,
u may pls award points
to helpful answers by clicking the STAR
on the left of that reply.
regards,
amit m.