cancel
Showing results for 
Search instead for 
Did you mean: 

Submit Program is not returning values

former_member205363
Contributor
0 Kudos

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.


Accepted Solutions (1)

Accepted Solutions (1)

former_member184158
Active Contributor
0 Kudos

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

Answers (4)

Answers (4)

former_member205363
Contributor
0 Kudos

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.



former_member205363
Contributor
0 Kudos

Hi Friends,

Thanks for your quick responses...

I just passed r_budat paramter in the submit statement, now its working fine.

Regards,

Prasad.

former_member184158
Active Contributor
0 Kudos

Hi,

so if you would like to take a look to this report "RKAEP000", you will see that you have to define at least one code.

I hope this info, could help you.

Regards

Ibrahim

former_member201275
Active Contributor
0 Kudos

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.

roberto_vacca2
Active Contributor
0 Kudos

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

former_member205363
Contributor
0 Kudos

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.