2009 Feb 05 5:04 AM
Hi all,
how to handle mandatory fields while calling a report from some other transaction.
I am using SUBMIT keyword in my report to call the report.
2009 Feb 05 5:08 AM
Pass mandatory fields using WITH <field name>
SUBMIT ZQMRFUJINSPREP WITH QL_PRLOS = I_LOT_NUMBER
VIA SELECTION-SCREEN
USING SELECTION-SET 'INSP_REPORT'
USING SELECTION-SETS OF PROGRAM 'ZQMRFUJINSPREP' AND RETURN.
Check F1 on SUBMIT for more help.
2009 Feb 05 5:15 AM
Hi karan,
Thanks for reply.
Sorry I did not explain you the problem exactly.
I am using 3 radio buttons, when I select a radio button all the input fields of the called report will open up, here I give my input.
At this time I will not know what are the mandatory fields of that report.
So, how to handle it?
2009 Feb 05 5:09 AM
hi,
Try out the SUBMIT with
following additions
1. ... USING SELECTION-SET variant
2. ... USING SELECTION-SETS OF PROGRAM prog
3. ... WITH SELECTION-TABLE rspar
4. ... WITH expr_syntax1 WITH expr_syntax2 ...
5. ... WITH FREE SELECTIONS texpr
One of this might resolve your purpose
Thanks
Sharath
2009 Feb 05 5:09 AM
suppose report A is calling report B .
U can handle the mandatory fields of report B in the following two ways.
1. Put a check in Report A, for the fields , that you are passing to report B. If any of them is missing throw error.
Or.
2. In Report B put a check, for the fields, that u want to make mandatory. If any of them is missing,
then write the error message and leave program using 'leave program ', syntax.
This will write the error in spool .This is done because the program B is called in background
2009 Feb 05 5:13 AM
u can pass the values for that fields from ur report while calling using SUBMIT.
submit program name with p_test eq p_test1 " p_test1 is being passed here
with p_test2 in r_test2
and return.
2009 Feb 05 5:20 AM
Hi,
Hope Following Will Help you to solve out your Problem,
In Calling Program.
FREE MEMORY ID 'QUAL'.
SUBMIT zfsl_hr_qual_comp_test
WITH cdate EQ cdate " Here in my Called Program these two Field are Mandatory
WITH py_grp EQ py_grp " You Must Pass Values to both of these. other wise it stop on the Called Programs Selection Screen.
WITH r2 = 'X' " For RADIOBUTTON
AND RETURN.
IMPORT rate = it_qual[] FROM MEMORY ID 'QUAL' .
In Called Program
EXPORT rate = it2_qual[] TO MEMORY ID 'QUAL' .
RETURN.
Please REply if any Issue Regarding.
Kind Regards,
Faisal
Edited by: Faisal Altaf on Feb 5, 2009 10:22 AM
2009 Feb 05 5:20 AM
Hi,
You need to pass all mandatory fields from the calling program else you will get error messages when running your transaction.
Regards.
2009 Feb 05 5:24 AM
Hi,
Say while submitting to a report you need values for vbeln, posnr and datuv, then just use value from calling program to pass them to the other report.
Use something like this:-
SUBMIT <report_name> WITH p_vbeln = v_vbeln
WITH p_posnr = v_posnr
WITH p_datuv = v_datum
AND RETURN.
"v_vbeln, v_posnr and v_datum are fields on calling report
"p_vbeln, p_posnr and p_datuv are fields on submitting report
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir