‎2009 Feb 08 11:19 AM
My report name is yer00268
i use this logic
SUBMIT YER00268 TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS v_loc_mstr_print_parms
WITH SELECTION-TABLE i_int_seltab
AND RETURN.
but it go in loop.
I want to executed only once and skip,
How this can be done.
Pls. Replay
BR,
Ali
‎2009 Feb 08 11:28 AM
Hi,
There can be many ways of doing it:
One of them could be like this:-
Step 1. In your program create a new parameter on the selection screen. like this
PARAMETERS p_batch NO-DISPLAY.
This parameter will not be displayed on the screen.
Step 2. Put your SUBMIT statement in an IF block. Like this
IF p_batch IS INITIAL.
Here before calling submit you should set the Parameter p_batch to 'X' in the selection table.
SUBMIT YER00268 TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS v_loc_mstr_print_parms
WITH SELECTION-TABLE i_int_seltab
AND RETURN.
ENDIF.
This will work I am sure.
Regards,
Prakash Pandey
‎2009 Feb 08 11:28 AM
Hi,
There can be many ways of doing it:
One of them could be like this:-
Step 1. In your program create a new parameter on the selection screen. like this
PARAMETERS p_batch NO-DISPLAY.
This parameter will not be displayed on the screen.
Step 2. Put your SUBMIT statement in an IF block. Like this
IF p_batch IS INITIAL.
Here before calling submit you should set the Parameter p_batch to 'X' in the selection table.
SUBMIT YER00268 TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS v_loc_mstr_print_parms
WITH SELECTION-TABLE i_int_seltab
AND RETURN.
ENDIF.
This will work I am sure.
Regards,
Prakash Pandey
‎2009 Feb 08 11:37 AM
hi Prakash Pandey
I am not using any selectio screen.
My code will be in FM
‎2009 Feb 08 12:00 PM
Hi,
I have just tested this and its working fine..... Please chek this out...
parameters :
p_cont type c no-display. " Continuation variable not
*displayed on the selection-screen.
if p_cont is initial.
SUBMIT YER00268 TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS v_loc_mstr_print_parms
WITH SELECTION-TABLE i_int_seltab
with p_cont EQ 'X'
AND RETURN.
endif.
Regards,
Siddarth
‎2009 Feb 08 12:26 PM
It is not wrong.
But i do not to execute the logic more than one.
Also, i will use the logic in side a FM.
and call that FM from Web Dynpro
‎2009 Feb 08 12:59 PM
Hi Ali,
If you are using an FM then use p_batch as an OPTIONA IMPORT parameter of the FM.
and rest all logic will remain same.
Regards,
Prakash Pandey
‎2009 Feb 08 1:07 PM
Alright,
in your function module write this query.
data w_cont type c.
Import w_cont to w_con from memory id CON.
if w_cont is inital.
w_cont = 'X'.
export w_cont to memory id CON.
SUBMIT YER00268 TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS v_loc_mstr_print_parms
WITH SELECTION-TABLE i_int_seltab
AND RETURN.
endif.
I think this should work and solve your problem
Regards,
Siddarth
‎2009 Feb 09 4:54 AM
Hi Siddharth Chordia
your answer is helpfull, but I ask me that the field CON is unkown.
‎2009 Feb 09 5:14 AM
H iAli,
I apologize for the mistake,
Please use the statements below, actually we should write CON within quotes 'CON'.
data w_cont type c.
Import w_cont to w_cont from memory id 'CON'.
if w_cont is inital.
w_cont = 'X'.
export w_cont to memory id 'CON'.
‎2009 Feb 08 11:30 AM
hi.
for looping only once do just like this.
loop at ................
do your work.
exit. " Exit from loop.
endloop.