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

给大家出一个简单的小问题(ABAP)

$
0
0

LOOP AT xh_itabl.

      SELECT SUM( erfmg ) SUM( dmbtr )  INTO (wa_it-erfmg, wa_it-dmbtr)

      FROM mseg

      WHERE  bwtar IN so_bwart AND

             mseg~matnr = xh_itabl-matnr AND

             werks = xh_itabl-werks AND

             shkzg = 'H'.

IF wa_it-erfmg <> space.

        xh_itabl-nprice = wa_it-dmbtr / wa_it-erfmg.

        MODIFY xh_itabl.

ENDIF.

 

endloop.

 

要求:

1. 将 select 从loop 里面拿出来。

2. 不用select sum.


Viewing all articles
Browse latest Browse all 4604

Trending Articles



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