Quantcast
Viewing all articles
Browse latest Browse all 3132

How to Loop and delete inside loop based on some condition in HANA procedure

Hello Experts,

 

I have one requirement as explained below.

 

i have created one hana procedure in which i am fetching data from table and passing all the where condition through lv_where as shown below.

A.)

 

OUTPUT = SELECT A.QMNUM,B.TPLNR, C.INGRP,C.BAUTL,A.ARBPL,C.IWERK FROM

                      .QMEL AS A INNER JOIN

                           QMIH AS C ON

                      A.QMNUM = C.QMNUM INNER JOIN

                           ILOA AS B ON

                      C.ILOAN = B.ILOAN

                      WHERE A.kzloesch <> 'X' AND A.qmart = 'PT'

                      group by A.QMNUM,B.TPLNR,C.INGRP,C.BAUTL,A.ARBPL,C.IWERK ;

 

 

     IT_VIQMEL = APPLY_FILTER(:OUTPUT,:LV_WHERE);

 

  Here i am getting the correct data  in IT_VIQMEL after applying the filter OUTPUT  and passing Where condition LV_WHERE which is coming

     from ABAP report.

 

     B.) Now i have to delete the records from IT_VIQMEL by comparing value with condition as shown below.

 

                   if  IT_VIQMEL-TPLNR0(2)  NE P_LINE   (any fixed value based of user input).

                      delete the row no from internal table IT_VIQMEL

                         Else Continue.

                    endif.

 

 

How to acheive above (B )LOOP and delete inside based on condition explained in HANA procedure?

 

 

 

 

 

Can anyone help on this?


Viewing all articles
Browse latest Browse all 3132

Trending Articles



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