Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inner Join short dump

Former Member
0 Likes
780

Any ideas why the following code dumps? The fields in the type are of the same type as the database fields.

TYPES:

BEGIN OF gy_ratings,

objid TYPE hrobjid,

scale_id LIKE t77tp-scale_id,

stext LIKE t77ts-stext,

rating LIKE t77tp-rating,

pstext LIKE t77tp-pstext,

END OF gy_ratings.

Data:

gt_ratings TYPE TABLE OF gy_ratings,

SELECT hobjid ascale_id arating apstext b~stext

FROM hrp1033 AS h

INNER JOIN t77tp AS a ON ascale_id = hscale

INNER JOIN t77ts AS b ON bscale_id = hscale

AND blangu = alangu

INTO TABLE gt_ratings

WHERE h~plvar = g_plvar

AND h~otype = c_qk

AND a~langu = sy-langu.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
744

Hi,

Please change your order of selection...

6 REPLIES 6
Read only

Former Member
0 Likes
744

Hi,

What does your Short dump say?

And the order of selection of fields should be in the same order as they are declared

Regards,

Shailaja

Read only

0 Likes
744

The order change did the trick, didn't think it was something so simple! Thanks

Read only

Former Member
0 Likes
744

Hi ,

Try with this,

TYPES:

BEGIN OF gy_ratings,

objid TYPE hrobjid,

scale_id LIKE t77tp-scale_id,

stext LIKE t77ts-stext,

rating LIKE t77tp-rating,

pstext LIKE t77tp-pstext,

END OF gy_ratings.

Data:

gt_ratings TYPE TABLE OF gy_ratings,

SELECT hobjid ascale_id bstext arating a~pstext

FROM hrp1033 AS h

INNER JOIN t77tp AS a ON ascale_id = hscale

INNER JOIN t77ts AS b ON bscale_id = hscale

AND blangu = alangu

INTO TABLE gt_ratings

WHERE h~plvar = g_plvar

AND h~otype = c_qk

AND a~langu = sy-langu.

Please let me know if you still face problem.

Thanks and regards,

rajeshwar

Read only

0 Likes
744

hi

try to use

INTO CORRESPONDING FIELDS OF TABLE

Thanks

Read only

Former Member
0 Likes
745

Hi,

Please change your order of selection...

Read only

Former Member
0 Likes
744

sequence of fields RATINGS, PSTEXT and STEXT does not match in select statement and in the Internal table defined.

Modify the internal table as

TYPES:
BEGIN OF gy_ratings,
  objid TYPE hrobjid,
  scale_id LIKE t77tp-scale_id,
* stext LIKE t77ts-stext,  "Comment this field
  rating LIKE t77tp-rating,
  pstext LIKE t77tp-pstext,
  stext LIKE t77ts-stext,  "Add field here
END OF gy_ratings.

Hope it will work.