2019 Aug 19 11:38 AM
Hi Experts,
We are unable display the data using Submit program Could you please help me ASAP.
Program:GP4QLQKH46VZJ3P1A40A23S3HJG100
sample code: Submit GP4QLQKH46VZJ3P1A40A23S3HJG100 WITH $1KOKRE EQ p_kokrs
WITH $1GJAHR EQ p_gjhar
WITH $1PERIV EQ '1'
WITH $1PERIB EQ '9'
WITH $1VERP EQ '0'
WITH $1KOSET EQ 'GFGGNX'
WITH $1KSTAR EQ 'NCPR'
EXPORTING LIST TO MEMORY AND RETURN.
Thank you,
Naresh.V
Please use the COMMENT button, ANSWER is only for solutions. As SAP says at the right of the answer area:
You should only submit an answer when you are proposing a solution to the poster's problem.
2019 Aug 19 12:01 PM
Don't use submit for this kind of reports, but use the Report/Report Interface , small sample:
* sender, current programm
CLEAR gs_sender.
gs_sender-rtool = 'RT'.
gs_sender-rappl = space.
gs_sender-rsubc = space.
gs_sender-ronam = sy-repid.
* receiver (check transaction definition)
CLEAR gs_receiver. " Define receiver: RONAM syntax depends on RTOOL/RAPPL
gs_receiver-rtool = 'RW'.
gs_receiver-ronam = 'ISIP'.
* Build criteria field list and corresponding selection values
" from you requirement
" KOKRS, KOSTL, etc.
* handle call stack
CALL FUNCTION 'RSTI_APPL_STACK_POP'
IMPORTING
i_rec = gs_sender
EXCEPTIONS
appl_stack_not_initialized = 1.
IF sy-subrc <> 0.
CALL FUNCTION 'RSTI_APPL_STACK_INITIALIZE'
EXPORTING
e_appl = gs_sender-rappl
e_subc = gs_sender-rsubc
e_tool = gs_sender-rtool
e_onam = gs_sender-ronam.
ENDIF.
* call report via report-report-interface
CALL FUNCTION 'RSTI_SELECTION_EXPORT'
TABLES
it_sel = gt_sel
it_fields = gt_fields.
CALL FUNCTION 'RSTI_COMMUNICATION_HANDLER'
EXPORTING
e_rexec = 'X'
e_fccls = '9'
e_rec = gs_receiver
EXCEPTIONS
appl_stack_not_initialized = 1
no_lines = 2
no_line_picked = 3
OTHERS = 4.
2019 Aug 20 8:18 PM
Hi Raymond,
As per your request I modified code as per below ,but here I am getting only first page records, but I want to get all cost center data ,but now I am getting only first page records.


I want to get all cost center list, please refer below screen shot ,how to do it ? please check my code as well. please do needful.

Thanks & Regards
Naresh
2019 Aug 21 7:51 AM
2019 Aug 19 3:38 PM
Good Day Raymond,
Highly Appreciated for your quick reply. I want to explain more details about my requirement.
Step 1-Standard T-Code - S_ALR_87013611
Standard Report program -GP4QLQKH46VZJ3P1A40A23S3HJG100
Once user executed the report with below parameters-

