Abap function moudulefunction module.docx
《Abap function moudulefunction module.docx》由会员分享,可在线阅读,更多相关《Abap function moudulefunction module.docx(40页珍藏版)》请在冰豆网上搜索。
Abapfunctionmoudulefunctionmodule
ABAP_DOCU_DOWNLOAD
DownloadABAPdocumentationinHTMLformat.
APPL_LOG_DELETE
Withthisfunctionmoduleyoudeletelogsinthedatabaseaccordingtospecifiedselectionconditions
APPL_LOG_DISPLAY
Withthisfunctionmoduleyoucananalyzelogsinthedatabase.
APPL_LOG_DISPLAY_INTERN
Withthisfunctionmoduleyoucananalyzelogsinlocalmemory,e.g.whenyouhaveonlycollectedlogrecordsatruntimeanddonotwanttowritetothedatabase.
APPL_LOG_INIT
Thisfunctionmodulecheckswhetherthespecifiedobjectorsub-objectexistsanddeletesallexistingassociateddatainlocalmemory.
APPL_LOG_READ_DB
Withthisfunctionmoduleyoureadthelogdatainthedatabaseforanobjectorsub-objectaccordingtospecifiedselectionconditions.
APPL_LOG_READ_INTERN
Withthisfunctionmoduleyoureadalllogdatawhoselogclasshasatleastthespecifiedvalue,fromlocalmemory,forthespecifiedobjectorsub-object.
APPL_LOG_SET_OBJECT
Withthisfunctionmodule,youcreateanewobjectorsub-objectforwritinginlocalmemory.WithaflagyoucancontrolwhethertheAPPL_LOG_WRITE_...messagesarewritteninlocalmemoryorareoutputonthescreen.
APPL_LOG_WRITE_DB
Withthisfunctionmoduleyouwritealldataforthespecifiedobjectorsub-objectinlocalmemorytothedatabase.Ifthelogfortheobjectorsub-objectinquestionisnew,thelognumberisreturnedtothecallingprogram.
APPL_LOG_WRITE_HEADER
Withthisfunctionmodule,youwritethelogheaderdatainlocalmemory.
APPL_LOG_WRITE_LOG_PARAMETERS
Withthisfunctionmodule,youwritethenameofthelogparametersandtheassociatedvaluesforthespecifiedobjectorsub-objectinlocalmemory.Ifthisfunctionmoduleiscalledrepeatedlyforthesameobjectorsub-object,theexistingparametersareupdatedaccordingly.Ifyoudonotspecifyanobjectorsub-objectwiththecall,themostrecentlyusedisassumed.
APPL_LOG_WRITE_MESSAGE_PARAMS
Withthisfunctionmoduleyouwriteasinglemessage,withparameters,inlocalmemory.OtherwisethefunctionmoduleworkslikeAPPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_WRITE_MESSAGES
Withthisfunctionmoduleyouwriteoneormoremessages,withoutparameters,inlocalmemory.
APPL_LOG_WRITE_SINGLE_MESSAGE
Withthisfunctionmoduleyouwriteasinglemessage,withoutparameters,inlocalmemory.Ifnoheaderentryhasyetbeenwrittenfortheobjectorsub-object,itiscreated.Ifyoudonotspecifyanobjectorsub-objectwiththecall,themostrecentlyusedisassumed.
ARFC_GET_TID
willreturntheIPaddressoftheterminalinhex.
BAL_CNTL_CREATE
CreateControlforlogdisplay
BAL_CNTL_FREE
ReleaseControl
BAL_CNTL_REFRESH
Putnewdatainlogdisplay
BAL_DB_DELETE
Deletelogsfromthedatabase
BAL_DB_DEQUEUE
Unlocklog
BAL_DB_ENQUEUE
Locklog
BAL_DB_LOAD
Loadlogsfromthedatabase
BAL_DB_LOAD
Loadlog(s)
BAL_DB_SAVE
Savelogsinthedatabase
BAL_DB_SAVE
Savelog(s)
BAL_DB_SAVE_PREPARE
Preparesave
BAL_DB_SEARCH
Findlogsinthedatabase
BAL_DSP_LOG_DISPLAY
Displaymessagesinmemory
BAL_DSP_LOG_DISPLAY
DisplayLog
BAL_DSP_LOG_PARAMETERS
Eitheroutputextendedlongtextorcallacallbackroutine(basedonthedatainBAL_S_LOG-PARAMS)
BAL_DSP_LOG_TECHNICAL_DATA
Outputalllogheaderdata
BAL_DSP_MSG_LONGTEXT
Displaymessagelongtext
BAL_DSP_MSG_PARAMETERS
Eitheroutputextendedlongtextorcallacallbackroutine(basedonthedatainBAL_S_MSG-PARAMS)
BAL_DSP_MSG_TECHNICAL_DATA
Outputtechnicaldataofamessagesuchasworkarea,errornumber,etc.
BAL_DSP_OUTPUT_FREE
Endoutput
BAL_DSP_OUTPUT_INIT
Initializeoutput
BAL_DSP_OUTPUT_SET_DATA
Setdatasettobedisplayed
BAL_DSP_PROFILE_DETLEVEL_GET
MessagehierarchyinDETLEVEL
BAL_DSP_PROFILE_NO_TREE_GET
Displaywithouttree(fullscreen)
BAL_DSP_PROFILE_POPUP_GET
Displaywithouttree(popup)
BAL_DSP_PROFILE_SINGLE_LOG_GET
Standardprofile(SLG1)foronelog
BAL_DSP_PROFILE_STANDARD_GET
Standardprofile(SLG1)foralotoflogs
BAL_GLB_AUTHORIZATION_GET
Assignauthorization
BAL_GLB_AUTHORIZATION_RESET
Resetauthorization
BAL_GLB_CONFIG_GET
Readconfiguration
BAL_GLB_CONFIG_SET
Setconfiguration
BAL_GLB_MEMORY_EXPORT
PutfunctiongroupmemoryinABAP-MEMORY
BAL_GLB_MEMORY_IMPORT
GetfunctiongroupmemoryfromABAP-MEMORY
BAL_GLB_MEMORY_REFRESH
(Partially)resetglobalmemory
BAL_GLB_MEMORY_REFRESH
(Partially)initializememory
BAL_GLB_MSG_CURRENT_HANDLE_GET
Getcurrentmessagehandle
BAL_GLB_MSG_DEFAULTS_GET
Getmessagedefaults
BAL_GLB_SEARCH_LOG
Findlogsinmemory
BAL_GLB_SEARCH_MSG
Findmessagesinmemory
BAL_LOG_CREATE
Createlogwithheaderdata
BAL_LOG_CREATE
Createlogwithheaderdata
BAL_LOG_DELETE
Deletelog(fromdatabasealsoatSave)
BAL_LOG_EXIST
Checkexistenceofaloginmemory
BAL_LOG_HDR_CHANGE
Changelogheader
BAL_LOG_HDR_CHECK
Checklogheaderdataforconsistency
BAL_LOG_HDR_READ
Readlogheaderandotherdata
BAL_LOG_MSG_ADD
Putmessageinlog
BAL_LOG_MSG_ADD
Putmessageinlog
BAL_LOG_MSG_CHANGE
Changemessage
BAL_LOG_MSG_CHANGE
Changemessage
BAL_LOG_MSG_CHECK
Checkmessagedataforconsistency
BAL_LOG_MSG_CUMULATE
Addmessagecumulated
BAL_LOG_MSG_DELETE
Deletemessage
BAL_LOG_MSG_DELETE
Deletemessage
BAL_LOG_MSG_EXIST
Checkexistenceofamessageinmemory
BAL_LOG_MSG_READ
Readmessageandotherdata
BAL_LOG_MSG_REPLACE
Replacelastmessage
BAL_LOG_REFRESH
Deletelogfrommemory
BAL_LOG_REFRESH
Deletelogfrommemory
BAL_MSG_DISPLAY_ABAP
OutputmessageasABAP-MESSAGE
BAL_OBJECT_SELECT
ReadApplicationLogobjectstablerecord
BAL_OBJECT_SUBOBJECT
Checkwhetherobjectandsubobjectexistandthecombinationisallowed
BAL_SUBOBJECT_SELECT
Readsubobjecttablerecord
BP_EVENT_RAISE
TriggeraneventfromABAP/4program
BP_JOBLOG_READ
Fetchjoblogexecutions
CHANGEDOCUMENT_READ_HEADERS
Getthechangedocumentheaderforasalesdocument,andputtheresultsinaninternaltable.
Example:
CALLFUNCTION'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass='EINKBELEG'
objectid=l_objectid
username=space
TABLES
i_cdhdr=lt_cdhdr.
LOOPATlt_cdhdrWHEREudateINs_aedat.
CALLFUNCTION'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber=lt_cdhdr-changenr
TABLES
editpos=lt_editpos.
LOOPATlt_editposWHEREfname='LOEKZ'
ANDf_new='L'.
p_desc=text-r01."CancelContract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS
Getthedetailsofachangedocument,andstoretheminaninternaltable.Thiswilltellyouwhetherafieldwaschanged,deleted,orupdated.
Example:
CALLFUNCTION'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass='EINKBELEG'
objectid=l_objectid
username=space
TABLES
i_cdhdr=lt_cdhdr.
LOOPATlt_cdhdrWHEREudateINs_aedat.
CALLFUNCTION'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber=lt_cdhdr-changenr
TABLES
editpos=lt_editpos.
LOOPATlt_editposWHEREfname='LOEKZ'
ANDf_new='L'.
p_desc=text-r01."CancelContract
ENDLOOP.
ENDLOOP.
CLAF_CLASSIFICATION_OF_OBJECTS
Returnallofthecharacteristicsforamaterial
CLOI_PUT_SIGN_IN_FRONT
Movethenegativesignfromthelefthandsideofanumber,totherighthandsideofthenumber.NotethatTheresultwillbeleftjustified(likeallcharacterfields),notrightjustifedasnumbersnormallyare.
CLPB_EXPORT
Exportatexttabletotheclipboard(onpresentationserver)
CLPB_IMPORT
ImportaTextTablefromtheClipboard(onpresentationserver)
COMMIT_TEXT
ToloadlongtextintoSAP
CONVERSION_EXIT_ALPHA_INPUT
convertsanynumberintoastringfillwithzeroes,withthenumberattheextremeright
Example:
input=123
output=0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT
convertsanynumberwithzeroesrightintoasimpleinteger
Example:
input=00000000000123
output=123
CONVERT_ABAPSPOOLJOB_2_PDF
convertabapspooloutputtoPDF
CONVERT_OTF
ConvertSAPdocuments(SAPScript)toothertypes.
Example:
CALLFUNCTION"CONVERT_OTF"
EXPORTINGFORMAT="PDF"
IMPORTINGBIN_FILESIZE=FILE_LEN
TABLESOTF=OTFDATA
LINES=PDFDATA
EXCEPTIONSERR_MAX_LINEWIDTH=1
ERR_FORMAT=2
ERR_CONV_NOT_POSSIBLE=3
OTHERS=4.
CONVERT_OTFSPOOLJOB_2_PDF
convertsaOTFspooltoPDF(i.e.Sapscriptdocument)
CONVERT_TO_FOREIGN_CURRENCY
Convertlocalcurrencytoforeigncurrency.
CONVERT_TO_LOCAL_CURRENCY
Convertfromforeigncurrencytolocalcurrency
DATE_CHECK_PLAUSIBILITY
ChecktoseeifadateisinavalidformatforSAP.Workswellwhenvalidatingdatesbeingpassedinfromothersystems.
DATE_COMPUTE_DAY
Returnsanumberindicatingwhatdayoftheweekthedatefallson.Mondayisreturnedasa1,Tuesdayas2,etc.
DATE_GET_WEEK
willreturntheweekthatadateisin.
DATE_IN_FUTURE
CalculateadateNdaysinthefuture.
DAY_ATTRIBUTES_GET
Returnusefulinformationaboutaday.Willtellyouthedayoftheweekasaword(Tuesday),thedayoftheweek(2wouldbeTuedsay),whetherthedayisaholiday,andmore.(providedbyFrancoisHenrotte)
DOWNLOAD
downloadafiletothepresentationserver(PC)
DYNP_VALUES_READ
Readthevaluesfromadynpro.Thisfunctioncanbeusedtoreadthevaluesfromareport'sselectionscreentoo(Anotherexample).
DYNP_VALUES_UPDATE
SimilartoDYNP_VALUES_READ,thisfunctionwillallowtheupdatingoffieldsonadynpro.Veryusefulwhenyouwanttochangeafieldbasedonthevalueenteredforanotherfield.
ENQUE_SLEEP
Waitaspecifiedperiodoftimebeforecontinuingprocessing.
ENQUEUE_ESFUNCTION
Lockanabap