Code: Alles auswählen.
*Declaration for FuBa LDB_PROCESS
DATA: g_it_callback TYPE TABLE OF ldbcb,
g_wa_callback LIKE LINE OF g_it_callback,
g_it_selscreen TYPE TABLE OF rsparams,
g_wa_selscreen LIKE LINE OF g_it_selscreen,
g_it_fsell TYPE rsfs_fields,
g_wa_ls_fieldselection LIKE LINE OF g_it_fsell,
g_wa_ls_fields LIKE LINE OF g_wa_ls_fieldselection-fields,
g_it_ldb_lo TYPE TABLE OF vtvbarw_dl,
g_wa_ldb_lo TYPE vtvbarw_dl,
Code: Alles auswählen.
*Fill Callback
REFRESH: g_it_callback.
g_wa_callback-ldbnode = 'POSITIONS'. "zu selektierender Knoten
g_wa_callback-get = 'X'.
g_wa_callback-get_late = ' '.
g_wa_callback-cb_prog = sy-repid.
g_wa_callback-cb_form = 'LDB_CALLBACK_LO'. "Name der Callback Routine
APPEND g_wa_callback TO g_it_callback.
CLEAR g_wa_callback.
*Fill Field-Selection
REFRESH: g_it_fsell, g_wa_ls_fieldselection-fields.
g_wa_ls_fields-line = 'BUKRS'.
APPEND g_wa_ls_fields TO g_wa_ls_fieldselection-fields.
g_wa_ls_fields-line = 'GSART'.
APPEND g_wa_ls_fields TO g_wa_ls_fieldselection-fields.
g_wa_ls_fields-line = 'SSTATI'.
APPEND g_wa_ls_fields TO g_wa_ls_fieldselection-fields.
g_wa_ls_fieldselection-tablename = 'POSITIONS'.
APPEND g_wa_ls_fieldselection TO g_it_fsell.
* Selectionscreen
**Key Date
CLEAR g_wa_selscreen.
g_wa_selscreen-selname = 'P_DAT'.
g_wa_selscreen-kind = 'P'.
g_wa_selscreen-sign = 'I'.
g_wa_selscreen-option = 'EQ'.
g_wa_selscreen-low = g_keydate.
APPEND g_wa_selscreen TO g_it_selscreen.
*Product Groups - Loans
CLEAR g_wa_selscreen.
g_wa_selscreen-selname = 'P_LO'.
g_wa_selscreen-kind = 'P'.
g_wa_selscreen-sign = 'I'.
g_wa_selscreen-option = 'EQ'.
g_wa_selscreen-low = 'X'.
APPEND g_wa_selscreen TO g_it_selscreen.
Code: Alles auswählen.
FORM ldb_callback_lo USING "#EC CALLED
u_positions TYPE ldbcb-ldbnode "#EC *
u_wa_ldb_lo TYPE vtvbarw_dl "#EC *
u_mode TYPE c "#EC *
u_selected TYPE c. "#EC *
APPEND u_wa_ldb_lo TO g_it_ldb_lo.
ENDFORM.
Code: Alles auswählen.
* call logical database
CALL FUNCTION 'LDB_PROCESS'
EXPORTING
ldbname = 'FTI_LO_POSITIONS'
field_selection = g_it_fsell[]
TABLES
callback = g_it_callback
selections = g_it_selscreen
EXCEPTIONS
ldb_not_reentrant = 1
ldb_incorrect = 2
ldb_already_running = 3
ldb_error = 4
ldb_selections_error = 5
ldb_selections_not_accepted = 6
variant_not_existent = 7
variant_obsolete = 8
variant_error = 9
free_selections_error = 10
callback_no_event = 11
callback_node_duplicate = 12
callback_no_program = 13
callback_no_cbform = 14
dyn_node_no_type = 15
dyn_node_invalid_type = 16
OTHERS = 17.
IF sy-subrc <> 0.
ENDIF.
Code: Alles auswählen.
*Declaration for FuBa LDB_PROCESS
DATA: lt_callback TYPE TABLE OF ldbcb,
ls_callback LIKE LINE OF lt_callback OCCURS 1 WITH HEADER LINE,
lt_selscreen TYPE TABLE OF rsparams,
ls_selscreen LIKE LINE OF lt_selscreen.
* Selectionscreen
**Key Date
ls_selscreen-selname = 'BUKRS'.
ls_selscreen-kind = 'S'.
ls_selscreen-sign = 'I'.
ls_selscreen-option = 'EQ'.
ls_selscreen-low = '5600'.
APPEND ls_selscreen TO lt_selscreen.
CLEAR ls_selscreen.
ls_selscreen-selname = 'ANLAGE'.
ls_selscreen-kind = 'S'.
ls_selscreen-sign = 'I'.
ls_selscreen-option = 'EQ'.
ls_selscreen-low = '3456'.
APPEND ls_selscreen TO lt_selscreen.
CLEAR ls_selscreen.
ls_selscreen-selname = 'BERDATUM'.
ls_selscreen-kind = 'S'.
ls_selscreen-sign = 'I'.
ls_selscreen-option = 'EQ'.
ls_selscreen-low = '20091231'.
APPEND ls_selscreen TO lt_selscreen.
CLEAR ls_selscreen.
ls_selscreen-selname = 'BEREICH1'.
ls_selscreen-kind = 'P'.
ls_selscreen-sign = 'I'.
ls_selscreen-option = 'EQ'.
ls_selscreen-low = '01'.
APPEND ls_selscreen TO lt_selscreen.
CLEAR ls_selscreen.
ls_selscreen-selname = 'XEINZEL'.
*ls_selscreen-kind = 'P'.
*ls_selscreen-sign = 'I'.
*ls_selscreen-option = 'EQ'.
ls_selscreen-low = 'X'.
APPEND ls_selscreen TO lt_selscreen.
CLEAR ls_selscreen.
*Callback
REFRESH: ls_callback.
ls_callback-ldbnode = 'ANLCV'.
ls_callback-get = 'X'.
ls_callback-cb_prog = '/LUR/ANDERNACH'.
ls_callback-cb_form = 'CB_GET_ANLCV'.
APPEND ls_callback TO lt_callback.
CLEAR ls_callback.
* call logical database
CALL FUNCTION 'LDB_PROCESS'
EXPORTING
ldbname = 'ADA'
* field_selection = g_it_fsell
TABLES
callback = lt_callback
selections = lt_selscreen
EXCEPTIONS
ldb_not_reentrant = 1
ldb_incorrect = 2
ldb_already_running = 3
ldb_error = 4
ldb_selections_error = 5
ldb_selections_not_accepted = 6
variant_not_existent = 7
variant_obsolete = 8
variant_error = 9
free_selections_error = 10
callback_no_event = 11
callback_node_duplicate = 12
callback_no_program = 13
callback_no_cbform = 14
dyn_node_no_type = 15
dyn_node_invalid_type = 16
OTHERS = 17.
IF sy-subrc <> 0.
ENDIF.
*&---------------------------------------------------------------------*
*& Form cb_get_anlcv
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->NAME text
* -->LS_BSIK text
* -->MODE text
* -->SELECTED text
*----------------------------------------------------------------------*
FORM cb_get_anlcv USING name LIKE ldbn-ldbnode
ls_anlcv LIKE anlcv
mode TYPE c
selected TYPE c.
ENDFORM. "cb_get_anlcv