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

How to debug rfc function module?

956


Can we use transfer dataset to transfer data in internal table ?

1868


What happens if a function module runs in an update task?

778


How to select valid lines for secondary list?

797


What are the disadvantages of logical databases?

896


What is difference between check table and value table ?

832


Difference between transparent tables and pooled tables? : abap hr

798


Explain what are the events used in interactive reports?

698


What are the types of search helps? : sap abap data dictionary

867


How do you read files from the application server ? : abap bdc

844


What is the transaction for recording bdc ? : abap bdc

781


Sales Order Information Report that lists information like sales order no, Item no, material no, Quantity, Quantity unit, Net value, Currency,Sub Total, Grand Total. plz mention the detail coding Tahnks, Rahul

1926


difference between Valuation type and valuation category?

2204


How to Modify Layout set for RVORDER01 for printing sales order confirmation. plz mention the detail coding Tahnks, Rahul

3628


What are the different methods of passing data?

848