<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    javaGrowing

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      92 隨筆 :: 33 文章 :: 49 評論 :: 0 Trackbacks

    2007年5月17日 #

    單擊“開始→運行”,在“打開”框中鍵入“MOUNTVOL ? /E”,然后單擊“確定”按鈕,重新啟動電腦。
    posted @ 2008-11-01 15:19 javaGrowing 閱讀(519) | 評論 (0)編輯 收藏

    Archetype Command
    JSF Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Spring MVC Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-spring -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Struts 2 Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Tapestry Basic mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-basic-tapestry -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    JSF Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-jsf -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Spring MVC Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-spring -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Struts 2 Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-struts -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Tapestry Modular mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-modular-tapestry -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject
    Core
    (backend only)
    mvn archetype:create -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-core -DremoteRepositories=http://static.appfuse.org/releases -DarchetypeVersion=2.0.2 -DgroupId=com.mycompany.app -DartifactId=myproject

    You should be able to run AppFuse immediately if you have a MySQL 5.x database installed and it's accessible to root using no password. If you'd prefer to use an embedded database, we've recently added Database Profiles for H2, HSQLDB, etc.

    MySQL Security
    Running MySQL using root with no password is not the most secure thing to do. Once your database is created, you can change the root password using the command below:
    mysql --user=root --pass='' mysql -e "update user set password=password('newpw') where user='root'; flush privileges;"

    AppFuse uses the username "root" and a blank password by default. To change these values, modify the <jdbc.username> and <jdbc.password> properties in your project's pom.xml (at the bottom).

    Run your application

    Running AppFuse is easy now. Once the archetype project is created, Maven will create and populate your database using the hibernate3 and dbunit plugins, respectively. All you have to do is use Maven to run the Jetty container and view your application.

    1. Check your new project into source control, unless you have a good reason not to. Google Code has free Subversion hosting, as do many others.
    2. From the command line, cd into your new project's directory and run mvn to download JARs, Tomcat and run the integration tests in your project. Now is a good time to take a coffee break or grab a beer - downloading everything and running the tests can take 5-10 minutes.
    3. To view your application run mvn jetty:run-war from your project's directory (for a modular project, you'll need to run mvn jetty:run-war from your project's web directory). Maven will start Jetty and you should be able to view your application in your browser at http://localhost:8080.
      The default username/password for an admin user is admin/admin. For a regular user, use user/user.
    4. To override files from AppFuse, run mvn war:inplace. This will extract the dependent WARs into src/main/webapp, where you can change files to your heart's content. When you have the war expanded in your source tree, you can run mvn jetty:run. This will allow you to change files on-the-fly and Jetty will reload them as needed. The only problem with this approach is you end up with an "exploded AppFuse" in your project, which won't bode well for upgrading. We recommend you check your project into source control before running mvn war:inplace. That way, it'll be easier for you to decide what needs to be checked in (over written) and what can be deleted.

    If you receive OutOfMemory errors when using mvn jetty:run, see this mailing list thread.

    You can change AppFuse from its "embedded mode" to full-source mode by running mvn appfuse:full-source from your project's root directory.

    Bug with Ant 1.7.0
    Local repositories and projects on Windows platforms are held in directories whose paths contain no spaces. To fix this issue, modify your $M2_HOME/conf/settings.xml and change your localRepository to something like the following:
    <localRepository>c:\docume~1\username\.m2\repository</localRepository> 
    
    Development Environment
    See development environment for detailed instructions on how to setup your computer to develop AppFuse-based applications.
    Changing database settings
    To change your MySQL database settings, simply change the <jdbc.*> properties at the bottom of your pom.xml. See Database Profiles to use a database other than MySQL


    set MAVEN_OPTS=-Xmx512m -Xms512m -XX:MaxPermSize=512m
    posted @ 2008-09-03 18:07 javaGrowing 閱讀(478) | 評論 (0)編輯 收藏

    今天我在調程序時,遇到了見郁悶的事,我用ajax從前臺顯示頁面傳字符串變量給處理頁面,出現了件怪事,我想傳的內容是abc+,但接收以后用System.out.println()輸出是abc空格。反復測試好幾遍,都是這個結果,真是令人郁悶。在網上搜了搜,找到了原因。
    原因:?? url中有些字符被轉義,比如空格被編碼成加號,于是傳的參數明明是加號,獲取的值卻成了空格。如何解決呢?如果是通過url傳遞參數,應該對其進行必要的編碼。
    解決辦法:
    ???????? 在javascript中加入?? function URLencode(sStr)
    {
    ??? return escape(sStr).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27').replace(/\//g,'%2F');
    }
    對字符串進行處理.如:var str=URLencode("abc+")
    posted @ 2007-12-19 09:02 javaGrowing 閱讀(11319) | 評論 (5)編輯 收藏

    The following processes including SD,MM,PP,FI,CO .


    SD Relevant Steps:
    1.Check if all delivery in due list have been processedVL06G (Could set background jobs to automatically generate the billing due list for posting)
    2.Check if all picking in due list have been processedVL06P
    3.Check if all goods issue in due list have been processedVL04
    4.Check if all billed AR has been release to accountingVFX3

    PP Relevant Steps:
    1.Check if all back flash error has been solved (COGI Check every day this kind of problem and solved on time)
    2.Check if all production orders that will not be followed have been finally??confirmed or technically closed. Do final confirmation even small quantity??variance exist but we consider this order has finished
    3.Do technical close at month end for the orders will not be followed in the future
    4.Confirmation. Do not confirm any assembly scrap when do production order conf.

    MM Relevant Steps
    1.Check if all goods movement has been booked in SAP
    2.GR/IR clearing accounts maintenance if needed
    3.Open the MM period for movement posting when new period starts MMPV

    FI Relevant Steps
    1.Book all accounting entries for:
    - Accrued expense
    - Do recurring entry (prepayment, accrued expense, amortization)
    - Process G/L, vendor, customer balance & open items
    - Cost allocations by FI
    2.AM Fixed asset depreciation run and period postingAFAB
    3.AM Periodic posting ASKB
    4.G/L,AR,AP balance check & Open item clearing
    5.Foreign currency revaluation for bank/cash & AR AP open items
    Bank/cash revaluation: F.06
    AR AP open items: F.05
    6.GR/IR clearing account regrouping process F.19
    7.Automatic clearing for G/L accounts, vendor and customer F.13

    CO Relevant Steps
    1.Release standard cost estimate
    CK24Only when there are costing run to be released.
    2.Cost reallocation according to activity
    Distribution: CKV5
    Assessment: KSU5
    3.Cost splitting among activity KSS2
    4.Actual activity price calculation KSII
    5.Production order revaluation with actual activity price CON2
    6.WIP calculationfor the production orders KKAO
    7.Variance calculation for the production orders KKS1
    8.Production / Costing orders settlement CO88/KO88
    9.Material ledger closing > MMPV first
    a.Create costing runCKRU00
    b.Allow settlementCKMF_RUN
    c.Allow closing entriesCKMG_RUN
    d.Material selectionCKMB_RUN
    e.Determine costing sequenceCKMC_RUN
    f.Settle single levelCKMH_RUN
    g.Settle multi levelCKMM_RUN
    h.Post closingCKMI
    posted @ 2007-12-18 16:03 javaGrowing 閱讀(901) | 評論 (0)編輯 收藏

    所謂排序,就是要整理文件中的記錄,使之按關鍵字遞增(或遞減)次序排列起來。其確切定義如下:
      輸入:n個記錄R1,R2,…,Rn,其相應的關鍵字分別為K1,K2,…,Kn。
      輸出:Ril,Ri2,…,Rin,使得Ki1≤Ki2≤…≤Kin。(或Ki1≥Ki2≥…≥Kin)。

    ??? 這里,我們簡單介紹幾種排序方法,直接插入排序、希兒排序、冒泡排序、快速排序、直接選擇排序,文中所提及的代碼在IE6下測試通過。

    直接插入排序基本思想
    ??? 假設待排序的記錄存放在數組R[1..n]中。初始時,R[1]自成1個有序區,無序區為R[2..n]。從i=2起直至i=n為止,依次將R[i]插入當前的有序區R[1..i-1]中,生成含n個記錄的有序區。

    ??? 算法描述

    ?function?InsertSort(arr)?{?//插入排序->直接插入法排序
    ??var?st?=?new?Date();
    ??
    var?temp,?j;
    ??
    for(var?i=1;?i<arr.length;?i++)?{
    ???
    if((arr[i])?<?(arr[i-1]))?{
    ????temp?
    =?arr[i];
    ????j?
    =?i-1;
    ????
    do?{
    ?????arr[j
    +1]?=?arr[j];
    ?????j
    --;
    ????}
    ????
    while?(j>-1?&&?(temp)?<?(arr[j]));
    ????arr[j
    +1]?=?temp;
    ???}
    //endif
    ??}
    ??status?
    =?(new?Date()?-?st)?+?'?ms';
    ??
    return?arr;
    ?}

    希爾排序基本思想
     ??先取一個小于n的整數d1作為第一個增量,把文件的全部記錄分成d1個組。所有距離為dl的倍數的記錄放在同一個組中。先在各組內進行直接插人排序;然后,取第二個增量d2<d1重復上述的分組和排序,直至所取的增量dt=1(dt<dt-l<…<d2<d1),即所有記錄放在同一組中進行直接插入排序為止。
    ?  該方法實質上是一種分組插入方法。

    ??? 算法描述

    ?

    function?ShellSort(arr)?{?//插入排序->希兒排序
    ??var?st?=?new?Date();
    ??
    var?increment?=?arr.length;
    ??
    do?{
    ???increment?
    =?(increment/3|0)?+?1;
    ???arr?
    =?ShellPass(arr,?increment);
    ??}
    ??
    while?(increment?>?1)

    ??status?
    =?(new?Date()?-?st)?+?'?ms';
    ??
    return?arr;
    ?}
    ?
    function?ShellPass(arr,?d)?{?//希兒排序分段執行函數
    ??var?temp,?j;
    ??
    for(var?i=d;?i<arr.length;?i++)?{
    ???
    if((arr[i])?<?(arr[i-d]))?{
    ????temp?
    =?arr[i];?j?=?i-d;
    ????
    do?{
    ?????arr[j
    +d]?=?arr[j];
    ?????j?
    =?j-d;
    ????}
    ????
    while?(j>-1?&&?(temp)?<?(arr[j]));
    ????arr[j
    +d]?=?temp;
    ???}
    //endif
    ??}
    ??
    return?arr;
    ?}

    冒泡排序基本思想
    ??? 將被排序的記錄數組R[1..n]垂直排列,每個記錄R[i]看作是重量為R[i].key的氣泡。根據輕氣泡不能在重氣泡之下的原則,從下往上掃描數組 R:凡掃描到違反本原則的輕氣泡,就使其向上"飄浮"。如此反復進行,直到最后任何兩個氣泡都是輕者在上,重者在下為止。

    ??? 算法描述
    ?

    function?BubbleSort(arr)?{?//交換排序->冒泡排序
    ??var?st?=?new?Date();
    ??
    var?temp;
    ??
    var?exchange;
    ??
    for(var?i=0;?i<arr.length;?i++)?{
    ???exchange?
    =?false;
    ???
    for(var?j=arr.length-2;?j>=i;?j--)?{
    ????
    if((arr[j+1])?<?(arr[j]))?{
    ?????temp?
    =?arr[j+1];
    ?????arr[j
    +1]?=?arr[j];
    ?????arr[j]?
    =?temp;
    ?????exchange?
    =?true;
    ????}
    ???}
    ???
    if(!exchange)?break;
    ??}
    ??status?
    =?(new?Date()?-?st)?+?'?ms';
    ??
    return?arr;
    ?}

    快速排序基本思想
    ??? 將原問題分解為若干個規模更小但結構與原問題相似的子問題。遞歸地解這些子問題,然后將這些子問題的解組合為原問題的解。
    ??? 在R[low..high]中任選一個記錄作為基準(Pivot),以此基準將當前無序區劃分為左、右兩個較小的子區間R[low..pivotpos- 1)和R[pivotpos+1..high],并使左邊子區間中所有記錄的關鍵字均小于等于基準記錄(不妨記為pivot)的關鍵字 pivot.key,右邊的子區間中所有記錄的關鍵字均大于等于pivot.key,而基準記錄pivot則位于正確的位置(pivotpos)上,它無 須參加后續的排序。

    ??? 算法描述
    ?

    function?QuickSort(arr)?{?//交換排序->快速排序
    ??if?(arguments.length>1)?{
    ???
    var?low?=?arguments[1];
    ???
    var?high?=?arguments[2];
    ??}?
    else?{
    ???
    var?low?=?0;
    ???
    var?high?=?arr.length-1;
    ??}
    ??
    if(low?<?high){
    ???
    //?function?Partition
    ???var?i?=?low;
    ???
    var?j?=?high;
    ???
    var?pivot?=?arr[i];
    ???
    while(i<j)?{
    ????
    while(i<j?&&?arr[j]>=pivot)
    ?????j
    --;
    ????
    if(i<j)
    ?????arr[i
    ++]?=?arr[j];
    ????
    while(i<j?&&?arr[i]<=pivot)
    ?????i
    ++;
    ????
    if(i<j)
    ?????arr[j
    --]?=?arr[i];
    ???}
    //endwhile
    ???arr[i]?=?pivot;
    ???
    //?end?function
    ???var?pivotpos?=?i;?//Partition(arr,low,high);
    ???QuickSort(arr,?low,?pivotpos-1);
    ???QuickSort(arr,?pivotpos
    +1,?high);
    ??}?
    else
    ???
    return;
    ???
    return?arr;
    ?}

    直接選擇排序基本思想
    ?? n個記錄的文件的直接選擇排序可經過n
    -1趟直接選擇排序得到有序結果:
    ?①初始狀態:無序區為R[
    1..n],有序區為空。
    ?②第1趟排序
    ????在無序區R[
    1..n]中選出關鍵字最小的記錄R[k],將它與無序區的第1個記錄R[1]交換,使R[1..1]和R[2..n]分別變為記錄個數增加1個的新有序區和記錄個數減少1個的新無序區。
      ……
    ?③第i趟排序
      第i趟排序開始時,當前有序區和無序區分別為R[
    1..i-1]和R[i..n](1≤i≤n-1)。該趟排序從當前無序區中選出關鍵字最小的記錄R?[k],將它與無序區的第1個記錄R[i]交換,使R[1..i]和R[i+1..n]分別變為記錄個數增加1個的新有序區和記錄個數減少1個的新無序區。
    ????這樣,n個記錄的文件的直接選擇排序可經過n
    -1趟直接選擇排序得到有序結果。

    ????算法描述
    ?
    function?SelectSort(arr)?{?//選擇排序->直接選擇排序
    ??var?st?=?new?Date();
    ??
    var?temp;
    ??
    for(var?i=0;?i<arr.length;?i++)?{
    ???
    var?k?=?i;
    ???
    for(var?j=i+1;?j<arr.length;?j++)?{
    ????
    if((arr[j])?<?(arr[k]))
    ?????k?
    =?j;
    ???}
    ???
    if?(k?!=?i){
    ????temp?
    =?arr[i];
    ????arr[i]?
    =?arr[k];
    ????arr[k]?
    =?temp;
    ???}
    ??}
    ??status?
    =?(new?Date()?-?st)?+?'?ms';
    ??
    return?arr;
    ?}

    posted @ 2007-07-23 16:23 javaGrowing 閱讀(500) | 評論 (0)編輯 收藏

    Dom + Javascript 在本機瀏覽器中對的表格數據進行排序

    在本機瀏覽器中對的表格數據進行排序
    在Web應用中,數據從服務器端返回到客戶端,以表格形式表現出來。如果要對數據集按指定的列排序顯示,常規做法都是向服務器發出請求,服務器端程序重新從數據庫中取出按指定列排序的數據,返回給客戶端,頁面重新顯示排序后數據。
    ?
    采用這種方式有如下缺點:
    1- 響應時間延遲,每次排序都要向服務器端發送請求,等待結果返回,同時增加網絡負載。
    2- 編程復雜,可維護性差,而且客戶端和服務器端代碼耦合度很高,客戶端和服務器端都要處理排序涉及的列名、排序方式,如果有分頁和查詢條件,都需要在客戶端頁面中保留,排序請求時重新傳遞到服務器端,當參數數量很多時極易出錯。
    3- 重用度很低,針對不同表格,很難抽象出一個公共程序來共用,需要逐個編寫代碼實現,增加工作量。
    ?
    現在換一個角度考慮,數據既然已下載到了客戶端,在重新排序時沒有必要再重服務器端獲取,只要對瀏覽器中的數據重新排序顯示就可以了。要實現該目標,需要做到以下幾點:
    1 - 獲得表格中要排序的數據,將其放入一個2維數組中。
    2 - 對2維數組排序。
    3 - 用排序后的數據重新更新表格。
    ?
    利用瀏覽器支持的DOM(Document Object Model)和JavaScript即可實現上述目標。
    ?
    通常頁面中會很多的<table>,要獲得需要排序數據所在的table,需要在<table>中增加一個id屬性,便于document對象用getElementById得到該表格對象,例如要排序的表格定義如下:
    ?<table id="st" >
    ??? <tr>
    ??????? <td>1</td>
    ??????? <td>2</td>
    ??? </tr>
    </table>
    ?
    在javascript中,用var objTable = document.getElementById("st")就可得到表格對象,該對象在DOM中定義為一個Element。
    ?
    然 后用 var objRows = objTable.getElementsByTagName("tr")得到該表格中全部的行對象,ObjRows.length返回該表格行數; var rowi = objRows[i].getElementsByTagName("td")得到第i行的全部<td>節點,i從0開始計數, rowi.item(j)則可得到第i行,第j列的節點,該節點的innerHTML為該節點<td></td>之間的內容。
    ?
    獲取表格數據到2維數組的代碼見源代碼,此處略。
    ?
    下面說明在javascript中2維數組的構造和排序。
    javascript不支持2維數組,因此需要用數組的數組來模擬一個2維數組,其方法是先定義一個1維數組,元素個數為2維數組的行數,然后對每個元素賦一個值,值為一個數組,其元素個數為2維數組的列數。構造代碼如下:
    ?
    var rows = new Array(R);? //R為行數
    for(var i = 0; i < rows.length; i++){
    ??? rows[i] = new Array(C);??? //C為列數
    }
    ?
    ?
    利用javascript中的Array.sort(comparer)對rows中的元素排序,比較方式由重新定義的比較函數得到。要根據第j列元素的大小排序,只要定義如下函數即可:
    ?
    function compareCol(a,b){
    ???
    ??? if (a[j] < b[j])
    ??????? return -1;
    ?
    ??? if (a[j] > b[j])
    ??????? return 1;
    ?
    ?? return 0;
    ?
    }
    ?
    因為compareCol只能有兩個參數,因此j要定義為全局變量。
    ?
    用rows.sort (compareCol)就可實現根據j列值的大小對行進行排序。根據javascript文檔,字符串比較大小是按照其Unicode編碼的大小來比 較,對英文排序沒有問題,對中文排序時就不是按通常的拼音排序,那需要javascript提供本地化支持,目前沒有發現javascript此功能。該 功能在java中可用java.text.Collator實現。
    ?
    ?
    ?以上介紹了在本地對瀏覽器中的數據進行排序的主要思想, 為方便使用,將這些功能進行了封裝,以javascript函數的提供,存放在sorttable.js文件中,在需要的頁面中用<script type=text/javascript src='sorttable.js'></script>引入。
    ?
    ?
    ?下面說明排序函數原型和使用方法。
    ?
    函數1 function sortTable(tableId,sortCol,compareType)
    對頁面中指定表格中的數據進行排序,通常第一行為標題行,排序時從第二行開始,第一次調用為升序排列,第二次為降序排列,依次輪換。
    tableId??? 為<table id=''>中id的值,在同一個頁面中要唯一。
    sortCol??? 排序時用來比較大小的數據所在的列,從1開始計數。
    compareType 排序時比較大小的方式,s-按字符串比較大小,n-按數字比較大小。
    ?
    ?
    ?
    ?函數2 function sortTableInRange(tableId,sortCol,compareType,startRow,endRow,startCol,endCol)
    ?
    ??????? 對表格中指定的區域數據排序,有時數據第一列為流水號,最后一行為合計,這些數據不需要參與排序,可用此函數來對部分數據排序。
    ???????
    ??????? tableId??? 為<table id=''>中id的值,在同一個頁面中要唯一。
    ??????? sortCol??? 排序時用來比較大小的數據所在的列,從1開始計數。
    ??????? compareType 排序時比較大小的方式,s-按字符串比較大小,n-按數字比較大小。
    ??????? startRow,endRow 要排序區域開始和結束行號,從1開始計數。例如對第2行到第7行排序,startRow=2,endRow=7
    ??????? startCol,endCol? 要排序區域開始和結束列號,從1開始計數。
    ?
    ?
    ?
    ?
    ?
    存在的問題:
    1- 中文不能按拼音排序。
    ?
    ?
    要注意的問題:
    要排序的table必須用ID標示,并要作為參數傳給排序函數,表格中的數據應該是可以排序的,否則結果不可預知;要排序的表格不能有嵌套表,否則排序出錯。
    ?
    ?
    本函數已在IE6.0 ,FireFox1.01中運行通過。源代碼和例子代碼見后。
    ?
    ?
    ?
    ?
    參考資料:
    ?
    Danny Goodman with Michael Morrison?? JavaScript Bible 5th? ,John Wiley and Sons? 2004
    ?
    David Flanagan? JavaScript The Definitive Guide 4th ,? O'Reilly? 2001
    ?
    ?
    ?
    ?
    ?
    ?附源代碼:要運行例子,需要將javascript代碼保存到sorttable.js文件中,html部分代碼保存到同一目錄下另一文件中即可。
    ?
    ?
    sorttable.js
    ?
    ?

    ?1?//=========================================================
    ?2??//
    ?3??//??在本機對瀏覽器頁面表格中的數據行進行排序的javascript函數
    ?4??//?
    ?5??//??author?William??QQ:?22967225
    ?6?//??create?date?2005-12-2
    ?7??//??version?1.0
    ?8??//=========================================================
    ?9?
    10??//column?index?for?sort
    11??var?indexCol;
    12??//比較函數,用于Array.sort()排序時比較用。
    13??//本函數比較數組元素array1[indexCol]和元素array2[indexCol]Unicode值的大小
    14??function?arrayCompare(array1,array2){
    15???//alert(array1.length+"--"+array1[indexCol]);
    16???if?(array1[indexCol]?<?array2[indexCol])
    17????return?-1;
    18???if?(array1[indexCol]?>?array2[indexCol])
    19????return?1;
    20??
    21???return?0;
    22??
    23??}
    24??//比較數組元素array1[indexCol]和元素array2[indexCol]的數值大小
    25??function?arrayCompareNumber(array1,array2){
    26??
    27???if?(parseInt(array1[indexCol])?<?parseInt(array2[indexCol]))
    28????return?-1;
    29???if?(parseInt(array1[indexCol])?>?parseInt(array2[indexCol]))
    30????return?1;
    31??
    32???return?0;
    33??}
    34??//與arrayCompare相反方式比較大小,用于倒序使用
    35??function?arrayCompareRev(array1,array2){
    36??
    37???if?(array1[indexCol]?<?array2[indexCol])
    38????return?1;
    39???if?(array1[indexCol]?>?array2[indexCol])
    40????return?-1;
    41??
    42???return?0;
    43??
    44??}
    45??//與arrayCompareNumber相反方式比較大小,用于倒序使用
    46??function?arrayCompareNumberRev(array1,array2){
    47???if?(parseInt(array1[indexCol])?<?parseInt(array2[indexCol]))
    48????return?1;
    49???if?(parseInt(array1[indexCol])?>?parseInt(array2[indexCol]))
    50????return?-1;
    51??
    52???return?0;
    53??}
    54??
    55??//define?a?2-dimension?array
    56??function?BiArray(rows,cols){
    57??
    58???//simulate?multidimension?array
    59???this.rows?=?rows;
    60???this.cols?=?cols;
    61??
    62???//construct?array
    63???var?lines?=?new?Array(rows);
    64???for(var?i?=?0;i?<?lines.length;?i++){
    65????lines[i]?=?new?Array(cols);
    66???}

    ?
    posted @ 2007-07-23 16:20 javaGrowing 閱讀(440) | 評論 (0)編輯 收藏

    function toHtml(strBody,cset)
    {
    ?var Rec=new ActiveXObject("ADODB.RecordSet");
    ?Rec.Fields.Append("DDD",201,1);
    ?Rec.Open();
    ?Rec.AddNew();

    ?Rec(0).AppendChunk(strBody);

    ?Rec.Update();
    ?var HTML=Rec(0).Value;
    ?Rec.Close();
    ?delete Rec;
    ?document.charset=cset;
    ?return(HTML);
    }

    posted @ 2007-05-26 01:07 javaGrowing 閱讀(1003) | 評論 (0)編輯 收藏

    出處:http://www.smallrain.net/study_show.asp?id=703

    <div id="Error"></div>
    <div id="State"></div>
    <div id="DownloadEnd"></div>
    <Script Language="JavaScript">
    <!--
    // more javascript from http://www.smallrain.net

    function Ajax(OnError,OnState,OnDownloadEnd)
    {
    ?// 錯誤字符串
    ?this.ErrorStr ??= null;
    ?// 錯誤事件驅動,當發生錯誤時觸發
    ?this.OnError ??= OnError;
    ?// 狀態事件驅動,當狀態改變時觸發
    ?this.OnState ??= OnState;
    ?// 完成事件驅動,當類操作完成時觸發
    ?this.OnDownloadEnd ?= OnDownloadEnd;

    ?// XMLHTTP 發送數據類型 GET 或 POST
    ?this.method??= "GET";
    ?// 將要獲取的URL地址
    ?this.URL??= null;
    ?// 指定同步或異步讀取方式(true 為異步,false 為同步)
    ?this.sync??= true;
    ?// 當method 為 POST 時 所要發送的數據
    ?this.PostData??= null
    ?// 返回讀取完成后的數據
    ?this.RetData ??= null;

    ?// 創建XMLHTTP對像
    ?this.HttpObj ??= this.createXMLHttpRequest();
    ?if(this.HttpObj == null)
    ?{
    ??// 對像創建失敗時中止運行
    ??return;
    ?}

    ?var Obj = this;
    ?// 調用事件檢測
    ?this.HttpObj.onreadystatechange = function()
    ?{
    ??Ajax.handleStateChange(Obj);
    ?}
    }

    // UTF 轉入 GB (by:Rimifon)
    Ajax.prototype.UTFTOGB = function(strBody)
    {
    ?var Rec=new ActiveXObject("ADODB.RecordSet");
    ?Rec.Fields.Append("DDD",201,1);
    ?Rec.Open();
    ?Rec.AddNew();
    ?Rec(0).AppendChunk(strBody);
    ?Rec.Update();
    ?var HTML=Rec(0).Value;
    ?Rec.Close();
    ?delete Rec;
    ?return(HTML);
    }

    // 創建XMLHTTP對像
    Ajax.prototype.createXMLHttpRequest = function()
    {
    ?if (window.XMLHttpRequest)
    ?{
    ??//Mozilla 瀏覽器
    ??return new XMLHttpRequest();
    ?}
    ?else if (window.ActiveXObject)
    ?{
    ??????? ?var msxmls = new Array('Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','Msxml2.XMLHTTP.3.0','Msxml2.XMLHTTP','Microsoft.XMLHTTP');
    ??????? ?for (var i = 0; i < msxmls.length; i++)
    ??????? ?{
    ??????????????? ?try
    ??????????????? ?{
    ??????????????????????? ?return new ActiveXObject(msxmls[i]);
    ??????????????? ?}catch (e){}

    ??}
    ?}
    ?this.ErrorStr = "你的瀏覽器不支持XMLHttpRequest對象."
    ?if(this.OnError)
    ?{
    ??this.OnError(this.ErrorStr);
    ?}
    ??? ?return null;
    }

    // 發送HTTP請求
    Ajax.prototype.send = function()
    {

    ?if (this.HttpObj !== null)
    ?{
    ??this.URL = this.URL + "?t=" + new Date().getTime();
    ??this.HttpObj.open(this.method, this.URL, this.sync);
    ??if(this.method.toLocaleUpperCase() == "GET")
    ??{
    ???this.HttpObj.send(null);
    ??}
    ??else if(this.method.toLocaleUpperCase() == "POST")
    ??{
    ???this.HttpObj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
    ???this.HttpObj.send(this.PostData);
    ??}
    ??else
    ??{
    ???this.ErrorStr = "錯誤的[method]命令."
    ???if(this.OnError)
    ???{
    ????this.OnError(this.ErrorStr);
    ???}
    ???return;
    ??}

    ??if (this.HttpObj.readyState == 4)
    ??{
    ???// 判斷對象狀態
    ??????????? ??if (this.HttpObj.status == 200)
    ??????????????? ?{
    ????this.RetData = this.UTFTOGB(this.HttpObj.responseBody);
    ????if(this.OnDownloadEnd)
    ????{
    ?????this.OnDownloadEnd(this.RetData);
    ????}
    ??????????????????????? ?return;
    ??????????????? ?}
    ???else
    ???{
    ????this.ErrorStr = "您所請求的頁面有異常."
    ????if(this.OnError)
    ????{
    ?????this.OnError(this.ErrorStr);
    ????}
    ????return;
    ???}
    ??}

    ?}

    }

    // 事件檢測
    Ajax.handleStateChange = function(Obj)
    {
    ?if(Obj.OnState)
    ?{
    ??Obj.OnState(Obj.HttpObj.readyState);
    ?}

    ?if (Obj.HttpObj.readyState == 4)
    ?{
    ??// 判斷對象狀態
    ??????????? ?if (Obj.HttpObj.status == 200)
    ??????????????? {
    ???Obj.RetData = Obj.UTFTOGB(Obj.HttpObj.responseBody);
    ???if(Obj.OnDownloadEnd)
    ???{
    ????Obj.OnDownloadEnd(Obj.RetData);
    ???}
    ??????????????????????? return;
    ??????????????? }
    ??else
    ??{
    ???Obj.ErrorStr = "您所請求的頁面有異常."
    ???if(Obj.OnError)
    ???{
    ????Obj.OnError(Obj.ErrorStr);
    ???}
    ???return;
    ??}
    ?}
    }


    // 錯誤回調事件函數
    function EventError(strValue)
    {
    ?document.getElementById("Error").innerHTML = strValue;
    }

    // 狀態回調事件函數
    function EventState(strValue)
    {
    ?var strState = null;
    ?switch (strValue)
    ?{
    ?? ??case 0:
    ??strState = "未初始化...";
    ??break;

    ?? ??case 1:
    ??strState = "開始讀取數據...";
    ??break;

    ?? ??case 2:
    ??strState = "讀取數據...";
    ??break;

    ?? ??case 3:
    ??strState = "讀取數據中...";
    ??break;

    ?? ??case 4:
    ??strState = "讀取完成...";
    ??break;

    ?? ??default:
    ??strState = "未初始化...";
    ??break;
    ?}
    ?document.getElementById("State").innerHTML = strState;
    }

    // 完成回調事件函數
    function EventDownloadEnd(strValue)
    {
    ?document.getElementById("DownloadEnd").innerHTML = strValue;
    }


    // 初始化Ajax對像,引入事件回調函數
    var A1 = new Ajax(EventError,EventState,EventDownloadEnd);
    // 指定method數據發送類型
    A1.method = "GET";
    // 指定URL地址
    A1.URL = "// 指定為異步處理
    A1.sync = true;
    //發送請求
    A1.send();
    //-->
    </Script>?

    posted @ 2007-05-26 00:37 javaGrowing 閱讀(654) | 評論 (0)編輯 收藏

    ajax代理程序自動判斷字符編碼

    作者:llinzzi 時間: 2006-03-16 文檔類型:原創 來自:藍色理想
    瀏覽統計 total:6402 | year:1609 | Quarter:376 | Month:132 | Week:26 | today:2

    由于ajax在跨域的訪問上有問題,目前最好的方法是做代理.寫了個代理程序和心得.

    為了做ajax的代理,研究了下服務器端的xmlhttp并和客戶端的ajax中的xmlhttp做了個比較,后臺代碼是asp的.

    服務器端的xmlhttp也就是asp小偷程序,我把代碼改成了javascript.

    1.在服務器端的xmlhttp.Open("GET",url,false)異步必須是關閉的,而客戶端的異步是打開的,這個很好理解.
    2.在服務器端的xmlhttp.Responsebody 這里用的是Responsebody而不是ResponseText或ResponseXml,一開始我是用ResponseText,但在函數bytesToBSTR轉換編碼的時候提示錯誤,經過比較發現其他的asp小偷程序里的代碼都是Responsebody,分析后,發現body返回來的是二進制數據而不是像ResponseText或ResponseXml那樣返回字符或dom對象.

    ajax的asp代理函數介紹:
    send_request(url) ,url為地址

    服務器端代碼如下帶自動判斷所有字符編碼,已測試 日語 韓語 繁體:

    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>XMLHTTP</title>
    </head>
    <%

    ?

    Server.ScriptTimeout=9999999;
    function send_request(url) {
    ?var codedtext;
    ?http_request = Server.CreateObject("Microsoft.XMLHTTP");
    ?http_request.Open("GET",url,false);
    ?http_request.Send(null);
    ?if (http_request.ReadyState == 4){
    ??//自動判斷編碼開始
    ??var charresult = http_request.ResponseText.match(/CharSet=(\S+)\">/i);
    ??if (charresult != null){
    ??var Cset = charresult[1];
    ??}else{Cset = "gb2312"}//對獲取不到的網站采用gb2312編碼,可自行更改
    ??
    //自動判斷編碼結束
    ??codedtext = bytesToBSTR(http_request.Responsebody,Cset);
    ??}else{
    ??codedtext = "Erro";
    ??}
    ?return(codedtext);
    }

    function bytesToBSTR(body,Cset){
    var objstream;
    objstream = Server.CreateObject("Adodb.Stream");
    objstream.Type = 1;
    objstream.Mode = 3;
    objstream.Open();
    objstream.Write(body);
    objstream.Position = 0;
    objstream.Type = 2;
    objstream.Charset = Cset;
    bytesToBSTR = objstream.Readtext;
    objstream.Close;
    return(bytesToBSTR);
    }

    %>
    <body>
    <% Response.Write(send_request("http://www.daum.net")) %>
    </body>
    </html>

    posted @ 2007-05-26 00:31 javaGrowing 閱讀(433) | 評論 (0)編輯 收藏

    一. Input和Output
    1. stream代表的是任何有能力產出數據的數據源,或是任何有能力接收數據的接收源。在Java的IO中,所有的stream(包括Input和Out stream)都包括兩種類型:
    1.1 以字節為導向的stream
    以字節為導向的stream,表示以字節為單位從stream中讀取或往stream中寫入信息。以字節為導向的stream包括下面幾種類型:
    1) input stream:
    1) ByteArrayInputStream:把內存中的一個緩沖區作為InputStream使用
    2) StringBufferInputStream:把一個String對象作為InputStream
    3) FileInputStream:把一個文件作為InputStream,實現對文件的讀取操作
    4) PipedInputStream:實現了pipe的概念,主要在線程中使用
    5) SequenceInputStream:把多個InputStream合并為一個InputStream
    2) Out stream
    1) ByteArrayOutputStream:把信息存入內存中的一個緩沖區中
    2) FileOutputStream:把信息存入文件中
    3) PipedOutputStream:實現了pipe的概念,主要在線程中使用
    4) SequenceOutputStream:把多個OutStream合并為一個OutStream
    1.2 以Unicode字符為導向的stream
    以Unicode字符為導向的stream,表示以Unicode字符為單位從stream中讀取或往stream中寫入信息。以Unicode字符為導向的stream包括下面幾種類型:
    1) Input Stream
    1) CharArrayReader:與ByteArrayInputStream對應
    2) StringReader:與StringBufferInputStream對應
    3) FileReader:與FileInputStream對應
    4) PipedReader:與PipedInputStream對應
    2) Out Stream
    1) CharArrayWrite:與ByteArrayOutputStream對應
    2) StringWrite:無與之對應的以字節為導向的stream
    3) FileWrite:與FileOutputStream對應
    4) PipedWrite:與PipedOutputStream對應
    以字符為導向的stream基本上對有與之相對應的以字節為導向的stream。兩個對應類實現的功能相同,字是在操作時的導向不同。如CharArrayReader:和ByteArrayInputStream的作用都是把內存中的一個緩沖區作為InputStream使用,所不同的是前者每次從內存中讀取一個字節的信息,而后者每次從內存中讀取一個字符。
    1.3 兩種不現導向的stream之間的轉換
    InputStreamReader和OutputStreamReader:把一個以字節為導向的stream轉換成一個以字符為導向的stream。
    2. stream添加屬性
    2.1 “為stream添加屬性”的作用
    運用上面介紹的Java中操作IO的API,我們就可完成我們想完成的任何操作了。但通過FilterInputStream和FilterOutStream的子類,我們可以為stream添加屬性。下面以一個例子來說明這種功能的作用。
    如果我們要往一個文件中寫入數據,我們可以這樣操作:
    FileOutStream fs = new FileOutStream(“test.txt”);
    然后就可以通過產生的fs對象調用write()函數來往test.txt文件中寫入數據了。但是,如果我們想實現“先把要寫入文件的數據先緩存到內存中,再把緩存中的數據寫入文件中”的功能時,上面的API就沒有一個能滿足我們的需求了。但是通過FilterInputStream和FilterOutStream的子類,為FileOutStream添加我們所需要的功能。
    2.2 FilterInputStream的各種類型
    2.2.1 用于封裝以字節為導向的InputStream
    1) DataInputStream:從stream中讀取基本類型(int、char等)數據。
    2) BufferedInputStream:使用緩沖區
    3) LineNumberInputStream:會記錄input stream內的行數,然后可以調用getLineNumber()和setLineNumber(int)
    4) PushbackInputStream:很少用到,一般用于編譯器開發
    2.2.2 用于封裝以字符為導向的InputStream
    1) 沒有與DataInputStream對應的類。除非在要使用readLine()時改用BufferedReader,否則使用DataInputStream
    2) BufferedReader:與BufferedInputStream對應
    3) LineNumberReader:與LineNumberInputStream對應
    4) PushBackReader:與PushbackInputStream對應
    2.3 FilterOutStream的各種類型
    2.2.3 用于封裝以字節為導向的OutputStream
    1) DataIOutStream:往stream中輸出基本類型(int、char等)數據。
    2) BufferedOutStream:使用緩沖區
    3) PrintStream:產生格式化輸出
    2.2.4 用于封裝以字符為導向的OutputStream
    1) BufferedWrite:與對應
    2) PrintWrite:與對應
    3. RandomAccessFile
    1) 可通過RandomAccessFile對象完成對文件的讀寫操作
    2) 在產生一個對象時,可指明要打開的文件的性質:r,只讀;w,只寫;rw可讀寫
    3) 可以直接跳到文件中指定的位置
    4. I/O應用的一個例子
    import java.io.*;
    public class TestIO{
    public static void main(String[] args)
    throws IOException{
    //1.以行為單位從一個文件讀取數據
    BufferedReader in =
    new BufferedReader(
    new FileReader("F:\\nepalon\\TestIO.java"));
    String s, s2 = new String();
    while((s = in.readLine()) != null)
    s2 += s + "\n";
    in.close();

    //1b. 接收鍵盤的輸入
    BufferedReader stdin =
    new BufferedReader(
    new InputStreamReader(System.in));
    System.out.println("Enter a line:");
    System.out.println(stdin.readLine());

    //2. 從一個String對象中讀取數據
    StringReader in2 = new StringReader(s2);
    int c;
    while((c = in2.read()) != -1)
    System.out.println((char)c);
    in2.close();

    //3. 從內存取出格式化輸入
    try{
    DataInputStream in3 =
    new DataInputStream(
    new ByteArrayInputStream(s2.getBytes()));
    while(true)
    System.out.println((char)in3.readByte());
    }
    catch(EOFException e){
    System.out.println("End of stream");
    }

    //4. 輸出到文件
    try{
    BufferedReader in4 =
    new BufferedReader(
    new StringReader(s2));
    PrintWriter out1 =
    new PrintWriter(
    new BufferedWriter(
    new FileWriter("F:\\nepalon\\ TestIO.out")));
    int lineCount = 1;
    while((s = in4.readLine()) != null)
    out1.println(lineCount++ + ":" + s);
    out1.close();
    in4.close();
    }
    catch(EOFException ex){
    System.out.println("End of stream");
    }

    //5. 數據的存儲和恢復
    try{
    DataOutputStream out2 =
    new DataOutputStream(
    new BufferedOutputStream(
    new FileOutputStream("F:\\nepalon\\ Data.txt")));
    out2.writeDouble(3.1415926);
    out2.writeChars("\nThas was pi:writeChars\n");
    out2.writeBytes("Thas was pi:writeByte\n");
    out2.close();
    DataInputStream in5 =
    new DataInputStream(
    new BufferedInputStream(
    new FileInputStream("F:\\nepalon\\ Data.txt")));
    BufferedReader in5br =
    new BufferedReader(
    new InputStreamReader(in5));
    System.out.println(in5.readDouble());
    System.out.println(in5br.readLine());
    System.out.println(in5br.readLine());
    }
    catch(EOFException e){
    System.out.println("End of stream");
    }

    //6. 通過RandomAccessFile操作文件
    RandomAccessFile rf =
    new RandomAccessFile("F:\\nepalon\\ rtest.dat", "rw");
    for(int i=0; i<10; i++)
    rf.writeDouble(i*1.414);
    rf.close();

    rf = new RandomAccessFile("F:\\nepalon\\ rtest.dat", "r");
    for(int i=0; i<10; i++)
    System.out.println("Value " + i + ":" + rf.readDouble());
    rf.close();

    rf = new RandomAccessFile("F:\\nepalon\\ rtest.dat", "rw");
    rf.seek(5*8);
    rf.writeDouble(47.0001);
    rf.close();

    rf = new RandomAccessFile("F:\\nepalon\\ rtest.dat", "r");
    for(int i=0; i<10; i++)
    System.out.println("Value " + i + ":" + rf.readDouble());
    rf.close();
    }
    }
    關于代碼的解釋(以區為單位):
    1區中,當讀取文件時,先把文件內容讀到緩存中,當調用in.readLine()時,再從緩存中以字符的方式讀取數據(以下簡稱“緩存字節讀取方式”)。
    1b區中,由于想以緩存字節讀取方式從標準IO(鍵盤)中讀取數據,所以要先把標準IO(System.in)轉換成字符導向的stream,再進行BufferedReader封裝。
    2區中,要以字符的形式從一個String對象中讀取數據,所以要產生一個StringReader類型的stream。
    4區中,對String對象s2讀取數據時,先把對象中的數據存入緩存中,再從緩沖中進行讀?。粚estIO.out文件進行操作時,先把格式化后的信息輸出到緩存中,再把緩存中的信息輸出到文件中。
    5區中,對Data.txt文件進行輸出時,是先把基本類型的數據輸出屋緩存中,再把緩存中的數據輸出到文件中;對文件進行讀取操作時,先把文件中的數據讀取到緩存中,再從緩存中以基本類型的形式進行讀取。注意in5.readDouble()這一行。因為寫入第一個writeDouble(),所以為了正確顯示。也要以基本類型的形式進行讀取。
    6區是通過RandomAccessFile類對文件進行操作。

    posted @ 2007-05-19 20:11 javaGrowing 閱讀(334) | 評論 (0)編輯 收藏

    ? 表???? 說明
    組織結構             T001  Company Code
    TVKO Sales Organization
    TSPA DIvision
    TVTW Distribution Channel
    TVTA Sales Area
    TVBUR Sales Office
    TVGRP Sales Person Group
    T001W Plant
    TVST Shipping Point
    TVLA Loading Point
    T014 Credit Control Area
    客戶 ??????? KNA1?? General Data????????????????? KNB1?? Customer Master – Co.
    posted @ 2007-05-17 09:30 javaGrowing 閱讀(423) | 評論 (0)編輯 收藏

    SD?和 MM?模塊的業務集成:

    1. 當你創建銷售訂單(SO),所有的項目將從MM模塊拷貝物料主數據.

    2. MRP和可用性檢查也從MM模塊讀取相關數據.

    3. While you create inbound/outbound delivery with reference to a sales order,the shipping point determination takes place with the help of the loading group, plant data, shipping conditions etc. This also refers to Material Master.

    4. The material which you are entering in a sales order must be extended to the sales area of your sales order/customer otherwise you cannot transact with this material.

    SD?和 FI模塊的業務集成 :-

    1. Whenever you create a delivery with reference to a sales order, goods movement takes place in the bacgground. eg. In case of standard sales order, you create an outbound goods delivery to the customer.
    Here movement 601 takes place. This movement is configured in MM. Also, this movement hits some G/L account in FI. Every such movement of good s hits some G/L account.

    2. The accounts posting in FI is done with reference to the billing documents (invoice, debit note, credit note etc) created in SD. Thus this is a link between SD and FI

    3. Tax determination: In case of a tax determination also, there is a direct link between SD and MM

    SD 與其他模塊的集成點列表

    銷售訂單 –?
    Integration Points????????????????????? Module
    ?Availability Check??????????????? -?????? MM
    ?Credit Check??????????????????????? -?????? FI
    ?Costing?????????????????????????????????-?????? CO/ MM
    ?Tax Determination????????????? -?????? FI
    ?Transfer of Requirements?-?????? PP/ MM

    發貨和過賬 –?
    Integration Points????????????????????? Module
    ?Availability Check???????? ?????? ?-?????? MM
    ?Credit Check????????????????????? ? ?-?????? FI
    ?Reduces stock??????????????????? ?-?????? MM
    ?Reduces Inventory $???????????-?????? FI/ CO
    ?Requirement Eliminated???-?????? PP/ MM

    發票?-
    Integration Points????????????????????? Module
    ?Debit A/R????????????????????????????? -?????? FI/ CO
    ?Credit Revenue?????????????????? -?????? FI/ CO
    ?Updates G/ L?????????????????????? -?????? FI/ CO
    ? (Tax, discounts, surcharges, etc.)
    ?Milestone Billing???????????????? -?????? PS

    退貨 & Credit Memo -
    Integration Points????????????????????? Module
    ?Increases Inventory?????????? ?? ?-?????? MM
    ?Updates G/ L????????? ?????????? ??? ?-?????? FI
    ?Credit Memo??????????????? ??? ?????? -?????? FI
    ?Adjustment to A/R????????? ?????? ?-?????? FI
    ?Reduces Revenue??????????????? -?????? FI?

    ? 個人收集的業務重要函數

    Function Name
    Function Description
    Function Pool
    Function Pool Description
    示例程序
     
    SD_SALEDOCUMENT_CREATE
     
     
     
     
    SD_ORDER_CREDIT_RELEASE
    SD 信用管理
    VKMP
     
     
    RV_AVAILABILITY_CHECK
    RV 可用量和需求
    V03V
     
     
    RV_REQUIREMENT_GENERATE
    RV 可用量和需求
    V03V
     
     
    RV_DELIVERY_CREATE
    SD 交貨匯總處理
    V50S
     
     
     
     
     
     
     
    出庫單-》財務憑證
    WS_REVERSE_GOODS_ISSUE
    Goods Mvmnts and Goods Mvments Reversals
    V51W
     
    RVV50L09
    MB_CREATE_GOODS_MOVEMENT
    為交貨的發貨
    MBWL
     
     
    MB_CANCEL_GOODS_MOVEMENT
    為交貨的發貨
    MBWL
     
     
    訂單 / 出庫單-》發票
    RV_INVOICE_CREATE
    出具發票(新建)
    V60A??????????????????????
     
     
    RV_INVOICE_DOCUMENT_ADD
    ?。ū4妫┢渲?SLL_DOCUMENT_TRANSFER單元的調用可作發票出口
     
     
     
     
     
    發票-》財務憑證
    RV_ACCOUNTING_DOCULIST_CREATE
     
    V60B??????????????????????
    RV-RF 接口
     
    RV_ACCOUNTING_DOCUMENT_CREATE
    發票-》憑證
    V60B??????????????????????
    RV-RF 接口
    VF02 (過帳)
    FI_PERIOD_CHECK
    財務會計-》憑證-》過帳期間-》未清和關帳過帳期間(表t001b
    FACS
    FI/CO 接口的 FI 服務
    很多的檢查函數
    sd_invoice_release_to_account
    釋放發票-》憑證
    調用
    RV_INVOICE_DOCUMENT_ADD
    V60A????????????????????
    RV-RF 接口
    VFX3
    RV_INVOICE_LIST_DOCUMENT_ADD
     
    V60A
     
    VF02
    RV_INVOICE_DOCUMENT_ADD
    根據 RFBFK 決定是否調用( 591 行) RV_ACCOUNTING_DOCUMENT_CREATE
    V60A
     
    VF02 (保存)
     
     
     
     
     
     
    AC_DOCUMENT_CREATE
     
    RWCL
    會計合算接口
     
    AC_DOCUMENT_REVERSE
     
    RWCL
    會計合算接口
     
     
     
     
     
     
     
    RV_MISSING_DOCUMENT_DATA
    確定不完整的銷售憑證
    VO5M
     
    RVAUFERR
     
     
     
     
     
    ?
    ?
    ?
    ?
    ?
    ?
    ?
    ?
    ?
    ?
    ?
    NUMBER_CHECK
    檢查號碼是否在號碼區間內
     
    R/3 Central Basis Development: Number Ranges
     
    BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: medium none; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0cm; BORDER-LEFT: windowtext 1pt solid; WIDTH: 182pt; PADDING-TOP
    posted @ 2007-05-17 09:29 javaGrowing 閱讀(2324) | 評論 (0)編輯 收藏

    總的說來,credit memo和debit memo是對企業向顧客已經交付的貨物的價值進行調整的單據類
    型。舉個例,如果您已經就所交付的貨物向買主開具了100元的發票,可是由于貨物質量的瑕疵,
    買主主張“貨接受但必須削價10元”,如果您接受了這個主張,那您就得開具10元的credit memo
    (即實際業務中的所謂“紅字發票”)??傊c原始invoice的價值相比,增價用debit memo,
    降價用credit memo,兩者都是billing document type。
    credit memo request 和debit memo request都是sales document type,其原理與一般的銷售訂
    單類型并無質的區別。只是,兩個memo request的下游transaction都是直接參照訂單創建
    billing document,而不需要有delivery。
    credit memo request --> credit memo, debit memo request --> debit memo,這就是它們的
    流程。
    posted @ 2007-05-17 09:22 javaGrowing 閱讀(611) | 評論 (0)編輯 收藏

    主站蜘蛛池模板: 久久久久久精品免费看SSS| 久久亚洲精品中文字幕| 久久精品国产亚洲av麻豆小说 | 免费一级特黄特色大片在线 | 欧美a级在线现免费观看| 国产精品亚洲午夜一区二区三区| 久久精品a一国产成人免费网站| 国产精品99久久免费观看| 亚洲一区二区三区不卡在线播放| 日韩高清免费观看| 精品免费人成视频app| 久草免费手机视频| 中文字幕在线免费视频| 一级**爱片免费视频| 亚洲自偷自拍另类12p| 亚洲一区精品无码| 亚洲精品岛国片在线观看| 无码免费一区二区三区免费播放| 亚洲a∨无码男人的天堂| 亚洲视频在线免费观看| 日韩高清在线免费观看| 成人A级毛片免费观看AV网站| 亚洲精品视频在线观看免费| 牛牛在线精品观看免费正 | 免费看男人j放进女人j免费看| 亚洲一区二区三区久久久久| 亚洲麻豆精品果冻传媒| 国产又黄又爽又刺激的免费网址| 最近免费中文字幕中文高清| 亚洲日韩在线观看免费视频| 免费人成在线观看播放a| 免费国产污网站在线观看不要卡| 看一级毛片免费观看视频| 337P日本欧洲亚洲大胆精品 | 四虎影视永久免费观看| 99久在线国内在线播放免费观看 | 久久亚洲AV成人无码| 亚洲高清视频免费| 色偷偷亚洲女人天堂观看欧| 亚洲综合精品伊人久久| 亚洲av永久中文无码精品综合|