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

Explain the session method? : abap bdc

625


How do I find the output type of a table or a program?

590


In which particular scenario we use sorted table and which particular scenario we use standard table?

1024


Can we access static attribute from instance method

999


What is a bsp application? : sap abap hr

637






What is asynchronous update?

579


What is the meaning of client independent?

571


What is the difference between a dialog program and a report?

561


Explain about drill down report?

8781


Advantages and disadvantages of different types of bdc's?

577


What are conversion & interface programs in sap?

655


How to debug rfc function module?

705


Differentiate between the uline and write: sy-uline statements if any?

733


What is step-loop? Explain all the steps?

545


What are standard layouts sets in the sap script?

557