Screen Painter Exception URGENT
Hi.
I got INVALID_DYNPRONAME when i actually copied one of the screens 1100 ffrom transaction A to screen 1200 in same transaction.
I modified the report program
from START OF SELECTION 1100
To Start of selection 1200.
It threw an exception during runtime at:
call 'HELP_GET_FIELDS' id 'DYNAME' field dyname
id 'DYNUMB' field dynumb
id 'REQUEST' field request
id 'DPOVNAME' field syst-repid
id 'DPOVNUMB' field syst-dynnr
id 'SSF' field ssf
id 'PROOT' field <startdynpro>
id 'STACKPOS' field start_search_on_scr_stackpos
id 'PATH' field searchpath_of_subscreen_areas
id 'DPOV' field <dpovtab>."#EC CI_CCALL
case sy-subrc.
when 0.
when 1.
>>>>> raise invalid_dynproname.
when 2.
raise invalid_dynpronummer .
when 3.
raise invalid_request.
when 4.
raise invalid_dynprofield.
when 5.
raise invalid_abapworkarea.
Hi AMC,
a screen can not be copied from one transaction to another. A transaction may start with a screen of a program object (report, function pool or module pool).
Please try to copy the screen to another screen numer and give the same program name.
if you don't know the programs name, you may press the object tree button when maintaining the screen or use the menu system-status. On the left is the program for the screen. Double-click on program or screen, press tree icon. In the object tree on the left, you have the screen. Right-click on it and choose copy. Use new number an program name as seen on top of the object tree.
Regards,
Clemens
Edited by: Clemens Li on Feb 8, 2008 2:25 PM - typos corrected
Similar Messages
-
Urgent problem ......In screen Painter
Dear all,
May problem is in the Screen painter. with out clicking the EXIT button, exits out of the screen.
and also the Messages are not displayed.
I designed the screen, using GUI status I created two buttons in the application Toolbar.
one for INSERT.
one for EXIT.
In the main program I coded like this
save_ok = ok_code.
SELECT * FROM ziv_check_intfc INTO TABLE it_check_intfc.
CASE sy-dynnr.
WHEN '2000'.
CASE save_ok .
WHEN 'INSERT'.
LOOP AT it_check_intfc INTO wa_check_intfc.
IF wa_check_intfc-ziv_intfc <> ziv_check_intfc-ziv_intfc.
IF wa_check_intfc-ziv_attr <> ziv_check_intfc-ziv_attr.
IF wa_check_intfc-ziv_value <> ziv_check_intfc-ziv_value.
INSERT ziv_check_intfc.
MESSAGE 'RECORD INSERTED INTO TABLE' TYPE 'I'.
ELSE.
MESSAGE 'RECORD ALREADY EXISTS IN THE TABLE' TYPE 'I'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
WHEN 'EXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDCASE.Make sure that you clear the ok_code after processing it.
save_ok = ok_code.
SELECT * FROM ziv_check_intfc INTO TABLE it_check_intfc.
CASE sy-dynnr.
WHEN '2000'.
<b>CASE ok_code. "save_ok .</b>
WHEN 'INSERT'.
<b>clear ok_code.</b>
LOOP AT it_check_intfc INTO wa_check_intfc.
IF wa_check_intfc-ziv_intfc <> ziv_check_intfc-ziv_intfc.
IF wa_check_intfc-ziv_attr <> ziv_check_intfc-ziv_attr.
IF wa_check_intfc-ziv_value <> ziv_check_intfc-ziv_value.
INSERT ziv_check_intfc.
MESSAGE 'RECORD INSERTED INTO TABLE' TYPE 'I'.
ELSE.
MESSAGE 'RECORD ALREADY EXISTS IN THE TABLE' TYPE 'I'.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
WHEN 'EXIT'.
<b>clear ok_code.</b>
LEAVE PROGRAM.
ENDCASE.
ENDCASE.
Regards,
Rich Heilman -
How to create a drop down box and text box in screen painter?
Hi i am totally new to this concept of screen painter..please can any tell me
how to create drop down box in screen painter?
How to create or display default date and time values?
How to create text box for giving comments?
How to store the records that we are entering in a table?
Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.Hi,
Check all these.
1.how to create drop down box in screen painter?
To get Drop Drown Box on screen .
Follow these steps.
1.
Go to T.Code SE51 and Select Laypout for the Screen.
2.
Double click on the field for which u want Dropdown box.
3.
Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
4.
Save and Activate ur screen .
5.
Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
6.
The following code should be written under PROCESS BEFORE EVENT in the MODULE.
TYPE-POOLS :vrm.
DATA:
i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
w_natio LIKE LINE OF i_natio.
DATA:
BEGIN OF i_t005t OCCURS 0,
land1 TYPE t005t-land1,
natio TYPE t005t-natio,
END OF i_t005t.
IF i_t005t[] IS INITIAL.
SELECT land1 natio
FROM t005t
INTO TABLE i_t005t
WHERE spras = sy-langu.
IF sy-subrc = 0.
LOOP AT i_t005t .
w_natio-key = i_t005t-land1.
w_natio-text = i_t005t-natio.
APPEND w_natio TO i_natio.
CLEAR w_natio.
ENDLOOP.
ENDIF.
ENDIF.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
values = i_natio
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
2.1.How to create or display default date and time values?
1.
create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
2.
Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
3.How to create text box for giving comments?
1.
Define one variable in the TOP include with type STRING means Global variable.
2.
Create one input field by giving screen field name which u have defined in the above step.
4.How to store the records that we are entering in a table?
For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
Check the following steps to handle Table control.
1).
U should take one variable in your internal table or in structure which
is used for table control fields
ex :
data :
begin of itab occurs 0 ,
mark type c , "This is to select the record.
matnr like mara-matnr ,
matkl like mara-matkl,
maktx like makt-maktx,
end of itab .
Controls: TABC types TABLEVIEW using screen 100.
2).
This mark variable should be given in Table control properties.
follow the path
double click on the table control-->attributes .->select
w/SelColumn and in that itab-mark. Check in the figure.
[Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
3).
After that. Take this example.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
LOOP AT ITAB WITH CONTROL tabc
ENDLOOP.
PROCESS AFTER INPUT.
MODULE CANCEL AT EXIT-COMMAND.
LOOP AT ITAB.
Module read_table_control.
ENDLOOP.
module user_command_0100.
In this Module read_table_control, You should write the following code
MODULE read_table_control INPUT.
MODIFY itab INDEX tabc-current_line."( This will update the
"ITAB table MARK field with 'X ' whatever we have selected
"on table control.)
ENDMODULE.
4)
If you want to Delete some of the records from Table control
follow this code Create one pushbutton and give Fucnction code to that
and write below code
CASE OKCODE.
WHEN 'CREATE'.
LOOP AT itab WHERE mark = 'X'.
"Use UPDATE statement to create new record.
ENDLOOP.
ENDCASE.
I hope that you will get something.
Regards,
Venkat.O -
Is there any possible to display the text in big font in screen painter
HI all!
i want to display the text in the large size in the text field in the screen painter in the odule pool programing.Is there any possible.What i have to do in the screen painter to display the text in the large size.Also is there any possible to put the color for the text.Give me replyHI
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.
by using these methods you can achieve i hope..
have a good day.
regards
sarves -
Changing fonts in Screen painter
Hi experts,
I have a screen, that displays information. I need to display the information in a different font than usual, e.g. Bold or Italic.
Could you please let me know the ways to change the FONTS in screen painter.
Is it feasible to do so?
Thanks,
AbhayCheck out this code:
create a screen 100, PF-STATUS '0100' and custom container 'CONT'
*& Report ZZ_SOURAV_DYNAMIC_DOCUMENTS
REPORT zz_sourav_dynamic_documents.
TYPE-POOLS: sdydo.
DATA:
container TYPE REF TO cl_gui_docking_container,
doc TYPE REF TO cl_dd_document,
ok_code TYPE syucomm.
DATA form1 TYPE REF TO cl_dd_form_area.
DATA text TYPE sdydo_text_element.
DATA value TYPE sdydo_value.
DATA button1 TYPE REF TO cl_dd_button_element.
DATA input1 TYPE REF TO cl_dd_input_element.
DATA first_display VALUE 'X'.
DATA opt_tab TYPE sdydo_option_tab.
DATA select1 TYPE REF TO cl_dd_select_element.
* CLASS cl_my_event_handler DEFINITION
CLASS cl_my_event_handler DEFINITION.
PUBLIC SECTION.
METHODS:
handle_input FOR EVENT entered OF cl_dd_input_element
IMPORTING sender,
handle_submit_buttons FOR EVENT clicked OF cl_dd_button_element
IMPORTING sender,
use_new_resources FOR EVENT resources_changed OF cl_gui_resources.
ENDCLASS. "cl_my_event_handler DEFINITION
* CLASS cl_my_event_handler IMPLEMENTATION
CLASS cl_my_event_handler IMPLEMENTATION.
METHOD handle_input.
MESSAGE i001(00) WITH input1->value.
ENDMETHOD. "handle_submit_buttons
METHOD handle_submit_buttons.
MESSAGE i001(00) WITH input1->value.
ENDMETHOD. "handle_submit_buttons
METHOD use_new_resources.
IF first_display IS INITIAL.
* initialize documents
CALL METHOD doc->initialize_document.
* merge documents
CALL METHOD doc->merge_document.
* display documents
CALL METHOD doc->display_document
EXPORTING
reuse_control = 'X'
reuse_registration = 'X'.
ENDIF.
ENDMETHOD. "use_new_resources
ENDCLASS. "cl_my_event_handler IMPLEMENTATION
START-OF-SELECTION.
DATA: my_handler TYPE REF TO cl_my_event_handler.
CREATE OBJECT my_handler .
END-OF-SELECTION.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS '0100'.
* SET TITLEBAR 'xxx'.
SET HANDLER my_handler->use_new_resources.
CREATE OBJECT doc
EXPORTING
* style =
background_color = cl_dd_area=>col_background_level2
* bds_stylesheet =
* no_margins =
PERFORM add_html_code.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'BACK'.
SET SCREEN 00.
LEAVE SCREEN.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form add_html_code
* text
* --> p1 text
* <-- p2 text
FORM add_html_code .
IF first_display = 'X'.
text = 'Line1'.
CALL METHOD doc->add_text
EXPORTING
text = text
* text_table =
* fix_lines =
sap_style = cl_dd_document=>heading
* sap_color = cl_dd_document=>LIST_POSITIVE_INT
sap_fontsize = cl_dd_document=>medium
* sap_fontstyle = cl_dd_document=>SANS_SERIF
* sap_emphasis = cl_dd_document=>
* style_class = cl_dd_document=>WARNING
* CHANGING
* document =
CALL METHOD doc->new_line
EXPORTING
repeat = 1.
text = 'Line2'.
CALL METHOD doc->add_text
EXPORTING
text = text
* text_table =
* fix_lines =
* sap_style = cl_dd_document=>heading
sap_color = cl_dd_document=>list_key_inv
* sap_fontsize = cl_dd_document=>medium
* sap_fontstyle = cl_dd_document=>SANS_SERIF
* sap_emphasis = cl_dd_document=>
* style_class = cl_dd_document=>WARNING
* CHANGING
* document =
CALL METHOD doc->new_line
EXPORTING
repeat = 1.
text = 'Line3'.
CALL METHOD doc->add_text
EXPORTING
text = text
* text_table =
* fix_lines =
* sap_style = cl_dd_document=>heading
* sap_color = cl_dd_document=>list_key_inv
* sap_fontsize = cl_dd_document=>medium
* sap_fontstyle = cl_dd_document=>SANS_SERIF
* sap_emphasis = cl_dd_document=>
* style_class = cl_dd_document=>WARNING
* CHANGING
* document =
CALL METHOD doc->display_document
EXPORTING
* reuse_control = 'X'
* reuse_registration = 'X'
container = 'CONT'
* parent =
EXCEPTIONS
html_display_error = 1
OTHERS = 2
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CLEAR first_display.
ENDIF.
ENDFORM. " add_html_code -
Can any share me the procedure to create a text box in screen painter?
Hi Friends,
Can anyone share me the procedure to create a text box in screen painter and browser for attaching files ....please its urgent....
Points will be definetly rewarded.
ThanksRefer to
How to create a text box in ascreen painter?
where another user (venkateshwar reddy) has asked a very similar question... is this an exam question?
Jonathan -
How to continue the screen in Screen -painter?
Hi friends can anybody help me out in knowing how to continue the fields in screen painter. For clear explanation i have got 20 fields to be entered in my form, but when i am going to layout of screen painter i have been able to accomadate only 12 the rest 8 i want to be in continuation.
hope you can under stand.
suppose if this is the layout
Registration
01. ......
02. ,,,,,,
12. ,,,,,,,,
i have accomadated in one single screen
i want to accomadate the rest 8 in continuation can i know how?
please its urgent for me.hi
increase the window size.
regards
sreelatha gullapalli -
How to put "selection options without intervals" on screen painter?
Hello all,
I need to put a field for pernr(personal number) on screen painter (module program) and user should be able to enter a list of pernr's to process. I know in report program I can do this by:
SELECT-OPTIONS: s_lpernr FOR pa001-pernr NO INTERVALS.
How can I get this work on sccreen painter in module programming? How can I add a field on screen painter with a range without intervals? Please let me know.
Thanks.
Mithun.You can also do this using the function module COMPLEX_SELECTIONS_DIALOG.
REPORT ZTEST_SCREEN .
DATA : BEGIN OF IT_DYNPFIELDS OCCURS 3.
INCLUDE STRUCTURE DYNPREAD.
DATA : END OF IT_DYNPFIELDS.
DATA: TEST(10) TYPE C.
RANGES: R_UNAME FOR SY-UNAME.
DATA: V_USERNAME LIKE SY-UNAME.
DATA : V_PROG LIKE D020S-PROG VALUE 'ZTEST_SCREEN',
V_DNUM LIKE D020S-DNUM VALUE '0100'.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'TEST'.
* SET TITLEBAR 'xxx'.
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
*& Module GET_CURSOR_USERNAME INPUT
* text
MODULE GET_CURSOR_USERNAME INPUT.
REFRESH IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
MOVE 'V_USERNAME' TO IT_DYNPFIELDS-FIELDNAME.
APPEND IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = V_PROG
DYNUMB = V_DNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC EQ 0.
READ TABLE IT_DYNPFIELDS WITH KEY FIELDNAME = 'V_USERNAME'.
IF SY-SUBRC = 0.
V_USERNAME = IT_DYNPFIELDS-FIELDVALUE.
ENDIF.
ENDIF.
PERFORM GET_MULTIPLE.
ENDMODULE. " GET_CURSOR_USERNAME INPUT
*& Form GET_MULTIPLE
* text
* --> p1 text
* <-- p2 text
FORM GET_MULTIPLE .
* Dynamically holding Field name
FIELD-SYMBOLS: <FST> TYPE STANDARD TABLE.
IF R_UNAME[] IS INITIAL.
IF NOT V_USERNAME IS INITIAL.
R_UNAME-SIGN = 'I'.
R_UNAME-OPTION = 'EQ'.
R_UNAME-LOW = V_USERNAME.
APPEND R_UNAME.
CLEAR R_UNAME.
ENDIF.
ENDIF.
ASSIGN R_UNAME[] TO <FST>.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Select Multiple Value'(059)
TEXT = 'Finish Group'(058)
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = 'X'
JUST_DISPLAY = ' '
JUST_INCL = 'X'
TABLES
RANGE = <FST>
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC EQ 0.
READ TABLE R_UNAME INDEX 1.
IF SY-SUBRC = 0.
V_USERNAME = R_UNAME-LOW.
ENDIF.
ENDIF.
ENDFORM. " GET_MULTIPLE -
Hi,
How to insert a picture in screen painter.?
Thanks,
SureshHi
first Upload the image in SMW0 in binary format and give name as 'Zimage_LOGO'.
Below find the code to display Image in module pool program
Data : CL_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
CL_PICTURE TYPE REF TO CL_GUI_PICTURE,
WA_HTML LIKE W3HTML,
WA_MIME LIKE W3MIME,
WA_PARAM LIKE W3PARAM,
WA_QUERY LIKE W3QUERY,
LV_URL(256) TYPE C,
PIC_SIZE TYPE I,
LV_text(28) TYPE C VALUE 'Image Display Example'.
In PBO event write below code
IF CL_PICTURE IS INITIAL.
Create controls
CREATE OBJECT CL_CONTAINER
EXPORTING
CONTAINER_NAME = 'CL_CONTAINER'.
CREATE OBJECT CL_PICTURE
EXPORTING
PARENT = CL_CONTAINER.
CALL METHOD CL_PICTURE->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT_CENTER.
WA_QUERY-NAME = '_OBJECT_ID'.
WA_QUERY-VALUE = 'Zimage_LOGO'.
APPEND WA_QUERY TO IT_QUERY.
APPEND WA_HTML TO IT_HTML.
APPEND WA_MIME TO IT_MIME.
CALL FUNCTION 'WWW_GET_MIME_OBJECT'
TABLES
QUERY_STRING = IT_QUERY
HTML = IT_HTML
MIME = IT_MIME
CHANGING
RETURN_CODE = WA_PARAM-RET_CODE
CONTENT_TYPE = WA_PARAM-CONT_TYPE
CONTENT_LENGTH = WA_PARAM-CONT_LEN
EXCEPTIONS
OBJECT_NOT_FOUND = 1
PARAMETER_NOT_FOUND = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
PIC_SIZE = WA_PARAM-CONT_LEN.
CALL FUNCTION 'DP_CREATE_URL'
EXPORTING
TYPE = 'image'
SUBTYPE = 'X-UNKNOWN'
SIZE = PIC_SIZE
DATE =
TIME =
DESCRIPTION =
LIFETIME = 'T'
CACHEABLE =
SEND_DATA_AS_STRING =
FIELDS_FROM_APP =
TABLES
DATA = IT_MIME
FIELDS =
PROPERTIES =
COLUMNS_TO_STRETCH =
CHANGING
URL = LV_URL
EXCEPTIONS
DP_INVALID_PARAMETER = 1
DP_ERROR_PUT_TABLE = 2
DP_ERROR_GENERAL = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
CALL METHOD CL_PICTURE->LOAD_PICTURE_FROM_URL
EXPORTING
URL = LV_URL.
ENDIF.
ENDIF.
Hope it shall be useful
Regards
Santosh -
Screen Painter and Menu Painter Translations
Hello All,
I want to translate the Screen painter and Menu Painter Objects .
When I go to the SE41 and select the PF Status of my Program and press change Button I'm getting the following msg :
Make repairs in foreign namespaces only if they are urgent .
If I press Ok and select the Menu path : Goto --> Translation .
The Translation options is in deactivated mode.
How to do the Translation now ?
Regards,
Deepu.KHi
Run trx SE63, then go to: Translation->Short Texts->Screen Painter
Choose:
- Header to translate the title of attribute of the screen;
- Texts to translate the label of the input/ouput fields
Translation->Short Texts->User interface to translate the menu
Max -
Screen painter, ChooseFromList and et_EDIT
Hi,
I'm in Screen Painter and I did set a it_EDIT with a ChooseFromList Business Partner.
When I hit PREVIEW, it works fine, the list of Business Partners appear and I choose one but the choosen one do not go in the et_EDIT textbox.
I don't understand the Aliases because the help do not let me understand what it is and there's no way to see by a demo or anything else so I can understand clearly.
First is this all possible just by the Screen Painter or I do need to code something else ? Any video tutorials ? Anything could help understand how to make it work.
I beg anyone to give me a working solution.
Thank you
Edited by: Marc Roussel on Dec 20, 2010 3:16 PMJust a mall thing. Everything seems to work except that when I did choose the BP, a message pop saying :
"Item - Can't set value on item because the item can't get focus. [66000-153]"
However once I clicked OK of that message, I see my choosen BP in my EditText and everything is fine so I don't understand why I receive this message. Here's the code I use
if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_ACTIVATE && pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
SAPbouiCOM.IChooseFromListEvent oCFLEvento = null;
oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal));
string sCFL_ID = null;
sCFL_ID = oCFLEvento.ChooseFromListUID;
SAPbouiCOM.Form oForm = null;
oForm = SBO_Application.Forms.Item(FormUID);
SAPbouiCOM.ChooseFromList oCFL = null;
oCFL = oForm.ChooseFromLists.Item(sCFL_ID);
if (oCFLEvento.BeforeAction == false)
SAPbouiCOM.DataTable oDataTable = null;
oDataTable = oCFLEvento.SelectedObjects;
string val = System.Convert.ToString(oDataTable.GetValue(0, 0));
if ((pVal.ItemUID == "it_BPCode") && pVal.ActionSuccess)
((SAPbouiCOM.EditText)oForm.Items.Item("it_BPCode").Specific).Value = val; -
Range options in screen painter
Developed an application in ABAP for employee entitlement. Most of the screens are designed in Screen painter as they has to be run for single Emp. psl no.
But screen for infosystems (2000) is designed using selection-screen as it can be run for single or multiple EMP PSL no.
This infosystems screen is called using " Call selection-screen command'.
Now whenever there is change in program the flow logic of screen 2000 is changed. Now my questions are
- How to call screen 2000 without affecting flow logic.
- How to design screen in screen painter for parameter ranges.
Kindly help as no help is available
thanks
anuHi,
select options in screen check this code..
REPORT ZTEST_SCREEN .
DATA : BEGIN OF IT_DYNPFIELDS OCCURS 3.
INCLUDE STRUCTURE DYNPREAD.
DATA : END OF IT_DYNPFIELDS.
DATA: TEST(10) TYPE C.
RANGES: R_UNAME FOR SY-UNAME.
DATA: V_USERNAME LIKE SY-UNAME.
DATA : V_PROG LIKE D020S-PROG VALUE 'ZTEST_SCREEN',
V_DNUM LIKE D020S-DNUM VALUE '0100'.
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
* text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'TEST'.
* SET TITLEBAR 'xxx'.
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
*& Module GET_CURSOR_USERNAME INPUT
* text
MODULE GET_CURSOR_USERNAME INPUT.
REFRESH IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
MOVE 'V_USERNAME' TO IT_DYNPFIELDS-FIELDNAME.
APPEND IT_DYNPFIELDS.
CLEAR IT_DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = V_PROG
DYNUMB = V_DNUM
TRANSLATE_TO_UPPER = 'X'
TABLES
DYNPFIELDS = IT_DYNPFIELDS
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11.
IF SY-SUBRC = 0.
READ TABLE IT_DYNPFIELDS WITH KEY FIELDNAME = 'V_USERNAME'.
IF SY-SUBRC = 0.
V_USERNAME = IT_DYNPFIELDS-FIELDVALUE.
ENDIF.
ENDIF.
PERFORM GET_MULTIPLE.
ENDMODULE. " GET_CURSOR_USERNAME INPUT
*& Form GET_MULTIPLE
* text
* --> p1 text
* <-- p2 text
FORM GET_MULTIPLE .
* Dynamically holding Field name
FIELD-SYMBOLS: <FST> TYPE STANDARD TABLE.
IF R_UNAME[] IS INITIAL.
IF NOT V_USERNAME IS INITIAL.
R_UNAME-SIGN = 'I'.
R_UNAME-OPTION = 'EQ'.
R_UNAME-LOW = V_USERNAME.
APPEND R_UNAME.
CLEAR R_UNAME.
ENDIF.
ENDIF.
ASSIGN R_UNAME[] TO <FST>.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Select Multiple Value'(059)
TEXT = 'Finish Group'(058)
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = 'X'
JUST_DISPLAY = ' '
JUST_INCL = 'X'
TABLES
RANGE = <FST>
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
OTHERS = 4.
IF SY-SUBRC = 0.
READ TABLE R_UNAME INDEX 1.
IF SY-SUBRC = 0.
V_USERNAME = R_UNAME-LOW.
ENDIF.
ENDIF.
ENDFORM. " GET_MULTIPLE
Check this thread...
Select option in Dialog program screen
Regards
Vijay -
Multiple lines in screen painter
hi All,
How can i enable multi lines entry in screen painter ?
I have a sigle line text right now but user wants ability to enter multiple line since single lines dont suffice their requirement
tahnks
AJHi Ashish,
Example 1: Creating the TextEdit control
This is a simple example of how to implement a text edit control.
Steps
1. Create a report
2. In the start of selection event add: SET SCREEN '100'.
3. Create screen 100
4. Place a custom control on the screen by choosing the custom control icon which can be recognized by the letter 'C', and give it the name MYCONTAINER1.
5. To be able to exit the program, add a pushbutton with the function code EXIT.
6. In the elements list enter the name OK_CODE for the element of type OK.
The code
REPORT sapmz_hf_controls1 .
CONSTANTS:
line_length TYPE i VALUE 254.
DATA: ok_code LIKE sy-ucomm.
DATA:
Create reference to the custom container
custom_container TYPE REF TO cl_gui_custom_container,
Create reference to the TextEdit control
editor TYPE REF TO cl_gui_textedit,
repid LIKE sy-repid.
START-OF-SELECTION.
SET SCREEN '100'.
MODULE USER_COMMAND_0100 INPUT *
MODULE user_command_0100 INPUT.
CASE ok_code.
WHEN 'EXIT'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0100 OUTPUT
MODULE status_0100 OUTPUT.
The TextEdit control should only be initialized the first time the
PBO module executes
IF editor IS INITIAL.
repid = sy-repid.
Create obejct for custom container
CREATE OBJECT custom_container
EXPORTING
container_name = 'MYCONTAINER1'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
others = 6
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Create obejct for the TextEditor control
CREATE OBJECT editor
EXPORTING
wordwrap_mode =
cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = line_length
wordwrap_to_linebreak_mode = cl_gui_textedit=>true
parent = custom_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
gui_type_not_supported = 5
others = 6
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'I' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
The result
hope this will be helpfull.
Regards,
Raghu -
How to degin a select-option in screen painter?
Help me !
How can i create an object like select-option in screen painter.
I want to input a range ,but there are no button or text in screen painter like select-option?hai u can create select options on screen but in little differernt way..
1st way : if u want to give only 1 interval then declare on screen as two different variables in same line
and after that append the value in ranges.
2nd way: here u can define as asingle input vriable beside that variable u can give a icon as extension in select option and give give some function code to that.if we click on that in user command write following code :
IF V_OKCODE = 'EXT'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = 'Title'
TEXT = 'Text'
SIGNED = 'X'
LOWER_CASE = ' '
NO_INTERVAL_CHECK = ' '
JUST_DISPLAY = ' '
JUST_INCL = ' '
EXCLUDED_OPTIONS =
DESCRIPTION =
HELP_FIELD = 'T001W-WERKS'
SEARCH_HELP =
TABLES
RANGE = R_WERKS
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
help field the field reference wich u want to declare and range is where values will be stored atomatically as in select options.
once we click the icon if we execute the function module a window will open as in selection option in reports.there user can enter the values.once the user enters the values it will stored automatically in ranges declared like r_werks in above example.
try it.. -
How to design select-option through screen painter
I am new to screen painter. I want to make a screen having range of values high/low (just like select-option)......How can I do this using screen painter?
Hi!
Method 1
a) Create a subscreen area in your screen layout where you want to create the select options.
b) In the top include of your module pool program declare a selection screen as a subscreen e.g.
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
select-options s_matnr for mara-matnr.
SELECTION-SCREEN END OF SCREEN.
c) In the PBO and PAI of the main screen where the select options needs to be created do a call subscreen of the above screen (100).
CALL SUBCREEN sub_area INCLUDING
This call subscreen statement is necessary for transport of values between screen and program.
Note: All validations of the selection screen fields e.g. the s_matnr field created above should be done in selection screen events like AT SELECTION-SCREEN etc and not in PAI. These selection screen validations etc should be done in the top include only.
Method 2
a) Create 2 separate fields in your screen layout - one for the low value and one for the high value. Insert an icon beside the high value which will call the multiple selections popup screen on user command. Use function module COMPLEX_SELECTIONS_DIALOG to achieve this.
struc_tab_and_field-fieldname = con_cust. " 'KUNNR'
struc_tab_and_field-tablename = con_kna1. " 'KNA1'.
CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
EXPORTING
TITLE = ' '
text = g_titl1 " 'Customers'
tab_and_field = struc_tab_and_field
TABLES
RANGE = rng_kunnr
EXCEPTIONS
NO_RANGE_TAB = 1
CANCELLED = 2
INTERNAL_ERROR = 3
INVALID_FIELDNAME = 4
OTHERS = 5.
IF NOT rng_kunnr[] IS INITIAL.
Read the very first entry of the range table and pass it to
dynpro screen field
READ TABLE rng_kunnr INDEX 1.
IF sy-subrc = 0.
g_cust = rng_kunnr-low.
ENDIF.
You can use the return table rng_kunnr to populate your own internal range table with the values entered by the user. Basically here you are just simulating the work of a select-options parameter by module pool screen elements
You can go with it also ....
Re: Select-options in dynpro
Regards....
Maybe you are looking for
-
in the export module for facebook every time i click "sign in to facebook" it gives the following error: "An error occurred while request facebook connection"
-
I have an old 6.0 version of Adobe Acrobat Pro and am trying to download and install based on web instructions, but the buttons do not work? Here is the script from my chat with support: Hi, we are currently helping other customers in line ahead of
-
IsSchemaValid does chang the xml-encoding header from UTF-8 to WINDOWS-1252
I found the following effect: isSchemaValid does changing the encoding - entry of the xml-file-header generating xml-file by using DBMS_XMLGEN : xmldoc := DBMS_XMLGEN.getXML(ctx); with the header of the file is <?xml version="1.0" encoding="UTF-8"?>
-
I recently updated? to Lion from 10.6.8(snow leopard), and things seem to be running slower. Has anyone had similar problems? I have Feb 2011 Macbook pro 13" 2.3 Ghz.
-
[SOLVED] "Copy to Clipboard" console command - Parcellite
I'm trying to make a python script that will take a screenshot using scrot, upload it to imageshack.us and then copy the image link to the clipboard (parcellite). The problem lies in the "copy to the clipboard" part. The documentation states that the