Skip to Content
0
Former Member
Apr 13, 2010 at 09:54 PM

Understanding the code

75 Views

Hi gurus, following code is in a pricing requirement, can some one explain me what is this doing as i do not understand clearly and pricing condition is not applied saying the following requirement is not fulfilled,

data: v_mara type mara.
  sy-subrc = 4.
   if komk-auart is initial.
      
    check: komk-fkart eq 'IV' or komk-bsart ne ' '.
    endif.
                        
    check: komk-auart ne 'cc' and komk-auart ne 're'.
    check: komk-auart_sd ne 'CC' and komk-auart_sd ne 'RE'.
   sy-subrc = 0.*
   select single * from mara into v_mara where matnr = komp-matnr.
   if sy-subrc = 0.

      sy-subrc = 4.
       check:  v_mara-mtart ne 'LEER' and v_mara-mtart ne 'ZPRE' and v_mara-mtart ne 'VEN'.
     sy-subrc = 0.

     if komk-auart_sd eq 'OR' or komk-auart_sd eq ' '.
       komp-zprodh3 = v_mara-prdha(3).
     endif.
   endif.

Thank you in advance,

Kind regards,

Gopio.

Edited by: Naga Gopathi on Apr 13, 2010 11:58 PM

Edited by: Matt on Apr 20, 2010 7:52 AM