2006 Aug 29 11:44 AM
Hi,
I want to shift the fields in my Module Pool Program. for example Consider Transaction MM01 there are
5 Field on the first first screen. observe positions of the fields Material & Change Number in MM01.
but in MM02 the the field Change Number is shifted upwards.
Kindly let me know how this can be done.
thanks in advance
Rakshan
Hi,
I want to shift the fields in my Module Pool Program. for example Consider Transaction MM01 there are
5 Field on the first first screen. observe positions of the fields Material & Change Number in MM01.
but in MM02 the the field Change Number is shifted upwards.
Kindly let me know how this can be done.
thanks in advance
Rakshan
2006 Aug 29 1:09 PM
Hello,
In MM01 and MM02, the field change number is moving upwards becuase the other fields got hidden.
you can hide your field as below:
1. give the screen group GP1 of the field which you want to hide.
2. write this code in your PBO.
if flag = 'X'.
loop at screen.
if screen-group1 = 'GP1'.
screen-active = 0.
modify screen.
endif.
endloop.
endif.
The field which has group1 value as GP1 will be hidden and the fields which are under that fields will come up by 1 row.
Regards,
Naimesh
2006 Aug 29 1:24 PM
Hi Rakshan,
Do you want to control the screen fields in your custom transaction or in SAP std screens?
If you want to do it for your own module pool you need to use screen modification code as mentioned by Naimesh. You can find more info about the how to modify in the link below
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dbab6f35c111d1829f0000e829fbfe/content.htm
check the code give below
REPORT demo_dynpro_modify_simple.
DATA: ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
DATA flag(1) TYPE c.
CALL SCREEN 100.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'SCREEN_100'.
LOOP AT SCREEN.
IF screen-group1 = 'MOD'.
IF flag = ' '.
screen-input = '0'.
ELSEIF flag = 'X'.
screen-input = '1'.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ENDMODULE.
MODULE cancel.
LEAVE PROGRAM.
ENDMODULE.
MODULE user_command_0100 INPUT.
save_ok = ok_code.
CLEAR ok_code.
CASE save_ok.
WHEN 'TOGGLE'.
IF flag = ' '.
flag = 'X'.
ELSEIF flag = 'X'.
flag = ' '.
ENDIF.
ENDCASE.
ENDMODULE.
If you want to achieve the same on SAP Std screens then there are coupple of options
1). Use Transaction Variants ( SHD0 )
2). Use badis or user exits to modify the screen fields
Cheers
VJ
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |