Posted: Sat Apr 26, 2008 4:47 pm Post subject: BAPI_BUS_EVENTTYPE_LIST
BAPI_BUS_EVENTTYPE_LIST - Business event types in business event group
Code:
FUNCTION Z_HR_BIW_BUSINESS_EVENT_ATTR .
*"----------------------------------------------------------------------
""Local interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBW_BUSEVENT_ATTR OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
*"----------------------------------------------------------------------
*Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT,
LT_ITAB LIKE BAPIETDAT OCCURS 0 WITH HEADER LINE.
DATA : LT_DESC LIKE BAPIDESC OCCURS 0 WITH HEADER LINE.
*Ranges
RANGES : L_R_PLVAR FOR BAPIETDAT-PLVAR,
L_R_BEGDA FOR BAPIDATE-BEGDA,
L_R_ENDDA FOR BAPIDATE-ENDDA.
*Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
*counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
*cursor
S_CURSOR TYPE CURSOR.
*Initialization mode (first call by SAPI) or data transfer mode (following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
*Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZBUS_EVENTTYPE_ATTR'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
*this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
*Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
*Fill field list table for an optimized select statement
*(in case that there is no 1:1 relation between InfoSource fields
*and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.