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
What are the drill-down features provided by abap/4 in interactive lists?
It is not possible to create an abap/4 program, which contains only subroutines. State true or false. : abap modularization
Why do we need enhancements?
What is the difference between open_form and close_form?
What is read line in abap?
How many types of tables exists and what are they in data dictionary? : abap data dictionary
What is luw?
What is an evaluation path? : sap abap hr
How can a lock object be called in the transaction?
What are the advantages and disadvantages of ABAP query tool?
What is sap script? Describe its components.
while implementing badi what are the tables u find??
What is pass by value and what is pass by reference? Which is better?
What are the 3 types of tables in sap? : abap data dictionary
Define external layer?