Tuesday, May 31, 2011
User Exit
Enhancements in SAP table
The details about projects, enhancements and components are contained in two SAP tables:
MODSAP: containing enhancement name, type of exit and component
MODACT: containing project name and enhancements
REPORT ZDEMO_EXAMPLE.
TABLES: MODSAP, MODACT.
PARAMETERS: INPUT1 LIKE MODSAP-NAME DEFAULT ' ',
INPUT2 LIKE MODSAP-TYP DEFAULT ' ',
INPUT3 LIKE MODSAP-MEMBER DEFAULT ' '.
DATA: SEARCH1 LIKE MODSAP-NAME,
SEARCH2(3), " like modsap-typ,
SEARCH3 LIKE MODSAP-MEMBER.
CONCATENATE: '%' INPUT1 '%' INTO SEARCH1,
'%' INPUT2 INTO SEARCH2,
'%' INPUT3 '%' INTO SEARCH3.
SELECT * FROM MODSAP WHERE NAME LIKE SEARCH1
AND TYP LIKE SEARCH2
AND MEMBER LIKE SEARCH3.
SELECT SINGLE * FROM MODACT WHERE MEMBER = MODSAP-NAME.
WRITE: /10 MODSAP-NAME, 30 MODSAP-TYP, 45 MODSAP-MEMBER, 70 MODACT-NAME.
CLEAR : MODSAP, MODACT.
ENDSELECT.
IF SY-SUBRC NE 0.
WRITE : /'Not found'.
ENDIF.
END-OF-SELECTION.
CLEAR: SEARCH1, SEARCH2, SEARCH3.
NOTE: SAP’s naming convention for user exits-
· Program/Function exits : EXIT_AAAAAAAA_nnn where
AAAAAAAA stands for the program name which contains the exit and
nnn is a SAP assigned number starting from 001
-----------------------------------------------------------------
· Menu exits : AAAAAAAA+XXX where
AAAAAAAA stands for the program name which contains the exit and
+XXX is the name of the function code contained in the menu item
-----------------------------------------------------------------
· Screen Exits : AAAAAAAA_nnnn_BBBBBBBB_CCCCCCCC_mmmm where
AAAAAAAA : calling program name
nnnn : calling screen number
BBBBBBBB : area
CCCCCCCC : called program name
mmmm : called screen number
Enhancements (User Exits & Customer exits)
There are different ways to implement custom functionality in the SAP standard code.
All User exits start with the word USEREXIT_...
FORM USEREXIT_XXXX....
INCLUDE ZZUSEREXIT.......
ENDFORM.
Customer exits are nothing but a include in customer name space will be provided in the function module which starts with CALL CUSTOMER.
- They do not affect software updates.
Disadvantage:
- Customer exits are not available for all programs and screens found in the SAP System.
1. Function Module exits
2. Screen exits
3. Menu exits
Format: CALL CUSTOMER-FUNCTION '910'
The naming standard of function modules for function module exits is:
EXIT_
Format: CALL CUSTOMER-SUBSCREEN CUSTSCR1
Function codes for menu exits all start with "+".
Format: +CUS (additional item in GUI status)
Author(s): Tutun Nandy
Monday, May 30, 2011
RFC in SAP
Wednesday, May 25, 2011
BDC using Session method.
no standard page heading line-size 255.
*include bdcrecx1.
types: begin of ty_record,
* data element: LIF16
LIFNR TYPE LIFNR,
* data element: KTOKK
KTOKK TYPE KTOKK,
* data element: ANRED
ANRED TYPE ANRED,
* data element: NAME1_GP
NAME1 TYPE NAME1,
* data element: SORTL
SORTL TYPE SORTL,
* data element: LAND1_GP
LAND1 TYPE LAND1,
end of ty_record.
data: i_record type table of ty_record,
w_record type ty_record.
DATA : I_BDCDATA TYPE TABLE OF BDCDATA,
W_BDCDATA TYPE BDCDATA.
DATA: CLIENT TYPE APQI-MANDANT," SY-MANDT Client
DEST TYPE APQI-DESTSYS ,"FILLER8 Target system for ODC/no longer relevant
GROUP TYPE APQI-GROUPID," FILLER12 Session name
HOLDDATE TYPE APQI-STARTDATE," FILLER8 Session locked until specified date
KEEP TYPE APQI-QERASE," FILLER1 Indicator to keep processed sessions
USER TYPE APQI-USERID," FILLER12 Batch input user
RECORD TYPE APQI-PUTACTIVE," FILLER1 Indicator: BI recording ('X' or ' ')
PROG TYPE APQI-PROGID," SY-CPROG Creator Program
DCPFM TYPE USDEFAULTS-DCPFM," '%' Decimal Character Used
DATFM TYPE USDEFAULTS-DATFM." '%' Date Format Used
DATA : IT_FILE type table of ALSMEX_TABLINE, "if data is brought from Excel sheet
wa_file type ALSMEX_TABLINE. "if data is brought from Excel sheet
start-of-selection.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'C:\Users\mouriuser54\Desktop\Ravi_XK01_INPUTDATA.XLSX'
I_BEGIN_COL = '1'
I_BEGIN_ROW = '1'
I_END_COL = '6'
I_END_ROW = '10'
TABLES
INTERN = IT_FILE
* EXCEPTIONS
* INCONSISTENT_PARAMETERS = 1
* UPLOAD_OLE = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at it_file into wa_file.
case wa_file-col.
when 1.
w_record-LIFNR = wa_file-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_record-LIFNR
IMPORTING
OUTPUT = w_record-LIFNR
.
when 2.
w_record-KTOKK = wa_file-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_record-KTOKK
IMPORTING
OUTPUT = w_record-KTOKK.
when 3.
w_record-ANRED = wa_file-value.
when 4.
w_record-NAME1 = wa_file-value.
when 5.
w_record-SORTL = wa_file-value.
when 6.
w_record-LAND1 = wa_file-value.
endcase.
at end of row.
append w_record to i_record.
clear w_record.
endat.
endloop.
perform open_group.
LOOP AT I_RECORD INTO W_RECORD.
*do.
CLEAR : I_BDCDATA[].
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
w_record-lifnr.
perform bdc_field using 'RF02K-KTOKK'
w_record-ktokk.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-LAND1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-ANRED'
w_record-ANRED.
perform bdc_field using 'LFA1-NAME1'
w_record-name1.
perform bdc_field using 'LFA1-SORTL'
w_record-sortl.
perform bdc_field using 'LFA1-LAND1'
w_record-land1.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0380'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XK01'.
clear : w_record.
ENDLOOP.
perform close_group.
FORM OPEN_GROUP.
GROUP = 'RAVINDRA_SESS'.
USER = SY-UNAME.
KEEP = 'X'.
*HOLDDATE = ''.
* open batchinput group
CALL FUNCTION 'BDC_OPEN_GROUP'
EXPORTING CLIENT = SY-MANDT
GROUP = GROUP
USER = USER
KEEP = KEEP.
* HOLDDATE = HOLDDATE.
WRITE: /(30) 'BDC_OPEN_GROUP'(I02),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDFORM.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR W_BDCDATA.
W_BDCDATA-PROGRAM = PROGRAM.
W_BDCDATA-DYNPRO = DYNPRO.
W_BDCDATA-DYNBEGIN = 'X'.
APPEND W_BDCDATA TO I_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
* IF FVAL <> NODATA.
CLEAR W_BDCDATA.
W_BDCDATA-FNAM = FNAM.
W_BDCDATA-FVAL = FVAL.
APPEND W_BDCDATA TO I_BDCDATA.
* ENDIF.
ENDFORM.
FORM BDC_TRANSACTION USING TCODE.
CALL FUNCTION 'BDC_INSERT'
EXPORTING TCODE = TCODE
TABLES DYNPROTAB = I_BDCDATA.
ENDFORM.
FORM CLOSE_GROUP.
* close batchinput group
CALL FUNCTION 'BDC_CLOSE_GROUP'.
WRITE: /(30) 'BDC_CLOSE_GROUP'(I04),
(12) 'returncode:'(I05),
SY-SUBRC.
ENDFORM.
BDC using Call Transaction method.
* data element: LIF16
LIFNR TYPE LIFNR,
* data element: KTOKK
KTOKK TYPE KTOKK,
* data element: ANRED
ANRED TYPE ANRED,
* data element: NAME1_GP
NAME1 TYPE NAME1,
* data element: SORTL
SORTL TYPE SORTL,
* data element: LAND1_GP
LAND1 TYPE LAND1,
end of ty_record.
w_record type ty_record.
DATA : I_BDCDATA TYPE TABLE OF BDCDATA,
W_BDCDATA TYPE BDCDATA.
DATA: I_MESSTAB TYPE TABLE OF BDCMSGCOLL,
W_MESSTAB TYPE BDCMSGCOLL.
DATA : IT_FILE type table of ALSMEX_TABLINE, "if data is brought from Excel sheet
wa_file type ALSMEX_TABLINE. "if data is brought from Excel sheet
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = 'C:\Users\mouriuser54\Desktop\Ravi_XK01_INPUTDATA.XLSX'
I_BEGIN_COL = '1'
I_BEGIN_ROW = '1'
I_END_COL = '6'
I_END_ROW = '10'
TABLES
INTERN = IT_FILE
* EXCEPTIONS
* INCONSISTENT_PARAMETERS = 1
* UPLOAD_OLE = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
loop at it_file into wa_file.
case wa_file-col.
when 1.
w_record-LIFNR = wa_file-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_record-LIFNR
IMPORTING
OUTPUT = w_record-LIFNR
.
when 2.
w_record-KTOKK = wa_file-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = w_record-KTOKK
IMPORTING
OUTPUT = w_record-KTOKK.
when 3.
w_record-ANRED = wa_file-value.
when 4.
w_record-NAME1 = wa_file-value.
when 5.
w_record-SORTL = wa_file-value.
when 6.
w_record-LAND1 = wa_file-value.
endcase.
at end of row.
append w_record to i_record.
clear w_record.
endat.
endloop.
* EXPORTING
* FILENAME = 'C:\Users\mouriuser54\Desktop\Ravi_XK01.TXT'
* FILETYPE = 'ASC'
* HAS_FIELD_SEPARATOR = 'X'
** HEADER_LENGTH = 0
** READ_BY_LINE = 'X'
** DAT_MODE = ' '
** CODEPAGE = ' '
** IGNORE_CERR = ABAP_TRUE
** REPLACEMENT = '#'
** CHECK_BOM = ' '
** VIRUS_SCAN_PROFILE =
** NO_AUTH_CHECK = ' '
** IMPORTING
** FILELENGTH =
** HEADER =
* TABLES
* DATA_TAB = i_record[]
* EXCEPTIONS
* FILE_OPEN_ERROR = 1
* FILE_READ_ERROR = 2
* NO_BATCH = 3
* GUI_REFUSE_FILETRANSFER = 4
* INVALID_TYPE = 5
* NO_AUTHORITY = 6
* UNKNOWN_ERROR = 7
* BAD_DATA_FORMAT = 8
* HEADER_NOT_ALLOWED = 9
* SEPARATOR_NOT_ALLOWED = 10
* HEADER_TOO_LONG = 11
* UNKNOWN_DP_ERROR = 12
* ACCESS_DENIED = 13
* DP_OUT_OF_MEMORY = 14
* DISK_FULL = 15
* DP_TIMEOUT = 16
* OTHERS = 17
* .
*IF SY-SUBRC <> 0.
** MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
** WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*do.
CLEAR : I_BDCDATA[].
*read dataset dataset into record.
*if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMF02K' '0100'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
W_RECORD-LIFNR.
perform bdc_field using 'RF02K-KTOKK'
W_RECORD-KTOKK.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-LAND1'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'LFA1-ANRED'
W_RECORD-ANRED.
perform bdc_field using 'LFA1-NAME1'
W_RECORD-NAME1.
perform bdc_field using 'LFA1-SORTL'
W_RECORD-SORTL.
perform bdc_field using 'LFA1-LAND1'
W_RECORD-LAND1.
perform bdc_dynpro using 'SAPMF02K' '0120'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-KUNNR'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPMF02K' '0130'.
perform bdc_field using 'BDC_CURSOR'
'LFBK-BANKS(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_dynpro using 'SAPMF02K' '0380'.
perform bdc_field using 'BDC_CURSOR'
'KNVK-NAMEV(01)'.
perform bdc_field using 'BDC_OKCODE'
'=ENTR'.
perform bdc_transaction using 'XK01'.
CLEAR : W_RECORD.
ENDLOOP.
CLEAR W_BDCDATA.
W_BDCDATA-PROGRAM = PROGRAM.
W_BDCDATA-DYNPRO = DYNPRO.
W_BDCDATA-DYNBEGIN = 'X'.
APPEND W_BDCDATA TO I_BDCDATA.
CLEAR W_BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
* IF FVAL <> NODATA.
CLEAR W_BDCDATA.
W_BDCDATA-FNAM = FNAM.
W_BDCDATA-FVAL = FVAL.
APPEND W_BDCDATA TO I_BDCDATA.
CLEAR W_BDCDATA.
* ENDIF.
ENDFORM.
FORM BDC_TRANSACTION USING TCODE.
CALL TRANSACTION TCODE USING I_BDCDATA
MODE 'N'"CTUMODE'
UPDATE 'S'"CUPDATE
MESSAGES INTO I_MESSTAB.
ENDFORM.
Wednesday, May 18, 2011
ALV HIERARCHICAL List Display
*& Report ZDEMO_ALVHIER
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDEMO_ALVHIER.
INCLUDE zdemo_alv_top.
START-OF-SELECTION.
PERFORM read_data.
PERFORM fill_key_info.
PERFORM fill_field_catalog using 'it_vbak' 'VBAK'.
PERFORM fill_field_catalog using 'it_vbap' 'VBAP'.
PERFORM display_heirseq_alv.
FORM read_data.
SELECT * INTO TABLE it_vbak from VBAK UP TO 10 ROWS.
if not it_vbak is INITIAL.
SELECT * INTO TABLE it_vbap FROM VBAP FOR ALL ENTRIES IN it_vbak WHERE vbeln = it_vbak-vbeln.
ENDIF.
ENDFORM.
FORM fill_field_catalog USING fp_tabnam TYPE c fp_structure TYPE c.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-cprog
I_INTERNAL_TABNAME = fp_tabnam
I_STRUCTURE_NAME = fp_structure
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = it_fieldcat
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
FORM fill_key_info.
CLEAR gs_keyinfo.
gs_keyinfo-header01 = 'VBELN'.
gs_keyinfo-item01 = 'VBELN'.
gs_keyinfo-header02 = SPACE.
gs_keyinfo-item02 = 'POSNR'.
ENDFORM.
FORM display_heirseq_alv.
CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
I_CALLBACK_PROGRAM = SY-CPROG
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IS_LAYOUT =
IT_FIELDCAT = it_fieldcat
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
* IT_EVENTS =
* IT_EVENT_EXIT =
I_TABNAME_HEADER = 'it_vbak'
I_TABNAME_ITEM = 'it_vbap'
* I_STRUCTURE_NAME_HEADER =
* I_STRUCTURE_NAME_ITEM =
IS_KEYINFO = gs_keyinfo
* IS_PRINT =
* IS_REPREP_ID =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
* IR_SALV_HIERSEQ_ADAPTER =
* IT_EXCEPT_QINFO =
* I_SUPPRESS_EMPTY_DATA = ABAP_FALSE
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB_HEADER = it_vbak
T_OUTTAB_ITEM = it_vbap
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
ALV Block List
*& Report ZDEMO_ALVBLOCK
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDEMO_ALVBLOCK.
INCLUDE zdemo_alv_top.
sTART-OF-SELECTION.
list_layout-colwidth_optimize = 'X'.
PERFORM read_data.
end-of-SELECTION.
PERFORM initalize_alv_block.
PERFORM fill_field_catalog using 'IT_T001' 'T001'.
PERFORM append_data_to_alv_block USING 'IT_T001' IT_T001.
REFRESH it_fieldcat.
PERFORM fill_field_catalog using 'IT_KNB1' 'KNB1'.
PERFORM append_data_to_alv_block USING 'IT_KNB1' IT_KNB1.
PERFORM display_blocked_alv.
FORM initalize_alv_block.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = sy-cprog
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* IT_EXCLUDING =
.
ENDFORM.
FORM fill_field_catalog USING fp_itab TYPE c fp_structure TYPE c.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = sy-cprog
I_INTERNAL_TABNAME = fp_itab
I_STRUCTURE_NAME = fp_structure
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_INCLNAME =
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = it_fieldcat
* EXCEPTIONS
* INCONSISTENT_INTERFACE = 1
* PROGRAM_ERROR = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
FORM read_data.
SELECT * INTO TABLE it_t001 from t001 UP TO 10 ROWS.
if not it_t001 is INITIAL.
SELECT * INTO TABLE it_knb1 FROM knb1 FOR ALL ENTRIES IN it_t001 WHERE bukrs = it_t001-bukrs.
ENDIF.
ENDFORM.
FORM append_data_to_alv_block USING fp_tnam TYPE c fp_data TYPE STANDARD TABLE.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = list_layout
IT_FIELDCAT = it_fieldcat
I_TABNAME = fp_tnam
IT_EVENTS = it_events
* IT_SORT =
* I_TEXT = ' '
TABLES
T_OUTTAB = fp_data
* EXCEPTIONS
* PROGRAM_ERROR = 1
* MAXIMUM_OF_APPENDS_REACHED = 2
* OTHERS = 3
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
FORM display_blocked_alv.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
* EXPORTING
* I_INTERFACE_CHECK = ' '
* IS_PRINT =
* I_SCREEN_START_COLUMN = 0
* I_SCREEN_START_LINE = 0
* I_SCREEN_END_COLUMN = 0
* I_SCREEN_END_LINE = 0
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
* EXCEPTIONS
* PROGRAM_ERROR = 1
* OTHERS = 2
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
Simple ALV List Display Interactive
ALV TOP
DATA: IT_EKKO LIKE TABLE OF EKKO WITH HEADER LINE,
WA_EKKO LIKE EKKO,
IT_EKPO LIKE TABLE OF EKPO WITH HEADER LINE,
it_csks LIKE TABLE OF csks,
IT_EVENTS TYPE SLIS_T_EVENT,
WA_EVENTS TYPE SLIS_ALV_EVENT,
IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_T001 LIKE TABLE OF T001,
IT_KNB1 LIKE TABLE OF KNB1,
LIST_LAYOUT TYPE SLIS_LAYOUT_ALV,
GS_KEYINFO TYPE SLIS_KEYINFO_ALV.
DATA IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
data : it_vbak type table of vbak,
it_vbap type table of vbap.