Quantcast
Channel: SCN : Popular Discussions - ABAP和Java开发 (ABAP & Java Development)
Viewing all articles
Browse latest Browse all 4604

升级后for all entries in 不好使了

$
0
0

升级到ECC6.0之后,同一段代码读不出来数据了。

代码是

  SELECT objnr wrttp acpos wrt01 wrt02 wrt03 wrt04 wrt05 wrt06 wrt07 wrt08 wrt09 wrt10 wrt11 wrt12

    FROM pmco INTO CORRESPONDING FIELDS OF TABLE it_pmco FOR ALL ENTRIES IN it_screen1

   WHERE objnr = it_screen1-objnr AND ( ( wrttp = '01' AND vorga = '' ) OR wrttp = '04' ).

 

it_screen1里面是有数据的

 

 

我把代码改成

  LOOP AT it_screen1.

    SELECT objnr wrttp acpos wrt01 wrt02 wrt03 wrt04 wrt05 wrt06 wrt07 wrt08 wrt09 wrt10 wrt11 wrt12

      FROM pmco APPENDING CORRESPONDING FIELDS OF TABLE it_pmco

     WHERE objnr = it_screen1-objnr AND ( ( wrttp = '01' AND vorga = '' ) OR wrttp = '04' ).

  ENDLOOP.

 

就能读出来了....我实在看不出来为什么。


Viewing all articles
Browse latest Browse all 4604

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>