07-31-2007 9:50 AM
Hi experts!.
I don't know how I can hide fields in my dynpro 0001. I try this:
PROCESS BEFORE OUTPUT.
...
loop at SCREEN.
if EXTRACT-name = 'ZUSERNAME'.
EXTRACT-visible = 0.
modify screen.
endif.
endloop.
PROCESS AFTER INPUT.
...
But don`t work. System said me:
Syntax error in screen
-
Program SAPLZHB_V
Screen 0001
Position Flow Logic Line 9
SCREEN is not a database table.
In another hand, I want set ZUSERNAME = SY-UNAME but I don't know where.
A lot of thanks in advance.
Regards.
08-01-2007 5:15 AM
Hi,
i think u should not write your code their first make a module and write your code inside that module i think this will solve your problem definetely
07-31-2007 10:00 AM
Hi,
USE
loop at SCREEN.
if SCREEN-name = 'ZUSERNAME'.
SCREEN-active = 0. " to hide 0 to show 1.
modify screen.
endif.
endloop.
Regards,
Sesh
07-31-2007 10:03 AM
07-31-2007 10:00 AM
U can not loop screen directly in the Flow logic.
Try using this in any existing Modules of PBO or create your own module for this screen and write your code there..
Reward points if helpful.
Regards,
Sathish.V
07-31-2007 10:22 AM
I cannot to create a PBO module.
Note: I created View with Table Maintenace Generator
And I try (at Flow logic) :
loop at SCREEN.
if SCREEN-name = 'ZUSERNAME'.
SCREEN-active = 0.
modify screen.
endif.
endloop.
But don`t work. Same problem
regards
07-31-2007 10:59 AM
Hi,
In the flow logic write
MODULE init_screen.
Now double click on init_screen to create hte PBO module and say ok in the pop_up that appears.
The put the below in between statements
MODULE init_screen OUTPUT.
loop at SCREEN.
if SCREEN-name = 'ZUSERNAME'.
SCREEN-active = 0.
modify screen.
endif.
endloop.
ENDMODULE.
Regards,
Sesh
07-31-2007 11:35 AM
Thanks for your reply Seshatalpasai Madala.
I do your idea but doesn`t work.
And I put a breakpoint into: if SCREEN-name = 'ZUSERNAME' And system stops and do SCREEN-active = 0 but doesn't work, sm30 show column.
Thanks you in advance.
regards
07-31-2007 10:03 AM
Hi,
U have to use
EXTRACT-active = 0. instead of EXTRACT-visible = 0.
If u use visible = 0,it means the the text field will show as password field where entries are replaced by *****
Message was edited by:
Arjun Puthuruthy
07-31-2007 10:36 AM
Hi
PROCESS BEFORE OUTPUT.
...
loop at SCREEN.
if SCREEN-name = sy-uname. "see change it will chk directly
screen-active = 0. "see change
modify screen.
endif.
endloop.
PROCESS AFTER INPUT.
...
Jogdand M B
07-31-2007 11:37 AM
07-31-2007 3:05 PM
PROCESS BEFORE OUTPUT.
module screen_modify. -> use one module under PBO EVENT,double click on module name.
PROCESS AFTER INPUT.
Write the code as below.
module screen_modify.
loop at SCREEN.
if screen-name = 'ZUSERNAME'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
endmodule
It should work.
Thanks
Seshu
07-31-2007 3:23 PM
Thank you for your response but don't work.
I don't know what happend. I try:
MODULE screen_modify.
loop at SCREEN.
if SCREEN-name = 'ZUSERNAME'.
SCREEN-active = 0.
SCREEN-invisible = 1.
modify screen.
endif.
endloop
But don't work
regards
07-31-2007 3:26 PM
do not give SCREEN-active = 0.
and use like SCREEN-invisible = 1. -> 1 should be like <b>'1'</b>
Try now it should work.
MODULE screen_modify.
loop at SCREEN.
if SCREEN-name = 'ZUSERNAME'.
SCREEN-invisible = '1'.
modify screen.
endif.
endloop.
Thanks
Seshu
07-31-2007 3:33 PM
Don't work.
I use only SCREEN-invisible = 1 and no work.
thank you for your time.
regards
07-31-2007 3:53 PM
I guess you are not using this code in right area.
Table maintaice may have 2 screen numbers.
if you use right screen number then it will come,the same code i used many times,it works great.
Check the screen number where you are using and let me know.
other way :
take your Function group which is related to Table maintaince.
Now goto SE80 -> select Function group option -> enter function group name.
now you will see list of objects under Function group.
Select what screen you want -> double click on screen.
now click on change mode -> click on layout .
keep the cursor on your field name -> delete field there .
but i will not suggest this method
Thanks
Seshu
07-31-2007 4:06 PM
I'm using this code in right area because when I put a breakpoint in this line:
if SCREEN-name = 'ZUSERNAME'.
And I go to SM30 transaction and put my custom table system stops at line:
if SCREEN-name = 'ZUSERNAME'.
And I can see how change screen table.
In another hand when I change General attributes of element list at my screen (like input output) I can see this modifications at sm30.
regards.
07-31-2007 5:32 PM
Yeah I have tested what you written,it is not working .
You can achive this one by using table maitaince event,
Search in forum like table maitaince event in forum ,you get many links.
simple way to do in table maintaince event
1. Go to se11 in the change mode -
>
2. then to the maintanence genarator generator screen
3. then to menu path Environment->modification-->events
4. in this there is an event 21 ( fill hidden fields )
or
there's another way:
sm30 - configuration (icon right on top of the TC) - administrator - checkbox invisible
Thanks
Seshu
08-01-2007 5:15 AM
Hi,
i think u should not write your code their first make a module and write your code inside that module i think this will solve your problem definetely