‎2007 Apr 13 3:45 AM
Hi experts,
I will be using a dummy program that will call the report program. I need to bypass the selection screen & automatically mark a checkbox in the said selection screen of the report program. Thus when I execute the dummy program all I see is the report output only. How can I do this?
Many thanks.
‎2007 Apr 13 4:17 AM
Hi,
Check this code.
Here <b>zps_calling_report</b> is you dummy calling program.<b> z_called_report</b> is your actual program which gives output.
You can call the program using <b>SUBMIT</b> command with addition <b>SELECTION-TABLE</b> seltab. Table seltab is of type rsparams. See how the checkbox is set in calling program.
Let me know if you have any questiom.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*" This is your calling DUMMY program
REPORT zps_calling_report.
DATA : seltab LIKE rsparams OCCURS 0 WITH HEADER LINE.
SELTAB-SELNAME = 'P_BOX'.
SELTAB-KIND = 'P'.
SELTAB-SIGN = 'I'.
SELTAB-OPTION = 'EQ'.
SELTAB-LOW = 'X'.
APPEND SELTAB.
SUBMIT zps_called_report WITH SELECTION-TABLE seltab.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*
*" This is your called program which gives output.
REPORT zps_called_report.
PARAMETERS: p_box AS CHECKBOX.
*----------------------------------------------------------------------*
*----------------------------------------------------------------------*Regards,
RS
‎2007 Apr 13 4:36 AM
Try this :
set flags
IF u_jse IS NOT INITIAL.
l_flg_securities = 'X'.
ENDIF.
IF u_jlo IS NOT INITIAL.
l_flg_loans = 'X'.
ENDIF.
IF u_jotc IS NOT INITIAL.
l_flg_otc = 'X'.
ENDIF.
set keydate
l_keydate = u_date.
set ranges
l_wrk_range_val-sign = 'I'.
l_wrk_range_val-option = 'EQ'.
l_wrk_range_val-low = u_wa_out_tab-valuation_area.
APPEND l_wrk_range_val TO l_range_val.
l_ranges-valuation_area = l_range_val.
l_wrk_range_dea-sign = 'I'.
l_wrk_range_dea-option = 'EQ'.
l_wrk_range_dea-low = u_wa_out_tab-deal_number.
APPEND l_wrk_range_dea TO l_range_dea.
l_ranges-deal_number = l_range_dea.
SUBMIT rtpm_trl_show_position_values
WITH so_bukrs IN l_ranges-company_code
WITH so_secac IN l_ranges-security_account
WITH so_loanr IN l_ranges-loans_contract
WITH so_otcnr IN l_ranges-deal_number
WITH p_sec EQ l_flg_securities
WITH p_loa EQ l_flg_loans
WITH p_pos EQ im_flag_opt_fut
WITH p_dea EQ l_flg_otc
WITH pm_noz EQ im_flag_no_zeros
WITH pm_date EQ l_keydate
AND RETURN. "#EC CI_SUBMIT
‎2007 Apr 13 5:00 AM
.hi marc,
try this one in your dummy report
SUBMIT 'report program'
VIA SELECTION-SCREEN
USING SELECTION-SET 'VARIANT1'
USING SELECTION-SETS OF PROGRAM 'report program'.
u must declare a variant in the report program.(ckechbox = 'X')
in the case you need to bypass the selection screen, be sure to have this in your all parameters:
sample
P_parm1 type ztable-zfield no display.
regards,
rye
‎2007 Apr 13 5:21 AM
hi Marc Winston Ng
try this....
ur program to b called has parameter cb AS checkbox.
In ur calling program.
SUBMIT <prog_name> with cb = 'X' and return.
Regards,
Naveen
‎2007 Apr 13 5:42 AM
hi,
in the main program decalare parameter cb as checkbox <b>no-display</b>.
In ur calling program.
SUBMIT <prog_name> with cb = 'X' and return.
‎2007 Apr 13 12:01 PM
There is no need of declaring the parameter in the calling program
‎2007 Apr 13 6:09 AM
Hi Marc,
Just Copy and paste this code. For the CALLED PROGRAM selection screen create a variant with name " var1 ".OK.
After this execute your main program i.e., your CALING PROGRAM.
<b>Calling Program:</b>( Main Program )
data:
w_variant(5) TYPE c VALUE 'VAR1'.
SUBMIT YH625_CALLED_PROGRAM USING SELECTION-SET w_variant.
<b>Called Program:</b>
parameter w_char AS CHECKBOX.
WRITE '*************** This is Called program output **********************'.
WRITE / 'Your viewing this, without seeing selection screen of this program'.
<b>Reward if helpful.
Hope your Problem is solved, because I tested this in my SAP system.</b>
Regards,
V.Raghavender.