Doubleclicking in subscreen
Hi all,
In my subscreen, I display some fields. In one of the field, purchase order (EBELN), i have set it so that it will response to doubleclick in screen painter. But when I click on the field during runtime, nothing happens. How can I execute the doubleclick in the codes?
Hi Mil,
please refer the following code
1.Define Fcode in the Gui Status of the Corresponding Screen.
2. Go to coding module USER_command <screen no.>
3. and write a case statement like following
CASE SY-UCOMM.
WHEN 'DCLICK'.
it_bdcdata-program = 'SAPLBTCH'.
it_bdcdata-dynpro = '2170'.
it_bdcdata-dynbegin = 'X'.
it_bdcdata-fnam = 'BTCH2170-JOBNAME'.
APPEND it_bdcdata.
DATA: g_line TYPE i,
g_val(30) TYPE c,
fld TYPE yibc_abortjoblog-jobname.
GET CURSOR FIELD fld LINE g_line VALUE g_val..
it_bdcdata-fval = g_val.
APPEND it_bdcdata.
CALL TRANSACTION 'SM37' USING it_bdcdata MODE 'E'.
ENDCASE.
Here DCLICK IS THE FCODE FOR DOUBLE CLICK.
Hope u get the logic.if not i can further help you
please reward point if answer is helpful.
thanks
Divya Jain
Similar Messages
-
Getting error while calling a subscreen in module pool program
HI ALL,
ACTUALLY I'M GETTING A SYNTAX ERROR WHILE I'M CALLING A SUBSCREEN
IN A MODULE POOL PROGRAM IN PAI MODULE
THE ERROR IS AS FOLLOW
"." or "ID ... FIELD ..." expected after "SUBSCREEN"
CAN ANYBODY PLS HELP ME.
REGARDS
ANDREWSHI MAX ,
THE CODE IS AS FOLLOWS:
*& Report ZTABSTRIP_PS
REPORT ZTABSTRIP_PS.
type-pools : vrm.
DATA:number1 type I,
number2 type I,
result type I,
ok_code like SY-UCOMM,
employee1 type c,
ABAP(19) type c,
SALES(19) type c,
HR(19) type c,
MM(19) type c,
employee type c.
emp type c.
CONTROLS tabstrip TYPE TABSTRIP.
CALL SCREEN 100.
call screen 110.
call screen 130.
call screen 120.
call screen 140.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'STATUS'.
SET TITLEBAR 'TITLE'.
CASE OK_CODE.
WHEN 'BACK' or 'EXIT' or 'DELETE'.
leave program.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
WHEN 'BACK'.
leave PROGRAM.
when 'EXIT' or 'DELETE'.
leave to screen 0.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
endcase.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
when 'TAB1'.
tabstrip-activetab = 'TAB1'.
when 'TAB2'.
tabstrip-activetab = 'TAB2'.
result = number1 + number2.
when 'TAB3'.
tabstrip-activetab = 'TAB3'.
SET TITLEBAR 'TITLE1'.
when 'TAB4'.
tabstrip-activetab = 'TAB4'.
if employee = 'NEERAJ'.
ABAP = 'NEERAJ'.
elseif employee = 'UMESH'.
SALES = 'UMESH'.
ELSEIF employee = 'RAM'.
HR = 'RAM'.
elseif employee = 'ANIL'.
MM = 'ANIL'.
endif.
employee = employee.
WHEN 'BACK'.
leave PROGRAM.
when 'EXIT' or 'DELETE'.
leave to screen 0.
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
ENDCASE.
WHEN 'BACK' or 'EXIT' or 'DELETE'.
leave program .
WHEN 'SAVE'.
MESSAGE 'please choose a valid function' TYPE 'I'.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module STATUS_0110 OUTPUT
text
**MODULE STATUS_0110 OUTPUT.
SET PF-STATUS 'STATUS1'.
SET TITLEBAR 'xxx'.
**case ok_code.
**WHEN 'back' or 'exit' or 'delete'.
leave PROGRAM.
WHEN 'save'.
MESSAGE 'please choose a valid function ' TYPE 'W'.
ENDCASE.
**ENDMODULE. " STATUS_0110 OUTPUT
*& Module USER_COMMAND_0110 INPUT
text
MODULE USER_COMMAND_0110 INPUT.
number1 = number1.
number2 = number2.
CLEAR NUMBER1.
CLEAR NUMBER2.
REFRESH NUMBER1.
REFRESH NUMBER2.
ENDMODULE. " USER_COMMAND_0110 INPUT
*& Module STATUS_0130 OUTPUT
text
MODULE STATUS_0130 OUTPUT.
SET PF-STATUS 'STATUS2'.
SET TITLEBAR 'xxx'.
RESULT = number1 + number2.
*CLEAR RESULT.
REFRESH RESULT.
ENDMODULE. " STATUS_0130 OUTPUT
*& Module STATUS_0120 OUTPUT
text
MODULE STATUS_0120 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
DATA: l_name TYPE vrm_id,
li_list TYPE vrm_values,
l_value LIKE LINE OF li_list.
l_value-key = '1'.
l_value-text = 'ANIL'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '2'.
l_value-text = 'RAM'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '3'.
l_value-text = 'NEERAJ'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_value-key = '4'.
l_value-text = 'UMESH'.
APPEND l_value TO li_list.
CLEAR l_value.
CLEAR li_list.
l_name = 'employee'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
ID = l_name
VALUES = li_list
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.
CLEAR li_list.
ENDMODULE. " STATUS_0120 OUTPUT
*& Module USER_COMMAND_0120 INPUT
text
MODULE USER_COMMAND_0120 INPUT.
INCLUDING sy-repid '140'.
employee1 = employee.
IF employee1 CS 'NEERAJ'.
call SUBSCREEN sub4 .
ABAP = 'NEERAJ'.
CLEAR ABAP.
ELSEIF employee1 CS 'UMESH'.
call SUBSCREEN sub4 .
SALES = 'UMESH'.
CLEAR SALES.
elseif employee1 CS 'RAM'.
call SUBSCREEN sub4 .
HR = 'RAM'.
CLEAR HR.
ELSEIF employee1 CS 'ANIL'.
call SUBSCREEN sub4 .
MM = 'ANIL'.
CLEAR MM.
endif.
ENDMODULE. " USER_COMMAND_0120 INPUT
*& Module STATUS_0140 OUTPUT
text
MODULE STATUS_0140 OUTPUT.
*CASE OK_CODE.
WHEN employee1 'NEERAJ'.
screen-active = 1.
ABAP = 'NEERAJ'.
WHEN employee1 = 'UMESH'.
screen-active = 1.
SALES = 'UMESH'.
WHEN employee1 = 'RAM'.
screen-active = 1.
HR = 'RAM'.
WHEN employee1 = 'ANIL'.
screen-active = 1.
MM = 'ANIL'.
endif.
*ENDCASE.
ENDMODULE. " STATUS_0140 OUTPUT -
Regarding SY-UCOMM from a subscreen.
Hi All,
I am calling a screen from a subscreen by using a push button.
Issue : suppose SY_UCOMM when push button is pressed is TEST.
When I press it , it takes to called sceen and in this screen SY_UCOMM changes.
But , when I return control to my subscreen, I get SY_UCOMM as TEST.
Please let me know the cause for the same.
Thanks in advance.hi,
first clear the Sy-ucomm or ok_code in PBO..
and check again..
and also check for enter do you assigned and function code or not in se41...
if you donot any function key or code for enter the old sy-ucomm will be still there.
soclear the Sy-ucomm or ok_code in PBO..
i think from sub screen you can not call the another screen..
but you can call the transaction..
Regards,
Prabhudas -
How to add custom fields in BADI Subscreen.
Hi Friends,
I have to include some custom fields in MFBF tcode.(In make-to-order tab page).
To do that I have used RM_HR_INTEGRATION BADI definition and created implementation for this. In the provided subscreen I tried to add custom fields but it asks access key . I donu2019t know , how to proceed further. Your help is needed.
Or kindly provide me solution to achieve my requirement.
Thanks in Advance,
senthil.Hi Venky,
We can see the documentation in
se18 -> badi -> LE_SHP_TAB_CUST_HEAD -> display -> documentation button above the definition name
in the first pop-up of documentation..go to the end which says 'Further notes'
Further notes
Documentation on BAdI Interface LE_SHP_TAB_CUST_HEAD
click on this and we have a detailed description of each method defined in the badi
Hope it helps
Regards
Byju -
Want check box checked as default for a newly added subscreen in ME21N
Hi Guys,
I have added a subscreen in ME21N with one field with check box.
When I enter ME21N I should get that checkbox CHECKED automatically.
How to do this.
And one more thing is when manually putting checkmark,when I press enter that check mark is getting deselected.How to overcome this???
I have used screen exit
SAPLXM06
screen: 0101 for this subscreen.
Thanks in Advance.
Prasad.Hi,
the deselection problem could be caused of an incorrect name of that screen field name. You should check in screen painter if that check box field name is the same name as your data object (e.g. gv_checkbox) .
Unfortunately it is not possible to define default values within Screen Painter. You have to do this in PBO.
Regards
Mark-André -
Edit a field in ALV tree in a subscreen of a module pool
Hi
I want to make a field editable in the ALV tree based on some condtions in a subscreen of a module pool. I used the edit = 'X' field in the fieldcatalog still it is showing the field as display and not edit.
Please help me to get the field as editable and save it to the database table.
Please not this is ALV TREE
Regards,
MozilaHi Mayank,
Thanks for the reply
I am using oops method.
I tried making the field which is to be made editable as wa_fieldcatalog-edit = 'X'. But its not working. I didnt get you when you said edit in layout object.
I also went through the demo programs but these programs are not having editable fields.
My code is as follows:
IF tree4 IS INITIAL.
* create container for alv-tree
l_tree_container_name = 'TREE4'.
CREATE OBJECT l_custom_container
EXPORTING
container_name = l_tree_container_name
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
* create tree control
CREATE OBJECT tree4
EXPORTING
i_parent = l_custom_container
i_node_selection_mode = cl_gui_column_tree=>node_sel_mode_multiple
i_item_selection = 'X'
i_no_html_header = 'X'
i_no_toolbar = 'X'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
illegal_node_selection_mode = 5
failed = 6
illegal_column_name = 7.
* create hierarchy
CALL METHOD tree4->set_table_for_first_display
EXPORTING
is_layout = s_layo
CHANGING
it_sort = it_sort
it_outtab = it_final
it_fieldcatalog = it_fieldcat.
ELSE.
CALL METHOD tree4->refresh_table_display
EXPORTING
it_sort = it_sort
EXCEPTIONS
program_error = 1
failed = 2
cntl_system_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.
endif. -
Double click on the node,ALV tree, subscreen
Hi,
I have a small requirement in ALV Tree
left side i get a tree and when i double click on one of it , i'm trying to display the subscreen. even though i am setting the paramaters to the screen but i'm unable to get those values in the subscreen.
example
Name Description subscreen 0101
xyz xyz desc (double click on this) name = XYZ
ABC abs desc descrip = xyz desc
This is what the requirement is:
Please help me out with the solution.
BhavanaHi Bhavana,
Register your double click event in the ALV Tree program. Then call the respective subscreen using sy-ucomm value.
IF NOT r_ucomm IS INITIAL.
CASE r_ucomm.
WHEN '&F03'.
SET SCREEN 100.
LEAVE SCREEN.
endif.
Refer the below code for setting the registering the event.
CALL METHOD tree->get_registered_events
IMPORTING
events = l_events_s.
l_event-eventid = cl_gui_column_tree=>eventid_item_double_click.
APPEND l_event TO l_events_s.
CALL METHOD tree->set_registered_events
EXPORTING
events = l_events_s
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
illegal_event_combination = 3.
CREATE OBJECT l_events_receiver.
SET HANDLER l_events_receiver->handle_item_click FOR tree.
CLASS lcl_events_receiver DEFINITION. "#EC *
PUBLIC SECTION.
METHODS:
handle_item_click FOR EVENT item_double_click OF cl_gui_alv_tree
IMPORTING node_key fieldname.
ENDCLASS. "lcl_handle_events DEFINITION
CLASS lcl_events_receiver IMPLEMENTATION.
METHOD handle_item_click.
PERFORM employee_data USING node_key fieldname.
CALL SCREEN 300.
ENDMETHOD. "HANDLE_ITEM_DOUBLE_CLICK
ENDCLASS. "lcl_events_receiver IMPLEMENTATION
Thanks.
Ganesh R K
Edited by: Ganesh.rk83 on Jun 23, 2011 11:21 AM -
PAI is NOT trigger for ALV in subscreen
Hi, All
Currently, I am using ALV object to output ALV report in one SUBSCREEN.
When I double-click, the PAI is not trigger. But just go into double-click event directly.
However, If I use AVL function or object to output in NORMAL screen, PAI is trigger after double click.
SY-UCOMM is like %_GC 920 3Hello Ocean
The ALV grid is a special control in terms that all the events are already pre-registered at the control (method SET_REGISTERED_EVENTS). This means that as soon as you define an event handler method and SET HANDLER for the corresponding event your application can deal with this event.
You can register all events of the ALV grid as application events (i.e. after any event handling PAI of the screen is triggered) at the CONSTRUCTOR method:
I_APPL_EVENTS = 'X'
However, I prefer to use method CL_GUI_CFW=>SET_NEW_OK_CODE because it offers more flexibility to me:
Only those event where I need to trigger PAI after event handling are affected
By setting a new ok-code I can trigger a specific logic at PAI
Regards
Uwe -
Issue while opening websites from module pool subscreen.
I have three subscreens which do open while user clicks a radio button on the main screen . Now in two of the subscreens,there are two text fields which contain url of two websites . When i am setting a GUI status when sy-pfkey/sy-ucomm = 'PICK' , they are getting set but inside the PAI of subscreens when I am writing :-
When sy-ucomm = 'PICK'.
call fn 'call_browser'.
The websites don't open because the PICK fn code is not getting triggered.
In two of the subscreens ,the website addresses / urls will be fixed whereas in the third subscreen,the website address comes from field "tline" .
So I can't handle the scenario through buttons and assigning function codes to them.
Pls advise.Dear Subankar,
For that screen filed select option like drill down with key.
Regards,
Madhu. -
Can i add more than one subscreen to me21n / me22n ?
i was implement one subscreen in the past with BAdI
ME_GUI_PO_CUST .
now the customer ask for one more , is it possible ?
in "IF_EX_ME_GUI_PO_CUST~SUBSCRIBE"
you have code :
*class definition
ls_subscriber-name = subscreen1.
the dynpro number to use
ls_subscriber-dynpro = '0001'.
the program where the dynpro can be found
ls_subscriber-program = 'SAPLYMEPOBADIEX' ." 'SAPLMEPOBADIEX' "
each subscreen needs his own DDIC-Structure
ls_subscriber-struct_name = 'MEPO_BADI_STRUCT'. " MEPO_BADI_STRUCT
a label can be defined
ls_subscriber-label = text-001.
the position within the tabstrib can be defined
ls_subscriber-position = 9.
is it possible to make another subscreen ?Hi,
I think that you can only create one subscreen. This BADI is similar to the user exit MM06E005.
Vani -
Hiding a Complete Subscreen in a main Screen
HI All,
I have a req in which there is 5 subscreens present in one main screen. My issue is i want to hide a complete Subscreen based on 1checkbox present in that mainscreen itself.
After checking that checkbox user will be pressing ENTER. After that i need to hide some of the subscreens.
Thanks in advance,
ShyamHI,
You can check for the subscreen_area that you use to put the subscreen and in the PBO of the main screen you can avoid calling this subscreen or you can hide the subscreen area by making SCREEN-ACTIVE=0 for the subscreen area.
For the check box you can set some fcode and in the PAI you can set some global flag which you need to check in PBO and then deactive the subscreen area.
PAI module.
if ok_code is <your check box>.
if check_box = 'X'.
global_flag = 'X'.
else.
clear global_flag.
endif.
PBO Module.
if global_flag = 'X'.
loop at screen.
if screen-name = 'SUBSCREEN_AREA'.
screen-active= 0.
modify screen.
endloop.
endif.
Regards,
Sesh -
Add button to BP subscreen Identification Numbers
Hi gurus,
in transaction BP there is a tab called Identification. On this tab a subscreen area Identification Numbers exists which contains a screen (SAPLBUD0 - 1520). We want some added logic on the screen by means of a new button. I think it is not possible to add a button because the screen is hard-coded, so what I thought should happen is that a copy of the screen is made including the new button.
And now my problem occurs, how do I replace the former screen(SAPLBUD0 - 1520) with the new screen on that particular screen area?
kind regards,
Wim van ErpI've found it. trx. BUS3 contains the specific screen.
regards. -
Updating multiple subscreens in using DYNP_VALUES_UPDATE
Hi,
I have subscreens in multiple tabs. One tab is with fields, the other with a table.
The requirement is that either selecting from fields or table, it will prompt a pop-up with tree structure for selection. Once a selection is made (multiple values allowed), it should update both screens in the different tab.
The scenario is that, if I am in tab 1 (screen 9003), the values updated is only fields on tab 1 and not the table in tab 2 (screen 7338), and vice versa. Both goes thru the same set of codes.
I used 2 DYNP_VALUES_UPDATE to update the different screens (both in the same program) and have also tried DYNP_UPDATE_FIELDS but both works the same way.
I have also tried with 1 call to DYNP_VALUES_UPDATE by passing in the main screen (Screen 7200). It works the same way as above.
Please help.Thanks for the reply. I believe assigning the values behind the screen with my own code would mean that I pass the value to the field/structure? I've done that prior to calling DYNP_VALUES_UPDATE. Does that mean I do not need to call the function module for it to work?
Can you give an example, please? -
How to add a field in a table control of the subscreen 6103 of tcode f-03
hi abap gurus....i m new to abap and this is my first post ..i m hoping for a reply soon as it is urgent....
my requirement is to add a field PAYR-CHECF to a table control of the subscreen 6103 of tcode f-03Hi,
Please see documentation of enhancement MM06E005 (transaction SMOD).
Userexit EXIT_SAPMM06E_016 is a component of enhancement MM06E005.
With that enhancement, you can
- Maintain/supply your own customer fields
- Update your own customer-specific tables
You cannot:
- Change standard fields
- Change data that depends on the document header in the items
- Change data that depends on an item in the document header
Please have a look at Business Add-In (BAdI) ME_PROCESS_PO_CUST.
Regards,
Edit -
PAI of subscreen: using sy-ucomm
Hi,
I need to write some code in a PAI of a subscreen ( which is actually a screen exit).
I am using : IF sy-ucomm = 'FCOD'.
PERFORM GIVE_MESSAGE.
ENDIF.
IN MODULE USER_COMMAND_9211.
I want to know if it is good to use SY-UCOMM directly ?
I read in SAP HELP that I cannot use OK-CODE or FCODE in subscreen directly, so I am using sy-ucomm.
Please advice if this is correct method or is there any better method?
Thanks,
Rupali.Hi
A subscreen is not a screen: it can "live" in a main screen only and it can be called by several main screens.
It should be better not to manage a USER_COMMAND in a subscreen for the reason above.
Anyway u can check the SY-UCOMM instead of OK-CODE of the main screen, but u make sure the OK-CODE is not changed: sometimes the ok-code can be changed under some situations: so the value of SY-UCOMM wouldn't be equal to OK-CODE.
If you're in a screen-exit it's better not to define an own ok-code becuase it can determine a bad behavior of the standard program.
Max
Maybe you are looking for
-
Somehow when I synced my iPhone last week, it added albums of photos from I guess previous syncs and now I have all theses albums on my phone I do not want on my phone. I have tried to figure out how to delete them but can't. And it is taking up a
-
Is it possible to turn off the new Image Size previewing function in CC?
I find it slows down my workflow, especially when editing really big files. I can see why some people might find it useful, but when you're working through a lot of files and you don't want a preview it is sooo frustrating. Sometimes when I hit the c
-
M4b files will not sync after recent update
I recently updated the software on my ipod touch 4th gen. After updating, I tried to sync my playlists, but not all of the files would sync. After some investigation, I figured out that the files that wouldn't sync were audio books in m4b format. The
-
Where can I purchase a Satellite 3000-514 motherboard?
I need to replace the system board (?), motherboard (?) on my Toshiba Satellite S3000-514. Question: Where can I go to purchase the motherboard? Question 2: How much in sterling can I expect to pay? Thank you.
-
Editable DataGrid won't sort correctly
This is the weirdest behavior I've ever seen... I am working on a datagrid (editable="true"), and for some reason the thing does not want to sort correctly. It is a basic datagrid with itemrenderers for each column so that we can edit in the grid. So