BDT Function Code for button

Hello Folks ,
Iv'e Created a new screen using BDT technology and added a button inside screen .
how can i handle the function code within this screen in a way that i won't have system messeage "Unknown function code XXX" while clicking on this button.
tanks in advance.
Herzel .

Hi,
You need to implement for your button a function module for the BDT event FCODE. You can have a look at the fms *_BUPA_EVENT_FCODE, to get an idea on how to implement it.
Thanks and warm regards,
Smita.

Similar Messages

  • 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 ALV

    Hi 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

  • 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,
    Vijaya

    hi!
    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

  • PO function code for HOLD & CANCEL (DELETE or BLOCKED) button

    Hi,
    can any one can provide the function code for HOLD button in purchase order creation.
    How to find out the function code for HOLD button.
    Regards,
    Nagaraju.

    For your case specifically, function code for hold is dependent on that program is calling it, but any way for hold, you can simply use HOLD or RECN or ONHO or PTBK or a bunch of others.
    For block you can use SHB1 or SHB2 or VFIX etc. To make it easy for you and others, follow the following steps:
    -Run transaction SHDB and record the transaction you want.
    -Then in a different session, run SE16 and enter table name RSMPTEXTS.
    -Enter any OK Code you want to know its use in the field OBJ_CODE (Function Code) and execute.
    -If you know the program name or Tcode, you can use that too. Just enter that in the appropriate field.
    -OR use the text wildcard and see if you're lucky.
    -The Text will tell you what the OK Code does.
    Ken G

  • Function code for notification in a custom scenario

    Hi,
    Does anyone know the activity code or function code for a notification that needs to be sent to the organiser of a training event if the maximum capacity of the event is exceeded, i.e. the attendee goes on the waiting list.
    There seems to be no standard activity type which gets triggered the moment the max. capacity of the training event is exceeded.(unlike BOKP)
    Does anyone know the workaround for this ?
    As far as I know you cannot create your own activity based on your custom scenario.
    Hence how to handle this ?

    You can use CRM_ORDER_MAINTAIN and populate the parameter IT_SERVICE_OS
    or use BAPI_OPPORTUNITY_CHANGEMULTI and populate the parameter SERVICE_OS.
    BR,
    Florin

  • What is the function code for execute

    Hi,
    What is the function code for execute.
    I am using set pf-status under initialization.
    Thanks.
    Sai.

    Hi,
    If your adding a execute in pf-status then we can give the function code for execute as 'EXEC' - F8.
    Nyways it automatically comes no need to explicitly add in pf-status. The standard function code is 'ONLI'
    just we need to check the sy-ucomm value and perform what you want.
    i.e if sy-ucomm = 'EXEC'.
    endif.
    hope this help you.
    plz reward if useful.
    thanks,
    dhanashri.
    Edited by: Dhanashri Pawar on Jun 26, 2008 11:43 AM

  • Code for button located inside the MC

    I decided to rearange my flash site and now things don't work.
    I used to have an image collage where all the images were buttons and each image was located on the stage ( which made a stage with 10+ loose images)
    I made each image a button. Below is a code example for one of the images named "icysophistication_app_btn". The previously working code for it was:
    icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
    function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
              gotoAndPlay("icysophistication");
    Then I decided to unite all the images into one mc called "imgscollage_buttons_mc" (because later on I want to build another collage and have them sliding on the screen with tweener engine)
    imgscollage_buttons_mc.icysophistication_app_btn.addEventListener(MouseEvent.CLICK, onClick_IcySophisticationPopUp);
    function onClick_IcySophisticationPopUp(event:MouseEvent) :void {
              gotoAndPlay("icysophistication");
    I am guessing I have to put something before -  gotoAndPlay("icysophistication");
    but can't figure out what.
    Please suggest

    your original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
    your new code is still on the main timeline and the main timeline still has that frame label?

  • Help with writing code for button

    Hi!
    Can someone help me with the code for a button that sends my menu back to 0?
    This is the code current code, and I've created a button called sistapilen that I want to insert where the regular button "arrow" is not visible. I want sistapilen to navigate me back to 0. (Or if I can get "arrow" to do it and delete "sistapilen"). 
    /Jen
    // File downloaded from www.riacodes.com
    import com.greensock.*;
    var arrayX :Array = [0,-800,-1600,-2400,-3200,-4000,-4800];
    var currentIndex:Number=6;
    left_mc.addEventListener(MouseEvent.CLICK,navigate);
    right_mc.addEventListener(MouseEvent.CLICK,navigate);
    left_mc.buttonMode = true;
    right_mc.buttonMode = true;
    checkArrows();
    function navigate(e:MouseEvent):void{
    if(e.currentTarget == left_mc) currentIndex --;
    else currentIndex ++;
    checkArrows();
    TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});
    function checkArrows():void{
    if(currentIndex == 0) left_mc.visible=false;
    else if (currentIndex == arrayX.length - 1) right_mc.visible = false;
    else{
    left_mc.visible = true;
    right_mc.visible= true;

    Add a listemer for whichever other button you plan to use...
    sistapilen.addEventListener(MouseEvent.CLICK,navigate);
    And try changing your navigate function as follows...
    function navigate(e:MouseEvent):void{
         if(e.currentTarget == left_mc) {
              currentIndex--;
         } else if(e.currentTarget == right_mc){
              currentIndex ++;
         } else {
              currentIndex = 0;
         checkArrows();
         TweenLite.to(content_mc,.5 ,{x:arrayX[currentIndex]});

  • 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,
    Advait

    Hi 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

  • 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,
    Madhavi

    Hi 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.

  • Plsql code for button.....

    i have a page which contain fields term_id,*term_desc*,*term_condition*
    and some buttons Add,*delete* and save..
    Actually no data in the table..
    when i press Add button the term_id should get increment by '1' .
    where i have to wite the below coding in Edit Add button?
    can i put the coding in Conditional Item Display condition type PLSQL?
    declare
    a number;
    begin
    select max(nvl(term_id,0))+1 into a from term_creation;
    *:P5_TERM_ID*:=a;
    end;
    Edited by: skud on Mar 5, 2011 2:05 AM

    You can submit the page with a request say "MY_REQUEST" and run a conditional PLSQL block(request equal to MY_REQUEST) and add the PLSQL code there.
    If you want to do it without submitting page
    <li>Apex Version 4 : Add an id to button (button attributes, id ="MY_BUTTON" ) and add a Dynamic Action fired on click of DOM element : MY_BUTTON , event type would be PLSQL and write your PLSQL code there(add required page items to be submitted in the field)
    <li>Apex 3.x and 2.x(works iwth apex 4 too), create an ondemand PLSQL process, call the process from a javascript function(add the item values to session using the ajax request handle) and call the javascript function from the button click( action type: redircet to URL , javascript:function_name(parameter1,parameter2) )

  • 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,
    Sukhbold

    Hi,
    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,

  • Code for button is affecting the entire movie

    The following code is on the timeline and the button
    instance, cancelMC, is also on the same timeline in a different
    layer and appears 4 times throughout the timeline. I've asked this
    question (worded differently) at kirupa and the post has gone
    ignored for some reason - maybe the title is too long or something.
    The code tells the button, onRelease, to "gotoAndStop(1)" however,
    if you click anywhere on the interface it does that. This is what
    would have happened if I had put on the timeline
    "this.gotoAndStop(1)." But I did not type that as you can see:
    with(cancelMC){
    onRollOver = function(){
    this.ExplainMC.gotoAndStop("cancel");
    onRollOut = function(){
    this.ExplainMC.gotoAndStop("void");
    onRelease = onReleaseOutside = function(){
    _root.searchPanelMC.mainMenuMC.gotoAndStop(1);
    this.gotoAndStop("user");
    Notice it says "this.cancelMC"? That is the button. Someone
    please help with this - I am at a loss and have tried everything to
    make it work.

    your original code was on the main timeline and it was the main timeline that contained the frame labeled "icysophistication"?
    your new code is still on the main timeline and the main timeline still has that frame label?

  • Deactivating the Function codes of Buttons on standard RF screen

    I have to deactivate the functionality of some of the function keys(Buttons) on Std. SAP RF Screen(Quant screen)  of LM51 transaction (Pgm: SAPLLMOB & Screen# 0152). How can I achieve this. I appreciate if any one can guide me on this.
    Thanks
    Usha

    Hi,
    Try this out with Transaction Variant (T.code is SHDO)
    <b>Transaction SHD0 -</b> Create a variant for the required transaction bychanging the layout through hiding fields and screens
    The Below data i copied from the web, this may helpyou ...
    Case one for creating Transaction Variants
    Step 1:
    Execute transaction SHD0 and create a Transaction Variant against the original transaction.
    Step 2:
    As soon as you press the create button, the original screen of the transaction will appear. After pressing any button/tab on the screen a menu variant screen will appear. Make sure to check any field or tab or any button you want to disappear from the menu functions. Press the exit and save button when you are sure that no further settings are required on sub-screens (if present). After pressing the exit and save button another menu variant screen will appear. Press the save button here and save as a local object or under any development class.
    Step 3:
    When you are back on the Transaction Variant (SHD0) screen, press shift+F6 or click the goto menu and press the create variant transaction button. Through this transaction SE93 will be executed. Enter the transaction name you want to create and any other required field and now press the save button.
    Step 4:
    Now execute the transaction you create through create Transaction Variant and enjoy the results.
    Case two for creating Transaction Variants
    Step 1:
    Create a dialogue transaction through SE93 and enter the program name and screen number of the original transaction you want to make a variant on (e.g., PFCG). Press the save button and check whether the replica transaction (PFCG) has been created successfully by executing it on a new session.
    Step 2:
    Execute transaction SHD0 to create a Transaction Variant. Specify the transaction name (replica of PFCG) which you have just created and create a Transaction Variant against the replica transaction.
    Step 3:
    As soon as you press the create button, the original screen of the transaction will appear. After pressing any button/tab on the screen a menu variant screen will appear. Make sure to check any field or tab or any button you want to disappear from the menu functions. Press the exit and save button when you are sure that no further settings are required on sub-screens (if present). After pressing the exit and save button another menu variant screen will appear. Press the save button here and save as a local object or under any development class.
    Step 4:
    When you are back on the main screen of the SHDO (Transaction Variant) click the edit option on the menu tab and activate Standard Variant. Through this a Standard Variant will be assigned to the transaction specified (replica transaction).
    Regards
    Sudheer

  • How to create new logical function codes for Subtype

    Hi all
      I'm developing an WF that must be started when the user makes any change in a employee position. The problem is that this change can be made by many transactions, I know that it´s possible to do it by PA30/PA40, and today it´s made here using PP01. The Functional Consultant said to me that the better way to map all possible trasactions which made that kind of changes in an employee data is by adding new "Logical Funcion codes" (or Activities) for our specif subinfotypes.
      The table that contains such information is T77FLC. How can I add that new activities for a subinfotype, by a costumizing or just adding new entries in this table?
    Thanks in Advance

    Josie,
    You can configure your own workflow events based on HR objects/infotypes/subtypes/update type/activity type combinations using transaction SWEHR3.  Look at SWEHR2 for the standard events to get some idea of what you need to enter in SWEHR3.
    The relationship between the infotype and the matching business object type is held in SWEHR1.
    Regards,
    Jocelyn

Maybe you are looking for