Thursday, May 21, 2015

Field PLMKB-QDYNREGEL. does not exist in the screen SAPLQPAA 0160

tag: LSMW quality inspection plan upload
error message: Field PLMKB-QDYNREGEL. does not exist in the screen SAPLQPAA 0160
solution:check the dynamic modification rule if existed in your template if you have set the the DMR level is not 3. if yes, delete all DMR you have set on MIC level(master inspection chars level). the error should be gone.

​or you can write a code to avoid this situation for field PLMKB-QDYNREGEL in step "Maintain Field Mapping and Conversion Rules", as below :

​QDYNREGEL                    Dynamic Modification Rule
                    Source:  ZBIPMK-QDYNREGEL (Dynamic Modification Rule)
                    Code:    if  ZBIPKO-QDYNHEAD = '3' .
                             if ZBIPMK-QDYNREGEL <> ''.
                             BIPMK-QDYNREGEL = ZBIPMK-QDYNREGEL.
                             else.
                             BIPMK-QDYNREGEL = '/'.
                             endif.
                             else .
                             BIPMK-QDYNREGEL = '/'.
                             endif.

​error message:Dynamic modification rule & is not compatible with sampling procedure - QP 254
solution: QDB1 create allowed relationship for DMR and sampling procedure.   or change to another sampling procedure.

CO06 explanation

CO06中,行项目只会显示check.rule + avialable check所定制的元素。 比如,PO在check.rule + avialable check的组合中,是不考虑的,那么在CO06中,是不会显示出来的。

rec/reqd qty:  库存或是需求数量,取决于当前行的MRP元素
confirmed: 是Available check时所承诺的数量。 但如果后续供应发生变化,而你又没有重新做mateial available  CHECK,这个字段中的值是不会自动变动的。在这种情况下,confirmed的数量可能是虚假的数量了。 

Cum. ATP qty: 剩余可用的ATP 数量, 如果是负值,表示缺少的ATP数量。 这个数量与库存或是供应是无关的。

举例来说明。
库存原始有100PCS,生产订单需求100PCS.
第一次做Avialable CHECK时,
order confirmed的数量会是100,cum. atp qty会是0.
如果库存这时被发料到其他地方用掉,这时库存会变为0 .
  • 在不对order 重新执行avialable check时,这个confirmed的数量仍将是100,同时Cum.ATP qty 会变成-100.
  • 在对order 重新执行avialable check后,这个confirmed的数量将会是0,同时Cum.ATP qty 会变成0.

ABAP learning: implement a implicit enhancement in SAP

Example : Enhance to check the production version if it's suject to the name rule.
run TX C223, to get the main program name:SAPLCMFV
type this program name in SE80 under program, it'll automatic turn to function group: CMFV

in the function module(FM), find a suitable function to implement the enhancement.
I choose CM_FV_PROD_VERS_SAVE_ALL.
double click on it to enter the FM, and click "enhance"(shift+f4).
goto the main menu : EDIT- enhancement operations--show implicit enhancement options


put on your cursor to the desired possition. (only the black right arrow possition can be implemented.)
​and once again goto the menu:EDIT- enhancement operations--create implementation.

​here, insert your codes.

Example code:

* Check the PV number if between 0001 TO 0099 
Data:
      lc_flag type CHAR1 ,
      wa_BAPIRET2 type BAPIRET2 .

LOOP AT GT_MKAL_Y WHERE VERID  NE SPACE .
  CALL FUNCTION 'Z_CA85DETERMINE_A5_E5_LOGIC'
    Exporting
      IV_PLANT GT_MKAL_Y-werks
    importing
      ev_a5_flag lc_flag .

IF lc_flag 'X' and GT_MKAL_Y-werks ne '1600' or GT_MKAL_Y-werks NE '1700'.
  call FUNCTION 'Z_FV_PROD_VERS_CHECK'
    Exporting
        P_VERID GT_MKAL_Y-VERID

    Importing
        BAPIRET2 wa_BAPIRET2 .

    IF wa_BAPIRET2-TYPE 'E' .
        MESSAGE wa_BAPIRET2-MESSAGE type 'E'.
    ENDIF .

 ENDIF .

ENDLOOP .
Function module Z_FV_PROD_VERS_CHECK source code:
DATA :
      lr_number type range of char4,
      ls_number like line of lr_number.

      ls_number-sign 'I' .
      ls_number-option 'BT' .
      ls_number-low '0001' .
      ls_number-high '0099' .
      append ls_number to lr_number.

  IF P_VERID in lr_number .
     BAPIRET2-TYPE 'S' .
  ELSE.
    BAPIRET2-TYPE 'E' .
    BAPIRET2-MESSAGE 'For all A5 BGs except India, the production version should between 0001 to 0099, please check your input'.

  endif.
 
stucture BAPIRET2 should put in "export" as a parameter.

--
​The end.​