‎2006 Aug 28 11:25 AM
Hi ,
I have 2 parameters in Selection screen.
If field1 is null then I have to make the field 2 as Mandatory.If Field1 has some value then I have to proceed with the value...no need to make field 2 as mandatory.
Help me on this.
Sumithra
‎2006 Aug 28 12:55 PM
HELLO,
probe the code:
REPORT zaon_prueba_input .
PARAMETERS: field1(5),
field2(5).
AT SELECTION-SCREEN ON field1.
IF field1 IS INITIAL.
LOOP AT SCREEN.
IF screen-name = 'FIELD2'.
BREAK-POINT.
screen-required = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
WRITE: 'leche'.
‎2006 Aug 28 11:30 AM
Hi,
Put this code at event : AT SELECTION-SCREEN OUTPUT.
if field1 is initial.
loop at screen.
if screen-name = 'FIELD2'.
screen-required = 1.
modify screen.
endif.
endloop.
endif.or
AT SELECTION-SCREEN .
IF field1 IS INITIAL.
if field2 is initial.
MESSAGE e000(xx) 'enter data for field2'.
ENDIF.
ENDIF.Regards
appana
‎2006 Aug 28 11:31 AM
hi,
To keep both the fields open for input, keep them under the same block.
If we dont keep them under same block, as soon as an error message is thrown, only second field
will be open for input and the first field will be grayed.
selection-screen begin of block b1 with frame title text-001.
parameters : p_first type c,
p_scnd type c.
selection-screen end of block b1.
At selection-screen on block b1.
If p_first is initial.
if p_scnd is initial.
message e000 with 'Enter value in p_scnd'.
endif.
endif.
Regards,
Sailaja.
‎2006 Aug 28 11:31 AM
hi Vasu,
Do this way ..
AT-SELECTION SCREEN
PERFORM VALIDATE_SELECTION_SCREEN.
FORM VALIDATE_SELECTION_SCREEN.
IF P_RAD2 = 'X'.
IF S_WERKS[] IS INITIAL.
IF S_PLNTY IS INITIAL OR
S_PLNNR IS INITIAL OR
S_PLNKN IS INITIAL OR
S_VORNR IS INITIAL OR
S_STEUS IS INITIAL.
MESSAGE E000 WITH 'Please make an entry in plant'(030).
ENDIF.
ENDIF.
ENDIF.
ENDFORM. " VALIDATE_SELECTION_SCREENRegards,
Santosh
‎2006 Aug 28 11:33 AM
USE FOLLOWING
IF P1 NOT INITIAL.
PARAMERE P2.
ELSE.
PARAMERE P2 OBLIGATORY.
ENDIF.
REWARD IF HELPFUL
REGARDS
‎2006 Aug 28 11:34 AM
HI,
Try one of the following two methods,
which suit you better.
<b>REPORT ztest.
tables: bkpf.
parameter: a(10) default 'dd' MODIF ID ABC.
select-options: b for bkpf-belnr MODIF ID SEL.
AT selection-screen on a.
if a is initial.
message e000(su) with 'enter in a'.
endif.</b>OR
<b>at selection-screen output.
If a is initial.
loop at screen.
if screen-group1 = 'SEL'.
screen-required = 1.
modify screen.
endif.
endloop.</b>REgards,
‎2006 Aug 28 11:41 AM
AT SELECTION-SCREEN OUTpUT.
IF p_FIELD1 IS INITIAL.
IF p_FIELD2 IS INITIAL.
*DISpLAy ERROR MESSAGE TO ENTER p_FIELD2.
ENDIF.
ENDIF.Message was edited by: Chandrasekhar Jagarlamudi
‎2006 Aug 28 12:12 PM
Hi,
Still I have the same oproblem...nothing is solving my prob
1.If I give that in At selection-scren <b>OUTPUT</b>
Its showing that in initial screen.If I didnt give value its updating the screen but not showing the things.
2. IF I give message its working fine.But I dont want to print any message.I want5 to make field2 as mandatory
‎2006 Aug 28 12:55 PM
HELLO,
probe the code:
REPORT zaon_prueba_input .
PARAMETERS: field1(5),
field2(5).
AT SELECTION-SCREEN ON field1.
IF field1 IS INITIAL.
LOOP AT SCREEN.
IF screen-name = 'FIELD2'.
BREAK-POINT.
screen-required = 1.
ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDIF.
START-OF-SELECTION.
WRITE: 'leche'.
‎2006 Aug 29 7:00 AM