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 is not selecting

Former Member
0 Likes
906

i have written a select statement that although the table is populated with values, it is not selecting the records based upon the field i have specificed.


TYPES: BEGIN OF measure_docs,
        ref_obj TYPE imrc_mdocm,
        nodeid     TYPE diohfw_nodeid,
  END OF measure_docs.

        SELECT ref_obj nodeid FROM diohfw_nodes INTO TABLE gt_measure_docs
          FOR ALL ENTRIES IN gt_diohfw_nodes
          WHERE sup_nodeid = gt_diohfw_nodes-nodeid
          AND   type       = 'MDC'.
     

      IF NOT gt_measure_docs IS INITIAL.
        SELECT * FROM imrg INTO TABLE gt_imrg
          FOR ALL ENTRIES IN gt_measure_docs
          WHERE mdocm = lt_measure_docs-ref_obj.

      ENDIF.

i have 15 entries in my gt_measure_docs table... i can copy the paste into se11 IMRG and see the values in the data display.

the field mdocm has an ALPHA conversion on so i tried adding the 00000000000000000234 to convert to 234, but it still cannot find the entries... i am sure i have missed something simple....

i typed the "ref_obj" as imrc_mdocm but still no dice! :o( any ideas what i have missed?

7 REPLIES 7
Read only

Former Member
0 Likes
863

Hi,

just add

IF NOT gt_measure_docs[] IS INITIAL.

and

SELECT * FROM imrg INTO TABLE gt_imrg

FOR ALL ENTRIES IN gt_measure_docs

WHERE mdocm = gt_measure_docs-ref_obj. --> GT

Edited by: Madhukar Shetty on Jul 7, 2010 2:27 PM

Read only

Former Member
0 Likes
863

Hello


      IF NOT gt_measure_docs IS INITIAL. " <- gt_measure_docs
        SELECT * FROM imrg INTO TABLE gt_imrg
          FOR ALL ENTRIES IN gt_measure_docs " <- gt_measure_docs
          WHERE mdocm = lt_measure_docs-ref_obj. " <- lt_measure_docs ??? are you sure ?
 
      ENDIF.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
863

Ignore

Maroz - Well spotted

Edited by: Keshav.T on Jul 7, 2010 6:01 PM

Read only

Former Member
0 Likes
863

sorry! that was still in there as i had loop round gt_measure_docs then called CONVERSION_EXIT_ALPHA_OUTPUT and changed the number and appended to a lt_measure_Docs as it was not working... i just did not change the LT back to GT for all of them.

i have now amended the code and it still does not like it.

Read only

0 Likes
863

Can you show your final code that does not work?

Regards

Prasenjit

Read only

Former Member
0 Likes
863

Have you checked your data type/length mismatch? 40 characters in one table, 20 in the other...is it not matching because of that?

Read only

Former Member
0 Likes
863

i linked up on another field and via another table... works better now..

thanks anyway!