on 2025 Feb 13 8:54 PM
Hi guys
I'm using submit to get data from FBL3n and put it in an internal table. The problem is: When I execute submit it's displaying the fbl3n selection screen and I don't want that, see my code:
FORM f_get_and_fill_data .
FIELD-SYMBOLS: <fs_t_data> TYPE ANY TABLE,
<fs_s_data> TYPE any,
<fs_x_whs> TYPE any,
<fs_saida> TYPE ty_saida.
DATA: lf_ref TYPE REF TO data,
lt_texpr TYPE rsds_texpr.
" ********************************************************************
" Chamada da Transação FBL3N
" ********************************************************************
" Ativa exportação de dados do ALV
cl_salv_bs_runtime_info=>set(
EXPORTING display = abap_false
metadata = abap_true
data = abap_true ).
* SUBMIT zrsd242
* WITH FREE SELECTIONS lt_texpr
* WITH p_bukrs EQ p_bukrs
* WITH s_branch IN s_branch
* WITH s_docnum IN s_docnum
* WITH s_docdat IN s_docdat
* WITH s_oper IN s_oper
* WITH s_cat_nf IN s_cat_nf
* WITH p_j1b1n EQ abap_false
* WITH p_zt082 EQ abap_false
* WITH p_dois EQ abap_true
* WITH r_detail EQ abap_true
* WITH r_sintet EQ abap_false
* USING SELECTION-SCREEN 1000 AND
* RETURN EXPORTING LIST TO MEMORY.
SUBMIT rfitemgl
WITH FREE SELECTIONS lt_texpr
WITH p_SAKNR IN p_SAKNR
WITH p_wlbuk IN p_wlbuk
WITH p_budat IN p_budat
WITH x_opsel EQ abap_false
WITH x_clsel EQ abap_false
WITH x_aisel EQ abap_true
WITH x_norm EQ abap_true
* WITH pa_vari EQ '/OES_EXT'
USING SELECTION-SCREEN 1000 AND
RETURN EXPORTING LIST TO MEMORY.
" ********************************************************************
" Recupera tabela ALV
" ********************************************************************
TRY.
cl_salv_bs_runtime_info=>get_data_ref( IMPORTING r_data = lf_ref ).
ASSIGN lf_ref->* TO <fs_t_data>.
CATCH cx_salv_bs_sc_runtime_info.
MESSAGE 'Erro ao recuperar dados do ALV - zt0388' TYPE 'E'.
ENDTRY.
cl_salv_bs_runtime_info=>clear_all( ).
IF <fs_t_data>[] IS ASSIGNED.
IF NOT <fs_t_data> IS INITIAL.
LOOP AT <fs_t_data> ASSIGNING <fs_s_data>.
MOVE-CORRESPONDING <fs_s_data> TO gs_saida.
gs_saida-datum = sy-datum.
gs_saida-uzeit = sy-uzeit.
APPEND gs_saida TO gt_saida.
ENDLOOP.
ELSE.
MESSAGE text-e01 TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
ELSE.
MESSAGE text-e01 TYPE 'S' DISPLAY LIKE 'E'.
LEAVE LIST-PROCESSING.
ENDIF.
Request clarification before answering.
You didn't use VIA SELECTION-SCREEN, so it should only be displayed if some mandatory parameters are missing, or wrong values trigering error message,
Also, EXPORTING LIST TO MEMORY shouldn't be required if the line items are displayed in an ALV grid, consider setting PARAMETER ID 'FIT_ALVC' for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.