2011年3月30日 星期三

[SD] USEREXIT_AVAIL_CHECK_CREDIT

釋放信用凍結的訂單後,要不要檢查可用量的 User Exit
從底下的程式碼(MV45AFZF)中就可以看出,只要將 CH_CHECK 設成 0 的話,就會作可用量的檢查
*---------------------------------------------------------------------*
* FORM USEREXIT_AVAIL_CHECK_CREDIT *
*---------------------------------------------------------------------*
* This userexit can be used, to determine, if an *
* availibility check should be carried out at release or recheck*
* of credit blocked orders. This routine is called per *
* item line. *
* Set CH_CHECK ! *
*---------------------------------------------------------------------*
* --> US_VBAK Header information *
* --> US_VBUK Header status information *
* --> US_VBAP Item line information *
* --> US_RELEASE at release ('X') *
* --> US_RECHECK at recheck ('X') *
* <-- CH_CHECK 0 = check *
* 4 = processing like standard *
* 8 = no check *
*---------------------------------------------------------------------*
FORM USEREXIT_AVAIL_CHECK_CREDIT USING US_VBAK STRUCTURE VBAK
US_VBUK STRUCTURE VBUKVB
US_VBAP STRUCTURE VBAPVB
US_RELEASE
US_RECHECK
CHANGING CH_CHECK.
DATA: CON_CHECK_STANDARD LIKE SY-SUBRC VALUE 4,
CON_CHECK_NO LIKE SY-SUBRC VALUE 8,
CON_CHECK_YES LIKE SY-SUBRC VALUE 0.
*
CH_CHECK = CON_CHECK_STANDARD.
* CH_CHECK = CON_CHECK_NO.
* CH_CHECK = CON_CHECK_YES.
ENDFORM.

沒有留言:

張貼留言