Adding field in selection sreen and display output

Hi,
i got an requirement that to add a field in selection screen i have done that but abgru is reason for rejection if u give in selection screen that reason for rej : Z5 it should come only Z5 related sales orders only but here all the sales orders are displaying ,can any one check this code and correct it ans send me plz.
select-options: s_abgru for vbap-abgru.
DATA:  lv_vbtyp LIKE vbak-vbtyp,
         lv_bsark LIKE vbak-bsark,
         lv_matnr LIKE vbap-matnr,
         lv_abgru LIKE vbap-abgru.---->reason for rej
  IF NOT s_abgru IS INITIAL.
    SELECT SINGLE abgru INTO lv_abgru FROM vbap WHERE abgru IN s_abgru.
    IF sy-subrc NE 0.
      MESSAGE e000 WITH 'Invalid Reason for Rejection '.
    ENDIF.
  ENDIF.
i have written this above code .plz correct it and send me /
Thanks in advance,

Hi
You need to use the field in your select statement in the where condition.
like
REPORT  ytest.
TABLES: vbak, vbap.
TYPES: BEGIN OF ty_itab,
       vbtyp TYPE vbtyp,
       bsark TYPE bsark,
       matnr TYPE matnr_d,
       END OF ty_itab.
DATA: itab TYPE STANDARD TABLE OF ty_itab WITH HEADER LINE.
SELECT-OPTIONS: s_augru FOR vbak-augru.
START-OF-SELECTION.
  SELECT k~vbtyp
         k~bsark
         p~matnr
         INTO TABLE itab
         FROM vbak AS k INNER JOIN
              vbap AS p ON
              kvbeln = pvbeln
         WHERE augru IN s_augru.
Regards
Raj

