on 09-08-2015 8:23 AM
Hi Friends,
I would like to call standard report with the submit statement in my custom report.
T-Code: KOB1
Custom code in my report:
LOOP AT gt_output ASSIGNING <output>.
rspar_line-selname = 'AUFNR'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'EQ'.
rspar_line-low = <output>-aufnr.
APPEND rspar_line TO rspar_tab.
CLEAR rspar_line.
ENDLOOP.
rspar_line-selname = 'BUDAT'.
rspar_line-kind = 'S'.
rspar_line-sign = 'I'.
rspar_line-option = 'BT'.
rspar_line-low = ss_erdat-low.
rspar_line-high = ss_erdat-high.
APPEND rspar_line TO rspar_tab.
SUBMIT RKAEP000 WITH SELECTION-TABLE rspar_tab
WITH P_DISVAR = '1SAP' " layout
WITH P_MAXSEL = 100000 " max rows
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH P_TCODE EQ 'KOB1'
USING SELECTION-SCREEN 110
AND RETURN.
If I run KOB1 T-code with selection parameters and then above submit program is working fine, If I try directly submit program with-out running KOB1 then its not returning any output.
Please let me know do need to pass any more parameters to the submit statement.
Hi,
I would like to know why you want to ignore the TCode
there are many tcodes
WITH P_TCODE = 'KOB1'
WITH P_TCODE = 'KSB5'
WITH P_TCODE = 'KSB1'
so, if you try to run this program RKAEP000 in Se38 directly you will get error, so you need absolute a tcode.
So it means, you have to define the Tcode.
Regards
Ibrahim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have placed like below, still I am not getting data,
SUBMIT RKAEP000 WITH SELECTION-TABLE rspar_tab
WITH p_disvar = '1SAP'
WITH p_maxsel = 5000 " 100000
WITH p_tcode = 'KOB1'
WITH p_kokrs = '1000'
WITH p_usedb = 'X'
WITH p_usegrd = 'X'
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
USING SELECTION-SCREEN 110
AND RETURN.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you are not passing enough parameters through your submit statement. Definetly you need to send P_KOKRS.
If you go to se38 for this program and do a where-used list you can find many SAP examples where they do a submit to this report.
For example /KYK/S_KOB1:
SUBMIT rkaep000 AND RETURN
WITH p_tcode = 'KOB1'
WITH p_kokrs = p_kokrs
WITH aufnr IN s_aufnr
with kstar in s_kstar
with aufgr = p_aufgr
with koagr = p_koagr
WITH r_budat BETWEEN s_pdate-low and s_pdate-high
WITH p_usedb = 'X'
WITH p_usear = ' '
with g_tname in r_tname
with g_values in r_values
WITH p_arobj = 'CO_ITEM'.
Compare these to yours. First thing i note is that they all send KOKRS and this has to be there because it is in the popup.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi.
If you launch with SUBMIT, your TCODE will be something like SE38 and not KOB1.
Report RKAEP000 initialize KOB1 through transaction_init FORM. So your solution could be a batch input through SM35.
Hope to help
Bye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am passing 'KOB1' to P_TCODE parameter, so it will not check sy-tcode.
Below scenario is working:
Run KOB1 see the results, come out run custom program then working fine....
Is there any additional parameters will be set by KOB1.
SUBMIT RKAEP000 WITH SELECTION-TABLE rspar_tab
WITH p_disvar = '1SAP'
WITH p_maxsel = 5000 " 100000
WITH p_tcode = 'KOB1'
WITH p_kokrs = '1000'
WITH p_usedb = 'X'
WITH p_usegrd = 'X'
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
USING SELECTION-SCREEN 110
AND RETURN.
Thanks,
Prasad.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.