Hi Experts,
We have a client upgrading to HANA so there are many reports that we would like to code pushdown.
There are certain challenges that we are facing while creating procedures like:
The existing report has many loops and read statements inside so we are planning to bring that logic down inside Procedures.
As of now all the Select Queries have been incorporated via CE Functions inside the Procedures but the main challenge now is how to code for loop and read statements inside procedures.
I would like to put a loop on the output parameters below:
Also,Is it a good practice to remove all the loops and read statements and writing them in Procuderes or just leave them as it is and just put the Select Queries inside Procedures.
Below is the code that we want to have inside our procedures:
LOOP AT i_vbfa INTO w_vbfa WHERE vbelv = w_vbak-vbeln.
READ TABLE i_vbrk INTO w_vbrk WITH KEY vbeln = w_vbfa-vbeln
fkart = 'ZRBC'.
IF sy-subrc = 0.
v_fkdat = w_vbrk-fkdat.
IF w_vbrk-zzbelnr IS INITIAL.
lv_rbc = 'X'.
ENDIF.
ENDIF.
READ TABLE i_vbrk INTO w_vbrk WITH KEY vbeln = w_vbfa-vbeln
fkart = 'ZRBM'.
IF sy-subrc = 0.
lv_rbm = 'X'.
ENDIF.
CLEAR: w_vbfa,
w_vbrk.
ENDLOOP.
I guess we would have to use For and Cursor Statements but never used them.
Thanks,
Gaurav