Reputation: 19
I'm trying to run the standard report S_ALR_87013611
in my ABAP program using submit
to get the data in an internal table, but after the submit
command the report is displayed in Report Painter format and data is not returned.
I tried different approaches to submit the report without getting output but all attempts were not successful.
I expect suggestions or recommendations to achieve the objective.
REPORT zz_costcenter_3611.
TABLES: csks, cska.
DATA: go_data TYPE REF TO data.
FIELD-SYMBOLS: <gt_data> TYPE ANY TABLE.
PARAMETERS: pkokrs TYPE kokrs OBLIGATORY DEFAULT '1000', "Company Code
pgjahr TYPE gjahr OBLIGATORY , " Fiscal Year
pperbl_f TYPE perbl, " period low
pperbl_t TYPE perbl, "period high
pversn TYPE versn OBLIGATORY DEFAULT '0'. "plan version
PARAMETERS: pksgru TYPE ksgru. "cost center Group
PARAMETERS: p_kostl TYPE csks-kostl NO-DISPLAY.
SELECT-OPTIONS: so_kostl FOR p_kostl.
PARAMETERS: pkagru TYPE kagru. "Cost element group
PARAMETERS: p_kstar TYPE cska-kstar NO-DISPLAY.
SELECT-OPTIONS: so_kstar FOR p_kstar.
START-OF-SELECTION.
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_false
metadata = abap_false
data = abap_true ).
SUBMIT gp4qlqkh46vzj3p1a40a23s3hjg300
WITH $1kokre EQ pkokrs
WITH $1gjahr EQ pgjahr
WITH $1periv EQ pperbl_f
WITH $1perib EQ pperbl_t
WITH $1verp EQ pversn
WITH $1koset EQ pksgru
WITH _1koset IN so_kostl
WITH $1kstar EQ pkagru
WITH _1kstar IN so_kstar
AND RETURN.
TRY.
cl_salv_bs_runtime_info=>get_data_ref(
IMPORTING r_data = go_data ).
ASSIGN go_data->* TO <gt_data>.
CATCH cx_salv_bs_sc_runtime_info ##NO_HANDLER.
MESSAGE 'Unable to retrieve ALV data' TYPE 'E'.
ENDTRY.
Upvotes: 0
Views: 512
Reputation: 1
I agreed with Xavier it's not possible to catch the information from an internal table without export/import memory id.
Upvotes: 0