08-25-2008 9:50 AM
Hi Experts,
I need to develop a screen with a custom control and i/o fields against them on the same screen..however on the screen the custom control appears first and later when the back icon is clicked the i/o field appears.
Plz let me know ..what can be done abt this.
Thanx,
Sunitha
08-25-2008 10:11 AM
Hi Sunitha,
In the screen painter we can create the custom control and the fields as per the requirement and layout...
The possibilities are that the custom control has been hidden in PBO/PAI code or the program is designed with multiple screens..
first ..if in the inital screen both custom control and fields are present and on pressing 'BACK'..custom control is hidden then just put "/h" and switch on the debugger before pressing back...we can see where the code is present which hides the screen
secondly ..if they are on multiple screens..as suggested,it is better to move them all to one screen if the requirement is to provide them all on the same screen and hide/deactivate/modify the screen properties in PAI/PBO as required as per user interaction
As per the code given please check if increasing the boundaries of the screen on which the custom control and buttons sit may solve the problem...best option would be again with the debugger
Hope it helps
Regards
Byju
08-25-2008 9:58 AM
are you using single screen ?
Can you post your PBO part of the code.
08-25-2008 10:04 AM
Hi ,
Yes I am using same screen....Actually need to increase the font size of text...for this i have used DD_STYLE_TABLE...so the increased font appears on the custom control...I also need i/o fields against them....which is not happening
the PBO code is
if first_display eq 'X'.
set pf-status 'BRP'.
set handler my_handler->use_new_resources.
create document
create object do.
fill document
perform fill_opt_tab changing opt_tab.
perform set_background_color_desc.
perform dd_style_table using do.
merge document
call method do->merge_document.
display the document inside the container named 'HTML'
call method do->display_document
exporting parent = cl_gui_container=>default_screen
exceptions html_display_error = 1.
" do some exception handling ...
clear first_display.
endif.
08-25-2008 10:11 AM
Hi Sunitha,
In the screen painter we can create the custom control and the fields as per the requirement and layout...
The possibilities are that the custom control has been hidden in PBO/PAI code or the program is designed with multiple screens..
first ..if in the inital screen both custom control and fields are present and on pressing 'BACK'..custom control is hidden then just put "/h" and switch on the debugger before pressing back...we can see where the code is present which hides the screen
secondly ..if they are on multiple screens..as suggested,it is better to move them all to one screen if the requirement is to provide them all on the same screen and hide/deactivate/modify the screen properties in PAI/PBO as required as per user interaction
As per the code given please check if increasing the boundaries of the screen on which the custom control and buttons sit may solve the problem...best option would be again with the debugger
Hope it helps
Regards
Byju
08-25-2008 10:30 AM
Hi ,
Actually the i/o fields do not appear with the custom control anytime....the custom control is displayed first n then the i/o fields...
Thanx,
Sunitha
08-25-2008 12:00 PM
It is working for me. Check it once .
I have one input field and a custom control on it.
REPORT ztest_screen_style.
DATA:
cont TYPE REF TO cl_gui_custom_container,
o_dyndoc_id TYPE REF TO cl_dd_document.
data: input_field(10).
CALL SCREEN 100.
*&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
* Creating container
IF cont IS INITIAL.
CREATE OBJECT cont
EXPORTING
container_name = 'CONT'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
.
IF sy-subrc NE 0.
.
ENDIF.
"create the Dynamic document
CREATE OBJECT o_dyndoc_id.
"set the background
"change for various colors
"cl_dd_area=>col_tree_level1 ,2,3,4
CALL METHOD o_dyndoc_id->initialize_document
EXPORTING
background_color = cl_dd_area=>col_tree_level1.
DATA : dl_text(255) TYPE c. "Text
CALL METHOD o_dyndoc_id->add_text
EXPORTING
text = 'Flight Details'
sap_style = cl_dd_area=>heading
sap_fontsize = cl_dd_area=>large
sap_color = cl_dd_area=>list_heading_int.
* Display document
CALL METHOD o_dyndoc_id->display_document
EXPORTING
reuse_control = 'X'
parent = cont
EXCEPTIONS
html_display_error = 1.
IF sy-subrc NE 0.
ENDIF.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
*& Module USER_COMMAND_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE user_command_0100 INPUT.
CASE sy-ucomm.
WHEN 'BACK'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
Flow logic
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
*
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
Screen Layout.
http://img329.imageshack.us/img329/9040/newpicture1xk6.png
Output