Regarding Triggering button

Hi All,
When a click a logoff button how can i give it as a pop up by saying do you want exit with yes or no button in the popup, also how can i validate a particular filelds like when the text box is empty it should say enter a field how come i acheive all the scenario's?

Hi Suresh,
Please follow on the lines of below code snippets..
For your Pop Up
  DATA: lo_cmp_api TYPE REF TO if_wd_component,
        lo_window_manager TYPE REF TO if_wd_window_manager,
        lo_popup TYPE REF TO if_wd_window,
        lv_text TYPE string_table,
        lo_api TYPE REF TO if_wd_view_controller,
        lv_string TYPE string_table,
        l_string TYPE string,
        l_title type string.
*display confirmation window
  lo_cmp_api = wd_comp_controller->wd_get_api( ).
  lo_window_manager = lo_cmp_api->get_window_manager( ).
  lo_popup = lo_window_manager->create_popup_to_confirm(
               text = lv_string
               button_kind = if_wd_window=>co_buttons_yesno
               window_title = l_title
               close_button = abap_false
               message_type = if_wd_window=>co_msg_type_warning
               window_position = if_wd_window=>co_center ).
  lo_api = wd_this->wd_get_api( ).
  lo_popup->subscribe_to_button_event(
             button   = if_wd_window=>co_button_yes
             action_name = 'NO'
             action_view = lo_api
             is_default_button = abap_false ).
  lo_popup->subscribe_to_button_event(
             button   = if_wd_window=>co_button_no
             action_name = 'CANC'
             action_view = lo_api
             is_default_button = abap_true ).
  lo_popup->open( ).
Declare 'NO' and 'CANC' actions in ur view actions tab.
For checking the field
Check whether the field is empty or not in the method where you want to
check it, may be in your method to Save changes.
then
  DATA:
     lo_wd_view_controller TYPE REF TO if_wd_view_controller,
     lo_message_manager    TYPE REF TO if_wd_message_manager,
*Get the message manager controller
  lo_wd_view_controller = wd_this->wd_get_api( ).
  CALL METHOD lo_wd_view_controller->get_message_manager
    RECEIVING
      message_manager = lo_message_manager.
    IF <field> IS INITIAL.
      CALL METHOD lo_message_handler->report_error_message
        EXPORTING
          message_text = text-006.
    ENDIF.
Hope this solves your problems.
Regards,
Ismail.