Out put will display like as below-
so, Here I want to get each cost center list and cost center cost elements ,over/under absorption and all cost center elements details in table data format .once I received this data I can use in some other zprogram ,based on that I will do other calculation part by using standard cost center list data.
For this I have implemented logic as like as below, so Could you please check my below logic and do needful.
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S32 { color: #3399FF; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }
DATA ls_dfies TYPE dfies.
DATA ld_lfieldname TYPE fnam_____4.
DATA ld_tablename TYPE tabname.
DATA:gs_sender TYPE rstirec.
DATA:gs_receiver TYPE rstirec.
DATA:gt_sel TYPE TABLE OF rstisel.
DATA:gs_sel TYPE rstisel.
DATA:gt_fields TYPE TABLE OF rstifields.
DATA:gs_fields TYPE rstifields.
DATA lt_selections TYPE STANDARD TABLE OF rsparams.
DATA ls_selections TYPE rsparams.
DATA lt_selpars TYPE STANDARD TABLE OF rsel_paras.
DATA ls_selpars TYPE rsel_paras.
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
curr_report = 'GP4QLQKH46VZJ3P1A40A23S3HJG100'
TABLES
selection_table = lt_selections
EXCEPTIONS
OTHERS = 0.
CLEAR gs_sender.
gs_sender-rtool = 'RT'.
gs_sender-rappl = space.
gs_sender-rsubc = space.
gs_sender-ronam = 'GP4QLQKH46VZJ3P1A40A23S3HJG100'.
* receiver (check transaction definition)
CLEAR gs_receiver. " Define receiver: RONAM syntax depends on RTOOL/RAPPL
gs_receiver-rtool = 'RW'.
gs_receiver-ronam = 'ISIP'.
gs_sel-field = '$1KOKRE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '2019'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1GJAHR'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '2019'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1GJAHR'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '2019'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1KOKRE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '1000'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1KOSET'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = 'ENGG'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1KOSET'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '01011000ENGG'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1PERIB'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '12'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1PERIB'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '12'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1PERIV'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '1'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1PERIV'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '1'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1VALUTP'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1VALUTP'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '$1VERP'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = '%1VERP'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'MT-DATE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'OUT_DEVI'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'OUT_FORM'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'PECCDATE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'PSCCDATE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'RC_MODE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'STAT'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = 'X'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VALDATE'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VALPERIO'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '0'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VARF0101'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '1'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VART0101'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = '1'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VARV0101'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = 'X'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VAR_DEF'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = 'X'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_sel-field = 'VAR_VAL'.
gs_sel-sign = 'I'.
gs_sel-option = 'EQ'.
gs_sel-low = 'X'.
APPEND gs_sel TO gt_sel.
CLEAR:gs_sel.
gs_fields-field = '$1KOKRE'.
gs_fields-rfield = '$1KOKRE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'CACCD'.
gs_fields-rollname = '$1KOKRE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '%1KOKRE'.
gs_fields-rfield = '%1KOKRE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'CACCD'.
gs_fields-rollname = '%1KOKRE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '$1GJAHR'.
gs_fields-rfield = '$1GJAHR'.
gs_fields-kind = 'P'.
gs_fields-domname = 'GJAHR'.
gs_fields-rollname = '$1GJAHR'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '%1GJAHR'.
gs_fields-rfield = '%1GJAHR'.
gs_fields-kind = 'P'.
gs_fields-domname = 'GJAHR'.
gs_fields-rollname = '%1GJAHR'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '%1KOKRE'.
gs_fields-rfield = '%1KOKRE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'CACCD'.
gs_fields-rollname = '%1KOKRE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '$1KOKRE'.
gs_fields-rfield = '$1KOKRE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'CACCD'.
gs_fields-rollname = '$1KOKRE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '$1KOSET'.
gs_fields-rfield = '$1KOSET'.
gs_fields-kind = 'P'.
gs_fields-domname = 'GRPNAME'.
gs_fields-rollname = '$1KOSET'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '%1KOSET'.
gs_fields-rfield = '%1KOSET'.
gs_fields-kind = 'P'.
gs_fields-domname = 'GRPNAME'.
gs_fields-rollname = '%1KOSET'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '$1PERIB'.
gs_fields-rfield = '$1PERIB'.
gs_fields-kind = 'P'.
gs_fields-domname = 'PERBL'.
gs_fields-rollname = '$1PERIB'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields .
gs_fields-field = '%1PERIB'.
gs_fields-rfield = '%1PERIB'.
gs_fields-kind = 'P'.
gs_fields-domname = 'PERBL'.
gs_fields-rollname = '%1PERIB'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '$1PERIV'.
gs_fields-rfield = '$1PERIV'.
gs_fields-kind = 'P'.
gs_fields-domname = 'PERBL'.
gs_fields-rollname = '$1PERIV'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '%1PERIV'.
gs_fields-rfield = '%1PERIV'.
gs_fields-kind = 'P'.
gs_fields-domname = 'PERBL'.
gs_fields-rollname = '%1PERIV'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '%1VALUTP'.
gs_fields-rfield = '%1VALUTP'.
gs_fields-kind = 'P'.
gs_fields-domname = 'VALUTYP'.
gs_fields-rollname = '%1VALUTP'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '$1VALUTP'.
gs_fields-rfield = '$1VALUTP'.
gs_fields-kind = 'P'.
gs_fields-domname = 'VALUTYP'.
gs_fields-rollname = '$1VALUTP'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '$1VERP'.
gs_fields-rfield = '$1VERP'.
gs_fields-kind = 'P'.
gs_fields-domname = '$1VERP'.
gs_fields-rollname = '$1VERP'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = '%1VERP'.
gs_fields-rfield = '%1VERP'.
gs_fields-kind = 'P'.
gs_fields-domname = 'COVERSI'.
gs_fields-rollname = '%1VERP'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'MT-DATE'.
gs_fields-rfield = 'MT-DATE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'DATUM'.
gs_fields-rollname = 'MT-DATE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'OUT_DEVI'.
gs_fields-rfield = 'OUT_DEVI'.
gs_fields-kind = 'P'.
gs_fields-domname = 'OUT_DEVI'.
gs_fields-rollname = 'OUT_DEVI'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'OUT_FORM'.
gs_fields-rfield = 'OUT_FORM'.
gs_fields-kind = 'P'.
gs_fields-domname = 'OUT_FORM'.
gs_fields-rollname = 'OUT_FORM'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'PECCDATE'.
gs_fields-rfield = 'PECCDATE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'SYDATS'.
gs_fields-rollname = 'PECCDATE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'PSCCDATE'.
gs_fields-rfield = 'PSCCDATE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'SYDATS'.
gs_fields-rollname = 'PSCCDATE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'RC_MOD'.
gs_fields-rfield = 'RC_MOD'.
gs_fields-kind = 'P'.
gs_fields-domname = 'RC_MOD'.
gs_fields-rollname = 'RC_MOD'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'STAT'.
gs_fields-rfield = 'STAT'.
gs_fields-kind = 'P'.
gs_fields-domname = 'GR_STAT_A'.
gs_fields-rollname = 'STAT'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VALDATE'.
gs_fields-rfield = 'VALDATE'.
gs_fields-kind = 'P'.
gs_fields-domname = 'SYDATS'.
gs_fields-rollname = 'VALDATE'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VALPERIO'.
gs_fields-rfield = 'VALPERIO'.
gs_fields-kind = 'P'.
gs_fields-domname = 'NUM03'.
gs_fields-rollname = 'VALPERIO'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VARF0101'.
gs_fields-rfield = 'VARF0101'.
gs_fields-kind = 'P'.
gs_fields-domname = 'RW_LEVEL'.
gs_fields-rollname = 'VARF0101'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VART0101'.
gs_fields-rfield = 'VART0101'.
gs_fields-kind = 'P'.
gs_fields-domname = 'NUMC2'.
gs_fields-rollname = 'VART0101'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VARV0101'.
gs_fields-rfield = 'VARV0101'.
gs_fields-kind = 'P'.
gs_fields-domname = 'XFELD'.
gs_fields-rollname = 'VARV0101'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VAR_DEF'.
gs_fields-rfield = 'VAR_DEF'.
gs_fields-kind = 'P'.
gs_fields-domname = 'VAR_DEF'.
gs_fields-rollname = 'VAR_DEF'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
gs_fields-field = 'VAR_VAL'.
gs_fields-rfield = 'VAR_VAL'.
gs_fields-kind = 'P'.
gs_fields-domname = 'VAR_VAL'.
gs_fields-rollname = 'VAR_VAL'.
APPEND gs_fields TO gt_fields.
CLEAR: gs_fields.
* Build criteria field list and corresponding selection values
" from you requirement
" KOKRS, KOSTL, etc.
* handle call stack
CALL FUNCTION 'RSTI_APPL_STACK_POP'
IMPORTING
i_rec = gs_sender
EXCEPTIONS
appl_stack_not_initialized = 1.
IF sy-subrc <> 0.
CALL FUNCTION 'RSTI_APPL_STACK_INITIALIZE'
EXPORTING
e_appl = gs_sender-rappl
e_subc = gs_sender-rsubc
e_tool = gs_sender-rtool
e_onam = gs_sender-ronam.
ENDIF.
* call report via report-report-interface
CALL FUNCTION 'RSTI_SELECTION_EXPORT'
TABLES
it_sel = gt_sel
it_fields = gt_fields.
CALL FUNCTION 'RSTI_COMMUNICATION_HANDLER'
EXPORTING
e_rexec = 'X'
e_fccls = '9'
e_rec = gs_receiver
EXCEPTIONS
appl_stack_not_initialized = 1
no_lines = 2
no_line_picked = 3
OTHERS = 4.
Thanks & Regards
Naresh
2019 Aug 20 1:05 AM
2019 Aug 19 8:05 PM
Hi Raymond,
Much appreciated .Could you please help here ,This is not working .Still I am looking help .
Thanks & Regards
Naresh
2019 Aug 20 6:21 AM
Please use the COMMENT button, ANSWER is only for solutions. As SAP says at the right of the answer area:
You should only submit an answer when you are proposing a solution to the poster's problem.
2019 Aug 20 12:10 PM
Still I am looking help here, please do needful? And is there any other way to get S_ALR_87013611 transaction details in to internal table ?and is it related to any query program ? please suggest any other approach?
Thanks & Regards
Naresh
2025 Mar 19 7:17 AM
Hi Naresh,
Please add below given piece of code:
wa_selection-selname = 'OUT_APPD'.
wa_selection-kind = 'P'. "S-Select-options P-Parameters
wa_selection-sign = 'I'.
wa_selection-option = 'EQ'.
wa_selection-low = abap_true.
APPEND wa_selection TO it_selection.
CLEAR: wa_selection.
Also please check this link: https://me.sap.com/notes/0002974084
Hopefully you will get all the cost center details. It worked for me.
Thanks,
2019 Aug 20 5:48 AM
2020 May 28 8:20 AM
Hi Naresh,
Did you get any solution for it i have the same requirement, wherein i'm able to populate the values on selection for S_ALR_87013611 via submit, but when i execute the report, it keeps on running of longtime and doesn't return back to calling program. Any help would be really appreciated.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |