2008 Sep 26 11:21 PM
Hey folks,
I have posted this question previously but no one understood the real problem.
I have 4 fields
Company Code
material Number
plant
storage Location
Unit
when I select the company code AA01 from the F4 help I want to disable material number and Plant ..Like this i have 4 scenarios where based upon the input given in the selection screen other fields have to be enabled or disabled.
I have already used at selection screen on output but that doesn't help me as its a PBO event I tried to search for a proper event but cudn't find it. Is there any way i can achieve this. A sample code wud be easy for me to understand .
Thanks in advance
Rock
2008 Sep 26 11:33 PM
Set different groups in your fieds on the screen.
Set the screen group for the Material and Plant as the GR1
Set the screen gorup for the Storage location as the GR2.
You need to modify your screen fields on the PBO event.
Like:
IF P_BUKRS = 'AA01'.
loop at screen.
if screen-group1 = 'GP1'.
screen-input = 0.
modify screen.
elseif screen-group2 = 'GP2'.
screen-input = 1.
modify screen.
endif.
endloop.
else.
loop at screen.
if screen-group1 = 'GP2'.
screen-active = 0.
modify screen.
elseif screen-group2 = 'GP1'.
screen-input = 1.
modify screen.
endif.
endloop.
endif.
Regards,
Naimesh Patel
2008 Sep 26 11:49 PM
Hey Naimesh,
Its working only when i hit enter. is there any possibility that when i select the values from the F4 help it modifies the screen without hitting enter.
Thanks in advance
Rock
2008 Sep 30 1:09 PM
hi Rock,
Try the following logic in your POV.
data: record_tab like seahlpres occurs 0 with header line.
...
...
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
....
....
. exceptions
parameter_error = 1
no_values_found = 2
others = 3.
import record_tab from memory id 'mcx_record_tab'.
if not record_tab[] is initial.
loop at screen.
if screen-group1 = ...
modify screen....
endif.
....
....
endloop.
endif.
Thanks & Regards,
Abhishek Jolly
2008 Sep 27 2:00 AM
Try this way with MODIF ID
SELECT-OPTIONS NAME FOR SY-REPID MODIF ID XYZ.
...
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
CHECK SCREEN-GROUP1 = 'XYZ'.
SCREEN-INTENSIFIED = '1'.
MODIFY SCREEN.
ENDLOOP.
a®
2008 Sep 27 4:13 AM
First, define the modify ID for the fields you want to disable.
Second, loop at screen to find out the fields and set the attributes for them.