Application Development and Automation 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: 
Read only

simple problem in report

Former Member
0 Likes
735

hi all,

please check the below program, but my requirement is in selection screen i should have mandatory fields. when click on r2 radiobutton its giving an error like " Make an entry in all required fields" but i want to avoid this without entering the value in that field.

REPORT zreport01.

DATA : v_ebeln LIKE ekko-ebeln.

PARAMETERS: p_werks TYPE werks OBLIGATORY VALUE CHECK MODIF ID s1.

SELECT-OPTIONS: s_ebeln FOR v_ebeln NO-EXTENSION OBLIGATORY MODIF ID s2.

SELECTION-SCREEN SKIP.

PARAMETERS : r1 RADIOBUTTON GROUP g1 DEFAULT 'X' user-command ucomm,

r2 RADIOBUTTON GROUP g1.

AT SELECTION-SCREEN OUTPUT.

LOOP AT SCREEN.

IF r1 EQ 'X' AND screen-group1 EQ 'S2'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

IF r2 EQ 'X' AND screen-group1 EQ 'S1'.

screen-input = 0.

MODIFY SCREEN.

ENDIF.

ENDLOOP.

thanks in advance.

one more question is : can anyboby know the releavent Tcode:SE49 in 4.7EE and above versions....

regards

munvar.

6 REPLIES 6
Read only

Former Member
0 Likes
689

Hi, try to remove the OBLIGATORY syntax on your select options.

And u can check that select options fill or not fill by manually maybe at start of selection.

Best Regards,

Victor.

Read only

Former Member
0 Likes
689

Hi,

change the line

PARAMETERS: p_werks TYPE werks <b>OBLIGATORY</b> VALUE CHECK MODIF ID s1.

to

PARAMETERS: p_werks TYPE werks VALUE CHECK MODIF ID s1.

and it will work.

Regards

Nicole

Read only

Former Member
0 Likes
689

hi ..

just remove the keyword obligatory in the select-options .

then if u want to check the values use at-selection-screen

and validate the select-options.

thanks and regards

JK

Read only

0 Likes
689

Hi,

Removing the OBLIGATORY keyword is the simple thing u need to do.

DO assign points for the helpful replies.

Regards:

Sapna

Read only

mar_novalbos
Product and Topic Expert
Product and Topic Expert
0 Likes
689

Hello Munvar,

Regarding to t-code SE49:

SE49 does not exist anymore.

There is a workaround, but it is not considered as an SAP standard solution and it is not supported by SAP.

You might try to create a transaction variant:

1) Start SE93 to create a transaction variant

2) Specify a name, eg. ZSE49, and choose the first option:

"program and screen (dialog transaction)

3) Here specify SAPMSEUZ as program, and 200 as screen number

4) Choose a suitable development class (package) if you want it to be

transportable or Local (=$TMP) if non-transportable

5) press Save

And regarding to your report:

The general screen process logic is to first check the mandatory (obligatory) fields and then continue with the other events (at selection-screen, at selection-screen-output and so on..).

So, in your report, the system will check that all mandatory fields contain any information and, after, it will check the radiobutton group. To avoid this, I would not define parameters as obligatory but I would check that all required fields are filled in event AT SELECTION-SCREEN. Should any field is empty, then I would raise a message asking for a valid value.

I hope the above helps.

Best regards,

Mar Novalbos

Read only

Former Member
0 Likes
689

HI,

try like this,

PARAMETERS: p_werks TYPE werks VALUE CHECK MODIF ID s1.

instead of

PARAMETERS: p_werks TYPE werks OBLIGATORY VALUE CHECK MODIF ID s1.

if u want toto make all fields are mandatory then at selectio-screen event write give error message for user fbefore clicking on radio buttons so that all mandatory fields are filled beofre doing any operation.

if useful reward some points.

with regards,

suresh.