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

Select query not working

0 Likes
998

SELECT guid ptype FROM /rpm/item_d INTO TABLE int_guid
WHERE external_id IN so_itemn.

SELECT request_no item_guid group_guid row_key part_number
part_req_action part_rel_action
FROM zplpartlist_view INTO TABLE int_req_data
FOR ALL ENTRIES IN int_guid
WHERE request_no  IN so_reqno
AND item_guid   = int_guid-guid
AND part_number IN so_partn.

LOOP AT int_req_data INTO wa_req_data.
MOVE-CORRESPONDING wa_req_data TO wa_output.



READ TABLE int_guid INTO wa_guid WITH KEY guid = wa_req_data-item_guid.
wa_output-ptype = wa_guid-ptype.
append wa_output to int_output.

i am getting a dump form this code,,pls help

Moderator Message: Please use a proper subject line and do not post your whole query in it. Please do some research before posting and provide more details.

Message was edited by: Kesavadas Thekkillath

5 REPLIES 5
Read only

former_member196490
Active Participant
0 Likes
831

What is the dumo that you are getting

Read only

Former Member
0 Likes
831

Hi Prasanth,

Can you please post the error which you are getting?

Read only

0 Likes
831

field symbols missing...........................actually got the error,,,,,,,,,,thanks

Read only

venkateswaran_k
Active Contributor
0 Likes
831

Hi

In your select query

SELECT guid ptype FROM /rpm/item_d INTO TABLE int_guid
WHERE external_id IN so_itemn.

Use INTO CORRESPONDING FIELDS OF TABLE  instead of INTO TABLE

SELECT guid ptype FROM /rpm/item_d INTO CORRESPONDING FIELDS OF TABLE int_guid
WHERE external_id IN so_itemn.

Regards,

Venkat

Read only

Former Member
0 Likes
831

hi prasanth,

        Please check the structure of int_guid. its structure should have fields "guid and  ptype" IN THE SAME ORDER IN WHICH YOUR ARE USING IN SELECT QUERY.  and avoid using "into corrorsponding fields of table " statement because it reduces the performance of the program. also try to use the key work "client specified"

typically your select query would look like this.

SELECT  guid ptype FROM /rpm/item_d  CLIENT SPECIFIED INTO TABLE int_guid
WHERE  MANDT = SY-MANDT

AND external_id IN so_itemn.

Regards

Uday