Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to handle mandatory fields while calling a report

Former Member
0 Kudos
370

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.

8 REPLIES 8

Former Member
0 Kudos
186

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.

0 Kudos
186

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?

Former Member
0 Kudos
186

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

former_member195383
Active Contributor
0 Kudos
186

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

former_member226203
Active Contributor
0 Kudos
186

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.

faisal_altaf2
Active Contributor
0 Kudos
186

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

dev_parbutteea
Active Contributor
0 Kudos
186

Hi,

You need to pass all mandatory fields from the calling program else you will get error messages when running your transaction.

Regards.

I355602
Product and Topic Expert
Product and Topic Expert
0 Kudos
186

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