Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

i have a requirement.there are 2 fields and one check box
on my selection screen.initially first field sud be
mandatory, when we click on check box the first field which
was mandatory sud now be optional and second field sud be
mandatory?please provide me the solution asap.Thank you

Answer Posted / rinzy deena mathews

Declare the parameters with modification ID, and at the At
selection screen event, use screen-required to make the
fields manually mandatory.

Following is the code for this

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-
002.
PARAMETERS : fname(20) TYPE c MODIF ID f1,
lname(20) TYPE c MODIF ID l1.

PARAMETERS : check1 AS CHECKBOX DEFAULT 'X' USER-COMMAND
usc.
SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN OUTPUT.

IF check1 EQ 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'F1'.
screen-required = 1.
MODIFY SCREEN.
ELSEIF screen-group1 = 'L1'.
screen-required = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSEIF check1 NE 'X'.
LOOP AT SCREEN.
IF screen-group1 = 'L1'.
screen-required = 1.
MODIFY SCREEN.
ELSEIF screen-group1 = 'F1'.
screen-required = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the drill-down features provided by abap/4 in interactive lists?

1033


It is not possible to create an abap/4 program, which contains only subroutines. State true or false. : abap modularization

1323


Why do we need enhancements?

1145


What is the difference between open_form and close_form?

1077


What is read line in abap?

1107


How many types of tables exists and what are they in data dictionary? : abap data dictionary

1116


What is luw?

1216


What is an evaluation path? : sap abap hr

1044


How can a lock object be called in the transaction?

1011


What are the advantages and disadvantages of ABAP query tool?

977


What is sap script? Describe its components.

1061


while implementing badi what are the tables u find??

4117


What is pass by value and what is pass by reference? Which is better?

1377


What are the 3 types of tables in sap? : abap data dictionary

1084


Define external layer?

1157