Friday, March 16, 2018

MD04 differentiate Shipping Notification for AB/LS

Change MRP element data only for MRP element ShpgNt(LA), To differentiate text of Shipping Notification for inbound and PO confirmation

 Enhance
INCLUDE: MM61RO10_MODIFY_SCR_ELEMENTS







 
  TABLES: EKES.
  DATA: EXTRA like MDEZX-EXTRA.
    LOOP AT MDEZX WHERE DELKZ = 'LA'.
     IF MDEZX-EXTRA+0(2) = 'LA' or  MDEZX-EXTRA+0(2) = 'AB' or MDEZX-EXTRA+0(2) = 'LS'. " do search LA and AB only once to imporve performance.
        EXIT.
     ELSE.
          READ TABLE MDPSX INDEX MDEZX-ALINE.
          SELECT SINGLE * FROM EKES
                          WHERE EBELN = MDPSX-DELNR
                            AND EBELP = MDPSX-DELPS
                            AND ETENS = MDPSX-DELET .
          IF SY-SUBRC = 0.
            EXTRA = MDEZX-EXTRA .
            CLEAR MDEZX-EXTRA.
            CASE EKES-EBTYP .
              WHEN 'LA'.
                 CONCATENATE EKES-EBTYP ':' EKES-VBELN '/' EKES-VBELP '/' EXTRA INTO MDEZX-EXTRA.
              WHEN 'AB' .
                 CONCATENATE EKES-EBTYP ':' EXTRA INTO MDEZX-EXTRA.
              WHEN OTHERS.
                 CONCATENATE EKES-EBTYP ':' EXTRA INTO MDEZX-EXTRA.
            ENDCASE.
            MODIFY MDEZX.
          ENDIF.
     ENDIF.
    ENDLOOP.


after enhance:
 

Wednesday, January 24, 2018

Update APO selection profle w/o open planning book.

Usually, when we need update a selection profile, we have to select the selection profile by open planning book, and load it then we can change it.
As each time, the load take long time, it's not the best way to achieve it, especailly you have a lot of selection profle to be updated.


 After some search, we found there are 2 alternative approache.
  1. Update table /sapapo/ts_selko and /sapapo/ts_selpo by custom program, it's simple and direct.
  2. Use function module /SAPAPO/MCPSH_SELECTION_CHANGE
Test data as below:




IT_SELECTION

Caution:
This change is overwrite. So you have to put all selection option in IT_SELECTION. Or, the existed  selection option data will gone.





Works like a charm, verify it in planning book.



Monday, August 7, 2017

Production order error: division by zero

Check qty of material which have discontinue indicator.
The qty is zero.
System will division withdraw qty by requirement qty while change order qty.
Simply delete the item with requirement zero, problem solved.

该死的裤裆

该死的裤裆

该死的裤裆
挡在那中央
燥热的夏天
闷到它发慌

该死的裤裆
拉链要一直拉上
紧紧的封闭
淡出个鸟来

该死的裤裆
某天忘了拉上
它说它要开放
没有封闭
哪有什么开放
YO YO

该死的裤裆
谁都知道,
窝藏、窝藏
窝藏的就是根JB

没有约束的JB,
你就眼盯着它膨胀
膨胀膨胀,
那是它在自取灭亡
该死的裤裆
要变成血的汪洋

--
Best regards!

Joe.LI

Thursday, February 23, 2017

SAP: Migrate the quality level from legacy system at characteristic level.

Usually, QDL1 can only create the quality level at inspection lot level.
Hence, if you set the DMR at characteristic level, and when you try create  the quality level a characteristic level with QDL1, system will issue an error message:


Solution:
You have to create a quality level records, then you can use QDL2 to maintain  the quality level a characteristic level .
SAP provide note 136395 Creation/transfer of Q-levels is not possible to address this issue.





QDL2