2013年11月8日 星期五

JDE Parameterized URL

JDE Parameterized URL 一定要透過 Data Structure 傳遞參數
FormDSTmpl 傳遞 FI 編號
FormDSData 傳遞 FI 內容值
ex. P550001 有 3 個 FI
  1 KCOO
  2 DOCO
  3 DCTO
 今天只查 DOCO = 13000001 的資料
 => FormDSTmpl=|1|2|3|&FormDSData=||13000001||

完整模式 :
http://[ServerIP]:[ServerPort]/jde/HostedE1Servlet?OID=[ApplicationID]_[FormID]_[Version]&FormDSTmpl=[FI編號]&FormDSData=[FI內容值]
完整 URL :
http://192.168.1.153:82/jde/HostedE1Servlet?OID=P550001_W550001A&FormDSTmpl=|1|2|3|&FormDSData=||13000001||
 
環境要求 :
Tool Release : 8.96 - Service Pack E1 and Above
Application Release : 8.9 and Above
 
參考資料 :
 

2013年10月25日 星期五

ASP(vbscript) Querystring 判斷

記錄一下 ASP(vbscript) Querystring 的判斷結果
<%
   if IsEmpty(Request("a")) then
      ' http://localhost/TestQueryString.asp
      response.write "Empty"
   end if

   if IsNull(Request("a")) then
      response.write "Null"
   end if

   if Request("a") = "" then
      ' http://localhost/TestQueryString.asp
      ' http://localhost/TestQueryString.asp?a
      ' http://localhost/TestQueryString.asp?a=
      response.write "Blank"
   end if

   if IsNumeric(Request("a")) then
      ' http://localhost/TestQueryString.asp
      ' http://localhost/TestQueryString.asp?a=123
      ' http://localhost/TestQueryString.asp?a=-123
      ' http://localhost/TestQueryString.asp?a=0.123
      ' http://localhost/TestQueryString.asp?a=-0.123
      response.write "Numeric"
   end if

   if Request("a") is nothing then
      response.write "Nothing"
   end if
%>

2013年10月13日 星期日

JDE Business Function 令人無法想像的限制

最近撰寫 JDE 9.0 Business Function 遇到一個問題:

在 BF 中 Fetch Single 某個 Table
結果 SV File_IO_Status 一直 return CO Error
但是我確定該 Table 有符合的資料存在
相同的條件將 Fetch Single 寫在 P 程式中, 也一切正常 (CO Success)

最後才發現:
在 BF 使用 Fetch Single
一定要依序使用 Index Column

Ex. 
Table 有一組 Index, 依序為 : KCOO, DOCO, DCTO, LNID
在 BF 裡使用這組 Index 進行 Fetch Single, 可以有下列用法:
1. KCOO
2. KCOO + DOCO
3. KCOO + DOCO + DCTO
4. KCOO + DOCO + DCTO + LNID

但是, 如果你用 KCOO + DCTO, 就是死!