ZXQPLU02

<< Click to Display Table of Contents >>

Navigation:  All About ABAP Technique > English > ABAP Tutorial > ABAP Workbench Tools > Enhancement > Customer Exits > Customer Exits Examples > Project ZQMWS001 > Funtions Exits  > EXIT_SAPLQPL1_002  >

ZXQPLU02

*&---------------------------------------------------------------------*
*&  Include           ZXQPLU02                                         *
*&---------------------------------------------------------------------*
*->USE: to convert insp lot unit of measure from BOX to PCS
*->     especially in production in process inspection
*->     standard SAP will make insp lot unit BOX
*->     affected by rounding decimal of BOX no decimal
*->     giving incorrect sample quantity.
 
DATA: lv_meins like afpo-meins,
     lv_amein like afpo-amein,
     lv_umren like afpo-umren,
     lv_umrez like afpo-umrez.
 
IF I_QALS-HERKUNFT = '03'.
 
select single meins from mara into lv_meins where
          matnr = I_QALS-matnr.
 
IF I_QALS-MENGENEINH <> lv_meins.
    select single umrez umren from marm
          into (lv_umrez, lv_umren) where
           meinh = I_QALS-MENGENEINH and
           matnr = I_QALS-matnr.
 
    move I_QALS to E_QALS.
    E_QALS-MENGENEINH = lv_meins.
    E_QALS-EINHPROBE = lv_meins.
    E_QALS-LOSMENGE = E_QALS-LOSMENGE * lv_umrez / lv_umren.
    IF E_QALS-LMENGEIST <> 0.
      E_QALS-LMENGEIST = E_QALS-LMENGEIST * lv_umrez / lv_umren.
    ELSE.
      E_QALS-LMENGEIST = E_QALS-LOSMENGE.
    ENDIF.
    E_ACTIVE = 'X'.
 
ENDIF.
 
ENDIF.
 
IF I_QALS-HERKUNFT = '08'.               "insp lot from stock transfer
IF I_QALS-ANZGEB IS INITIAL OR         "number of container
    I_QALS-GEBEH IS INITIAL.           "container unit
    MESSAGE E001(00) WITH 'Enter No of Container'.
    E_ACTIVE = 'X'.
ENDIF.
ENDIF.
 
*$*$----------------------------------------------------------------$*$*
*$ Correction Inst.         0120061532 0000408293                     $*
*$--------------------------------------------------------------------$*
*$ Valid for       :                                                  $*
*$ Software Component   SAP_APPL   SAP Application                    $*
*$  Release 46C          To SAPKH46C32                                $*
*$  Release 470          All Support Package Levels                   $*
*$--------------------------------------------------------------------$*
*$ Changes/Objects Not Contained in Standard SAP System               $*
*$*$----------------------------------------------------------------$*$*
*>>>> START OF INSERTION <<<<
constants:
   c_max_anzgeb like qals-anzgeb value '999.999'.
move i_qals to e_qals.
if e_qals-anzgeb ge 1000.
   e_qals-anzgeb = c_max_anzgeb.
  move 'X' to e_active.
endif.
*>>>> END OF INSERTION <<<<<<
...
*&--------------------------------------------------------------------*