abap常用函數(shù)收集_第1頁(yè)
abap常用函數(shù)收集_第2頁(yè)
abap常用函數(shù)收集_第3頁(yè)
abap常用函數(shù)收集_第4頁(yè)
abap常用函數(shù)收集_第5頁(yè)
已閱讀5頁(yè),還剩55頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

abap常用函數(shù)收集一、單位換算callfunction'Z_FICO_DWHS'EXPORTINGa_matnr=tab01-ymatnr"物料號(hào)碼a_unit_from='PNL'"基本計(jì)量單位meinsa_unit_to='PC'"itab_fp-vrkme"銷(xiāo)售單位IMPORTINGa_rate=tybrgew.二、CONVERSION_EXIT_ALPHA_OUTPUT功能:刪除輸入的數(shù)字編號(hào)中的前置0。這個(gè)基本上不太用得到。輸入?yún)?shù):INPUT:不限制類型,必須輸入。原始編號(hào)。輸出參數(shù):OUTPUT:日期類型。計(jì)算出的結(jié)果。測(cè)試結(jié)果:如果INPUT輸入為純數(shù)字(就是只有0~9之間的字符),結(jié)果刪除該數(shù)字的前置0。如果INPUT輸入不為純數(shù)字(就是包含0~9之外的字符),結(jié)果就跟輸入值一樣。代碼說(shuō)明:調(diào)用了一個(gè)系統(tǒng)函數(shù)CONVERSION_EXIT_ALPHA_OUTPUT,這個(gè)函數(shù)是SAP用C語(yǔ)言寫(xiě)的,僅供SAP公司內(nèi)部使用,我們的開(kāi)發(fā)時(shí)無(wú)法使用。三、正確地使用SAP的標(biāo)準(zhǔn)對(duì)話框函數(shù)在用戶設(shè)計(jì)sap的程序時(shí),經(jīng)常需要一些對(duì)話框,用戶可以自己編寫(xiě),但使用SAP系統(tǒng)中提供了的對(duì)話框函數(shù)將減少許多開(kāi)發(fā)工作。12.3.1.將貨幣轉(zhuǎn)成外部?jī)?chǔ)存值CALLFUNCTION'BAPI_CURRENCY_CONV_TO_EXTERNAL'EXPORTINGcurrency=amount_internal=IMPORTINGAMOUNT_EXTERNAL=exceptionsOTHERS=1.12.3.2.將貨幣轉(zhuǎn)成內(nèi)部CALLFUNCTION'BAPI_CURRENCY_CONV_TO_INTERNALEXPORTINGcurrency=amount_external=max_number_of_digits=IMPORTINGAMOUNT_INTERNAL=RETURN=exceptionsOTHERS=1.12.3.3.求匯率CALLFUNCTION'CALCULATE_EXCHANGE_RATE'EXPORTINGDATE=ITAB1-INVDTFOREIGN_AMOUNT=ITAB1-AMTFOREIGN_CURRENCY=ITAB1-CURRLOCAL_AMOUNT=ITAB1-AMTNTDLOCAL_CURRENCY='NTD'TYPE_OF_RATE='M'IMPORTINGEXCHANGE_RATE=ITAB1-EXRAT*FOREIGN_FACTOR=*LOCAL_FACTOR=EXCEPTIONSNO_RATE_COMPUTABLE=1NO_RATE_FOUND=2RATE_TOO_BIG=3*NO_FACTORS_FOUND=4NO_SPREAD_FOUND=5OTHERS=6.CALLFUNCTION'READ_EXCHANGE_RATE'EXPORTINGdate=eket-eindtforeign_currency=ekko-waerslocal_currency='NTD'type_of_rate='M'IMPORTINGexchange_rate=zexchange_rateFOREIGN_FACTOR=LOCAL_FACTOR=VALID_FROM_DATE=EXCEPTIONSno_rate_found=1no_factors_found=2no_spread_found=3OTHERS=4.1、sap的函數(shù)組列表和用途說(shuō)明適用情況Functiongroup提示用戶將可能丟失數(shù)據(jù)SPO1提示用戶對(duì)某個(gè)問(wèn)題選擇Yes或者NoSPO1提示用戶將可能丟失數(shù)據(jù),并詢問(wèn)用戶是否繼續(xù)操作SPO1提示用戶在多個(gè)操作中選擇一個(gè)操作SPO2提示用戶是繼續(xù)當(dāng)前操作或者取消當(dāng)前操作SPO2提示用戶輸入數(shù)據(jù)(可以根據(jù)一個(gè)表檢查或者不檢查輸入值)SPO4將數(shù)據(jù)顯示給用戶SPO4將詳細(xì)數(shù)據(jù)顯示給用戶SPO6從列表中選擇數(shù)據(jù)SP05用可滾動(dòng)的對(duì)話框顯示數(shù)據(jù)給用戶STAB從視圖或者數(shù)據(jù)表中打印數(shù)據(jù)STPR2、函數(shù)列表和說(shuō)明2.1SPO1的函數(shù)*POPUP_TO_CONFIRM_STEP*POPUP_TO_CONFIRM_WITH_MESSAGE類似POPUP_TO_CONFIRM_STEP,只是多三行的文本錯(cuò)誤診斷提示。系統(tǒng)在窗口上顯示一個(gè)綠色問(wèn)號(hào)圖標(biāo)。callfunction'POPUP_TO_CONFIRM_WITH_MESSAGE'exportingtitel='確認(rèn)提示測(cè)試'textline1='確實(shí)要執(zhí)行;;'textline2=spop-textline2diagnosetext1=spop-diagnose1diagnosetext2=spop-diagnose2diagnosetext3=spop-diagnose3importinganswer=answer.*POPUP_TO_CONFIRM_WITH_VALUE*POPUP_TO_CONFIRM_LOSS_OF_DATA*POPUP_TO_CONFIRM該函數(shù)是POPUP函數(shù)的增強(qiáng)版,可以自定義按鈕文本和圖標(biāo)。用此函數(shù)可以建立一個(gè)對(duì)話框用于詢問(wèn)用戶是否執(zhí)行某步操作,該操作可能會(huì)丟失數(shù)據(jù),用戶可以選擇YesNo或者Cancel。該函數(shù)可以傳入一個(gè)標(biāo)題和一個(gè)兩行的文本(提示問(wèn)題)。系統(tǒng)在窗口上顯示一個(gè)黃色!圖標(biāo)和一行“數(shù)據(jù)將丟失。”??梢栽O(shè)置某個(gè)按鈕作為默認(rèn)按鈕。CALLFUNCTION'POPUP_TO_CONFIRM_LOSS_OF_DATA'EXPORTINGTITEL=TITELTEXTLINE1=SPOP-TEXTLINE1TEXTLINE2=SPOP-TEXTLINE2IMPORTINGANSWER=ANSWER.用此函數(shù)可以建立一個(gè)對(duì)話框用于詢問(wèn)用戶是否執(zhí)行某步操作,該操作可能會(huì)丟失數(shù)據(jù),用戶可以選擇YesNo或者Cancel。該函數(shù)可以傳入一個(gè)標(biāo)題,兩行的文本(提示問(wèn)題)和一個(gè)對(duì)象值(對(duì)象值將會(huì)插入在提示問(wèn)題文本的兩部分之間)。系統(tǒng)在窗口上顯示一個(gè)綠色問(wèn)號(hào)圖標(biāo)??梢栽O(shè)置某個(gè)按鈕作為默認(rèn)按鈕。CALLFUNCTION'POPUP_TO_CONFIRM_WITH_VALUE'EXPORTINGTITEL=TITELTEXT_BEFORE='確實(shí)要執(zhí)行'OBJECTVALUE='TEST'TEXT_AFTER='?'IMPORTINGANSWER=ANSWER.用此函數(shù)可以建立一個(gè)對(duì)話框用于詢問(wèn)用戶是否執(zhí)行某步操作,用戶可以選擇YesNo或者Cancel。該函數(shù)可以傳入一個(gè)標(biāo)題和兩行的文本(提示問(wèn)題)。系統(tǒng)在窗口上顯示一個(gè)綠色問(wèn)號(hào)圖標(biāo)。可以設(shè)置某個(gè)按鈕作為默認(rèn)按鈕。CALLFUNCTION'POPUP_TO_CONFIRM_STEP'EXPORTINGTITEL='確認(rèn)提示測(cè)試'TEXTLINE1='確實(shí)要執(zhí)行'TEXTLINE2='測(cè)試?'CANCEL_DISPLAY=SPACE"不顯示CANCEL按鈕IMPORTINGANSWER=ANSWER.2.2、FunctiongroupSPO2*POPUP_TO_DECIDE顯示一個(gè)對(duì)話框,用戶可以兩個(gè)操作中的一個(gè)或者取消??梢詡魅肴刑崾疚谋?。*POPUP_TO_DECIDE_WITH_MESSAGE類同POPUP_TO_DECIDE,程序員可以多傳入Withthisfunctionmoduleyoucreateadialogboxinwhichyouinformtheuseraboutaspecificdecisionpointviaadiagnosistext,duringanaction.Heorshecanchooseoneoftwoalternativeactionsofferedorcanceltheaction.Theaction,thediagnosistext,thequestionandthealternativeactionsarepassedasparameters.Theuseraction(Alternative1,Alternative2,orCancel)isreturnedinaparameter.2.3、FunctiongroupSPO4*POPUP_GET_VALUESThisfunctionmodulesendsadialogboxfordatadisplayandinput.TheinputfieldsarepassedinastructureandmustbedefinedintheDictionary.Youcanalsospecifyindividualfielddisplayattributesandafieldtext,ifthekeywordfromtheDictionaryisnottobedisplayedasfieldtextinthedialogbox,inthestructure.Thestandardhelpfunctionality(F1,F4)issupported.*POPUP_GET_VALUES_DB_CHECKEDThisfunctionmodulesendsadialogboxfordatatobeinputundcheckedagainstthedatabase.TheinputfieldsarepassedinastructureandmustbedefinedintheDictionary.Youcanalsospecifyindividualfielddisplayattributesandafieldtextinthestructure,ifthekeywordfromtheDictionaryisnottobedisplayedasfieldtextinthedialogbox.Acomparisonoperatorforcheckingtheinputdatainthedatabaseispassed.Youcanspecifywhetherthecheckisfortheexistenceorabsenceofanobject.Aforeignkeyrelationshipcheckissupported.Thestandardhelpfunctionality(F1,F4)issupported.Theuseractionisreturnedinaparameter.*POPUP_GET_VALUES_USER_CHECKEDThisfunctionmodulesendsadialogboxfordatatobeinputandcheckedinanexternalsub-routine(userexit).Theinputfieldsarepassedinastructureandmustbedefinedinthedictionary.Youcanalsospecifyindividualfielddisplayattributesandafieldtextinthestructure,ifthekeywordfromtheDictionaryisnottobedisplayedasfieldtextinthedialogbox.TheDatainputbytheuserinthedialogboxarepassedtothesub-routinespecifiedintheinterfaceforchecking.Errorsfoundbythecheckareenteredinanerrorstructureandareevaluatedonreturnfromthesub-routinebythefunctionmodule.Thestandardhelpfunctionality(F1,F4)issupported.Theuseraction(ContinueorCancel)isreturnedinaparameter.*POPUP_GET_VALUES_USER_HELPThisfunctionmodulesendsadialogboxfordatatobeinputwiththepossibilityofacheckinanexternalsub-routine(userexit)andbranchinginauserF1orF4help.TheinputfieldsarepassedinastructureandmustbedefinedintheDictionary.Youcanalsospecifyindividualfielddisplayattributesandafieldtextinthestructure,ifthekeywordfromtheDictionaryisnottobedisplayedasfieldtextinthedialogbox.Youcanpassthedatawhichareenteredbytheuserinadialogboxtoasub-routinewhichmustbespecifiedintheinterfaceforchecking.Errorsoccurringinthecheckarestoredinanerrorstructureandareanalyzedbythefunctionmoduleuponreturnfromthesub-routine.Thedata,andanerrormessage,ifappropriate,aredisplayedagain.Thestandardhelpfunctionality(F1,F4)issupported.UserexitsforauserF1orF4helpcanalsobespecified.Theuseraction(ContinueorCancel)isreturnedinaparameter.*POPUP_GET_VALUES_USER_BUTTONSThisfunctionmoduleislikethepreviousfunctionmodulePOPUP_GET_VALUES_USER_HELP,withtheadditionalpossibilityofpassingoneortwoadditionalpushbuttonsandastandardpushbutton,whichtheusercanname.*POPUP_GET_VALUES_SET_MAX_FIELDWiththisfunctionmoduleyoucanspecifythemaximumnumberoffieldswhichcanbedisplayedindialogboxesforthisfunctiongroup(SPO4).Thespecifiedvalueisstoredinthefunctiongrouplocalmemoryandappliesfortherestoftheapplication.Dialogboxeswhichdisplaymorethenthisnumberoffieldsaredisplayedwithascrollbar.2.4、FunctiongroupSPO6*POPUP_DISPLAY_TEXTWiththisfunctionmoduleyoudisplayatextwhichexistsinthesysteminadialogbox.*POPUP_DISPLAY_TEXT_WITH_PARAMSWiththisfunctionmoduleyoudisplayatextwhichexistsinthesystemwithparametersinadialogbox.Theparametervaluesarepassedinatable.Theuseofnumberedtextsisrecommended,tomaketheparametervaluestranslatable.Theparameternamesmustbepassedinupper-caseletters.2.5、FunctiongroupSPO5*POPUP_TO_DECIDE_LIST從列表中選擇數(shù)據(jù),樣例程序reportrsspo500.data:selectlistlikespoplioccurs5withheaderline.data:antworttypec.whileantwortne2.clearselectlist.refreshselectlist.selectlist-varoption=顯示含有單選按鈕的彈出框'.appendselectlist.selectlist-varoption='顯示含有復(fù)選框的彈出框'.selectlist-selflag='X'.appendselectlist.callfunction'POPUP_TO_DECIDE_LIST'exporting*CURSORLINE=1*MARK_FLAG=''mark_max=1start_col=10start_row=10textline1='Text1'textline2='POPUP_TO_DECIDE_LIST'textline3='TEXT3'titel='TITLE'importinganswer=antworttablest_spopli=selectlistexceptionsnot_enough_answers=1too_much_answers=2too_much_marks=3others=4.ifantworteq'A'.exit.endif.endwhile.ifantwortne'A'.clearselectlist.refreshselectlist.selectlist-varoption='最多15個(gè)選項(xiàng)'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='含有復(fù)選框'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='或單選按鈕'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='典型的列表功能:'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='*選擇'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='*選擇全部'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='取消全部選擇'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='370字符/選項(xiàng)'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='65字符/選項(xiàng)'.selectlist-selflag='X'.appendselectlist.selectlist-varoption='激活/不激活可選行'.selectlist-selflag='X'.selectlist-inactive='X'.appendselectlist.*2.Aufruf**********************************************************callfunction'POPUP_TO_DECIDE_LIST'exporting*CURSORLINE=1mark_flag='X'mark_max=0start_col=15start_row=15textline1='DasPOPUPbietet'(c01)textline2='folgendeFunktionalit鋞:'(c02)titel='DasBeispiel2'(b02)importinganswer=antworttablest_spopli=selectlistexceptionsnot_enough_answers=1too_much_answers=2too_much_marks=3others=4.endif.function收集(一)1.Function:CLOI_PUT_SIGN_IN_FRONT功能:將負(fù)號(hào)提前參數(shù):Changing:VALUE:需要負(fù)號(hào)提前的變量2.Function:EPS_GET_DIRECTORY_LISTING功能:獲得某路徑下的文件列表參數(shù):Import:DIR_NAME:需要查找的路徑FILE_MASK:沒(méi)用過(guò)Export:DIR_NAME:文件路徑FILE_COUNTER:文件個(gè)數(shù)ERROR_COUNTER:錯(cuò)誤的個(gè)數(shù)Tables:DIR_LIST:文件列表說(shuō)明:這個(gè)函數(shù)可以獲得服務(wù)器某個(gè)路徑下的所有文件,對(duì)opendatasetforreadfile中file名字的獲得有幫助。3.Function:BAPI_COMPANYCODE_GET_PERIOD功能:獲得公司的會(huì)計(jì)年度以及過(guò)賬日期參數(shù):Import:COMPANYCODEID:公司代碼POSTING_DATE:postingdateExport:FISCAL_YEAR:會(huì)計(jì)年度FISCAL_PERIOD:財(cái)務(wù)期間RETURN:返回值說(shuō)明:該函數(shù)可用來(lái)檢查會(huì)計(jì)期間。4.Function:MARA_SINGLE_READ功能:讀取物料信息參數(shù):Import:KZRFB:Indicator:RefreshbufferentryMAXTZ:Max.no.ofentriesinbuffer(這兩個(gè)參數(shù)應(yīng)該和性能優(yōu)化相關(guān))MATNR:物料號(hào)SPERRMODUS:Lockmode(none,shared,excl.)STD_SPERRMODUS:Standardlockmode(ifdifferent)(鎖相關(guān))OUTPUT_NO_MESSAGE:是否輸出消息Export:WMARA:返回的物料信息說(shuō)明:該函數(shù)可用于性能優(yōu)化,例如無(wú)法避免在loop中有sql的情況可以用該函數(shù)取代sql。對(duì)mara的其它操作參考functiongroup:MG215.Function:KNA1_SINGLE_READ功能:讀取customer表信息參數(shù):Import:KZRFB:Indicator:RefreshbufferentryKNA1_KUNNR:customercodeExport:WKNA1:返回的信息說(shuō)明:還有很多表的讀取參考functiongroup:MG416.Function:ADDR_GET_COMPLETE_ALL_TYPES功能:獲得地址的相關(guān)信息參數(shù):Import:ADDRNUMBER:addressnumberPERSNUMBER:個(gè)人信息ADDRESS_OBJECT_TYPE:類型1:組織2:個(gè)人3:客戶Export:ADDR1_COMPLETE:地址1ADDR2_COMPLETE:地址2ADDR3_COMPLETE:地址3ADDR1_COMPLETE_BAPI:地址1ADDR2_COMPLETE_BAPI:地址2ADDR3_COMPLETE_BAPI:地址3(以上三個(gè)bapi用)7.Function:READ_VBFA功能:取得documentflow(省得select了)參數(shù):Import:I_VBELV:PrecedingsalesanddistributiondocumentI_POSNV:PrecedingitemofanSDdocumentI_VBTYP_V:DocumentcategoryofprecedingSDdocumentI_VBTYP_N:DocumentcategoryofsubsequentdocumentI_FKTYP:BillingcategoryI_BYPASSING_BUFFER:是否用bufferI_REFRESH_BUFFER:刪除buffer?Tables:E_VBFA:憑證流的表說(shuō)明:可以通過(guò)bypassingbuffer來(lái)優(yōu)化性能8.Function:SD_VBAK_SINGLE_READ功能:讀取銷(xiāo)售訂單表頭信息參數(shù):Import:I_VBELN:銷(xiāo)售訂單I_BYPASSING_BUFFER:是否用bufferI_REFRESH_BUFFER:刪除buffer?Export:E_VBAK:返回表頭信息說(shuō)明:讀相關(guān)sd表的函數(shù)請(qǐng)參考functiongroup:V45I9.Function:LIKP_READ功能:DeliveryHeaderData參數(shù):Import:I_VBELN:DeliveryLINE_EXIST:if'x'checkonlyiflineexsistsExport:O_ANSWR:sendout'x'forlineexsistsintableTables:E_LIKP:SDDocument:DeliveryHeaderData說(shuō)明:有關(guān)讀取delivery的信息請(qǐng)參考functiongroup:LMGT10.Function:CREATE_SAP_SHORTCUT功能:創(chuàng)建快捷方式參數(shù):Import:SC_COMMAND:指定的tcodeSC_TITLE:快捷方式名字:例如:se38SC_TYPE:快捷方式類型:有三種:’report’,’transaction’,’systemcommand’NO_DIALOG:是否彈出窗口說(shuō)明:具體沒(méi)什么用,做著玩玩。11.Function:SAPGUI_PROGRESS_INDICATOR功能:顯示進(jìn)度參數(shù):Import:PERCENTAGE:進(jìn)度的百分?jǐn)?shù),>0,<100.TEXT:文本說(shuō)明:在運(yùn)行時(shí)間很長(zhǎng)的程序中可以選擇使用,這樣保證了程序不會(huì)中止。當(dāng)然也可以在rz10里面設(shè)置程序運(yùn)行時(shí)間,不過(guò)比較麻煩。12.CALLFUNCTION'FIRST_DAY_IN_PERIOD_GET'EXPORTINGi_gjahr=p_gjahr"會(huì)計(jì)年度*I_MONMIT=00i_periv='K4'“會(huì)計(jì)年度變式i_poper=p_period”會(huì)計(jì)期間(一個(gè)月份)IMPORTINGe_date=r_date-low“返回的月首日下面這個(gè)則是取得月尾日CALLFUNCTION'LAST_DAY_IN_PERIOD_GET'EXPORTINGi_gjahr=p_gjahr*I_MONMIT=00i_periv='K4'i_poper=p_periodIMPORTINGe_date=r_date-high.13.Funtion:K_GROUP_SELECT功能:利潤(rùn)中心組的檢索help參數(shù):Import:BUTTONS:按鈕,決定是否可以選擇group類型CLASS:costcenterclassCRUSER:創(chuàng)建人FIELD_NAME:字段名稱:此項(xiàng)為必輸項(xiàng)SEARCHFLD:還沒(méi)用過(guò)SEARCHFLD_INPUT:成本控制范圍是否可以輸入(參照?qǐng)D1)SEARCHFLD_REQUIRED:成本控制范圍是否必輸,如果設(shè)置為不可輸入,那么這個(gè)參數(shù)無(wú)效(參考圖2)SET:利潤(rùn)中心組的開(kāi)頭字母START_COLUMN:彈出窗口的位置START_ROW:彈出窗口的位置TABLE:表或者結(jié)構(gòu)的名稱Export:SET_NAME:取得幫助字段的值新手請(qǐng)教大家:我在看alv的時(shí)候,看到type-pools:slis.slis應(yīng)該是一組數(shù)據(jù)結(jié)構(gòu),例子里有:(1)xeventTYPEslis_t_event,ls_eventTYPEslis_alv_event.slis_er_tepTYPEslis_formnamevalue'TOP_OF_PAGE'(2)通過(guò)調(diào)用函數(shù)REUSE_ALV_EVENTS_GET,獲取所有的事件到xevent,然后把slis_er_tep賦給ls_event-form.我打印出xevent.它包含下面的事件.CALLER_EXITUSER_COMMANDTOP_OF_PAGE"頁(yè)標(biāo)題TOP_OF_COVERPAGEEND_OF_COVERPAGEFOREIGN_TOP_OF_PAGEFOREIGN_END_OF_PAGEPF_STATUS_SETLIST_MODIFYTOP_OF_LISTEND_OF_PAGE"頁(yè)尾END_OF_LISTAFTER_LINE_OUTPUTBEFOR_LINE_OUTPUTREPREP_SEL_MODIFYSUBTOTAL_TEXTGROUPLEVEL_CHANGE能說(shuō)明,以上事件具體是什么?ABAP:ALVALV是系統(tǒng)的一種網(wǎng)格的顯示方式,這種方式帶有匯總\排序\篩選等功能,ALV格式的數(shù)據(jù)是以單元格為單位顯示,不象一般的寫(xiě)屏方式拷出來(lái)或是導(dǎo)出成文件不同列的內(nèi)容粘在一塊,這種方式便于數(shù)據(jù)導(dǎo)出來(lái)放在電子表格里進(jìn)行加工.slis_t_fieldcat_alv是表內(nèi)字段的整體,slis_fieldcat_alv是某一個(gè)字段的內(nèi)容,將字段的內(nèi)容寫(xiě)到slis_fieldcat_alv中,然后append到slis_t_fieldcat_alv,后者是整個(gè)列表的標(biāo)題,在顯示的時(shí)候用到。slis_fieldcat_alv中的部分字段及意義:fieldname是對(duì)應(yīng)內(nèi)表中哪個(gè)字段,必須。seltext_s/m/l是標(biāo)題的名字,(一個(gè)即可)必須。col_pos表示所在位置,是第一列還是第二列。。intlen表示可以篩選的長(zhǎng)度,如果不輸?shù)迷捰锌赡茉诤Y選的時(shí)候顯示不夠長(zhǎng)。hotsot='x'表示可以點(diǎn)它來(lái)顯示次表。slis_t_event是event的整體可看作event的集合,感覺(jué)可以用來(lái)寫(xiě)表頭。。slis_alv_event是某個(gè)event,需要將slis_alv_eventappend到slis_t_event.它可以包含圖片和listheader等,也就是說(shuō)listheader等是靠event來(lái)顯示的。slis_t_listheader是listheader的集合,slis_listheader是某個(gè)listheader。將slis_listheader賦值后append到slis_t_listheader中。它是內(nèi)表的表頭slis_listheader包含:typ:H=header,S=Selection,A=action.key:是和s對(duì)應(yīng)的,是那個(gè)的標(biāo)題吧.info:可以是變量和賦值的。跟在key的標(biāo)題后面,是個(gè)表達(dá)值函數(shù):reuse_alv_events_get:將各個(gè)事件的名字寫(xiě)到slis_t_event的name中。這樣,可以在后面,根據(jù)名字的不同,對(duì)不同的event付不同的form,來(lái)實(shí)現(xiàn)不同功能。fieldcat屬性col_pos輸出列tabname標(biāo)簽名稱currency(5)貨幣單位quantity(3)計(jì)量單位qfieldname參考計(jì)量單位的字段名稱roundROUND值exponent(3)流動(dòng)表示的指數(shù)key(1)關(guān)鍵字段icon(1)作為圖標(biāo)輸出symbol(1)輸出作為符號(hào)checkbox(1)作為復(fù)選框輸出just(1)對(duì)齊lzero(1)輸出前導(dǎo)零no_sign(1)輸出抑制符號(hào)no_zero(1)為輸出隱藏零edit_mask為輸出編輯掩碼emphasize(4)帶有顏色的高亮列fix_column(1)固定列do_sum(1)總計(jì)列值no_out(1)列沒(méi)有輸出tech(1)技術(shù)字段outputlen列的字符寬度decimals_out能控制小數(shù)點(diǎn)的位數(shù)這里面很多都是最后一個(gè)對(duì)后面的都有影響。。。比如你想固定左邊的前3列那么在第一列的key='x'.然后在要在第四列處key=''.這樣前3列固定了(只能在grid類型下使用?)AP:ALV的一些說(shuō)明2007-12-0616:52APALVuserexit-ALV增強(qiáng)下載ALV為本地文件上一篇/下一篇2008-05-2311:08:05查看(2)/評(píng)論(0)/評(píng)分(0/0)每一個(gè)標(biāo)準(zhǔn)的用'REUSE_ALV_GRID_DISPLAY'實(shí)現(xiàn)的ALV,執(zhí)行后都會(huì)跳轉(zhuǎn)到一個(gè)標(biāo)準(zhǔn)的屏幕。我們可以去觀察這個(gè)screen的GUIStatus—‘STANDARD_FULLSCREEN’。上面有不少的按鈕,每個(gè)按鈕都有一個(gè)功能代碼。如‘&ALL’‘&SAL’這種。我的想法是,按這個(gè)按鈕的時(shí)候激發(fā)我在程序中代碼,實(shí)現(xiàn)ALV的userexit。做法(以下載按鈕為例):Step1:DATA:it_event_testTYPEslis_t_event_exit,it_event_test_waTYPEslis_event_exit.it_event_test_wa-ucomm='%PC'.it_event_test_wa-before='X'.*it_event_test_wa-after='X'.APPENDit_event_test_waTOit_event_test.Step2:FORM.mycommandUSINGr_ucommLIKEsy-ucommrs_selfieldTYPEslis_selfield.IFr_ucomm='%PC'.此處添加增強(qiáng)的代碼ENDIF.ENDFORM.Step3:CALLFUNCTION'REUSE_ALV_GRID_DISPLAY'EXPORTINGi_callback_program=g_repidis_layout=gs_layoutit_fieldcat=gt_fieldcat[]i_grid_title=l_texti_save='A'is_variant=gs_varianti_callback_user_command='MYCOMMAND'it_event_exit=it_event_testTABLESt_outtab=gt_data[]..SAP:SAPALV標(biāo)準(zhǔn)范例程序介紹上一篇/下一篇2008-05-2310:10:20查看(5)/評(píng)論(0)/評(píng)分(0/0)下面介紹幾個(gè)學(xué)習(xí)ALV的SAP自帶標(biāo)準(zhǔn)程序?qū)嵗?.BALVSD06:Outputflights(simpleversion+save)這是該系列范例最簡(jiǎn)單的一個(gè),建議以此入門(mén)。使用的FunctionModules:REUSE_ALV_LIST_DISPLAY:此FM非常重要,用來(lái)顯示simpleinteractivelist。大家要熟練掌握該FM的輸入?yún)?shù)名稱和作用,對(duì)ALV編程很有幫助。輸入?yún)?shù):I_CALLBACK_PROGRAM:FM執(zhí)行完之后回調(diào)的程序名I_STRUCTURE_NAME:internaltable的結(jié)構(gòu)。欄位格式(fieldcatalog,含輸出欄位的名稱)都參考自DataDictionary的這個(gè)結(jié)構(gòu)(注意:如果不是所有欄位都要輸出顯示,或要自行定義欄位格式而不用DataDictionary內(nèi)的結(jié)構(gòu),則請(qǐng)參考其他的輸入?yún)?shù)設(shè)定)I_SAVE:是否要儲(chǔ)存variants,“A”:standardanduser-specificsavingTables:T_OUTTAB:要輸出數(shù)據(jù)的internaltable2.BALVSD01:Simplelistflightmodel使用的FunctionModules:REUSE_ALV_VARIANT_DEFAULT_GETREUSE_ALV_EVENTS_GETREUSE_ALV_COMMENTARY_WRITEREUSE_ALV_VARIANT_F4REUSE_ALV_VARIANT_EXISTENCEREUSE_ALV_LIST_DISPLAY3.BALVSD11:Simplelistwithinteractionsandlayouts使用的FunctionModules:REUSE_ALV_FIELDCATALOG_MERGEREUSE_ALV_LIST_DISPLAY4.BALVHD01:Hierarchical-sequentiallistflightmodel顯示分級(jí)層次式的interactivelist,也就是Header–Item兩階層的list使用的FunctionModules:REUSE_ALV_VARIANT_DEFAULT_GETREUSE_ALV_FIELDCATALOG_MERGEREUSE_ALV_EVENTS_GETREUSE_ALV_COMMENTARY_WRITEREUSE_ALV_VARIANT_F4REUSE_ALV_VARIANT_EXISTENCEREUSE_ALV_HIERSEQ_LIST_DISPLAY:該FM用來(lái)顯示Hierarchical-sequentialinteractivelist,很重要5.BALVHD01_GROUP:Hierarchical-sequentiallistflightmodel使用的FunctionModules:REUSE_ALV_EVENTS_GETREUSE_ALV_HIERSEQ_LIST_DISPLAY在SE38環(huán)境下的程序名輸入欄輸入'DEMO*'后按F4,你可以查到SAP所有的DEMO示例程序,會(huì)學(xué)到很多ABAP功能的實(shí)現(xiàn)方法,輸入'BCALV*'后按F4,你可以查到很多ALV示例程序每日函數(shù)講解函數(shù)列表數(shù)名描述SD_VBAP_READ_WITH_VBELN根據(jù)銷(xiāo)售訂單讀取表vbap中的信息EDIT_LINES把READ_TEXT返回的LINES中的行按照TDFORMAT=“*”重新組織VIEW_MAINTENANCE_CALL維護(hù)表視圖函數(shù)名描述DY_GET_FOCUS獲得屏幕焦點(diǎn)DY_GET_SET_FIELD_VALUE獲得或者設(shè)置屏幕字段的值函數(shù)名描述F4IF_INT_TABLE_VALUE_REQUEST顯示檢索helpREAD_TEXT讀取長(zhǎng)文本CONVERSION_EXIT_CUNIT_OUTPUT單位轉(zhuǎn)換SJIS_DBC_TO_SBC全角轉(zhuǎn)半角SJIS_SBC_TO_DBC半角轉(zhuǎn)換為全角CO_R0_CHECK_DECIMAL_POINT根據(jù)單位檢查數(shù)據(jù)的小數(shù)位POSTAL_CODE_CHECK檢查郵政編碼函數(shù)名描述CONVERSION_EXIT_ALPHA_INPUT全數(shù)字則在前面補(bǔ)0CONVERSION_EXIT_ALPHA_INPUT和上面相反GET_JOB_RUNTIME_INFO獲得job相關(guān)信息TERMINAL_ID_GET獲得端末idDATE_CONVERT_TO_FACTORYDATE把輸入日期轉(zhuǎn)為工廠日歷日期MESSAGE_TEXT_BUILD把消息轉(zhuǎn)為文本函數(shù)名描述POPUP_TO_CONFIRM彈出確認(rèn)窗口函數(shù)名描述CONVERSION_EXIT_MATN1_INPUT物料號(hào)碼轉(zhuǎn)換函數(shù)CONVERSION_EXIT_MATN1_OUTPUT同上相反CONVERT_TO_LOCAL_CURRENCY按照指定日期匯率轉(zhuǎn)換金額為指定貨幣類型SSF_FUNCTION_MODULE_NAME根據(jù)form名取得對(duì)應(yīng)的函數(shù)名(SmartForm)函數(shù)名描述DATE_CHECK_PLAUSIBILITY日期CHECKcl_gui_frontend_services=>gui_upload上傳到服務(wù)器cl_gui_frontend_services=>gui_download下載到服本地SSF_FUNCTION_MODULE_NAMESMARTFORMS輸出報(bào)表時(shí),生成一個(gè)函數(shù)名稱,然后CALL這個(gè)名稱函數(shù)名描述POPUP_TO_DECIDE_LIST彈出供選擇窗口1.function:SD_VBAP_READ_WITH_VBELN功能:根據(jù)銷(xiāo)售訂單讀取表vbap中的信息參數(shù):import:I_VBELN訂單號(hào)(必輸項(xiàng))I_BYPASSING_BUFFER是否回避bufferI_REFRESH_BUFFER是否清空buffertables:ET_VBAPVB不清楚其意義ET_VBAPvbap表2.form:EDIT_LINES功能:把READ_TEXT返回的LINES中的行按照TDFORMAT=“*”重新組織原因:如果用Create_TEXT登錄的長(zhǎng)文本不存在該問(wèn)題,如果是在前臺(tái)業(yè)務(wù)登錄的text,那么存到數(shù)據(jù)庫(kù)的時(shí)候會(huì)在72位的地方換行,在lines這個(gè)表中的TDFORMAT設(shè)置為空,導(dǎo)致READ_TEXT返回的表中的行數(shù)也許不是你需要的行數(shù)。代碼:FORMEDIT_LINESTABLESP_IT_LINESSTRUCTURETLINE.DATA:L_IT_LINESTYPESTANDARDTABLEOFTLINE,L_WA_LINESTYPETLINE,L_WA_LINE1TYPETLINE,L_LINETYPEI.DATA:L_INDEXTYPEI,L_ITYPEI.READTABLEP_IT_LINESTRANSPORTINGNOFIELDSWITHKEYTDFORMAT=SPACE.CHECKSY-SUBRC=0.L_LINE=LINES(P_IT_LINES).CHECKL_LINE>1.L_IT_LINES[]=P_IT_LINES[].CLEAR:P_IT_LINES[].L_INDEX=2.DO.CLEAR:L_WA_LINES.READTABLEL_IT_LINESINTOL_WA_LINESINDEXL_INDEX.IFSY-SUBRC<>0.L_I=L_INDEX-1.READTABLEL_IT_LINESINTOL_WA_LINESINDEXL_I.IFSY-SUBRC=0.APPENDL_WA_LINESTOP_IT_LINES.ENDIF.EXIT.ENDIF.IFL_WA_LINES-TDFORMAT='*'.L_I=L_INDEX-1.CLEARL_WA_LINE1.READTABLEL_IT_LINESINTOL_WA_LINE1INDEXL_I.APPENDL_WA_LINE1TOP_IT_LINES.L_INDEX=L_I+2.ELSE.L_I=L_INDEX-1.READTABLEL_IT_LINESINTOL_WA_LINE1INDEXL_I.CONCATENATEL_WA_LINE1-TDLINEL_WA_LINES-TDLINEINTOL_WA_LINE1-TDLINE.APPENDL_WA_LINE1TOP_IT_LINES.L_INDEX=L_INDEX+2.ENDIF.ENDDO.ENDFORM."S4110_EDIT_LINES3.function:VIEW_MAINTENANCE_CALL功能:維護(hù)表視圖等Thefunctionmodulecallstheextendedtablemaintenance(Viewmaintenance).參數(shù):import:ACTIONS=DisplayU=ChangeT=TransportCORR_NUMBER傳送號(hào)(上面的action是t)SHOW_SelectION_POPUP是否彈出選擇畫(huà)面VIEW_NAME視圖名NO_WARNING_FOR_CLIENTINDEP跨集團(tuán)是否現(xiàn)實(shí)警告VARIANT_FOR_SelectION變式名CHECK_DDIC_MAINFLAG察看是否為可維護(hù)對(duì)象補(bǔ)充:VIEW_MAINTENANCE_CALL例子:CALLFUNCTION'VIEW_MAINTENANCE_CALL'EXPORTINGACTION='U'"更新SHOW_SelectION_POPUP='X'"顯示選擇畫(huà)面VIEW_NAME='ZPPT000020'"表名NO_WARNING_FOR_CLIENTINDEP=''"不顯示警告EXCEPTIONSCLIENT_REFERENCE=1FOREIGN_LOCK=2INVALID_ACTION=3NO_CLIENTINDEPENDENT_AUTH=4NO_DATABASE_FUNCTION=5NO_EDITOR_FUNCTION=6NO_SHOW_AUTH=7NO_TVDIR_ENTRY=8NO_UPD_AUTH=9ONLY_SHOW_ALLOWED=10SYSTEM_FAILURE=11UNKNOWN_FIELD_IN_DBA_SELLIST=12VIEW_NOT_FOUND=13MAINTENANCE_PROHIBITED=14OTHERS=15.效果:每天函數(shù)講解系列2006.01.101.SYSTEM-CALL:DY_GET_FOCUS說(shuō)明:獲得屏幕焦點(diǎn)參數(shù):ID'SSCREENNAM'FIELDCURRSUBSCREENID'SSCREENNBR'FIELDCURRSUBSCREENNOID'MSCREENNAM'FIELDCURRSCREENID'MSCREENNBR'FIELDCURRSCREENNOID'FIELDNAME'FIELDCURSOR_FIELDID'FIELDOFFS'FIELDDUMMYOFFSID'LINE'FIELDCURSOR_LINE.2.SYSTEM-CALL:DY_GET_SET_FIELD_VALUE說(shuō)明:獲得或者設(shè)置屏幕字段的值參數(shù):ID'GET_SET'FIELD'S'"S:SetmodeG:GetmodeID'SSCREENNAM'FIELDSHSUBSCREENID'SSCREENNBR'FIELDSHSUBSCREENNOID'MSCREENNAM'FIELDSHSCREENID'MSCREENNBR'FIELDSHSCREENNOID'FIELDNAME'FIELDDYNP_EXPORTID'LINE'FIELDDYNP_EXSTEPLID'VALUE'FIELDDYNP_EXPVAL.例子:我做了一個(gè)檢索help的exit,例如屏幕上有兩個(gè)字段,我按了一個(gè)字段的檢索help,那么根據(jù)這個(gè)字段就會(huì)取得相應(yīng)的另外一個(gè)字段的值,然后把這個(gè)之設(shè)置到第二個(gè)字段。FUNCTIONZTEST_F4.*"*"*"Localinterface:*"TABLES*"SHLP_TABTYPESHLP_DESCT*"RECORD_TABSTRUCTURESEAHLPRES*"CHANGING*"REFERENCE(SHLP)TYPESHLP_DESCR*"REFERENCE(CALLCONTROL)LIKEDDSHF4CTRLSTRUCTUREDDSHF4CTRL*"*LocaldatadefinitionDATA:L_ZZOINO(3)TYPEC.DATA:L_ZZPOSID(10)TYPEC.DATA:DYNP_EXPORT(132),DYNP_EXPVAL(132).DATA:DYNP_EXSTEPLTYPEI,OK,DUMMYCHAR.DATA:DUMMYOFFSTYPEI.DATA:SHSUBSCREENLIKEHELP_INFO-DYNPPROG,SHSUBSCREENNOLIKEHELP_INFO-DYNPRO,SHSCREENLIKEHELP_INFO-DYNPPROG,SHSCREENNOLIKEHELP_INFO-DYNPRO.DATA:CURRSUBSCREENLIKEHELP_INFO-DYNPPROG,CURRSUBSCREENNOLIKEHELP_INFO-DYNPRO,CURRSCREENLIKEHELP_INFO-DYNPPROG,CURRSCREENNOLIKEHELP_INFO-DYNPRO.DATA:CURSOR_FIELDLIKEDYNPREAD-FIELDNAME,CURSOR_LINETYPEI.DATA:SETCURSOR_AVAILABLETYPEI.*GetrecordvaluefromrecordtableREADTABLERECORD_TABINDEX1.L_ZZPOSID=RECORD_TAB+0(10).IFSHLP_TAB-INTDESCR-HOTKEYISINITIAL.L_ZZOINO=RECORD_TAB+10(3).ENDIF.*Checkcommand,ifreturn,setscreenIFCALLCONTROL-STEP='RETTOP'.*Initializescreen,getscreenfocusCALL'DY_GET_FOCUS'ID'SSCREENNAM'FIELDCURRSUBSCREENID'SSCREENNBR'FIELDCURRSUBSCREENNOID'MSCREENNAM'FIELDCURRSCREENID'MSCREENNBR'FIELDCURRSCREENNOID'FIELDNAME'FIELDCURSOR_FIELDID'FIELDOFFS'FIELDDUMMYOFFSID'LINE'FIELDCURSOR_LINE.*SetscreenparameterGETPARAMETERID'RID'FIELDSHSUBSCREEN.SHSCREEN=SHSUBSCREEN.GETPARAMETERID'DYN'FIELDSHSUBSCREENNO.SHSCREENNO=SHSUBSCREENNO.DYNP_EXPORT='V_WA_DYNPRO_9000-ZZOINO'.DYNP_EXPVAL=L_ZZOINO.*SystemcallforsetscreenCALL'DY_GET_SET_FIELD_VALUE'ID'GET_SET'FIELD'S'"SetmodeID'SSCREENNAM'FIELDSHSUBSCREENID'SSCREENNBR'FIELDSHSUBSCREENNOID'MSCREENNAM'FIELDSHSCREENID'MSCREENNBR'FIELDSHSCREENNOID'FIELDNAME'FIELDDYNP_EXPORTID'LINE'FIELDDYNP_EXSTEPLID'VALUE'FIELDDYNP_EXPVAL.*SystemcallforsetscreenDYNP_EXPORT='V_WA_DYNPRO_9000-ZZPOSID'.DYNP_EXPVAL=L_ZZPOSID.CALL'DY_GET_SET_FIELD_VALUE'ID'GET_SET'FIELD'S'"SetmodeID'SSCREENNAM'FIELDSHSUBSCREENID'SSCREENNBR'FIELDSHSUBSCREENNOID'MSCREENNAM'FIELDSHSCREENID'MSCREENNBR'FIELDSHSCREENNOID'FIELDNAME'FIELDDYNP_EXPORTID'LINE'FIELDDYNP_EXSTEPLID'VALUE'FIELDDYNP_EXPVAL.ENDIF.ENDFUNCTION.每天函數(shù)講解系列2006.01.11Function:F4IF_INT_TABLE_VALUE_REQUEST功能:顯示檢索help參數(shù):Import:DDIC_STRUCTURE:返回table的結(jié)構(gòu):‘s’:VALUE_TAB的結(jié)構(gòu)‘c’:VALUE_TAB只有一個(gè)字段RETFIELD:返回的字段名稱必輸DYNPPROG:當(dāng)前程序DYNPNR:屏幕號(hào)DYNPROFIELD:屏幕上需要檢索help的字段名稱WINDOW_TITLE:檢索help的標(biāo)題VALUE_ORG:檢索help屏幕顯示屬性:‘c’:cellbycell‘s’:structuredCALLBACK_PROGRAM:在f4之前調(diào)用的程序CALLBACK_FORM:在f4之前調(diào)用的程序里面的form名稱,形式如下FORMTABLESRECORD_TABSTRUCTURESEAHLPRESCHANGINGSHLPTYPESHLP_DESCRCALLCONTROLLIKEDDSHF4CTRL.Export:USER_RESET:如果沒(méi)有選擇(按紅x),返回‘x’Tables:VALUE_TAB:傳進(jìn)去的表必輸FIELD_TAB:Fieldsofthehitlist(暫時(shí)沒(méi)用)RETURN_TAB:返回值表,即如果選擇了而沒(méi)有寫(xiě)到屏幕上的值存在這個(gè)表中。DYNPFLD_MAPPING:把屏幕上需要help的字段可以放在這個(gè)表中。推測(cè):如果屏幕上有多個(gè)字段關(guān)聯(lián),那么只作一個(gè)help的話,這個(gè)應(yīng)該可以滿足。例子:FORMA3000_SET_F4_FIELD_WERKSUSINGP_FIELD.TYPES:BEGINOFT_S_WERKS,WERKSTYPET001W-WERKS,"プラントNAME1TYPET001W-NAME1,"名稱NAME2TYPET001W-NAME2,"名稱2STRASTYPET001W-STRAS,"地名/番地-號(hào)orT01TYPET001W-ORT01,"市區(qū)町村名ENDOFT_S_WERKS.TYPEST_I_WERKSTYPESTANDARDTABLEOFT_S_WERKS.*這個(gè)就是value_tabDATAL_IT_WERKSTYPET_I_WERKS.*取數(shù)據(jù)SelectWERKS"プラントNAME1"名稱NAME2"名稱2STRAS"地名/番地-號(hào)orT01"市區(qū)町村名FROMT001WINTOCORRESPONDINGFIELDSOFTABLEL_IT_WERKS.*調(diào)用函數(shù)CALLFUNCTION'F4IF_INT_TABLE_VALUE_REQUEST'EXPORTINGRETFIELD='WERKS'“plantDYNPPROG=SY-REPID“程序名DYNPNR=SY-DYNNR“屏幕號(hào)DYNPROFIELD=P_FIELD“字段名稱VALUE_ORG='S'“顯示屬性:cellbycellTABLESVALUE_TAB=L_IT_WERKSEXCEPTIONSPARAMETER_ERROR=1NO_VALUES_FOUND=2OTHERS=3.IFSY-SUBRC<>0.MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNOWITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ENDIF.ENDFORM."A3000_SET_F4_FIELD_WERKS程序:REPORTZF4IF_INT_TABLE_VALUE_REQUEST.TYPES:BEGINOFT_S_WERKS,WERKSTYPET001W-WERKS,"NAME1TYPET001W-NAME1,"NAME2TYPET001W-NAME2,"2STRASTYPET001W-STRAS,"/-orT01TYPET001W-ORT01,"ENDOFT_S_WERKS.TYPEST_I_WERKSTYPESTANDARDTABLEOFT_S_WERKS.*value_tabDATAL_IT_WERKSTYPET_I_WERKS.PARAMETERS:P_WERKS(4)TYPEC.ATSelectION-SCREENONVALUE-REQUESTFORP_WERKS.*ATSelectION-SCREENONHELP-REQUESTFOR.*SelectWERKS"NAME1"NAME2"2STRAS"/-orT01"FROMT001WINTOCORRESPONDINGFIELDSOFTABLEL_IT_WERKS.*CALLFUNCTION'F4IF_INT_TABLE_VALUE_REQUEST'EXPORTINGRETFIELD='WERKS'"plantDYNPPROG=SY-REPID"DYNPNR=SY-DYNNR"DYNPROFIELD='P_WERKS'"VALUE_ORG='S'"cellbycellTABLESVALUE_TAB=L_IT_WERKSEXCEPTIONSPARAMETER_ERROR=1NO_VALUES_FOUND=2OTHERS=3.IFSY-SUBRC<>0.MESSAGEIDSY-MSGIDTYPESY-MSGTYNUMBERSY-MSGNOWITHSY-MSGV1SY-MSGV2SY-MSGV3SY-MSGV4.ENDIF.Function:READ_TEXT/Create_TEXT功能:讀取長(zhǎng)文本/創(chuàng)建長(zhǎng)文本參數(shù):Import:CLIENT:集團(tuán)ID:文本ID(TTXID中定義)LANGUAGE:語(yǔ)言NAME:文本名字()OBJECT:文本對(duì)象(TTXOB中定義)Export:HEADER:文本的描述信息Tables:LINES:文本內(nèi)容例子:讀取銷(xiāo)售訂單頭文本CALLFUNCTION'READ_TEXT'EXPORTINGID=‘Y001’LANGUAGE=SY-LANGUNAME=‘385’OBJECT=‘VBBK’TABLESLINES=L_IT_LINESEXCEPTIONSID=1LANGUAGE=2NAME=3NOT_FOUND=4OBJECT=5REFERENCE_CHECK=6WRONG_ACCESS_TO_ARCHIVE=7OTHERS=8.Function:CONVERSION_EXIT_CUNIT_OUTPUT功能:根據(jù)語(yǔ)言決定單位的顯示參數(shù):Import:INPUT:內(nèi)部單位顯示方式LANGUAGE:語(yǔ)言代碼Export:LONG_TEXT:?jiǎn)挝坏拈L(zhǎng)文本OUTPUT:外部單位顯示方式SHORT_TEXT:?jiǎn)挝坏亩涛谋纠樱簡(jiǎn)挝伙@示轉(zhuǎn)換CALLFUNCTION'CONVERSION_EXIT_CUNIT_OUTPUT'EXPORTINGINPUT=‘ST’LANGUAGE=SY-LANGUIMPORTINGOUTPUT=L_OUTEXCEPTIONSUNIT_NOT_FOUND=1OTHERS=2.Function:SJIS_DBC_TO_SBC功能:全角轉(zhuǎn)換為半角參數(shù):Import:ALL:全部轉(zhuǎn)換ALPHABET_UPPER:A-Z轉(zhuǎn)換ALPHABET_LOWER:a-z轉(zhuǎn)換NUMERIC:0-9轉(zhuǎn)換Export:CONVERTED:轉(zhuǎn)換的字符個(gè)數(shù)Changing:TEXT:轉(zhuǎn)換結(jié)果Function:SJIS_SBC_TO_DBC功能:半角轉(zhuǎn)換為全角參數(shù):Import:ALL:全部轉(zhuǎn)換ALPHABET_UPPER:A-Z轉(zhuǎn)換ALPHABET_LOWER:a-z轉(zhuǎn)換NUMERIC:0-9轉(zhuǎn)換Export:CONVERTED:轉(zhuǎn)換的字符個(gè)數(shù)Changing:TEXT:轉(zhuǎn)換結(jié)果Function:CO_R0_CHECK_DECIMAL_POINT功能:根據(jù)單位檢查數(shù)據(jù)的小數(shù)位參數(shù):Import:I_QUANTITY:數(shù)量I_UNIT:?jiǎn)挝焕樱合旅娴睦訒?huì)返回錯(cuò)誤信息,以為單位ST是不能有小數(shù)位的。CALLFUNCTION'CO_R0_CHECK_DECIMAL_POINT'EXPORTINGI_QUANTITY=3.2I_UNIT=‘ST’EXCEPTIONSWRONG_DATA=1OTHERS=2.Function:POSTAL_CODE_CHECK功能:檢查郵政編碼參數(shù):Import:COUNTRY:國(guó)家(T005)必輸ONE_TIME_ACCOUNT:不明確POSTAL_CODE:郵政編碼POSTAL_CODE_PO_BOX:沒(méi)用過(guò),以下為推測(cè):如果輸入則會(huì)檢查,如果t005表中的XPLPF設(shè)置了,那么如果輸入PO_BOX,這個(gè)選項(xiàng)就必須輸入。PO_BOX:沒(méi)用過(guò)REGION:區(qū)域Ex

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論