顯示具有 ORACLE EBS - OUTPUT 標籤的文章。 顯示所有文章
顯示具有 ORACLE EBS - OUTPUT 標籤的文章。 顯示所有文章

2014年8月28日 星期四

[ Oracle ERP ] Show Barcode in View Output

1) Oracle Report using Barcode -
     http://tomkuo139.blogspot.tw/2009/02/oracle-report-barcode.html
     http://hi.baidu.com/eebevkrtwgbgxzd/item/1e8145c68d1b9a57bcef6924
     缺點: 必須下載安裝
     優點: 生成的Barcode 是圖檔

2) 利用外部程式產生資料 iReport 架設一台Server 將資料寫入再丟參數

3) Client Server 只要在Report 上設定字型即可產生, 但遇到ERP上, 掛載沒有字型一樣無法產生Barcode

4) 我個人最喜歡的解決方法

產生HTML 報表, 在字型上套用 Barcode 字型
優點: 只需要User電腦安裝Barcode字型即可, 不需要架設Server 或安裝其他開發工具
實際拿出掃描器可以描條碼

HTML 語法

<font style="font-family: ChinaDragon_39_BarCode; font-size: 40px;">*1234567*</font>



2014年7月9日 星期三

執行 Concurrent 後, 於客製的Form 的Output

Item Type: Push Button
Item Trigger: WHEN-BUTTON-PRESSED

1) Libraries : FNDCONC
2) Program Unit: editor_pkg.report(req_id number, save_output_flag varchar2);
            

可以從IE內的瀏覽器的網址,看得出來是呼叫的結果, 直接呈現HTML的Output



DECLARE
  ln_num             NUMBER;
  lb_submit          BOOLEAN;
   
  V_ERROR            VARCHAR2(30);
  V_RECEIPT_SEQ      NUMBER := 0;
   
  -- get concurrent status
  lb_wait                    BOOLEAN;
  ls_phase                   VARCHAR2(15);
  ls_status                  VARCHAR2(15);
  ls_dev_phase               VARCHAR2(80);
  ls_dev_status              VARCHAR2(80);
  ls_messge                  VARCHAR2(255);
BEGIN

  ln_num := FND_REQUEST.SUBMIT_REQUEST
           ( 'PO','YLPOM001_BATCH', '', '',FALSE,
               '', --1
           '',  --2
           '',  --3
           '',  --4
           '',  --5
           '',  --6
           '',  --7
           '',  --8
           '',  --9
           '',  --10
           '',  --11
           '',  --12
           '',  --13
           '',  --14
           'Y',  --15
           '',  --16
           CHR(0),  -- 從FORM叫REQUEST , 最後一個參數要放CHR(0)
           '','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','',
           '','','','','','','','','','');
  IF ln_num = 0 THEN
     FND_MESSAGE.RETRIEVE;
     FND_MESSAGE.ERROR;
  ELSE
    lb_submit := APP_FORM.QUIETCOMMIT;
                                
    FND_MESSAGE.DEBUG(' >> 預覽報表 << '|| CHR(10)|| 
                     'Request ID:' || TO_CHAR(ln_num));
                                
--2:每2秒檢查一次Request,10800:表示總共等10800秒,共180分鐘,超過180分鐘上一個Request若還未成功,則會出現Error

    lb_wait := Fnd_Concurrent.wait_for_request
          (ln_num
           ,2,10800,ls_phase,ls_status,ls_dev_phase,ls_dev_status,ls_messge);
             
    IF SUBSTR(UPPER(ls_dev_phase),1,8) = 'COMPLETE' 
       AND 
       SUBSTR(UPPER(ls_dev_status),1,6) = 'NORMAL' THEN
       ------------------------------------------------------------------------
                 -- Libraries: FNDCONC
                 -- procedure report(req_id number, save_output_flag varchar2);
       ------------------------------------------------------------------------
       editor_pkg.report(ln_num, 'Y');
     END IF;
              
 END IF;

END;

2014年5月28日 星期三

[ Oracle ERP ] PO - Oracle Standard Procedure - Amount

很多時候, Oracle 文件有提供資料, 但總是要自己看完再寫sql, 雖然前輩或是從網路上可以找到不少參考的SQL, 但我仍然盡量按照Oracle 的FORM 呈現的方式, 去找他們是用function 或是用其他方法取得相關數據, 套用Oracle 原始的方式,除非原本有bug 否則不太可能會出錯, 也許驗證資料幾百筆都對, 但可能因為公司別或是因為幣別匯率等等的原因, 導致一個月後或是幾天後發現問題。遇到問題再來找原因,我寧願把時間拿來剝洋蔥,自己找答案

本次時間:4 小時

從Oracle Standard PO 找到 Amount 以及 Matched Amount 的計算

FORM call Library - POXPOVP2.PLL – HEADERS_FOLDER_C. post_query



Matched Amount
select nvl(sum(nvl(apid.amount, 0)), 0) 
   into x_mamount
      from ap_invoice_distributions apid
            , po_distributions pod
      where pod.po_distribution_id = apid.po_distribution_id
      and pod.po_header_id = poh_id

      and pod.po_release_id = por_id;

Amount à po_inq_sv.GET_PO_TOTAL('STANDARD', 143807, NULL)

FUNCTION get_po_total (x_type_lookup_code  IN  VARCHAR2,
                   x_po_header_id        IN  NUMBER,
                   x_po_release_id     IN  NUMBER)

Db object: [ package]

po_inq_sv.get_post_query_info (
                        x_cancelled_by,
                        NULL,
                        to_number(name_in('headers_folder.agent_id')),
--                      name_in('headers_folder.type_lookup_code'),
                x_type_lookup_code,
                        to_number(name_in('headers_folder.po_header_id')),
                        to_number(name_in('headers_folder.po_release_id')),
                        NULL,
                        NULL,
                        x_agent_name,
                        x_closed_by_name,
                        x_cancelled_by_name,
                        x_base_currency,
                        x_amount);

2014年4月3日 星期四

Oracle Export HTML/Excel Report without XML

RDBMS : 8.1.7.4.0
Oracle Applications : 11.5.5


此方式無論是在Oracle EBS 任何版本或是Oracle Developer 6 以上的版本皆可開發,且系統升級時亦無影響


直接在EBS 上執行concurrent 即可跑出網頁報表,且不需使用XML
Run a concurrent program show a web report

如果變更瀏覽器大小,畫面會自動調整
When you change your view size on webpage
Eventhough, you print a report via IE, the webpage size will show the perfect
Full-size

Small size
 
 
 
Using Microsoft Excel Import the HTML Report
使用Microsoft Excel 匯入報表,會保留格式
 





"Notice" , if you set the "Keep the format", you can keep the column style
如果你在選項裡,設定保留HTML格式, 於匯入完成,可看到欄位格式皆保留

Microsoft Excel column's color less and HTML, therefore you would like to choose a Excel color is better.

如果您的HTML內設定的顏色在Microsoft Excel 裡沒有,則Excel無法顯示