Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: How to display total in alv only for single row

$
0
0

Hi Ritesh,

 

You could do that using the at new condition loop for that field,  say. ebeln, if you want just want one row to be populated with vat value for each ebeln in the the table.

 

Just ensure, ebeln is the first field of the table it_alv and that its sorted by ebeln.

 

Example,

sort it_alv by ebeln.

 

LOOP AT it_alv ASSIGNING <fs-alv>.

at new ebeln.

     READ TABLE it_vat ASSIGNING <fs-vat>

          WITH KEY ebeln = <fs-alv>-ebeln

                           posnr = <fs-alv>-posnr

                            kschl = 'JVCS'.

     IF sy-subrc = 0.

          <fs-alv>-vat = <fs-vat>-kbetr / 10.

        <fs-alv>-vat_val = <<fs-alv>-vat * it_alv-menge.

     END IF.

endat

 

END LOOP.


Viewing all articles
Browse latest Browse all 8533

Trending Articles



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