Similar Messages

  • How to save the variant and select it for displaying output

    For       ALV variant use the FM_REUSE_ALV_VARIANT_F4 and REUSE_ALV_VARIANT_DEFAULT_GET to allow the user to save the variant and select it for displaying output.If   any of the data (Z fields in VBAP) is blank,the cell in the column must be highlighted in red.

    Hi,
       Refer thsi code
    DATA : wa_variant  TYPE disvariant,       "Work area for variant
           wa_variant1 TYPE disvariant,       "Work area for variant
    *&      Form  sub_get_default_variant                                  *
    This form will initialize the variant                               *
    FORM sub_get_default_variant .
    *--Clear
      CLEAR wa_variant.
    *--Pass the report name
      v_repid = sy-repid.                     "Report ID
      wa_variant-report = v_repid.
    *--Call the function module to get the default variant
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save        = c_save
        CHANGING
          cs_variant    = wa_variant1
        EXCEPTIONS
          wrong_input   = 1
          not_found     = 2
          program_error = 3
          OTHERS        = 4.
    *--Check Subrc
      IF sy-subrc = 0.
        p_varnt = wa_variant-variant.
      ENDIF.
    ENDFORM.                                  "sub_get_default_variant
    Regards,
    Prashant

  • Rows to columns/Transpose the records Query and Display output

    hi ,
    can anyone help me query this and transpose it to this format?
    i am still a beginner in sql.
    thanks for help!
    Rows to columns/Transpose the records Query and Display output
    id     startdate     endate                    
    1111     1/2/2001     11/3/2001                    
    1111     2/5/2002     4/3/2002                    
    1111     2/6/2000     2/5/2001                    
    3333     5/2/2003     11/3/2003                    
    3333     6/2/2003     12/3/2003                    
    3333     2/6/2005     2/5/2005                    
    desired output     
    id     startdate1     endate1     startdate2     endate2     startdate3     endate3
    1111     1/2/2001     11/3/2001     2/5/2002     4/3/2002     2/6/2000     2/5/2001
    3333     5/2/2003     11/3/2003     6/2/2003     12/3/2003     2/6/2005     2/5/2005

    Have you only 3 dates for each id ?
    So, try :
    SQL> l
      1  with tbl as
      2  (select 1111 as id, to_date('01/02/2001','DD/MM/YYYY') startdate, to_date('11/03/2001','DD/MM/YYYY') enddate from dual union all
      3  select 1111 as id, to_date('02/05/2002','DD/MM/YYYY') startdate, to_date('04/03/2002','DD/MM/YYYY') enddate from dual union all
      4  select 1111 as id, to_date('02/06/2000','DD/MM/YYYY') startdate, to_date('02/05/2001','DD/MM/YYYY') enddate from dual union all
      5  select 3333 as id, to_date('05/02/2003','DD/MM/YYYY') startdate, to_date('11/03/2003','DD/MM/YYYY') enddate from dual union all
      6  select 3333 as id, to_date('06/02/2003','DD/MM/YYYY') startdate, to_date('12/03/2003','DD/MM/YYYY') enddate from dual union all
      7  select 3333 as id, to_date('02/06/2005','DD/MM/YYYY') startdate, to_date('02/05/2005','DD/MM/YYYY') enddate from dual )
      8  select id, max(decode(dr,1,startdate)) start1,
      9             max(decode(dr,1,enddate)) end1,
    10             max(decode(dr,2,startdate)) start2,
    11             max(decode(dr,2,enddate)) end2,
    12             max(decode(dr,3,startdate)) start3,
    13             max(decode(dr,3,enddate)) end3
    14  from (select id, startdate,enddate, dense_rank() over (partition by id order by startdate) dr from tbl)
    15* group by id
    SQL> /
                                                    ID START1   END1     START2   END2     START3   END3
                                                  1111 02/06/00 02/05/01 01/02/01 11/03/01 02/05/02 04/03/02
                                                  3333 05/02/03 11/03/03 06/02/03 12/03/03 02/06/05 02/05/05
    SQL> HTH,
    Nicolas.

  • Adding Amount field in BSEG table and display it single line item?

    hi experts,
           I am doing credit / debit form now my requirement is
                                               According to BELNR , GJAHR,BUKRS i want to find credit amount for this selection cretiria.
                         so i want to add all the lines of amount filed for a particular BELNR and display it as single line.
    so i am getting data from print program like this
    SELECTION-SCREEN BEGIN OF BLOCK b0 WITH FRAME TITLE text-001.
    SELECTION-SCREEN SKIP 2.
    PARAMETERS: p_belnr LIKE bkpf-belnr OBLIGATORY,
                p_bukrs LIKE bkpf-bukrs OBLIGATORY,
                p_gjahr LIKE bkpf-gjahr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b0.
    SELECT SINGLE *
                   FROM bkpf
                   INTO  i_bkpf
                   WHERE belnr = p_belnr
                         AND ( blart = 'DG' OR blart = 'ZG' )
                         AND bukrs = p_bukrs
                         AND gjahr = p_gjahr.
    IF sy-subrc = 0.
        SELECT  *
              FROM bseg
              INTO  table it_bseg
              WHERE belnr = i_bkpf-belnr .
      ENDIF.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname                 = 'Z_CREDIT_DEBIT'    " p_name
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
        IMPORTING
          fm_name                  = v_form_name
    EXCEPTIONS
      NO_FORM                  = 1
      NO_FUNCTION_MODULE       = 2
      OTHERS                   = 3
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    CALL FUNCTION v_form_name
    EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
      CONTROL_PARAMETERS         =
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
      OUTPUT_OPTIONS             =
      USER_SETTINGS              = 'X'
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
      JOB_OUTPUT_INFO            =
      JOB_OUTPUT_OPTIONS         =
      TABLES
        i_bkpf                     = i_bkpf
        i_bseg                     = i_bseg
    EXCEPTIONS
      FORMATTING_ERROR           = 1
      INTERNAL_ERROR             = 2
      SEND_ERROR                 = 3
      USER_CANCELED              = 4
      OTHERS                     = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    so my I_BSEG containing all line items of particular BELNR . with the field SHKZG  iam  getting only credit line items .
      now i want to do is add all credited amount and display like this in a table.
    against ref#  (BSEG-REBZG) ! details (BSEG-SGTXT)!  amount
    124569                                   10%discount                950.00(total amount ie sum of all lines amount for a BELNR)
                                                                                    10.00(total tax amt ie sum of   all lines of tax amount for a BELNR)                                                                               
                                                                                    960.00

    hi arun,
             i used collect in smartform my procedure is like this .
                   i am getting data into i_BSEG because i declared like this in TABLES parameter
                      i created a loop .
                             in that i mentioned like I_BSEG into WA_BSEG.
                                   then i created a program lines here i mentioned like this.
                                                  COLLECT WA_BSEG INTO IT_BSEG.
               but because of BUZEI "Number of Line Item Within Accounting Document .it is not same it is varying for every credited time that means for every line of BELNR. thats why it is not adding it is just appending .
    so pls tell me any other chance to find sum .
    because i want to sum up all credted amount and display it in single line
    ie first column REBZG "Number of the Invoice the Transaction Belongs to(against ref) i want to display once .
    And Second column  SGTXT "item text(details) for amount once and for tax amount once
    And Third column Amount first line consists total amount & second line consists total for tax amount
    regards,
    satheesh.
    [email protected]
    any doubts chat me regarding this post.

  • Fields missing in ALV grid display output

    Hello  Friends,
    I have done customer enhancement to VF04 tcode and i have added 2 new additional fields to the existing output.The program is working fine and its displaying the 2 new additional fields in the output display in development server.
    But when i transported the program to Q server and i have observed that the 2 new additonal fields are not displayed in the output display but when I  am selecting  'choose detail' push button on application tool bar it's showing the 2 new additional fields.In development server in the output 40 fields are displayed but in Q server only 9 fields are displayed.
    Could you please help me regarding this.
    Thanks in advance,
    Arvind.

    register the enhancementy to the project in Q server .. might be it is not transferred

  • Add custom fields on selection screen  and ouput in Transaction QM11

    Hi All,
       i have the requirement to enhance the transaction qm11( Report : RQMELL10) to add the custom fields on the report selection screen and in the report output.
      i tried to add the fields on selection screen by copy the standard program RQMELL10 to custom one. and tried to add the fields above to the coding tab but i am not able to display the text for those fields of select-options. can any one help me is it the right way to copy the standard program to custom program and adding the custom fields and how to get the text element for the custom fields which we are going to add it. i tried to add the text element in program text elements but it is not appering on the report.
    please requeting the help asap if it is possible.

    Have a glance in below thread.
    Enhancing transaction QM10
    Also, there are some more threads available in enhancing the QM10 / QM11. Please search those as well.

  • Help! one to many relationship table and display output as exists

    I have two tables:
    Table1: LOCATION with field locn_id
    Table2: TRACKING with field from_locn and to_locn
    Example
    locn_id from_locn to_locn
    26001A 26001A 26002A
    26002A 26001A 26001B
    26001B 26001A 26001C
    26001C
    I am linking locn_id to from_locn.
    I want to display output as:
    If locn_id exists in from_locn (I dont care how many records), display Y. If locn_id does not exist then display N.
    So in above case, output should be
    26001A Y
    26002A N
    26001B N
    26001C N

    Here is my try:
    create table LOCATION(locn_id   VARCHAR2(10));
    create table TRACKING(locn_id   VARCHAR2(10), from_locn  VARCHAR2(10), to_locn  VARCHAR2(10));
    insert into LOCATION values('26001A');
    insert into LOCATION values('26002A');
    insert into LOCATION values('26001B');
    insert into LOCATION values('26001C');
    insert into TRACKING values('26001A', '26001A', '26002A');
    insert into TRACKING values('26002A', '26001A', '26001B');
    insert into TRACKING values('26001B', '26001A', '26001C');
    insert into TRACKING values('26001C', '',       ''      );
    select l.locn_id,
    (select decode(count(*), 0, 'N', 'Y') from tracking t where l.locn_id = t.from_locn ) exists_flag
    from   location l
    LOCN_ID    E
    26001A     Y
    26002A     N
    26001B     N
    26001C     N
    4 rows selected.Edited by: Thomas Morgan on May 31, 2013 3:43 PM

  • Adding fields on selection screen dynamically

    Hi all,
    Can we add some fields to selection screen dynamically on pushbutton click?
    Regards,
    Dnyanesh

    just have look below code
    REPORT zrsdvsr1
           LINE-SIZE 220
           LINE-COUNT 65(5).
    TYPE-POOLS : slis.
    TABLES
    TABLES: vbak.
    DATA DECLARATIONS
    Ranges
    RANGES: r_posnr FOR vbap-posnr.
    DATA: BEGIN OF t_veramt OCCURS 0,
            vbeln TYPE vbap-vbeln,
            posnr TYPE vbap-posnr,
            matnr TYPE vbap-matnr,
            netwr TYPE vbap-netwr,
            mwsbp TYPE vbap-mwsbp,
          END OF t_veramt.
    DATA: BEGIN OF t_disamt OCCURS 0,
            vbeln TYPE vbap-vbeln,
            posnr TYPE vbap-posnr,
            matnr TYPE vbap-matnr,
            netwr TYPE vbap-netwr,
            mwsbp TYPE vbap-mwsbp,
            netwr_v TYPE vbap-netwr,
            mwsbp_v TYPE vbap-mwsbp,
            disc_val TYPE vbap-mwsbp,
          END OF t_disamt.
    *&   ALV FIELDS
    DATA : alv_fcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
           alv_layout TYPE slis_layout_alv.
    SELECTION SCREEN
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_ver RADIOBUTTON GROUP g1 USER-COMMAND rad DEFAULT 'X',
                 p_sab RADIOBUTTON GROUP g1 .
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: s_vbeln FOR vbak-vbeln NO INTERVALS MODIF ID gr1.
    PARAMETERS:    p_dwfile TYPE  rlgrap-filename
                   DEFAULT 'C:\test1.txt' MODIF ID gr2,         "#EC NOTEXT
                   p_upfile TYPE  rlgrap-filename
                   DEFAULT 'C:\test.txt' MODIF ID gr3.          "#EC NOTEXT
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_upfile.
    **************F4 Help For Input File Name****************************
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = syst-cprog
                dynpro_number = syst-dynnr
                field_name    = 'C:\'
           IMPORTING
                file_name     = p_upfile.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dwfile.
    **************F4 Help For Input File Name****************************
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = syst-cprog
                dynpro_number = syst-dynnr
                field_name    = 'C:\'
           IMPORTING
                file_name     = p_dwfile.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF  p_sab = 'X'.
          IF screen-group1 = 'GR1' OR screen-group1 = 'GR2'.
            screen-active = '0'.
            screen-invisible = '1'.
          ELSE.
            screen-active = '1'.
            screen-invisible = '0'.
          ENDIF.
          MODIFY SCREEN.
        ELSE.
          IF screen-group1 = 'GR3'.
            screen-active = '0'.
            screen-invisible = '1'.
          ELSE.
            screen-active = '1'.
            screen-invisible = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION
    START-OF-SELECTION.
    Check Radio Button
      IF p_ver = 'X'.
        PERFORM get_details_open_so_vertex.
      ELSE.
        PERFORM get_details_open_so.
      ENDIF.
    Display the output.
      PERFORM diplay_report .
    regards
    vinod

  • How to retreive and display output list from BAPI

    Hello
    I am making an applcation using SUP 2.0, and this application make an user to get leave history using a Mobile System from SUP.
    I've created the MBO as Attributes using the BAPI: BAPI_LEAVE_HISTORY.
    This BAPI has some parameters IN and OUT.
    Input parameters are Employee Id and date.
    The parameter OUT is a List that retreives the employee leave history.
    Anyone has an Idea or example how to retreive the output from BAPI and displaying the output on a screen.
    Any tips or blogs that can help me?
    Thanks all!
    Satish

    Hi David Brandow,
    I have tried your solution where I just created a MBO for my 'operation' and I'm using sync parameters to execute the RFC.
    The problem I'm facing is, for example, if I create a record it gets saved in the MBO table and the record successfully gets created in SAP as well after a sync. But when I create another record and sync, the previously saved record in MBO table also gets executed so I'm getting duplicate entries in SAP.
    Have you or anyone faced this problem?
    Any response is appreciated. Please let me know if I'm not clear, I realized its a complicated scenario.
    Thanks,
    Sandeep

  • Reading Contents of File and displaying output

    I'm trying to read the contents of a file, then loop through the contents, perform some formatting, and display the output. Should I read the file into an array? What is the best approach? Thanks in advance.

    Depends. Is it a text file? Can you format each line independent of others? If so, you can just read one line at a time (BufferedReader) and pass it to wherever the display is. If you need to work on the file as a whole, then you need read it all at once.

  • Adding Colume in the Table and display result in it.

    Hi Guru's ,
    I have a requirement to add column in existing Table. and Display the result after calculation.
    Thanks,
    Rutu

    Hi,
    Please used this code snippet for reference:
    OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("<VO Name>"); // Give VO Name attached to the Table Region.
    if (vo != null)
    vo.addDynamicAttribute("<Att_Name>"); //Adding ViewAttribute to VO
    vo.reset();
    vo.next();
    //Do calculation that you want
    //Setting the calculated value in the created VO Attribute
    vo.getCurrentRow().setAttribute("<Att_Name>", <Value to assign>);
    I hope this will gives you a proper Help.
    Please feel free to ask if any more Question
    Thanks,
    Shrikant

  • Add new field in selection-screen and output dynamically

    hi gurus,
      i need to add field in selectio-screen.
    i need to validate the field with existing fields.
    i need to add this in alv grid output list dynamically.
    thanks & regards,
       kgn9.

    Hi
    Try to use EXIT_SAPMM07M_001, it's to update the item (not header) text, but you can try to use it:
    FIELD-SYMBOLS: <BKTXT> TYPE MKPF-BKTXT.
    ASSIGN ('(SAPMM07M)MKPF-BKTXT') TO <BKTXT>.
    IF SY-SUBRC = 0.
      <BKTXT> = <.....>.
    ENDIF.
    Max

  • Get input and display output on same screen for report

    Hi frnds,
    two params
    that is mat.no,desc.
    enter the mat.no and also display the description of that mat.no in same input screen for the report.
    How can i archieve .
    Thanks in advance.

    Hi,
    It is not possible in Dialog Programming too. But there is an alternative. You can make the material number field as drop down. Assign a function code to that. Now in PAI you can code accordingly to display the description.
    In TOP.
    TABLES: mara, makt.
    DATA  gv_maktx TYPE makt-maktx.
    In PAI.
    CASE sy-ucomm.
    WHEN 'F_MATNO'        "function code assigned to the material number drop down field
         SELECT SINGLE maktx
          FROM makt
          INTO gv_maktx
          WHERE matnr = mara-matnr. " mara-matnr is the dictionary reference to the material number drop down field in the screen.
          makt-maktx = gv_maktx.    " makt-maktx is the dictionary reference to the material description field in the screen.
    ENDCASE.
    Thanks,
    Sri.

  • How get window between selection screen and alv output

    Hi Friends,
    I am displaying ALV report now i want to display small window with one button and it should show list of fields before displaying alv output.
    means i want a window showing list of fields of internal table coming from program.and when i will click on yes button it should show ALV output.
    how can i achive this .
    Pls. help
    thanks in advance.

    Hi,
    Try to use the following command:
    <b><i>WINDOW STARTING AT <some-value> <some-value> ENDING AT <some-value> <some-value>.
    </i></b>
    notice that there is a space between <> <>.
    This statement should be used inside the AT USER-COMMAND event.
    i.e.,
    AT USER-COMMAND.
       CASE SY-UCOMM.
           WHEN 'XXX'.
                <b> <i> WINDOW STARTING AT <> <> ENDING AT <> <>.</i></b>
                 ..............statements....................
       ENDCASE.
    This should help you some what.
    Bye

  • PL/SQL...Unsure how to loop thru multiple questions and display output?

    This is my first pl/sql program, I've written psudocode on paper, but not sure what to do for two parts.
    What I'm trying to do is write pl/sql that will check a row based on an employee id #.
    declare
    cursor cur is
    select *
    from employee
    where employee_id = foo;What we are checking are the results the employee answered. They have answered 180 questions and I want to find when the answer a 0, 7, and 9.
    Basically the pl/sql has to loop thru the 180 questions
    loop
    v_count := vcount + 1
    select *
    from employee
    where q1 thru q180 in (0, 7, 9);
    end loop;
    dbms_output.put_line ('Employee ID' || employee_id);
    dbms_output.put_line ('Q1 - Q180' || q1 - q180); I'm not sure how to write the pl/sql to loop thur all 180 questions.
    I'm not sure how to display the output to show what question they scored a 0, 7, and/or a 9 on.
    thanks
    Message was edited by:
    cmmiller

    536 columns in one table? Yowsa. Without a normalized table, you are going to need dynamic pl/sql and a messy solution.
    I would rethink your design, and come up with something more like so:
    employee
    questions
    employee_responses
    So that would you could easily do something like this:
    declare
      cursor c1 is
        select ers.question_id,
               que.question_name,
               ers.rating
          from employee emp,
               questions que,
               employee_responses ers
         where emp.employee_id = ers.employee_id and
               que.question_id = ers.question_id and
               emp.employee_id = v_employee_id and
               ers.rating in (0, 7, 9) and
               que.enabled_flag = 'Y';
    begin
      for r1 in c1 loop
        dbms_output.put_line('Question: '||r1.question_name);
        dbms_output.put_line('Employee Rated this: '||r1.rating);
      end loop;
    end;Thats how I would do it - I think you are going down the wrong path. What happens if you need to create a new question or delete one? You constantly have to modify the table. Hope this helps

