Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Level printing problem in smartform.

$
0
0

Dear All,

Good day.

Developing an smartform which will print levels based on counter number. For this reason i am doing the below code.

 

i = 6.

DO.

  READ TABLE it_final INTO wa_final INDEX i.

  IF sy-subrc = 0.

    APPEND wa_final TO it_main.

    i = i + 6.

  ELSE.

    EXIT.

  ENDIF.

ENDDO.

LOOP AT it_main INTO wa_final.

  DELETE it_final WHERE container_no = wa_final-container_no.

ENDLOOP.

 

So, it_main will contain only 6,12 or 18th row number from it_final. So, if i have to print 6 levels per page, then for counter number 20 there should be 4 pages. But using this condition, counter number 13 and 20 also going to it_main.i, e 5 pages are showing now. Can you solve the problem?

 

Note: First 2 pages shows right result but from page 3 it starts problem. According to my logic now it_main is containing data 6,12,18,13,20 !!!


Viewing all articles
Browse latest Browse all 8332

Trending Articles



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