Similar Messages

  • Regarding HTMLB button

    Hello SDN
    I'm new to portal and facing problem with button event management .when i triggered event its giving error that eventhandler could not be found .Where should i write my event handler  in"doProcessAfterInput()" or elsewhere
    waiting for help

    HI,
    I hope this code clears your doubt
    public class HelloDyn extends PageProcessorComponent {
      public DynPage getPage(){
        return new HelloDynDynPage();
      public static class HelloDynDynPage extends JSPDynPage{
        public int state = 0;
        public void doInitialization(){
        public void doProcessAfterInput() throws PageException {
         public void confirm(Event event) {
              IPortalComponentResponse response=(IPortalComponentResponse)this.getResponse();
              IPortalComponentRequest request =(IPortalComponentRequest)this.getRequest();
              InputField inputf=(InputField)getComponentByName("name");
              String inputValue=inputf.getValueAsDataType().toString();
              response.write("Welcome" + " "+inputValue);
              IUser user1 = request.getUser();
              String usn = user1.getDisplayName();
              response.write(usn);
              state = 1;
        public void doProcessBeforeOutput() throws PageException {
             switch(state)
                  case 0:
                   this.setJspName("HelloJsp.jsp");
                   break;
                   case 1:
                   this.setJspName("hiUser.jsp");
                   break;

  • Regarding Triggers in Oracle Forms

    Hello Gurus,
    Please help me .I am very new to Oracle Apps .I got the requirement from my client. Iam a technical developer .Please see the below requirement.
    Order Management Super User >>
    Pricing >>Price Lists >>Price list Setup
    When an item is created in the Price List Form ie.(Reatil) and saved it .The same item should automatically appeared in COST and ZERO DOLLAR Forms . Except Price value.
    Iam planning to do triggers.Can any one help me to create triggers ..step by step procedure .or Please give me any suggestions to done this requirement.Please help me .
    Best Regards,
    Sandeep

    hello
    Change/ modify the properties of the check box item;
    for the check boxes :
    1. Make the data type of the check box as number;
    2. fill the functional a.)value when check = 1 b.) value when uncheck = 0;
    3. add new item to summarize the value of the checkbox;
    change properties of the new added item
    datatype number;
    calculation summary
    summary function :- sum
    summarize block :- your block
    summarize item :- your check box item.
    used :----> when checkbox change trigger
    if nvl(:item_summry,0 > 2 and //double entry of data then
    your code......
    .... message..
    raise..
    else
    your code.....
    end if;
    For Duplicate Item data entry :-
    see this for the duplicate entry for item :-
    duplicate records in  a multi record block
    modify my given code & modify the said link information to satisfied your requirement.
    charles

  • Regarding Radio button in selection screen?

    Hi experts,
    In my selection screen I am having two radio buttons.
    By default I am selecting the first radiobutton and displaying a selection block correspoding to that below.
    If I am selecting second radio button I want to display another selection block regarding to that second radio button.
    At that time first selection block should be hidden or should be disabled.
    Please help me out with sample codings.
    Thanks,
    Sakthi.

    Hi ,
    Try like this..
    TABLES : mara.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE select.
    PARAMETERS : p1 RADIOBUTTON GROUP rado USER-COMMAND hi DEFAULT 'X',
                 p2 RADIOBUTTON GROUP rado.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 .
    SELECT-OPTIONS : s_hello FOR mara-matnr MODIF ID m1,
                     s_hi FOR mara-mtart NO-EXTENSION NO INTERVALS MODIF ID m2.
    SELECTION-SCREEN END OF BLOCK b2 .
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        CASE screen-group1.
          WHEN 'M1'.
            IF p1 = 'X'.
              screen-active = 1.
            ELSE.
              screen-active = 0.
            ENDIF.
          WHEN 'M2'.
            IF p2 = 'X'.
              screen-active = 1.
            ELSE.
              screen-active = 0.
            ENDIF.
        ENDCASE.
        MODIFY SCREEN.
      ENDLOOP.
    AT SELECTION-SCREEN ON s_hi.
      CHECK sy-ucomm NE 'HI'.
    START-OF-SELECTION.
      IF p1 = 'X'.
        WRITE 'hi'.
      ENDIF.
    cheers,
    Sai

  • Regarding Navigation buttons

    Dear All,
    I tried following code for use Navigation buttons. But it not working. It gives error "Object reference not set to instance of an object" Can anybody tell me what is wrong in that or any file want to include for that or is there another method for use Navigation buttons?
    Plz suggest me how to solve this error ?
    if (pVal.MenuUID == "1282" || pVal.MenuUID == "1288" || pVal.MenuUID == "1289" || pVal.MenuUID == "1290" || pVal.MenuUID == "1291")
                    if (pVal.BeforeAction == false)
                            try
                                switch (pVal.MenuUID)
                                    case "1288":
                                       // oForm.DataBrowser.BrowseBy = "PR_Date";
                                        oRecordSet.MoveNext();
                                        //// If reached EOF show next
                                        if (oRecordSet.EoF == true)
                                            oRecordSet.MoveLast();
                                        break;
                                    case "1289":
                                        oRecordSet.MovePrevious();
                                        //// If reached EOF show previous
                                        if (oRecordSet.EoF == true)
                                            oRecordSet.MoveFirst();
                                        break;
    Regards,

    Dear Friend,
    Plz suggest me any solution. How to use that one. Is there is another code plz give me ?
    It's urjant. How to solve it ?
    Regards

  • Regarding : Push button collective Billing document

    Hi Gurus,
    In transaction VF04, there is a push button called collective billing document, the requirement is to hide or make the push botton inactive, is it possible through any developments or any std configuration available to disable that, or any other methods pls help me at the earliest.
    Thanks in advance
    Regards
    Rajesh

    Hi,
    VF04 t.code
    menu System----> Status
    U found popup window in that u found Progam name RXXXXX like this .
    Double click on this....
    It will goes to SE38 editor copy this Program to zprogram
    then find out Set PF status in that Program
    Delete that button...
    AND use Zprogram

  • Query regarding radio buttons

    Suppose i have created a 2 radio buttons say A1, A2. If i click A1 radio button One table which i have created should open, Similarly when i click A2 radio button Another table should Display...an u plz give code for that??

    Hi
    What do you mean by table to be displayed? You mean the data from that table to be displayed in the report output.
    first fetch the data of two tables into two internal tables ITAB1 and ITAB2
    now write the code as
    if v_r1 = 'X'.  (first radiobutton is selected)
    write: ITAB1 fields
    else.
    Write ITAB2 fields
    endif.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Urgent regarding radio buttons

    hi friends i created radio buttons with the if else i am checking the output is coming wight..but can we ktake case statement..? if so after case what i have to wright..?
    .ParameterS:a1 type c radiobutton group radi .
    ParameterS:a2 type c radiobutton group radi.
    ParameterS:a3 type c radiobutton group radi.
    start-of-selection.
    *if a1 = 'X'.
    *WRITE: ' A1 SELECTED'.
    *ELSEIF A2 = 'X'.
    *WRITE: '   A2 SELECTED'.
    *ELSE.
    *WRITE: '  A3 SELECTED'.
    *ENDIF.
    as follows..?
    CASE radi.
    when a1.
    write: ' a1 selected'.
    when a2.
    write: ' a2 selected'.
    when a3.
    wruite: 'a3 selected'.
    when others.
    WRITE: 'A2 SELECTED'.
    endcase....
    but this radi is not accpetin can my question is can i write case here if so how..?plz reply asap

    Hi,
    You cannot do so... since Case-EndCase can be used to value of a single variable, and depending on its value, you perform some action.
    Though it is meaningless to use Case-Endcase for your version of code, since it is not appropriate here, I am just writing it down the corresponding CASE-ENCASE version of your IF-ELSE-ENDIF so that you can better understand how it works.
    Data: v_param(2) type c.
    If a1 = 'X'.
        v_param = 'A1'.
    ELSEIF A2 = 'X'.
        v_param = 'A2'.
    ELSE.
        v_param = 'A3'.
    ENDIF.
    Case v_param.                       " so here you are checking the value of a single variable
      When 'A1'.                           " checking value using When statement
        write: ' a1 selected'.
      When 'A2'
        write: ' a2 selected'.
      When 'A3'
        write: ' a3 selected'.
    EndCase.
    Hope it clears your doubt and answers your question.
    Regards, Tapas
    <Pls reward if useful or answered>

  • Regarding Radio button position

    Hi All,
    I have a requirement in which i have 2 radio buttons and 1 push button and i have declared these three like this
    PARAMETERS: r1  RADIOBUTTON GROUP g1,
                r2 RADIOBUTTON GROUP g1.
    SELECTION-SCREEN: BEGIN OF LINE.
    SELECTION-SCREEN: PUSHBUTTON 30(30) pb01 USER-COMMAND onli
                      VISIBLE LENGTH 15.
    SELECTION-SCREEN: END   OF LINE.
    If i select the first radio button and click on the push button ztable should be updated. i have written code for this but 2nd time when user clicks on the push button with out changing the radio button position, a pop up message should be displayed like 'Nothing has been changedu2019.
    Please suggest me in this issue.
    Thanks in advance.
    Regards,
    Samatha

    text 001 :Selection screen sample
    tex t002 : List
    text 003: Alv
    text 004: None
    CONSTANTS : rbSelected TYPE c LENGTH 1 VALUE 'X'.
    DATA : p_txt type c LENGTH 100.
    SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-001.
      SELECTION-SCREEN ULINE /10(40).
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb1 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-002.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb2 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-003.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN BEGIN OF LINE.
        SELECTION-SCREEN POSITION 15.
        PARAMETERS: rb3 RADIOBUTTON GROUP rb.
        SELECTION-SCREEN COMMENT 20(30) text-004.
      SELECTION-SCREEN END OF LINE.
      SELECTION-SCREEN ULINE /10(40).
    SELECTION-SCREEN END OF BLOCK frame1.
    IF rb1 = rbSelected.
      CONCATENATE 'You selected' text-002 INTO p_txt SEPARATED BY space.
    ELSEIF rb2 = rbSelected.
      CONCATENATE 'You selected' text-003 INTO p_txt SEPARATED BY space.
    ELSEIF rb3 = rbSelected.
      CONCATENATE 'You selected' text-004 INTO p_txt SEPARATED BY space.
    ENDIF.
    WRITE / p_txt.

  • Regarding push button for parameters

    initially there are two push buttons and the parameters should not be displayed.
    when any one push button is clicked on one parameter should be displayed.
    i had written the following code but is not working
    please help me
    with regards
    bob
    TABLES : SSCRFIELDS.
    PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
    PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
    SELECTION-SCREEN : begin of line,
    PUSHBUTTON 2(10) PB1 USER-COMMAND A,
    PUSHBUTTON 20(10) PB2 USER-COMMAND B,
    end of line.
    AT SELECTION-SCREEN ." OUTPUT.
    CASE SSCRFIELDS-UCOMM.
    WHEN 'A'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'P'.
    SCREEN-INPUT = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    endcase.

    Hi Gangadhar,
    Try the following code. Its working on my side.
    TABLES : SSCRFIELDS.
    PARAMETERS : P LIKE MARA-MATNR MODIF ID ABC.
    PARAMETERS : P1 LIKE MARC-WERKS MODIF ID ABC.
    SELECTION-SCREEN : begin of line,
    PUSHBUTTON 2(10) PB1 USER-COMMAND A,
    PUSHBUTTON 20(10) PB2 USER-COMMAND B,
    end of line.
    DATA : FLAG TYPE C.
    AT SELECTION-SCREEN OUTPUT.
      IF FLAG IS INITIAL..
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'P'.
            SCREEN-ACTIVE = '1'.
            SCREEN-INPUT = '0'.
            SCREEN-OUTPUT = '1'.
            SCREEN-INVISIBLE = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN .
      CASE SSCRFIELDS-UCOMM.
        WHEN 'A'.
        FLAG = '1'.
          LOOP AT SCREEN.
            IF SCREEN-NAME = 'P'.
              SCREEN-ACTIVE = '1'.
              SCREEN-INPUT = '1'.
              SCREEN-OUTPUT = '1'.
              SCREEN-INVISIBLE = '0'.
              MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
      Endcase.
    Hope this helps,
    Pragya

  • Problem regarding triggers

    hi
    I have implemeted before row and after statement triggers on a table T1. My requirement is i need to get some values from another tables, say T2 and T3 , and perform some calculation and update one of the columns in T1 with that calculated value.
    Initially i have written that logic in after statement . but i have used update on the same table in the after statement trigger. when i executed that it went infinite loop because of the update on same table.
    update T1
    set c1 = calc_value
    where seq = p_rec.new.seq;
    [\pre]
    So i have moved that before row level trigger as shown below:
    [pre]
    p_rec.new.c1 := calc_value;
    [\pre]
    now i tried to entering the values for tables T1,T2 and T3 through the oracle form and pressed save button. but it was raising an error that the values for the T@ and T3 are not available to calc the value .
    Is there a way that i can do the update on the same table without any problem.
    Please suggest.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    It would have been easy for me to do all the logic in forms but my manager wants all the logic to be put into database triggers. In the trigger, i am selecting the values of tables T2 and T3 , then performing the calculation and then assigning it to the column in the before row trigger. I have used the POST command in the oracle form to make sure that the values are posted to the database . But also i could see the trigger raise error message in the form.

  • Regarding triggering of TRIP workflow.....................

    hi friends,
    we have implemented ESS for employee subgroup "executive and above"  in our compnay no doubt whenever the user creating trip request through ESS my trip customized trip workflow is getting triggered.
    but for workers when ever my travel administrator creating trip request through TC-TRIP then in this scenario the workflow is also getting triggered.
    means i want to know how can we restrict that when ever trip request is creating through TC - TRIP the workflow must not be triggered it should triggere if and only the trip request creating through ESS only

    Hi Rajat
      This cannot be achieved. Since tirgger event travelreqeuset event calls in both the cases. You cannot avoid triggering whenever the travelrequested from the t-code. One way you can try, in the triggering the event check wheather sy-tcode is trip in that case exit the workflow in your design else continue. Write to logic to get the t-code data in your attribute .
    Regards
    vijay

  • Regarding Push Buttons in Output Screen

    Hi All,
    I want to add to buttons in the output screen(not in the selection-screen). I used the below code, but it was showing those buttons in selection screen. can any one help me how to get these two buttons in the output screen.
    INITIALIZATION.
      sscrfields-functxt_01 = 'AUTO POPULATE'.
      sscrfields-functxt_02 = 'SAVE'.
    AT SELECTION-SCREEN.
      CASE sscrfields-ucomm.
        WHEN 'FC01'.
        WHEN 'FC02'.
      ENDCASE.
    Thanks in advance.
    Regards,
    Ramana Prasad. T

    hi
    good
    go through this code,which ll give you brief idea about create the button in output screen
    *& Report ZSSCRBUTTON *
    *& Adds buttons to selection screen. *
    *& Demonstrates alteration of selection screen layout depending on *
    *& which button is pressed. *
    REPORT zsscrbutton NO STANDARD PAGE HEADING.
    TABLES: t030, skat, sscrfields.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME
    TITLE text-001.
    SELECT-OPTIONS: p_ktopl FOR t030-ktopl,
    p_komok FOR t030-komok,
    p_ktosl FOR t030-ktosl.
    SELECTION-SCREEN SKIP.
    *SELECTION-SCREEN FUNCTION KEY 1. “Adds button to application toolbar
    Declaration of sel screen buttons
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON (20) w_button USER-COMMAND BUT1.
    SELECTION-SCREEN PUSHBUTTON (25) w_but2 USER-COMMAND BUT2.
    SELECTION-SCREEN END OF LINE.
    SELECT-OPTIONS: p_konts FOR t030-konts,
    p_bklas FOR t030-bklas.
    PARAMETER: gd_ucomm like sy-ucomm default ‘BUT1&#8242; no-display.
    SELECTION-SCREEN END OF BLOCK block1.
    TYPES: BEGIN OF t_t030,
    ktopl TYPE t030-ktopl,
    konts TYPE t030-konts,
    txt20 TYPE skat-txt20,
    bklas TYPE t030-bklas,
    bkbez TYPE t025t-bkbez,
    END OF t_t030.
    DATA: it_t030 TYPE STANDARD TABLE OF t_t030 INITIAL SIZE 0,
    wa_t030 TYPE t_t030.
    DATA: gd_repsize TYPE i VALUE ‘83&#8242;.
    *INITIALIZATION.
    INITIALIZATION.
    Add displayed text string to buttons
    w_button = ‘GL account selection’.
    w_but2 = ‘Valuation class selection’.
    *AT SELECTION-SCREEN.
    AT SELECTION-SCREEN.
    Check if buttons have been
    if sscrfields-ucomm eq ‘BUT1&#8242;.
    gd_ucomm = ‘BUT1&#8242;.
    clear: p_BKLAS.
    refresh: p_BKLAS.
    elseif sscrfields-ucomm eq ‘BUT2&#8242;.
    clear: p_KONTS.
    refresh: p_KONTS.
    gd_ucomm = ‘BUT2&#8242;.
    endif.
    *AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT.
    if gd_ucomm eq ‘BUT1&#8242;.
    loop at screen.
    if screen-name CS ‘P_KONTS’.
    screen-active = 1.
    elseif screen-name CS ‘P_BKLAS’.
    screen-active = 0.
    endif.
    modify screen.
    endloop.
    elseif gd_ucomm eq ‘BUT2&#8242;.
    loop at screen.
    if screen-name CS ‘P_KONTS’.
    screen-active = 0.
    elseif screen-name CS ‘P_BKLAS’.
    screen-active = 1.
    endif.
    modify screen.
    endloop.
    endif.
    thanks
    mrutyun^

  • Regarding Radio Buttons

    Hello,
    My self created one Radio button group, in that i am created set of radio buttons.
    Then by default it is selecting one radio button.
    Now i dont want to be keep selecting bydefault one radio button in that group. For this what should I do.
    Thank you

    Hi,
    Radio buttons are meant for that only.........
    One radio button should be selected by default...
    If you want that functionality then you can use check box instead of radio butoons.
    Orelse take three radio buttons in a group and leave the one which is selected by default and use the other two for your programming.
    Reward if helpful.
    Regards,
    Syed

  • Regarding BACK button in ALV OO ABAP

    Hi ,
    I have created two screens with containers, first screen displays records in ALV grid and when user selects one or more records and clicks on release button (which i have created ), it should update the database field and displays the status report on the next screen.
    I have also done another functionality i.e., when user double clicks on a particular record, it should call the change order transaction(IW32).
    Now, the problem is when i select few records and click on release and after the status report i.e.,the secon screen is getting displayed.after coming back to the first screen if i double click on the record, it is going to the respective transaction(IW32).but when i click 'BACK' button in IW32,it is not going back at one click.i need to press so many times.then it is coming back to the first screen.
    Can anybody help me how to go back at one click.

    Hi,
    i thing the problem is in you internal table where you are selecting the record its still keeping the old selected record. you should refresh your internal table after first selection and than select for calling transaction.
    Atul

Maybe you are looking for

  • Need to write trigger to caputre all the sql fired by a terminal or osuser

    Hi everyone Can anyone please let me know the trigger through which i can capture all sql fired by particular Terminal or OSUSER thanks

  • I have the 24" imac 2.4ghz can it support elements 11

    i have the 24" imac 2.4ghz can it support elements 11??? i need to know soon

  • Burning music CD gives unknown error 2605

    When burning an audio/music CD is iTunes for Win, I get unknown error code 2605. iTunes diags report that the CD is OK and I am able to create a data CD\DVD within iTunes using the same playlist that will NOT burn a music CD. I am able to rip a music

  • GetURL --javascript stops working under Flash 8

    I have ran into a strange problem that I hope is simple to diagnose. I have done many projects where the Flash object calls a Javascript in the parent web page using a simple getURL method, like this: getURL("javascript:resizeSWF("+40+")"); That has

  • 11i.AD.I.6

    hi all EBiz suite 11.5.10.2 on Windows i would to update my AD module from 11i.AD.I.2 (11.5.10.2) to 11i.AD.I.6 version in the readme of this patch i found some pre-req 1)under system requirement: about perl executable: it mention to install perl and