Maybe you are looking for

  • How to use value in a drop-down list box as "With these Values" parameter?

    Hello, new user. I have a drop-down list box on Page 1, upon which the user can choose a study number. The List Box is named "P1_STUDY_NBR". Then I have a list, one entry of which goes to my master-detail form, which is Page 6. I would like it to go

  • Recommendation for Moving Screen Caps

    I'm looking for a program that will do screen capture movies. Snapz Pro seems like it will do what I want but I wanted to see if there was anything else somebody thought was AWESOME before I shell out my hard earned $$$.

  • Guidelines for 0HR_PA_PA_1Datasource in BI 7.0

    Hi Experts, I want to use the HR Headcount Datasource 0HR_PA_PA_1,as in previous versions we need to make changes according to the note  336229,we are using BI 7.0 and ECC 6.0 do I still need to make the changes according to the note please suggest m

  • OVI and Office 2000

    Strange thing. Try to sync using OVI and Outlook 2000. All contacts are sync'ed OK. But for the calender only reoccouring birthdays are sync'ed. No other appointmens (reoccouring or normal) appear in the Outlook calender (they are on the phone). The

  • Image Fade Out/Load new Image/Fade In

    I think I am having an event timing issue. My desire is to change the "header" image on each selection of a tabNavigator. I can swap the image without issue through a img.load process. I placed the image on a canvas and set the "showEffect" and "hide