Set function code active/inactive
Hi!
Is there a way to set a function code assigned to a function key active and inactive programmatically during runtime?
Regards,
Thomas
Hello Thomas,
You can use SET PF-STATAUS excluding addition based on some conditition
Take F1 help for furthere info
Best Regards
Ramchander Rao.K
Similar Messages
-
How to set Function Code for Radion Buttons in Screen painter
Hi,
I have faced problem of grouping 3 radio buttons in screen painter (no graphical editor). How to do it?
I have checked similiar threads in SDN, but those are for graphical editor.
Radio Buttons in custom screeen
http://****************/Tutorials/ABAP/Checkbox/page1.htm
http://****************/Tutorials/ABAP/Checkbox/page2.htm
Regards,
SukhboldHi,
U want to create radio button in the selection screen then u can create like this
PARAMETERS : c1 AS CHECKBOX USER-COMMAND cd,
r1 RADIOBUTTON GROUP rad,
r2 RADIOBUTTON GROUP rad.
AT SELECTION-SCREEN OUTPUT.
IF c1 = 'X'.
LOOP AT SCREEN.
IF screen-name = 'R1'.
screen-input = '0'.
screen-active = '0'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
ELSE.
LOOP AT SCREEN.
IF screen-name = 'R1'.
screen-input = '1'.
screen-active = '1'.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Thanks, -
Cash discount - F-28 - how to control Active / Inactive setting
Hi All,
When I try to post incoming posting through F-28 for a customer and choose the open items, the cash discount value is INACTIVE.
But when another user tries to post incoming payment for the same customer, Cash discount value is ACTIVE.
We are building a custom program for clearing the open items, so this is causing some discrepancies in the amount to be posted.
We checked the editing options(OPEN ITEMS tab) and it looks same for both of us.
Can anyone please let me know if there is any setting through which we can control the cash discount (ACTIVE / INACTIVE)
Thanks in advance.
KrishnaPlease try executing f-28 once again and check case discount column, if it is not there, execute transaction /nSU53 and check the authorization which is missing in your case.
Hope this helps!!!
Regards,
Murlidhar Khatri -
Activating Business set function for Campus management
Hello All,
I am trying to activate the business set function for Campus management but ending up in error
Invalid Status
Business function FICAX is not in target business function set
We are in Ehp4 and its IDES system. Do i miss any settings / configurations
Regards,
AnandHello Tina,
Kindly regret for delay in reply and I have sent you the mail.
Regards,
Anand -
How to Grey(Deactivate) Function Code at application Toolbar of a screen
Hi all,
I want to gray(deactivate) function codes at application toolbar of a normal screen. I am using excluding addition of set pf-status but it hides the button from the application tool bar.
I don't want to hide button, but gray only.
Thanx in advance.When editing the PF-Status itself, try selecting the menu option and then F7 (the Function Code / Activate / Deactivate button, or menu Extras > Function Active <-> Inactive).
Jonathan -
Function Code can not be selected
Dear expert,
Please help me, there is a uploader For MIGO, USer is uploading data using this uploader, Sometimes when user try to upload data, he gets a message on status BAR:
Function cannot be selected, When i Double Click on that Message i Get Following Information:
Message NO: 00255
Diagnosis
You entered an Inactive function code
You can trigger this by:
inputting directly in the OK code field
inputting the fastpath of an inactive menu function
choosing an inactice function key, or even by
choosing enter, if enter has an inactive function
In batch input a function code is included in field BDC_OKCODE of the session, as long as this function Code is not assigned to Enter
As well as activating function codes stastically in the menu painter(Transaction SE41), they can also be deactivated dynamically using the excluding addition with PF-STATUS.
Now one more thing i want to tell you is when user just open MIGO directly and try to enter some data and get back before saving and then Execute uploader then user can upload data without any error,
Kindly tell me what shoul i do to remove this error permanently
Thanks in advance
Regards
Shelly MalikThere is an error in this uploader, it should not call this command which is not available on that screen. What is this uploader? If it's a custom abap program, you must debug it.
-
Function code for dropdown on OO ALV Grid to trigger user_command
Hi Experts,
I know we can add a dropdown to a column of an OO ALV Grid, set values to the dropdown list and allow the user to select some these values.
However , what I'm not sure is that if we can *assign a function code to the dropdown * which would then trigger the event user_command ( PAI ) of the ALV class so I can handle the changes to when a particular value is selected from a dropdown list, just like we do in normal dialogs.
Now I know that I can register the 'Enter' event and handle the data changes in data_changed event, but that is something I want to avoid the user from doing as far as possible to make the report more user friendly.
Awaiting your valuable inputs and would really appreciate your help.
Thanks & regards,
AdvaitHi Advait,
No problem. Yes, this functionality requires changing the focus to other cell.
I think there is other solution. As the dropdown is kind of F4 activity try this way:
data: it_f4 type lvc_t_f4,
wa_f4 type lvc_s_f4.
wa_f4-FIELDNAME = 'CONNID'.
wa_f4-REGISTER = 'X'.
wa_f4-GETBEFORE = 'X'.
wa_f4-CHNGEAFTER = 'X'.
append wa_f4 to it_f4.
"register F4 event
CALL METHOD g_alv_grid_ref->register_f4_for_fields
EXPORTING
it_f4 = it_f4.
"Once you try to pick the value HANDLE_DATA_CHANGED event will be triggered
"Definition
methods:
handle_data_changed FOR EVENT data_changed OF cl_gui_alv_grid
IMPORTING er_data_changed e_onf4 e_onf4_before e_onf4_after,
"Implementation
METHOD handle_data_changed .
DATA: ls_mod_cells TYPE lvc_s_modi.
IF e_onf4_before = 'X'.
MESSAGE 'Data changed before F4' TYPE 'I'.
ENDIF.
IF e_onf4 = 'X'. "if event triggered by F4
MESSAGE 'Data changed on F4' TYPE 'I'.
ENDIF.
IF e_onf4_after = 'X'.
MESSAGE 'Data changed after F4' TYPE 'I'.
ENDIF.
"here you know which cell was modified
LOOP AT er_data_changed->mt_mod_cells INTO ls_mod_cells.
"just example test case, here you can implement your code for modified cells
IF ls_mod_cells-value >=5.
CALL METHOD er_data_changed->add_protocol_entry
EXPORTING
i_msgid = 'SABAPDOCU'
i_msgty = 'E'
i_msgno = '888'
i_msgv1 = 'Only numbers below 5 are possibe'
i_msgv2 = 'Please correct'
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id.
CALL METHOD er_data_changed->modify_cell
EXPORTING
i_fieldname = ls_mod_cells-fieldname
i_row_id = ls_mod_cells-row_id
i_value = space.
ENDIF.
ENDLOOP.
ENDMETHOD. "handle_data_changed
This approach works fine for picking value from input help. Never tried it for dropdown list. You have to try it out.
Regards
Marcin -
Hi,
I have a report where in i have to add a new icon with a tick symbol along with the existing execute icon ie f8.I have copied the status of the program into another before adding the new icon and to that i have added the new icon and function code.
i have used set pf-status in the initialisation event.Now when i give the select options and press f8 it enters into the program but sy-ucomm is still empty and does not do the desired functionality.If i click the icon for test run it does not enter the program itself.Can anyone help me out on this.
The status is activated in se41.
Points will be rewarded.
Please help.
Regards,
Sowmya.hi,
just try like that used in the report: demo_list_at_user_command
like:
START-OF-SELECTION.
WRITE: 'Basic List',
/ 'SY-LSIND:', sy-lsind.
TOP-OF-PAGE.
WRITE 'Top-of-Page'.
ULINE.
TOP-OF-PAGE DURING LINE-SELECTION.
CASE sy-pfkey.
WHEN 'TEST'.
WRITE 'Self-defined GUI for Function Codes'.
ULINE.
ENDCASE.
AT LINE-SELECTION.
SET PF-STATUS 'TEST' EXCLUDING 'PICK'.
PERFORM out.
sy-lsind = sy-lsind - 1.
AT USER-COMMAND.
CASE sy-ucomm.
WHEN 'FC1'.
PERFORM out.
WRITE / 'Button FUN 1 was pressed'.
WHEN 'FC2'.
PERFORM out.
WRITE / 'Button FUN 2 was pressed'.
WHEN 'FC3'.
PERFORM out.
WRITE / 'Button FUN 3 was pressed'.
WHEN 'FC4'.
PERFORM out.
WRITE / 'Button FUN 4 was pressed'.
WHEN 'FC5'.
PERFORM out.
WRITE / 'Button FUN 5 was pressed'.
ENDCASE.
sy-lsind = sy-lsind - 1.
FORM out.
WRITE: 'Secondary List',
/ 'SY-LSIND:', sy-lsind,
/ 'SY-PFKEY:', sy-pfkey.
ENDFORM.
When you run the program, the system displays the following basic list with a the page header defined in the program:
You can trigger the AT LINE-SELECTION event by double-clicking a line. The system sets the status TEST and deactivates the function code PICK. The status TEST contains function codes FC1 to FC5. These are assigned to pushbuttons in the application toolbar. The page header of the detail list depends on the status.
Here, double-clicking a line no longer triggers an event. However, there is now an application toolbar containing five user-defined pushbuttons. You can use these to trigger the AT USER-COMMAND event. The CASE statement contains a different reaction for each pushbutton.
For each interactive event, the system decreases the SY-LSIND system field by one, thus canceling out the automatic increase. All detail lists now have the same level as the basic list and thus overwrite it. While the detail list is being created, SY-LSIND still has the value 1.
Regards,
Renjith Michael. -
Risks when locking Prod in SCC4, but not setting Company Code to productive
Hi,
I am trying to figure out the risks related to not setting Company Codes to productive... even though the Production system is locked in SCC4. Will the lock in SCC4 mitigate the risk of not setting Company Codes to productive?
To my understanding, setting Company Codes to non-productive in the Production system would result in a risk for deleting financial data. I therefore wonder if defining the lock in SCC4 would compensate for this risk.
Regards
IT-auditorI asked myself the same question.
The F1-help in SCC4 says the following:
"This field should be maintained by the customer for documentary purposes."
But also:
"- Production clients and SAP reference clients are protected from the client copy tools, including "Copy by Transport Request" (transaction SCC1).
- There is corresponding protection from the automatic Customizing Distribution and other tools.
- In a production client, customizing settings that can be maintained as "current settings" are excluded from a client lock or transport connection; this means current settings (e.g. exchange rates, posting periods) can always be maintained in a productive client without recording changes. Other clients usually require a transport request."
So, i think that the client role option is more a documentation thing. But also disables some client copy and automatic transport functionality. In my opinion it should be "production" on a production system because if not there are several functions activated that shouldn´t be for security reasons.
That´s what i think. Maybe someone can correct me or give more information to this thread.
regards
Tobias -
Financial service extention set is not active
hi expert,
I try to execute t-code tm01 but error message pop-up "financial service extention set is not active"
I did activate EA-FS in t-code SFW5 but EA-FS was not activated in t-code BF11.
I can`t active EA-FS in BF11 because checkbox of EA-FS is unchagealbe, even others EA * applications are unchageable in BF11.
How can I active EA * applications in BF11?
Thanks
Junhi all,
thanks for your reply.
I activated business function (-> yellow) FIN_TR* but error is same.
I cant still execute t-code tm01.
Anything else?
Regards,
Jun -
How to set functional keys as shortcuts for menu items in AWT?
Hello!
I want to set functional keys as shortcuts for menu items in AWT, for example F1, F2... Here's my code:
MenuItem menuItemHelp = new MenuItem ("Help", new MenuShortcut(KeyEvent.VK_F1));
But, in result, this menu item is activated, when Ctrl-V pressed. Why?
Thanks in advance for help.I have no idea what is going on but if you reinstall the jdk then it might fix it. I had some similar problems myself but reinstalling fixed them.
-
How to find function code for buttons on toolbar in oops alv
Hi experts,
I want to remove some buttons from toolbar in oops alv, i know the procedure like get function code and pass the value in a table and pass that table to IT_TOOLBAR_EXCLUDING of
method set_table_for_first_display but I WANT TO KNOW HOW TO FIND FUNCTION CODE FOR BUTTONS ON TOOLBAR IN OOPS ALVHi Prakash,
-->First you have to set the pf status in your alv program by,
{FORM pf_status USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'FIRST'.
ENDFORM. "PF_STATUS}
-->Pass this Subroutine name in the Function module, Reuse_alv_grid_display's parameters i.e,
i_callback_pf_status_set = 'PF_STATUS'}
*-->Then doble click on that pf status,
From the menu bar, select Extras->Adjust Template->List Viewer,
This will give you the existing statndard gui status of the program*
->Then catch that function codes in the User command Parameter of the Function module Reuse.. i.e,
i_callback_user_command = 'COMM'
And make a subroutine of the name 'COMM'i.e,
FORM comm USING ucomm LIKE sy-ucomm selfield TYPE slis_selfield.
DATA: okcode TYPE sy-ucomm.
okcode = ucomm.
CASE okcode.
WHEN 'REF'.
CALL FUNCTION 'POPUP_TO_INFORM'
EXPORTING
titel = 'MANSI'
txt1 = 'CREATED BY'
txt2 = SY-UNAME
TXT3 = ' '
TXT4 = ' '
endcase.
Hope it helps you
Regrds
Mansi -
Error in Module pool:Function code
Hi All,
I am using IW52 transacion for which I have activated the Screen exit and inserted table control on it.
The table control entries has to be deleted for which I have added a Delete button with function Code 'DELE'.
When trying to delete the entry the system throws an error message saying that 'The function code DELE is not available here'.However after pressing enter the entries are deleted.
I have debugged for the error and could find that the table T185F is being checked in the function module screen sequence.
Could someone please let me know how to customize the table with the function code I have added.
Thanks.
ArvindHi Neha,
The link says that we cannot enter Custom User command in the SAP Screen exit.But I think there is a way to maintian T185* table in VFBS transaction.
I tried the same and now not getting the error message that "Function code XXX is not available here".
The problem is now that the system is always keeping the OLD sy-ucomm value.That is when I press delete records I get a confirm prompt message ( custom ) and record gets deleted.After this I again press enter the pop up comes again.
I checked in de bugging and found that the sy-ucomm was not cleared.I tried to clear sy-ucomm values but the main program of the transaction again resets the Sy-ucomm.
Please let me know if you or anyone has any solution to deal with this.
Thanks.
Arvind
Edited by: Arvind Soni on Jan 19, 2009 11:34 AM
Edited by: Arvind Soni on Jan 19, 2009 11:34 AM -
How to create function code for field in GRID like list box in screen
Hi all,
I have requirement like drop down is created for field1 in GRID,
and have given f4 help for it, as soon as i change the data in the field
event has to trigger to update thevalues in other field.
This scenario i worked on screens where field is created with listbox and assign function code to it
when the field value changes the event triggers .
Is there is anything like that which will fire the event for field value changes.
can i update anything through the fieldcatalogue.
anybody help me on this
Regards,
MadhaviHi Madhavi,
yes we can do that by registering edit events..
check the below example.. has both the variants dropdown/f4 hlp...
screen flow logic
PROCESS BEFORE OUTPUT.
MODULE pbo.
PROCESS AFTER INPUT.
MODULE pai AT EXIT-COMMAND.
program
* CLASS lcl_event_responder DEFINITION *
CLASS lcl_event_responder DEFINITION.
PUBLIC SECTION.
DATA : ls_changed_cell TYPE lvc_s_modi,
lv_language TYPE spras..
METHODS refresh_changed_data FOR EVENT data_changed
OF cl_gui_alv_grid
IMPORTING er_data_changed
e_ucomm.
ENDCLASS. "event_responder DEFINITION
DATA: go_handler TYPE REF TO lcl_event_responder,
go_container TYPE REF TO cl_gui_custom_container,
go_grid TYPE REF TO cl_gui_alv_grid,
gt_fieldcat TYPE lvc_t_fcat,
gv_language TYPE spras VALUE 'E',
gt_outtab TYPE TABLE OF makt WITH HEADER LINE.
PARAMETERS : dropdown TYPE char01 RADIOBUTTON GROUP grp,
f4help TYPE char01 RADIOBUTTON GROUP grp.
START-OF-SELECTION.
CALL SCREEN 100.
END-OF-SELECTION.
* MODULE PBO OUTPUT *
MODULE pbo OUTPUT.
SET PF-STATUS 'BASIC'.
PERFORM create_and_init_alv CHANGING gt_outtab[]
gt_fieldcat.
ENDMODULE. "pbo OUTPUT
* MODULE PAI INPUT *
MODULE pai INPUT.
SET SCREEN 0. LEAVE SCREEN.
ENDMODULE. "pai INPUT
FORM create_and_init_alv CHANGING pt_outtab LIKE gt_outtab[]
pt_fieldcat TYPE lvc_t_fcat.
CHECK go_container IS NOT BOUND.
CREATE OBJECT go_container
EXPORTING
container_name = 'CUSTOM'.
CREATE OBJECT go_grid
EXPORTING
i_parent = go_container.
PERFORM build_display_table.
PERFORM build_fieldcat CHANGING pt_fieldcat.
IF dropdown EQ abap_true.
PERFORM set_drdn_table.
ENDIF.
go_grid->set_table_for_first_display( CHANGING it_fieldcatalog = pt_fieldcat
it_outtab = pt_outtab ).
go_grid->set_ready_for_input( 1 ).
" raises the 'data_changed' event when we select another cell/any action after changing the data
go_grid->register_edit_event( EXPORTING i_event_id = cl_gui_alv_grid=>mc_evt_modified ).
CREATE OBJECT go_handler.
SET HANDLER go_handler->refresh_changed_data FOR go_grid.
ENDFORM. "CREATE_AND_INIT_ALV
FORM build_display_table.
FREE gt_outtab.
SELECT * FROM makt UP TO 20 ROWS INTO TABLE gt_outtab WHERE spras EQ gv_language.
ENDFORM. "build_display_table
FORM build_fieldcat CHANGING pt_fieldcat TYPE lvc_t_fcat.
DATA ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'MAKT'
CHANGING
ct_fieldcat = pt_fieldcat.
LOOP AT pt_fieldcat INTO ls_fcat.
IF ls_fcat-fieldname EQ 'SPRAS'.
ls_fcat-edit = abap_true..
ls_fcat-outputlen = 8.
IF dropdown EQ abap_true.
ls_fcat-drdn_hndl = '1'.
ls_fcat-checktable = '!'. "do not check foreign keys
ENDIF.
MODIFY pt_fieldcat FROM ls_fcat.
ENDIF.
ENDLOOP.
ENDFORM. "build_fieldcat
FORM set_drdn_table.
CHECK go_grid->offline( ) IS INITIAL.
DATA: lt_dropdown TYPE lvc_t_drop,
ls_dropdown TYPE lvc_s_drop.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'EN'.
APPEND ls_dropdown TO lt_dropdown.
ls_dropdown-handle = '1'.
ls_dropdown-value = 'DE'.
APPEND ls_dropdown TO lt_dropdown.
CALL METHOD go_grid->set_drop_down_table
EXPORTING
it_drop_down = lt_dropdown.
ENDFORM. " set_drdn_table
FORM change_display_table USING pv_language pv_rowno TYPE i.
READ TABLE gt_outtab INDEX pv_rowno.
SELECT SINGLE * FROM makt INTO gt_outtab WHERE matnr = gt_outtab-matnr AND spras = pv_language.
IF sy-subrc EQ 0.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ELSE.
CLEAR : gt_outtab-maktx,
gt_outtab-maktg.
DELETE gt_outtab INDEX pv_rowno.
INSERT gt_outtab INDEX pv_rowno.
ENDIF.
ENDFORM. "change_display_table
* CLASS event_responder IMPLEMENTATION *
CLASS lcl_event_responder IMPLEMENTATION.
METHOD refresh_changed_data.
READ TABLE er_data_changed->mt_mod_cells INTO ls_changed_cell INDEX 1.
CALL FUNCTION 'CONVERSION_EXIT_ISOLA_INPUT'
EXPORTING
input = ls_changed_cell-value
IMPORTING
output = lv_language.
PERFORM change_display_table USING lv_language ls_changed_cell-row_id.
go_grid->refresh_table_display( ).
ENDMETHOD. "click
ENDCLASS. "event_responder IMPLEMENTATION
Cheers,
Jose. -
Error ! No field defined for function Code
Hello ,
I have defined everything correctly but when i try to use the push button to go to next screen this message comes up 'No field defined for function Code' .Please advise .
Thank you ,Make sure that you put define the name of the OK_CODE field in your screen. Go to your screen, click on the element list tab. You should have a line which as a TYpe as "OK". Put the name as OK_CODE.
Now in your program.....you need a DATA statement for OK_CODE, and you need to handle the OK_CODE in your PAI of the screen.
data: ok_code type sy-ucomm.
* Module USER_COMMAND_0100 INPUT
module user_command_0100 input.
case ok_code.
when 'BACK' or 'EXIT' or 'CANCEL'.
clear ok_code
set screen 0.
leave screen.
endcase.
endmodule.
Regards,
RIch Heilman
Maybe you are looking for
-
Error message when installing Photoshop CS2 in Windows 8
I just upgraded to a computer with Windows 8. I use Photoshop CS2. I am getting the error message below when starting photoshop after installation. I changed program folders, but that did not work. Please advise. Error: an error has been detecte
-
My first BSOD occurred about 10 days ago, randomly and frequently, totally I have been through 24 dumps, that's really not a happy experience, right? Any help will be appreciated! Thanks in advance. FIY, I uploaded as much information as I can provid
-
In 3.5, =recordmode value for delta ZIC upload
Hi experts, I am creating an ODS in 3.5 to delta load data to a Z infocube. What value shoud i put to 0RECORDMODE in the infosource?? What type of data must it be? CHA1 or another standard type? Thanks, Artur.
-
Adobe Interactive Forms & CRM2007
Hi guys, we have to integrate CRM2007 and adobe interactive forms. Let's say when clicking a button in a CRM view it launch the adobe interactive form and then, if it gets changed, it should update some fields in CRM. we have looked at some post but
-
Hi everyone, I have a questions, I'm working in a server for BW 7.0 in a customer, but when I execute the transaction BPS0 and I want to create a balance function or investment function, there not appear. I only can see All function and conversion. B