05-23-2006 9:53 PM
This code passes syntax check but short-dumps. Any help would be appreciated.
REPORT ZGS_JOINTST2.
DATA it_kickouts TYPE rssm_t_seldone.
DATA wa_kickouts TYPE zbw_kickouts.
SELECT rsseldone~rnr
rsseldone~source
rsseldone~seldate
rsseldone~seltime
rsseldone~oltpsource
rserrorlog~msgv1
rserrorlog~msgv3
INTO TABLE it_kickouts
FROM rsseldone INNER JOIN rserrorlog
ON rsseldonernr = rserrorlogrequest
WHERE rsseldone~source = 'ZCC_0001'.
I'm simply trying to read the joined of the two RS tables and populate the custom table it_kickouts.
Geoff Stuart
05-24-2006 7:27 AM
DATA it_kickouts TYPE rssm_t_seldone.
DATA wa_kickouts TYPE zbw_kickouts.
With these statements it_kickouts and wa_kickouts are created as the field strings(structure but not as table).
So the problem is .
So what you have to do is declare the statement as ,
DATA it_kickouts like table of rssm_t_seldone.
or
DATA it_kickouts TYPE rssm_t_seldone occurs 0 with header line.
05-23-2006 10:00 PM
HI Geoff,
What does the error analysis says in Sshort-dump?
Can you paste it here?
Regards,
Vicky
05-23-2006 10:02 PM
What does the dump say? Make sure that you don't have less number of fields in your "it_kickouts" than your select field list(which is 7 in your example). Also make sure that the fields of it_kickouts have compatibility with the fields of the table you are selecting from.
05-23-2006 10:05 PM
05-23-2006 10:11 PM
I take it back. Does it_kickouts have the same structure and order as the fields you are selecting?
If not, try:
SELECT rsseldone~rnr
rsseldone~source
rsseldone~seldate
rsseldone~seltime
rsseldone~oltpsource
rserrorlog~msgv1
rserrorlog~msgv3
INTO <b>corresponding fields of</b> TABLE it_kickouts
FROM rsseldone INNER JOIN rserrorlog
ON rsseldone~rnr = rserrorlog~request
WHERE rsseldone~source = 'ZCC_0001'.
Rob
Message was edited by: Rob Burbank
05-23-2006 10:05 PM
Hi Geoff,
How about something like this...
SELECT a~rnr
a~source
a~seldate
a~seltime
a~oltpsource
b~msgv1
b~msgv3
INTO TABLE it_kickouts
FROM rsseldone as a INNER JOIN rserrorlog as b
ON arnr = brequest
WHERE a~source = 'ZCC_0001'.
Regards,
Den
05-24-2006 12:33 AM
I suspect that rssm_t_seldone does not contain all the fields or if it does they are in a different sequence to the select. If they are in a different sequence use the 'CORRESPONDING' option (as Rob suggests) if it does not have all the fields
try this:
types: begin of ty_in,
rnr type rsseldone-rnr,
source type rsseldone-source ,
seldate type rsseldone-seldate,
seltime type rsseldone-seltime ,
oltpsource type rsseldone-oltpsource ,
msgv1 type rserrorlog-msgv1 ,
msgv3 type rserrorlog-msgv3 ,
end of ty_in.
DATA it_kickouts TYPE table of ty_in with header line.
and it will still be safer to use the 'CORRESPONDING' option in the select
05-24-2006 7:27 AM
DATA it_kickouts TYPE rssm_t_seldone.
DATA wa_kickouts TYPE zbw_kickouts.
With these statements it_kickouts and wa_kickouts are created as the field strings(structure but not as table).
So the problem is .
So what you have to do is declare the statement as ,
DATA it_kickouts like table of rssm_t_seldone.
or
DATA it_kickouts TYPE rssm_t_seldone occurs 0 with header line.
05-26-2006 12:08 AM
Geoff,
I don't understand how the code passed syntax but the solution was to make the definition a table. Surely type rssm_t_seldone must be defined as a table already to pass syntax.