‎2009 Jan 11 11:31 AM
hi
in loop at screen
for the screen name value what is value to be considered
in some cases i have seen screen name having % in between
but these screen names doesnot there in the selection screen
how to check for such kind of names
‎2009 Jan 11 11:39 AM
Hi,
Can you be more clear on this .....
Is it a custom screen or a standard screen.
In any screen you can find the field names in the menu painter. Have a look in to that......
Regards,
Venkatesh
‎2009 Jan 11 11:39 AM
Hi,
Can you be more clear on this .....
Is it a custom screen or a standard screen.
In any screen you can find the field names in the menu painter. Have a look in to that......
Regards,
Venkatesh
‎2009 Jan 11 11:41 AM
Hello ,
Would you please check the Screen elements name also paste your code if possible toresolve the issue .
Regards,
‎2009 Jan 11 12:07 PM
hi
for ex here i have pasted the code there is sdn
LOOP AT SCREEN.
IF (
screen-name = '%BYB1005_BLOCK_1000'
screen-name = '%FYTI007_1000'
or screen-name = '%FBIS010_1000'
or screen-name = 'PYVW0_0'
or screen-name = '%_PYPERNR_%_APP_%-TEXT'
or screen-name = 'PYPERNR-LOW'
or screen-name = '%_PYPERNR_%_APP_%-VALU_PUSH'
).
screen-active = '0'.
screen-invisible = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
in this the names are in different format
how exactly to identify it on the screen screen
‎2009 Jan 11 1:47 PM
Hi, Ajay,
To Find the correct name of the field follow the bellow given steps,
1. --> Display the Screen With all the fields
2. --> Place you Muse Courser on the Field you want to hide using the Loop at Screen
3. --> Press 'F1' Key and on the display Window
4. --> From the Tool bar select the Technical Information Button
5. --> Now from the Display Window you can find the Name of the Require Field
Please Follow the above Steps and Replay if any problem,
Kind Regards,
Faisal
‎2009 Jan 11 6:21 PM
Hi,
When you define a paramter or select-option on the selection screen, the % is prefixed to the field name. These elements of the screen are used to name the field labels on the screen.
You should ignore these and only use the the name of the screen elements that you have defined in the selection screen when you are processing the screen in the loop at screen code block.
parameters p_matnr like mara-matnr.
"Now here %p_matnr will be the screen-name for the text label of the field p_matnr ( selection text that is displayed in the screen
loop at screen.
case screen-name.
when 'P_MATNR'.
" do the processing for the field matnr
endcase.
Looking at your code , I can see that you want to probably hide some fields or block.
What you can do is assign a modif id to each of the screen element that you want to hide. This modif id is then stored in the group1 attribute of the screen table at runtime.
So you can do something like this :
selection-screen begin of block b1
parameters p_matnr like mara-matnr modif id mat.
parametsr p_werks like mara-werks modif id mat.
selection-screen end of block b1.
at selection-screen output.
loop at screen.
case screen-group1.
when 'MAT'
screen-active = 0.
endcase.
endloop.
The above code loops at the screen and makes both the parameters invisible and since there is nothing left on the screen, the block will also be made invisible.
Hope this helps.
regards,
Advait
Edited by: Advait Gode on Jan 11, 2009 7:23 PM
Edited by: Advait Gode on Jan 11, 2009 7:44 PM
‎2009 Jan 12 4:02 AM
Hi Ajay.
this is the Sample program of loop at Screen.
MODULE passdata OUTPUT.
READ TABLE it_revision INTO wa_rev INDEX tab_clc-current_line.
IF sy-subrc = 0.
LOOP AT SCREEN.
IF screen-group1 = '111'. " 111 IS THE GROUP NAME
screen-input = 1. " input mode
screen-active = 1. " input mode.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-group1 = '111'. "GROUP NAME
screen-input = 0. " display mode
screen-active = 1. " DISPLAY MODE.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDIF.
ENDMODULE. " PASSDATA OUTPUT
you can also follow this link.
Hope it will solve your problem.
Thanks.
Arun Kayal.
‎2010 Sep 29 1:56 AM