Skip to Content
-1
Former Member
Oct 27 at 02:40 PM

convert abap code to sql or pyspark

155 Views

1) 1st snippet

 LOOP AT lt_flexcell_mat ASSIGNING <ls_flexcell_mat>.
INSERT <ls_flexcell_mat>-matnr INTO TABLE lt_produced_mat. AT END OF flexcell. add_flexcell( iv_flexcell = <ls_flexcell_mat>-flexcell it_produced_mat = lt_produced_mat iv_current_too = iv_current_too ). CLEAR lt_produced_mat. ENDAT. ENDLOOP.
2nd snippet:
  1. SELECT pkhd~matnr trgqty 
      FROM pkhd 
      INNER JOIN packpo 
      ON pkhd~matnr = packpo~matnr 
      INTO TABLE rt_pack_inst 
      FOR ALL ENTRIES IN lt_flexcell_mat 
      WHERE pkhd~matnr = lt_flexcell_mat-matnr 
      AND werks = iv_werks 
      AND packv <> '' 
      AND zz_primaerrk = 'X' 
      AND zz_rkstatus <> 'X' 
      AND zz_rk_gueltab <= sy-datum 
      AND zz_rk_gueltbis >= sy-datum 
      AND inddel = ''.