Sy-ucomm for a button
Hi Experts,
Can anyone please tell me about the sy-ucomm for message button in ME22N transaction and then one more button Repeat Output.
My requirement is i have to re send an IDOC when someone changes the PO and press the repeat output. For this i am using a user exit. When I am opening transaction ME22N it goes to that exit,
to resend IDOC i have written this code.
IF sy-tcode EQ 'ME22N'.
IF sy-ucomm EQ 'MENACH' . " message button
IF sy-ucomm EQ 'V70R'. " repeat output button
code to resend IDOC.
ENDIF.
ENDIF.
The problem is while debugging i found that when i press Message buttion at sy-ucomm EQ 'MENACH' it gives sy-subrc = 4, it is not taking sy-ucomm MENACH.
Can ANyone please tell me the exact sy-ucomm for Message button in ME22N.
Regards
Nik
HI Nikhil,
You should ask your MM Functional Consultant.
I know that you should have to maintain a Partner profile in we20 transaction and maintain the output control paramters like
Output type as NEU and Process Code a ME11.
then you should also configure your output determination procedure using SPRO (Take help of the functional guy).
Regards,
Ravi Kanth Talagana
Similar Messages
-
Unable to capture UCOMM for cancel & Exit
Hi,
From the fbv2 transaction(Invoice Change) invoice change, we need to capture the User Command (SY-UCOMM) for the exit & cancel, but we are not able to find any BTE,Enhancements for capturing that.Kindly let me know if any other solution is possible for capturing the UCOMM value.
Thanks,
Mohan.I am not sure if I got your question correctly but if you go inside in FBV2 and click on 'exit' button and debug, you can see sy-ucomm (ok-code) as 'END'. It goes to program MF05AFEENJ (main program SAPMF05A).
-
Code for 'enter' button in user command.
hi experts,
i have developed a initial screen as selection screen for table control.
data is displayed in second screen(table control).
<b></b>when user enters inputs in selection screen and presses enter on keyboard
it should execute to second screen. code for enter button. <b></b>Hello,
in the PBO process should you have the next code:
for example:
case sy-ucomm.
when 'ENTER'.
CALL SCREEN 0200. " The second window
when 'SAVE'.
when ...
endcase.
You should have all conditions in the case statement, otherwise you have a error.
Regards, -
Function code for execute button
Hi,
I have a requirement like this...
there is a program for selective deletion from a data target by a transaction called delete_facts.
this generates a program for selective deletion. when i run this report there comes one screen asks for selections fields and then again excute it then deletion will happen.
But this program i need to modify for certain default values so as to avoid entering of the values in the selection screen.
i will use default value this will solve my 1st purpose but since this program has to be scheduled from process chain, the 2nd execute funtionality( once the values appear in the screen) shud be automated.
can anybody tell me how to do this that is after program runs values will be passed to selection screen and selection screen shud not be shown and execute shud happen automatically.
this is the code generated by transaction delete_facts:
*& Report ZTEST_DELETE1
REPORT ZTEST_DELETE1.
generated Header from i_sel_repid
generated REPORT (RSDRD)
(should be deleted after use)
Generated by..: SALAGUN
Date/Time.....: 20070322 / 051426
*REPORT GP457FUV92GJS4663HYHXLYC9Q7 .
generated Tables from i_t_tables
and i_datatarget
TABLES:
SSCRFIELDS,
/BIC/SZTESTBC
,/BI0/SCHNGID
,/BI0/SRECORDTP
,/BI0/SREQUID
,/BI0/SDATE
,/BI0/SUNIT
generated DATA/TYPES
TYPE-POOLS: RSDRD, RSDQ.
DATA:
L_INTERACTIVE TYPE RS_BOOL,
L_ANSWER(1) TYPE C,
L_TYPE(1) TYPE C,
L_PARALLEL TYPE I,
L_NO_OF_ROWS TYPE I,
L_NO_OF_ROWS_C(10) TYPE C,
L_TITEL TYPE RS_CHAR72,
L_TEXT1 TYPE RS_CHAR72,
L_TEXT2 TYPE RS_CHAR72,
L_S_RANGE TYPE RSDRD_S_RANGE,
L_S_SELTXT TYPE RSDQ_S_SELTEXT,
L_SX_SEL TYPE RSDRD_SX_SEL,
L_T_MSG TYPE RS_T_MSG,
L_THX_SEL TYPE RSDRD_THX_SEL,
L_T_SELTXTS TYPE RSDQ_T_SELTEXT
WITH HEADER LINE.
generated SELECTION-SCREEN from i_t_selscr
SELECTION-SCREEN BEGIN OF BLOCK B001 WITH FRAME TITLE T001 .
SELECT-OPTIONS C001 FOR /BIC/SZTESTBC-/BIC/ZTESTBC
default 'D' TO 'C'.
SELECTION-SCREEN END OF BLOCK B001 .
SELECTION-SCREEN BEGIN OF BLOCK B002 WITH FRAME TITLE T002 .
SELECT-OPTIONS C002 FOR /BI0/SCHNGID-SID .
SELECT-OPTIONS C003 FOR /BI0/SRECORDTP-SID .
SELECT-OPTIONS C004 FOR /BI0/SREQUID-SID .
SELECTION-SCREEN END OF BLOCK B002 .
SELECTION-SCREEN BEGIN OF BLOCK B003 WITH FRAME TITLE T003 .
SELECT-OPTIONS C005 FOR /BI0/SDATE-DATE0 .
SELECTION-SCREEN END OF BLOCK B003 .
SELECTION-SCREEN BEGIN OF BLOCK B004 WITH FRAME TITLE T004 .
SELECT-OPTIONS C006 FOR /BI0/SUNIT-UNIT .
SELECTION-SCREEN END OF BLOCK B004 .
SELECTION-SCREEN BEGIN OF BLOCK B005 WITH FRAME TITLE T005 .
PARAMETERS L_PA TYPE DBMAN_PARALLEL_DEGREE DEFAULT '01'.
DATA L_P1(1) TYPE C.
PARAMETERS L_NL TYPE DBMAN_NO_LOGGING AS CHECKBOX DEFAULT ' '.
PARAMETERS L_SR TYPE DBMAN_SHOW_REPORT AS CHECKBOX DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK B005 .
generated body from i_t_body
generated INITIALIZATION from i_t_init
and i_t_seltexts
and i_batch_allowed
and i_datatarget
INITIALIZATION.
T001 = 'product'.
T002 = 'Data Package'.
T003 = 'Time'.
T004 = 'Unit'.
T005 = 'Options'.
SELECTION-SCREEN FUNCTION KEY 1.
MOVE 'Execute in Bckgrnd' TO SSCRFIELDS-FUNCTXT_01.
PERFORM RESTRICT_SEL_OPTIONS(SAPLRSDRD).
SET TITLEBAR 'SELECTION' OF PROGRAM 'SAPLRSDRD' WITH
' Delete selected entries from the data target DELETE '.
L_S_SELTXT-NAME = 'C001'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Base Code'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C002'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Change Run ID (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C003'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Record type (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C004'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Request ID (SID)'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C005'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Calendar Day'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'C006'.
L_S_SELTXT-KIND = 'S'.
L_S_SELTXT-TEXT = 'Unit of measure'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_PA'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Parall. deg. during reconstruc'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_NL'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Switch off logging drng recons'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
L_S_SELTXT-NAME = 'L_SR'.
L_S_SELTXT-KIND = 'P'.
L_S_SELTXT-TEXT = 'Display generated report'.
APPEND L_S_SELTXT TO L_T_SELTXTS.
generated AT SELECTION-SCREEN OUTPUT from i_sel_repid
AT SELECTION-SCREEN OUTPUT.
CALL FUNCTION 'SELECTION_TEXTS_MODIFY'
EXPORTING
PROGRAM = 'GP457FUV92GJS4663HYHXLYC9Q7'
TABLES
SELTEXTS = L_T_SELTXTS
EXCEPTIONS
PROGRAM_NOT_FOUND = 1
PROGRAM_CANNOT_BE_GENERATED = 2
OTHERS = 3.
generated AT SELECTION-SCREEN
AT SELECTION-SCREEN.
CASE SSCRFIELDS-UCOMM.
WHEN 'ONLI'.
L_INTERACTIVE = RS_C_TRUE.
WHEN 'OPTI'.
WHEN 'DELS'.
WHEN 'FC01'.
L_INTERACTIVE = RS_C_FALSE.
SSCRFIELDS-UCOMM = 'ONLI'.
WHEN 'OTHERS'.
ENDCASE.
generated END-OF-SELECTION from i_t_selopt
and i_del_repid
and i_datatarget
and i_gen_mode
END-OF-SELECTION.
IF NOT C001[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = 'ZTESTBC'.
LOOP AT C001 .
CLEAR L_S_RANGE.
MOVE C001-SIGN TO L_S_RANGE-SIGN.
MOVE C001-OPTION TO L_S_RANGE-OPTION.
MOVE C001-LOW TO L_S_RANGE-LOW.
MOVE C001-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C002[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0CHNGID'.
LOOP AT C002 .
CLEAR L_S_RANGE.
MOVE C002-SIGN TO L_S_RANGE-SIGN.
MOVE C002-OPTION TO L_S_RANGE-OPTION.
MOVE C002-LOW TO L_S_RANGE-SIDLOW.
MOVE C002-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C002-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C003[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0RECORDTP'.
LOOP AT C003 .
CLEAR L_S_RANGE.
MOVE C003-SIGN TO L_S_RANGE-SIGN.
MOVE C003-OPTION TO L_S_RANGE-OPTION.
MOVE C003-LOW TO L_S_RANGE-SIDLOW.
MOVE C003-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C003-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C004[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0REQUID'.
LOOP AT C004 .
CLEAR L_S_RANGE.
MOVE C004-SIGN TO L_S_RANGE-SIGN.
MOVE C004-OPTION TO L_S_RANGE-OPTION.
MOVE C004-LOW TO L_S_RANGE-SIDLOW.
MOVE C004-HIGH TO L_S_RANGE-SIDHIGH.
MOVE RS_C_FALSE TO L_S_RANGE-KEYFL.
start change
DESCRIBE FIELD C004-LOW TYPE l_type.
IF l_type = 'I'.
CONDENSE L_S_RANGE-LOW.
CONDENSE L_S_RANGE-HIGH.
ENDIF.
stop change
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C005[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0CALDAY'.
LOOP AT C005 .
CLEAR L_S_RANGE.
MOVE C005-SIGN TO L_S_RANGE-SIGN.
MOVE C005-OPTION TO L_S_RANGE-OPTION.
MOVE C005-LOW TO L_S_RANGE-LOW.
MOVE C005-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
IF NOT C006[] IS INITIAL.
CLEAR L_SX_SEL.
L_SX_SEL-IOBJNM = '0UNIT'.
LOOP AT C006 .
CLEAR L_S_RANGE.
MOVE C006-SIGN TO L_S_RANGE-SIGN.
MOVE C006-OPTION TO L_S_RANGE-OPTION.
MOVE C006-LOW TO L_S_RANGE-LOW.
MOVE C006-HIGH TO L_S_RANGE-HIGH.
MOVE RS_C_TRUE TO L_S_RANGE-KEYFL.
APPEND L_S_RANGE TO L_SX_SEL-T_RANGE.
ENDLOOP.
INSERT L_SX_SEL INTO TABLE L_THX_SEL.
ENDIF.
L_PARALLEL = L_PA.
IF L_INTERACTIVE EQ RS_C_TRUE.
CALL FUNCTION 'RSDRD_SEL_DELETION'
EXPORTING
I_DATATARGET = 'DELETE'
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = RS_C_TRUE
I_NO_LOGGING = L_NL
I_PARALLEL_DEGREE = L_PARALLEL
I_SHOW_REPORT = L_SR
CHANGING
C_T_MSG = L_T_MSG.
ELSE.
CALL FUNCTION 'RSDRD_BUILD_REPORT_FOR_BATCH'
EXPORTING
I_REPID = 'GP457FWJUK1J1F3ZIZZOEH9U533'
I_DATATARGET = 'DELETE'
I_GEN_ONLY = RS_C_FALSE
I_THX_SEL = L_THX_SEL
I_AUTHORITY_CHECK = RS_C_TRUE
I_NO_LOGGING = L_NL
I_PARALLEL_DEGREE = L_PARALLEL
I_SHOW_REPORT = L_SR
CHANGING
C_T_MSG = L_T_MSG.
ENDIF.
Thanks in advance,
Vijayahi!
Function code for execute button is 'ONLI'.
try ur code using it!!
Reward points if it helps.
Regards,
Neha Bansal.
Message was edited by:
Neha Bansal -
How to use the same script for multiple buttons
Hi,
I've only just started using flash so any help would be great!
I'm creating a blockbusters type game, I have a grid of 20 buttons and I need them (individually) to turn blue on click and red on double click. I've managed to do it with the first one using this code;
var clicked:Boolean = false;
bn1.addEventListener(MouseEvent.CLICK, bn1click);
function bn1click(event:MouseEvent):void {
clicked = true;
var newColorTransform:ColorTransform = bn1.transform.colorTransform;
if(clicked){
newColorTransform.color = 0x064258;
bn1.transform.colorTransform = newColorTransform;
bn1.doubleClickEnabled = true;
var doubleclicked:Boolean = false;
bn1.addEventListener(MouseEvent.DOUBLE_CLICK, bn1dclick);
function bn1dclick(event:MouseEvent):void {
doubleclicked = true;
var newColorTransform:ColorTransform = bn1.transform.colorTransform;
if(clicked){
newColorTransform.color = 0xac1e23;
bn1.transform.colorTransform = newColorTransform;
Now I'm having trouble getting the same to work for the rest of the buttons, they are each named bn2, bn3 etc. They need to work individually and remain blue/red once clicked. I've tried listing them as addEventListener commands but not having a great deal of success!
Any help would be greatly appreciated, thanks!
TomoOne way to do this is to use arrays to keep track of the buttons and their properties.
var buttonList:Array = new Array(bn1,bn2,bn3);
var clickedList:Array = new Array();
var doubleClickedList:Array = new Array();
//then use a for loop to assign the functions and properties for each button:
var thisMany:int = buttonList.length; // this will give you the number of items in the buttonList array
for(var i:int = 0; i<thisMany; i++) {
buttonList[i].addEventListener(MouseEvent.CLICK,btnClick); // assign the click function to each button
buttonList[i].addEventListener(MouseEvent.DOUBLE_CLICK,btnDClick); // assign the double click function
clickedList.push(false); // add a false value for each button to this array
doubleClickedList.push(false);
buttonList[i].doubleClickEnabled = true; // set the double click property for each button
function btnClick(event:MouseEvent):void {
var thisButton:int = buttonList.indexOf(event.target); // figure out which button was clicked as an item in the array
clickedList[thisButton] = true; // change the value in the array
var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
if(clickedList[thisButton]){
newColorTransform.color = 0x064258;
buttonList[thisButton].transform.colorTransform = newColorTransform;
function btnDClick(event:MouseEvent):void {
var thisButton:int = buttonList.indexOf(event.target);
doubleClickedList[thisButton] = true;
var newColorTransform:ColorTransform = buttonList[thisButton].transform.colorTransform;
if(doubleClickedList[thisButton]){
newColorTransform.color = 0xac1e23;
buttonList[thisButton].transform.colorTransform = newColorTransform;
Now you can have any number of buttons, just add their instance names to the array at the top. -
Menu Button in ALV toolbar (multiple choices for a button)
Hi abapers,
I would like to have a button with multiple choices in the toolbar;
at the moment I have created a menu button with just one function.
Here is my code:
CLASS lcl_event_receiver (Definition)
CLASS lcl_event_receiver DEFINITION.
PUBLIC SECTION.
METHODS:
handle_toolbar
FOR EVENT toolbar OF cl_gui_alv_grid
IMPORTING e_object e_interactive.
ENDCLASS. "lcl_event_receiver DEFINITION
CLASS lcl_event_receiver (Implementation)
CLASS lcl_event_receiver IMPLEMENTATION.
METHOD handle_toolbar.
DATA: ls_toolbar TYPE stb_button.
*Separator
CLEAR ls_toolbar.
MOVE 3 TO ls_toolbar-butn_type.
APPEND ls_toolbar TO e_object->mt_toolbar.
*Button
CLEAR ls_toolbar.
MOVE 1 TO ls_toolbar-butn_type.
MOVE 'EDIT' TO ls_toolbar-function.
MOVE icon_change TO ls_toolbar-icon.
MOVE ' Modifica'(l02) TO ls_toolbar-text.
MOVE ' ' TO ls_toolbar-disabled.
MOVE 'Modifica' TO ls_toolbar-quickinfo.
APPEND ls_toolbar TO e_object->mt_toolbar.
ENDMETHOD. "handle_toolbar
ENDCLASS. "lcl_event_receiver IMPLEMENTATIONhi,
check this code and reward me if it helps you..
TYPE-POOLS : slis,icon.
*Structure declaration for tcodes
TYPES : BEGIN OF ty_table,
tcode TYPE tcode,
pgmna TYPE progname,
END OF ty_table.
*Structure for tocde text
TYPES : BEGIN OF ty_itext,
tcode TYPE tcode,
ttext TYPE ttext_stct,
sprsl TYPE sprsl,
END OF ty_itext.
*Structure for output display
TYPES : BEGIN OF ty_output,
tcode TYPE tcode,
pgmna TYPE progname,
ttext TYPE ttext_stct,
END OF ty_output.
*internal table and work area declarations
DATA : it_table TYPE STANDARD TABLE OF ty_table INITIAL SIZE 0,
it_output TYPE STANDARD TABLE OF ty_output INITIAL SIZE 0,
it_ittext TYPE STANDARD TABLE OF ty_itext INITIAL SIZE 0,
wa_table TYPE ty_table,
wa_output TYPE ty_output,
wa_ittext TYPE ty_itext.
*Class definition for ALV toolbar
CLASS: lcl_alv_toolbar DEFINITION DEFERRED.
*Declaration for toolbar buttons
DATA : ty_toolbar TYPE stb_button.
Data declarations for ALV
DATA: c_ccont TYPE REF TO cl_gui_custom_container, "Custom container object
c_alvgd TYPE REF TO cl_gui_alv_grid, "ALV grid object
it_fcat TYPE lvc_t_fcat, "Field catalogue
it_layout TYPE lvc_s_layo, "Layout
c_alv_toolbar TYPE REF TO lcl_alv_toolbar, "Alv toolbar
c_alv_toolbarmanager TYPE REF TO cl_alv_grid_toolbar_manager. "Toolbar manager
*Initialization event
INITIALIZATION.
*Start of selection event
START-OF-SELECTION.
*Subroutine to get values from tstc table
PERFORM fetch_data.
*subroutine for alv display
PERFORM alv_output.
CLASS lcl_alv_toolbar DEFINITION
ALV event handler
CLASS lcl_alv_toolbar DEFINITION.
PUBLIC SECTION.
*Constructor
METHODS: constructor
IMPORTING
io_alv_grid TYPE REF TO cl_gui_alv_grid,
*Event for toolbar
on_toolbar
FOR EVENT toolbar
OF cl_gui_alv_grid
IMPORTING
e_object.
ENDCLASS. "lcl_alv_toolbar DEFINITION
CLASS lcl_alv_toolbar IMPLEMENTATION
ALV event handler
CLASS lcl_alv_toolbar IMPLEMENTATION.
METHOD constructor.
Create ALV toolbar manager instance
CREATE OBJECT c_alv_toolbarmanager
EXPORTING
io_alv_grid = io_alv_grid.
ENDMETHOD. "constructor
METHOD on_toolbar.
Add customized toolbar buttons.
variable for Toolbar Button
ty_toolbar-icon = icon_generate.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button1'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_voice_output.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button2'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_phone.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button3'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_mail.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button4'.
APPEND ty_toolbar TO e_object->mt_toolbar.
ty_toolbar-icon = icon_voice_input.
ty_toolbar-butn_type = 0.
ty_toolbar-text = 'Button5'.
APPEND ty_toolbar TO e_object->mt_toolbar.
Call reorganize method of toolbar manager to
display the toolbar
CALL METHOD c_alv_toolbarmanager->reorganize
EXPORTING
io_alv_toolbar = e_object.
ENDMETHOD. "on_toolbar
ENDCLASS. "lcl_alv_toolbar IMPLEMENTATION
*& Form fetch_data
text
--> p1 text
<-- p2 text
FORM fetch_data .
Select the tcodes upto 200 rows from TSTC
SELECT tcode
pgmna
FROM tstc
INTO CORRESPONDING FIELDS OF TABLE it_table
UP TO 200 ROWS
WHERE dypno NE '0000'.
*Select the tcode textx
IF it_table[] IS NOT INITIAL.
SELECT ttext
tcode
sprsl
FROM tstct
INTO CORRESPONDING FIELDS OF TABLE it_ittext
FOR ALL ENTRIES IN it_table
WHERE tcode = it_table-tcode
AND sprsl = 'E'.
ENDIF.
Apppending the data to the internal table of ALV output
LOOP AT it_table INTO wa_table.
wa_output-tcode = wa_table-tcode.
wa_output-pgmna = wa_table-pgmna.
For texts
READ TABLE it_ittext INTO wa_ittext WITH KEY tcode = wa_table-tcode.
wa_output-ttext = wa_ittext-ttext.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
ENDFORM. " fetch_data
*& Form alv_output
text
--> p1 text
<-- p2 text
FORM alv_output .
*Calling the ALV
CALL SCREEN 0600.
ENDFORM. " alv_output
Calling the ALV screen with custom container
On this statement double click it takes you to the screen painter SE51.Enter the attributes
*Create a Custom container and name it CC_CONT and OK code as OK_CODE.
*Save check and Activate the screen painter.
Now a normal screen with number 600 is created which holds the ALV grid. PBO of the actual screen , Here we can give a title and *customized menus
*& Module STATUS_0600 OUTPUT
text
MODULE status_0600 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0600 OUTPUT
calling the PBO module ALV_GRID.
*& Module ALV_GRID OUTPUT
text
MODULE alv_grid OUTPUT.
*create object for custom container
CREATE OBJECT c_ccont
EXPORTING
container_name = 'CC_CONT'.
*create object of alv grid
CREATE OBJECT c_alvgd
EXPORTING
i_parent = c_ccont.
create ALV event handler
CREATE OBJECT c_alv_toolbar
EXPORTING
io_alv_grid = c_alvgd.
Register event handler
SET HANDLER c_alv_toolbar->on_toolbar FOR c_alvgd.
Fieldcatalogue for ALV
PERFORM alv_build_fieldcat.
ALV attributes FOR LAYOUT
PERFORM alv_report_layout.
CHECK NOT c_alvgd IS INITIAL.
Call ALV GRID
CALL METHOD c_alvgd->set_table_for_first_display
EXPORTING
is_layout = it_layout
CHANGING
it_outtab = it_output
it_fieldcatalog = it_fcat
EXCEPTIONS
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 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.
ENDMODULE. " ALV_GRID OUTPUT
*& Form alv_build_fieldcat
text
<--P_IT_FCAT text
FORM alv_build_fieldcat.
DATA lv_fldcat TYPE lvc_s_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '1'.
lv_fldcat-fieldname = 'TCODE'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 8.
lv_fldcat-scrtext_m = 'TCODE'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '2'.
lv_fldcat-fieldname = 'PGMNA'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 15.
lv_fldcat-scrtext_m = 'PROGNAME'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
lv_fldcat-row_pos = '1'.
lv_fldcat-col_pos = '3'.
lv_fldcat-fieldname = 'TTEXT'.
lv_fldcat-tabname = 'IT_OUTPUT'.
lv_fldcat-outputlen = 60.
lv_fldcat-scrtext_m = 'Description'.
APPEND lv_fldcat TO it_fcat.
CLEAR lv_fldcat.
ENDFORM. " alv_build_fieldcat
*& Form alv_report_layout
text
<--P_IT_LAYOUT text
FORM alv_report_layout.
it_layout-cwidth_opt = 'X'.
it_layout-zebra = 'X'.
ENDFORM. " alv_report_layout
PAI module of the screen created. In case we use an interactive ALV or
*for additional functionalities we can create OK codes
*and based on the user command we can do the coding.
*& Module USER_COMMAND_0600 INPUT
text
MODULE user_command_0600 INPUT.
ENDMODULE. " USER_COMMAND_0600 INPUT
thanks,
gupta -
One function for multiple buttons?
I have a county map on my timeline with a list of each county as buttons ( there is 88 counties). I want to highlight the county on the map when I click the county's name from a list.
when I test this out, only the last one gets highlighted. I know I am missing something really simple. it does work if I write code for each button but I can't to seem to get it to work with only writing the function once for all buttons
var countyHigh:MovieClip = adamsHighlight;
var countyCheck:MovieClip = kickout.adamsCM;
kickout.adamsCheck_btn.addEventListener(MouseEvent.CLICK, highlightCounty);
kickout.allenCheck_btn.addEventListener(MouseEvent.CLICK, highlightCounty);
countyHigh = allenHighlight;
countyCheck = kickout.allenCM;
kickout.ashlandCheck_btn.addEventListener(MouseEvent.CLICK, highlightCounty);
countyHigh = ashlandHighlight;
countyCheck = kickout.ashlandCM;
function highlightCounty(event:Event):void{
if (countyHigh.alpha == 0)
countyHigh.alpha = .5;
else countyHigh.alpha = 0;
if(countyCheck.alpha == 0)
countyCheck.alpha = .5;
else
countyCheck.alpha = 0;
when I click all there buttons, the all highlight ashland county instead of their own county. I am using Flash Professional CS5 and only been playing with Flash for about a year.var previouslyHighlightedCounty:Movieclip;
function highlightCounty(e:MouseEvent):void{
if(previouslyHighlightedCounty){
//reset previouslyHighlightedCounty. ie, un-highlight
// highlight e.currentTarget
e.currentTarget=previouslyHighlightedCounty -
How to add a new button in IC tool bar and handle the event for the button?
Hi,
I am working on CRM 2007 Interaction center. To add a new button to IC toolbar, customizing is available to define a new button and then assign in to the profile.
In SPRO->CRM->IC webclient->Customer Specifc System Modifications->Define Toolbar Buttons, I defined one new button with ID ZSTART.
Now in SPRO->CRM->IC webclient->Basic Functions->Communication Channels->Define Toolbar Profiles , I selected Default profileid and in Generic Layout Buttons Tab, I added the new button ZSTART in Position 3.
So after completing the customizing when the user logs in using role IC_AGENT, the button (with ID:ZSTART) gets displayed in the IC toolbar too.
Now on click of this button, I need to create an object.
To do so, I have to catch the event which is raised by this new button.
Please let me how to implement the event handler for this new button. What will be the event name for this button click event and how I can subscribe for it ?
Please let me know if anyone of you have already worked on similar requirements.
Regards,
Manas.
Edited by: manas sahoo on Jul 22, 2008 7:49 PMHello Manas,
There are a couple of threads in the community that might help you out (if you haven't already found them):
Re: IC Web Client Toolbar
/message/3621917#3621917 [original link is broken]
Regards,
Renee Wilhelm
Edited by: Renee Wilhelm on Nov 6, 2008 7:46 PM -
[Feature Request] Better support for new buttons in JUNavigationBar
In my project I use a home made sub-class of JUNavigationBar, which contains some new functionality apart from a new button as well. This button allows me to refresh the currently selected row.
However, since I added this button though a simple this.add(), some of the functionality in JUNavigationBar may get confused.
For example, when I have removed some of the standard buttons but left my own button in place (setHasXXX()), the component index (calculated in JToolBar) and the array index for the buttons in JUNavigationBar may not match. This occasionally causes an ArrayIndexOutOfBoundsException.
In short, what I'm asking for, is a better way to manage buttons on JUNavigationBar. Even making the array of buttons and related methods and such protected in stead of private (so that my sub-class could handle it) would be a good start.Hi Arno,
I had a similar issue with trying to create a Nav bar with dynamic content. My solution was to leave all the standard buttons in place and to use setVisible(x) to make them appear or not as required.
BTW have you noticed that rollover behaviour isn't consistant ie works for FIRST/LAST etc but not for FIND/QUERY.
Regards
Andy -
Hello,
I'm trying to check for a button being pressed while another is down through Touch. In my case, I' m making a game and I need for a button to make the character jump. However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine. I'm testing this on my Motorola Droid 2.
Here is some of my code that demonstrates text instead of my character moving around:
package {
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
public class Document extends MovieClip {
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
private var controls:BottomBar;
private var debugText:String;
public function Document() {
addIngameGUI();
private function addIngameGUI(){
controls = new BottomBar();
controls.y = stage.stageHeight - controls.height;
addChild(controls);
controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
private function testBtns(event:TouchEvent){
debugText.text = event.target.name;
What am I doing wrong? Is there a better approach?
Thank you in advance.Hello,
I'm trying to check for a button being pressed while another is down through Touch. In my case, I' m making a game and I need for a button to make the character jump. However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine. I'm testing this on my Motorola Droid 2.
Here is some of my code that demonstrates text instead of my character moving around:
package {
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
public class Document extends MovieClip {
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
private var controls:BottomBar;
private var debugText:String;
public function Document() {
addIngameGUI();
private function addIngameGUI(){
controls = new BottomBar();
controls.y = stage.stageHeight - controls.height;
addChild(controls);
controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
private function testBtns(event:TouchEvent){
debugText.text = event.target.name;
What am I doing wrong? Is there a better approach?
Thank you in advance. -
Display GOS without click on 'Service for Object' button
Please try the following step to figure out.
1) VA03
2) At header of report (on the left hand side of 'Display S/O SysB SDI xxxxxxxxx:Overview' ) has a button called 'Services for Object' (GOS)
3) Click on that then it will popup icon menu set. <--- Want this to be displayed when access VA03 by no need to click the button in 2)
My requirement is I want this popup to be displayed suddenly after I access VA03 (no need to click on the Services for Object button anymore).
<b>
Could you please provide me any solution, function, example, similar case, etc. (based on 4.6c)?</b>
Thank you all expert in advance.. I'll be here to provide you more information that need.I found the solution yet. Let me drop a note to be a memorandum.
(1) Insert code into the last line of form <u>USEREXIT_READ_DOCUMENT</u> within report <u>MV45AFZZ</u>
PERFORM UNITEXIT_READ_DOCUMENT.
<b>*{ INSERT
*[Display Attachment Service Automatically]
DATA: lo_myobject TYPE REF TO cl_gos_manager,
lo_container TYPE REF TO cl_gui_custom_container,
ls_object TYPE borident. "BOR Identifier
ls_object-objkey = vbak-vbeln.
ls_object-objtype = 'BUS2032'.
CREATE OBJECT lo_myobject.
CALL METHOD lo_myobject->start_service_direct
EXPORTING ip_service = 'VIEW_ATTA'
is_object = ls_object
io_container = lo_container
EXCEPTIONS OTHERS = 2.
*[Display Toolbox]
CALL METHOD lo_myobject->DISPLAY_TOOLBOX
EXPORTING is_object = ls_object
io_container = lo_container
EXCEPTIONS OTHERS = 2.
*} INSERT</b>
ENDFORM.
(2) Try open VA03 and insert attachment at Service for Object.
(3) Reopen VA03, attachment list displayed suddenly.
<i>Reference Source# SAP Library, search 'Starting Only One Service Directly'.</i>
<b>NOTE:</b> You can use another relevant object by SE24 -> CL_GOS_MANAGER -
How to create subpicture for a button?
Hello!
I have really tried to find the answer to this rather silly problem on my own, but without result. Please help someone!
The situation:
I have a menu with three choices: "Play Movie", "Scene Selection" and "Subtitles". Now, the text presenting these choices are part of the background image, created in Premiere (the program I know best). They are written with an old typewriter to get that gritty feeling.
I want the user to scroll between these "menu items". The currently selected item should be indicated by a black circle/spot/dot before the text of the item. By default, when the menu appears, there is a black circle in front of (to the immediate left of) the item "Play Movie". The user should now be able to step with his/her remote to the other items, thereby making the black circle in front of "Play Movie" disappear and appearing instead before some of the other items. In short: the black circle is always showing before the currently selected item. OK, I got a bit verbose there, but the idea got across hopefully. One more thing: the background color is 100% white.
Up to this point, my solution was this: I placed black circles (small images with gradation and all, very nice looking) in front of ALL THREE ITEMS. Then I convert these into buttons. Then I choose the color set for the menu so that the unselected state is 100% white, plain and simple, with 100% opacity, thereby covering the black circles that should not show. Only in the selected and activated states does opacity for the button subpicture drop to 0%, thereby revealing the black circle that should be seen.
The problem? Well, on some DVD-players (not on the XBOX 360 though), when an item is activated, all three circles show for a brief moment before the selected action starts (for example playing the movie). It also happens in Encore Preview. This is not logical at all and looks amateurish. I don't know why it happens, but my guess is that it wouldn't if I did this the "correct" way: by creating subpictures fo the buttons in the shape of circles. I understand the nice looking gradations must go out the window but that is a price I'm willing to pay.
But now I run into an unexpected problem: I don't understand how to create a subpicture for the button that is a black circle. It seems the documentation in Encore and on forums in general takes for granted that you know how to do this.
What I tried ws this: I created a monochrome, small image in bmp format - a black circle on white background. But this image just shows up as a black rectangle in Encore.
What should I do? I should add that I have no real experience with Photoshop, so go slow if you go there.
Regards,
NikolajBasically, when one realizes the limitations of the Sub-picture Highlights, as set by the DVD-specs., it's easy to see the "workaround."
A couple of the aspects of Sub-picture Highlights are:
1.) 2-bit color (either ON, or OFF), from a limited color palette, with degrees of Transparency (the opposite of PS's Opacity).
2.) they will appear on top of anything else on the Menu, including things like Button text/graphics.
By constructing your Sub-picture Highlight in PS, you can use Masking to define where it will be, and where it will not be. In the case that prompted my article, the poster had a series of Text Buttons, and the Sub-picture Highlights were formed from that Text. The poster did not like the look of those 2-bit jagged blocks of color overlying the Text in the Button. The workaround is to "punch a hole" in the Sub-picture Highlight, so that it is hollow, where the Button's Text appears. This is done in PS, by using the "outline" of that Text to create a Mask for the Sub-picture Highlight. The jagged aspect can be adjusted a bit, by using a degree of Transparency (set in the non-Auto Color Set back in Encore). We still have a 2-bit color Sub-picture Highlight, and it still overlays the Button's Text, but now there is a hole in it, right where the Button's Text is located, and it is seen through that hole. The introduction of Transparency has the visual effect of "softening" the look of the 2-bit color, even though the jagged edges are still there - they just look softer. I went on to show how one could even use a second Sub-picture Highlight, that is just a bit larger than the first, and with more Transparency to simulate a "glow." Now, we cannot have a real "glow," because we are limited to that 2-bit color for the Sub-picture Highlight, but we can simulate it.
Much of what a designer does is really slight of hand - illusion. They all have to work within the limitations of the DVD (or BD) specs., but with a bit of creativity, planning and some work in PS and Encore, they can create enough smoke and use enough mirrors to fool the user into believing that what they think they see skirt the DVD-specs. They do not, but that's where the illusion comes in.
We get a lot of questions from people, who claim that one commercial DVD, or another, has full-color Sub-picture Highlights and they complain that Encore cannot do that - only 2-bit Sub-picture Highlights. What they are seeing, but do not realize it, is a dupe Menu, with a full-color graphic, and no real Sub-picture Highlight visible. Jeff gives full details on doing this. Same for those who have seen a Button with a duo-tone thumbnail, that turns full-color, when the Button is navigated to. Wow, how did they do that, and why can't Adobe Encore do that? Well, what they saw was a dupe Menu, with a full-color thumbnail and no visible real Sub-picture Highlight.
Jeff shows how to create what appears to be at least a 3-color Sub-picture Highlight. It's really just 3 regular 2-bit color Sub-picture Highlights, with Masking to create the illusion that he beat the DVD-specs. Neat! [Being from the USA, I also liked that he used the US flag, but he could have chosen the French "Tri-color," or any other flag, without artwork.]
These are all just tricks, but if the user buys into the illusion, who's to know?
Enjoy,
Hunt
PS - though many of the great, older posts were lost, when the forum changeover happened, I strongly suggest reading the posts here. You can bypass ones that do not offer you anything, but almost every possible illusion has been discussed at least one time, and likely many, with some different workflows offered by those, who replied. Great reading. -
Pane level is not working for created button in Employee Master Data
Hai,
I have created a button in Administration tab of Employee Master Data. I set the Pane level 3 for that button. Even though, when the Employee Master Data is opened, that button appears. ie., When Employee Master Data menu is clicked, Employee master data is opened in find mode and by default Address tab is active.But my button is visible here itself. I want that button visible only in Administration tab.
How to resolve this.
Thanks in advance.Hai,
Thanks for answering.
Actually coding is as follows:
oNewItem = oForm.Items.Add("XXX", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
oItem = oForm.Items.Item("61")
oNewItem.Top = oItem.Top
oNewItem.Height = oItem.Height
oNewItem.Width = oItem.Width
oNewItem.Left = oItem.Left
oNewItem.FromPane = 3
oNewItem.ToPane = 3
oNewItem.Visible = True
Butt1 = oForm.Items.Item("XXX").Specific
Butt1.Caption = "Click"
I got solution by commenting the line "oNewItem.Visible = True"
Thanks once again. But I don't know how it works.
Edited by: ParvathaSolai on Jun 7, 2011 2:11 PM -
Services for object buttons randomly disappearing from FB03
Hello SAP Experts,
We display an FI document via tcode FB03 (Display Document) and use the "services for object" buttons to attach documents via the "create attachment" button and also to view attached documents via the "attachment list" button.
However, quite often when displaying the FI document after a document has been attached, the "services for objects" buttons are not displayed. Just a blank toolbar appears.
Later on the when the FI document is displayed again via tcode FB03 (Display Document), the "services for objects" buttons do appear and the attachments can then be displayed.
As the attachments can be viewed sometimes, I would say that this issue is not related to security.
Any idea's what maybe causing the "services for objects" buttons randomly disappearing???
Regards,
SAP MuppetHello SAP Experts,
Any ideas or comments here???
Regards,
SAP Muppet -
How to Disable Check for updates button in Help/About in firefox 5.0
Hi the user should not manually check for updates so we want to disable the Check for updates button also in Help/About.
Thanks in advancedYou can hide that button with code in userChrome.css below the @namespace line.
* http://kb.mozillazine.org/userChrome.css
* http://kb.mozillazine.org/Editing_configuration
You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
* ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
<pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
#aboutDialog #updateBox { display:none!important; }</nowiki></pre>
You can also choose to lock the related update pref(s) to false if you want to make sure.
See:
* http://kb.mozillazine.org/Locking_preferences
* http://kb.mozillazine.org/about:config
Maybe you are looking for
-
Is there a way to have two iTunes libraries connect to my iPhone 5s at one time?
I have an iPhone 5s, I have tons of music on it, connect with an iTunes account joint owned; my Ex and I. Now I made my own account, I want to add the music to my iPhone without lossing the music from my old account.. Is this possible? (Whenever I pl
-
I can no longer access documents in iCloud from my Mac running Mavericks
I entered into the Yosemite public beta program. After running the installation, I decided to go back to Mavericks. I used my Time Machine Backup to restore my Mavericks installation. All is well again except one thing, I cannot access any pre-Beta d
-
Sinnce I updated to windows 8.1 I do not get a picture when I open a video file only sound
I have recently uprgaded my system to windows 8.1 and since doing so when I try to play a video file I only get sound and no picture.
-
IPhoto can't find server volume after migration to new iMac with 2 HDs
Hi all, I recently moved to a new iMac from an older Mac Pro. The new iMac has 2 hard drives (256GB SSD & 2TB HD) with all the programs installed on the SSD and the HD is used as the main file storage drive. iPhoto is installed on the SDD and its lib
-
ERSInstaller failed. ensureDirectory error
Hello I have a problem trying to run Java applications: Safari failure: ERSInstaller failed. ensureDirectory error. ensureDirectory error. Directory(/System/Library/PrivateFrameworks/WebKit2.framework/Profiles/joaquin/ Application Data/IBMERS/IBMWW/