Problem with selection screen input

my problem is when i enter l2_gr or l1_vbeln or l2_vbeln, in the selection screen, the output should come according to that.I am not getting the correct result.
form summ_report.
  data: l2gr like ekbe-belnr.
   select fs_plant  fv_plant    f~r_plant
          fl1_sto        pl1_delivery  p~l1_gr
          pl2_sto        pl2_delivery  p~bsl_err_message
          kebeln         pl1_pgi       p~l2_pgi
   into (dochdr-swerks,   dochdr-vwerks,   dochdr-rwerks,
         dochdr-l1sto,    docitem-l1xblnr, docitem-l1gr,
        docitem-l2sto,   docitem-l2xblnr, docitem-err_msg,
         tabekko-ebeln,   docitem-l1pgi,   docitem-l2pgi)
   from zdochdr as f inner join zdocitem as p
                      on fl1_sto  =  pl1_sto inner join
            ekko as k on pl1_sto  = kebeln
   where f~s_plant     in s_werks  and
         f~v_plant        in v_werks  and
         f~r_plant  in r_werks  and
         f~l1_sto           in l1_sto   and
         p~l1_delivery      in l1_xblnr and
         p~l1_gr            in l1_gr    and
         p~l2_sto           in l2_sto   and
         p~l2_delivery      in l2_xblnr and
         k~aedat            in s_aedat.
move : dochdr-swerks    to  final_data-i_swerks,
        dochdr-vwerks    to  final_data-i_vwerks,
        dochdr-rwerks    to  final_data-i_rwerks,
        dochdr-l1sto     to  final_data-i_l1sto,
        docitem-l1xblnr  to  final_data-i_l1xblnr,
        docitem-l1gr     to  final_data-i_l1gr,
        docitem-l2sto    to  final_data-i_l2sto,
        docitem-l2xblnr  to  final_data-i_l2xblnr,
        docitem-l2pgi    to  final_data-i_l2pgi,
        docitem-l1pgi    to  final_data-i_l1pgi,
        docitem-err_msg  to  final_data-i_errmsg.
        append final_data.
    endselect.
L2 Goods receipt
loop at final_data.
  select single belnr from ekbe into l2gr
    where ebeln = final_data-i_l2sto and
              belnr in l2_gr and
              bwart = '101' and
              bewtp = 'E' and
              vgabe = '1'.
  if sy-subrc eq 0.
    move l2gr to final_data-i_l2gr.
  endif.
leg1 Billing document
select vbeln from vbfa into (tabvbfa-vbeln)
  where vbeln in l1_vbeln and vbelv in (final_data-i_l2xblnr,final_data-i_l1xblnr).
select single vbeln from vbrk into tabvbrk-vbeln
   where vbeln = tabvbfa-vbeln and fkart = 'IV'.
  if sy-subrc eq 0.
     move tabvbrk-vbeln to final_data-i_l1vbeln.
  endif.
   endselect.
leg2 Billing document
select vbeln from vbfa into (tabvbfa-vbeln1)
         where vbeln in l2_vbeln and
         vbelv in (final_data-i_l2xblnr,
                         final_data-i_l1xblnr).
select single vbeln from vbrk into tabvbrk-vbeln1 where
                vbeln = tabvbfa-vbeln1 and fkart = 'ZTYS'.
    if sy-subrc eq 0.
        move tabvbrk-vbeln1 to final_data-i_l2vbeln.
    endif.
   endselect.
<b>if not l2_gr is initial or
    not l1_vbeln is initial or
     not l2_vbeln is initial.</b>        modify final_data.
  else.
     delete final_data.
  endif.
  endloop.
endform.
please help....
Thanks,
fractal.

I think the code in bold is what you are trying to do.
form summ_report.
  data: l2gr like ekbe-belnr.
  select f~s_plant f~v_plant     f~r_plant
         f~l1_sto  p~l1_delivery p~l1_gr
         p~l2_sto  p~l2_delivery p~bsl_err_message
         k~ebeln   p~l1_pgi      p~l2_pgi
    into (dochdr-swerks, dochdr-vwerks,   dochdr-rwerks,
          dochdr-l1sto,  docitem-l1xblnr, docitem-l1gr,
          docitem-l2sto, docitem-l2xblnr, docitem-err_msg,
          tabekko-ebeln, docitem-l1pgi,   ocitem-l2pgi)
    from zdochdr as f inner join zdocitem as p
      on f~l1_sto = p~l1_sto inner join ekko as k
      on p~l1_sto = k~ebeln
   where f~s_plant     in s_werks
     and f~v_plant     in v_werks
     and f~r_plant     in r_werks
     and f~l1_sto      in l1_sto
     and p~l1_delivery in l1_xblnr
     and p~l1_gr       in l1_gr
     and p~l2_sto      in l2_sto
     and p~l2_delivery in l2_xblnr
     and k~aedat       in s_aedat.
    move: dochdr-swerks   to final_data-i_swerks,
          dochdr-vwerks   to final_data-i_vwerks,
          dochdr-rwerks   to final_data-i_rwerks,
          dochdr-l1sto    to final_data-i_l1sto,
          docitem-l1xblnr to final_data-i_l1xblnr,
          docitem-l1gr    to final_data-i_l1gr,
          docitem-l2sto   to final_data-i_l2sto,
          docitem-l2xblnr to final_data-i_l2xblnr,
          docitem-l2pgi   to final_data-i_l2pgi,
          docitem-l1pgi   to final_data-i_l1pgi,
          docitem-err_msg to final_data-i_errmsg.
    append final_data.
  endselect.
* L2 Goods receipt
  loop at final_data.
    select single belnr from ekbe
                        into l2gr
                       where ebeln = final_data-i_l2sto
                         and belnr in l2_gr
                         and bwart = '101'
                         and bewtp = 'E'
                         and vgabe = '1'.
    if sy-subrc eq 0.
      move l2gr to final_data-i_l2gr.
    endif.
* leg1 Billing document
    select vbeln from vbfa
                 into tabvbfa-vbeln
                where vbeln in l1_vbeln
                  and vbelv in (final_data-i_l2xblnr,final_data-i_l1xblnr).
      select single vbeln from vbrk
                          into tabvbrk-vbeln
                         where vbeln = tabvbfa-vbeln
                           and fkart = 'IV'.
      if sy-subrc eq 0.
        move tabvbrk-vbeln to final_data-i_l1vbeln.
      endif.
    endselect.
* leg2 Billing document
    select vbeln from vbfa
                 into tabvbfa-vbeln1
                where vbeln in l2_vbeln
                  and vbelv in (final_data-i_l2xblnr, final_data-i_l1xblnr).
      select single vbeln from vbrk
                          into tabvbrk-vbeln1
                         where vbeln = tabvbfa-vbeln1
                           and fkart = 'ZTYS'.
      if sy-subrc eq 0.
        move tabvbrk-vbeln1 to final_data-i_l2vbeln.
      endif.
    endselect.
    if not <b>final_data-i_l2gr</b>    is initial or
       not <b>final_data-i_l1vbeln</b> is initial or
       not <b>final_data-i_l2vbeln</b> is initial.
      modify final_data.
    else.
      delete final_data.
    endif.
  endloop.
endform.

Similar Messages

  • BEx Report Performance with selection-screen input

    Hello Gurus,
    My Bex report is working fine when the report had run with out PLANT filter in the selection-screen but when report had run with plant in the selection-screen , report running for forever.
    Please let me know what I need to do improve the performance.
    Saleem.

    Hi Saleem, Just a few thoughts;
    1. Check the M-table in RSD1 for 0PLANT. In Table View edit any blank or null values. Run the same restrictions you apply in the query at Info provider level > Display Data. If there's any lapse; you can judge where exactly the problem lies.
    2. If you are using Infocube & that your master is >20% fact; you can declare the Info object as 'Line Item Dimension'.
    3. Create Variants. Esp. if you are running the query for same set of data. Try Variable Preselection: You can restrict both the values + varaiables in the filter level. When you execute the values will be visibly pre-selected in selection screen.
    4. As discussed in previous messages, running a SQL trace using RSRT may prove useful.

  • Problem with Selection screen values of an authorization variable

    hi Gurus,
    I have an authorization variable for Division in my queries....Now whenever a user tries to run the query...a list of divisions is available to him....All divisions for which he/she has proper roles assigned.
    Now the problem is that these values are not restricted to the ones relevant to that query (namely the multi provider)
    Eg. for a Flowers Query (divisions relevant to Flowers only) all the divisions (including the ones for Vegetables, Crops etc.) are also visible only because these roles are also assigned to the same user. This needs to be avoided.
    In a nutshell....
    Is their any way by which i can restrict the number of values popping up for an authorization variable in the selection screen, to only those values which are relevant to the info-provider on which the queries are based ???

    hi Deepu,
    I did go through that SAP note. I just have one concern regarding that. The check at the Info provider level is clear enough and i already have that in place. Now there are 2 more checks required a) at the info object level and b) at the BEX designer level.
    Are all three checks required???
    and also how do you  place the check at the BEX level??? i could not quite figure that one out...
    Any inputs would be welcome.
    Thanks,
    Nikhil

  • Problem with selection-screen

    I have a first parameter which is P_PERNR,
    IF I enter It and I push enter the others parameters assigned.
    I want the others parameters to be avalaible to modify.
    If I use AT SELECTION-SCREEN OUTPUT fto assign the fields :
    I can modify them but if I push enter they are overwrited by the fields selected with P_PERNR
    If I use AT SELECTION-SCREEN ON P_PERNR to assign the fields :
    I can modify them but if I change the parameter P_PERNR I doesn't overwrite the others parameters with the new fields selected with P_PERNR.
    Could you help me please?
    I joined a copy of my code.
    Thanks and regards
    AT SELECTION-SCREEN ON p_pernr.
      IF NOT p_pernr IS INITIAL.
        SELECT SINGLE pernr FROM pa0003
                     INTO pa0003-pernr
                     WHERE pernr EQ p_pernr.
        IF sy-subrc NE 0.
          MESSAGE e319(01) WITH text-e01 p_pernr text-e02.
        ENDIF.
    Vérification de l'existence du NT user
        CLEAR w_userid.
        SELECT usrid UP TO 1 ROWS
                 FROM pa0105
                 INTO w_userid
                 WHERE subty EQ '0003'
                   AND pernr EQ p_pernr
                   AND endda GT sy-datum.
        ENDSELECT.
        IF sy-subrc NE 0.
          MESSAGE e319(01) WITH text-e01 p_pernr text-e03.
        ENDIF.
    Vérification de l'existence de l'addresse mail
        CLEAR p_mail.
        SELECT usrid_long UP TO 1 ROWS
                 FROM pa0105
                 INTO p_mail
                 WHERE subty EQ '0010'
                   AND pernr EQ p_pernr
                   AND endda GT sy-datum.
        ENDSELECT.
        IF sy-subrc NE 0 OR p_mail IS INITIAL.
          MESSAGE e319(01) WITH text-e08 text-e09.
        ENDIF.
      ELSE.
        MESSAGE e319(01) WITH text-e04.
      ENDIF.
    *AT SELECTION-SCREEN OUTPUT.
      SELECT nachn vorna UP TO 1 ROWS
                         FROM pa0002
                         INTO (p_nachn, p_vorna)
                         WHERE pernr = p_pernr.
      ENDSELECT.
      IF sy-subrc NE 0.
        CLEAR p_nachn.
        CLEAR p_vorna.
      ENDIF.
    SELECT usrid_long UP TO 1 ROWS
                       FROM pa0105
                       INTO p_mail
                       WHERE pernr = p_pernr
                         AND subty = '0010'
                         AND endda GT sy-datum.
    ENDSELECT.
    IF sy-subrc NE 0.
       CLEAR p_mail.
    ENDIF.
    Détermination de la start date et de la last date pour l'affectation des roles
    Ici cette détermination provisoire ne sert qu'à l'affichage.
      SELECT begda endda UP TO 1 ROWS
              FROM pa0001
              INTO (p_begda, p_endda)
              WHERE pernr = p_pernr
              ORDER BY begda DESCENDING.
      ENDSELECT.
    Si la date de début est dans le passé on fixe la date de début en date du jour
      IF p_begda LT sy-datum AND NOT p_begda IS INITIAL.
        MOVE sy-datum TO p_begda.
      ENDIF.
    END-OF-SELECTION.

    With this following FM call I don't catch the informations.
    Do you know why ?
    Thanks and regards.
    AT SELECTION-SCREEN ON p_pernr.
    *AT SELECTION-SCREEN output.
      CALL FUNCTION 'DYNP_VALUES_READ'
        EXPORTING
          dyname                   = sy-cprog
          dynumb                   = sy-dynnr
          translate_to_upper       = ' '
          request                  = ' '
          perform_conversion_exits = ' '
          perform_input_conversion = ' '
          determine_loop_index     = ' '
        TABLES
          dynpfields               = wt_dynp
        EXCEPTIONS
          invalid_abapworkarea     = 1
          invalid_dynprofield      = 2
          invalid_dynproname       = 3
          invalid_dynpronummer     = 4
          invalid_request          = 5
          no_fielddescription      = 6
          invalid_parameter        = 7
          undefind_error           = 8
          double_conversion        = 9
          stepl_not_found          = 10
          OTHERS                   = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.

  • Facing Problem with Select-options input data......help me?

    I have a select-options on my selection screen. In the database table i have different four values for this. ex EEX01, EEX02, EEX03 and EEX04.
    their overall names are DE, HE, IT, TR respectively.
    Now the requirement is user will enter this data like DE to TR , i am now confused how do convert these value to the values that i have in table. Because i have to use this for extracting the data from database table.
    thanks in advance.

    hi,
    what is the table name for the case.
    and jsut list what are the fields .. we'll try to map the same and see if it works..
    if for the field there is a check table attached then conversion routine will take care of that .
    just check on the field of the domain  in the dbtable
    like matn1 for dataelement matnr and domain matnr in mara table.
    regards,
    vijay

  • Problem with selection-screen of program RFEBKA00

    Hi,
    When i execute the program RFEBKA00, some the text appear weir, or better, some texts does not appear... Like it misses some translation or something, but i check the data elements of the fields and everything is fine...
    Does anybody have any idea of what is happening?
    Best Regards,
    Luís Silva

    Hi Luis Silva,
    I've the same problem.
    How do you do to resolve the problem?
    Thanks in advance.
    Luigi Massa

  • How i can show the selection screen input field in the top of page in alv

    hi ,
              how i can show the selection screen input field in the top of page in alv  grid output.
    tell me the process

    Hi,
    excample from my program:
    FORM topof_page.
      DATA: l_it_header   TYPE TABLE OF slis_listheader WITH HEADER LINE,
            l_info        LIKE l_it_header-info.
      DATA: l_it_textpool TYPE TABLE OF textpool WITH HEADER LINE.
      DATA: l_key LIKE l_it_textpool-key.
      READ TEXTPOOL c_repid INTO l_it_textpool LANGUAGE sy-langu.
      DEFINE m_selinfo.
        if not &1 is initial.
          clear l_it_header.
          l_it_header-typ   = 'S'.
          l_key = '&1'.
          translate l_key to upper case.
          read table l_it_textpool with key key = l_key.
          if sy-subrc = 0.
            shift l_it_textpool-entry left deleting leading space.
            l_it_header-key = l_it_textpool-entry  .
          endif.
          loop at &1.
            case &1-option.
              when 'EQ'
                or 'BT'
                or 'CP'.
                write &1-low to l_it_header-info.
              when others.
                write &1-low to l_it_header-info.
                concatenate &1-option
                            l_it_header-info
                       into l_it_header-info
                       separated by space.
            endcase.
            if not &1-high is initial.
              write &1-high to l_info left-justified.
              concatenate l_it_header-info
                          l_info
                     into l_it_header-info
                     separated by space.
            endif.
            if &1-sign = 'E'.
              concatenate ']'
                          l_it_header-info
                     into l_it_header-info.
            endif.
            append l_it_header.
            clear: l_it_header-key,
                   l_it_header-info.
          endloop.
        endif.
      END-OF-DEFINITION.
      m_selinfo: s_trmdat,
                 s_trmext,
                 s_trmint,
                 s_fkdat,
                 s_delno,
                 s_vbeln,
                 s_deact,
                 s_kdmat.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
           EXPORTING
                it_list_commentary = l_it_header[].
    ENDFORM.
    I hope, this will help you.
    Regards
    Nicole

  • Problem in Selection Screen.

    Dear Experts,
    I am facing a problem in Selection Screen.
    <b>I have 2 radio buttons ,</b>
    <b>Radio Button 1</b> - Choosing the file from desktop and
    <b>Radio Button 2</b> - Executing from Database
    Under Option1 - i have a <b>FILE</b> parameter which is <b><u>Mandatory.</u></b>
    Problem Case -
    <b>when I choose option 2, Option 1 should be disabled. in the sense the file name which is mandatory here should not be mandatory . Currently, when i choose option 2 - i have to provide some dummy characters in the file parameter because the file parameter is mandatory, and <u><b>I want to avoid this.</b></u>
    Please see the entire code .</b>
    REPORT ZTEST.
    DATA: LV_FILE_PATH(20) TYPE  C.
    DATA: LV_MASK(20)      TYPE  C VALUE   ',*.XLS ,*.XLS.     '.
    *-- Macro to put radiobutton on selection screen
    *-- &1 - radiobutton parameter name
    *-- &2 - text element (description)
    *-- &3 - radiobutton group
    DEFINE MAKE_RADIOBUTTON.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    * From Config File
    MAKE_RADIOBUTTON RB_1  ALL_DATA SRC.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    * Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME  OBLIGATORY. "
    SELECTION-SCREEN END OF BLOCK A1.
    * From database table
    MAKE_RADIOBUTTON RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE1.
      CALL FUNCTION 'WS_QUERY'
           EXPORTING
                QUERY  = 'CD'  "// Current Directory
           IMPORTING
                RETURN = LV_FILE_PATH.
      CALL FUNCTION 'WS_FILENAME_GET'
           EXPORTING
                DEF_FILENAME     = 'TA_DOWNLOAD.MDB'
                DEF_PATH         = LV_FILE_PATH
                MASK             = LV_MASK
                MODE             = 'O'
           IMPORTING
                FILENAME         = P_FILE1
           EXCEPTIONS
                INV_WINSYS       = 1
                NO_BATCH         = 2
                SELECTION_CANCEL = 3
                SELECTION_ERROR  = 4
                OTHERS           = 5.
    INITIALIZATION.
      ALL_DATA = 'From Desktop     : ? '.
      INC_DOWN = 'From Database    : ?'.
      T000     = 'Configuration Upload'.
    Please help
    Thanks

    Hi
    You should do some modifications like these:
    DEFINE MAKE_RADIOBUTTON_1.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3 USER-COMMAND &4.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    DEFINE MAKE_RADIOBUTTON_2.
      SELECTION-SCREEN BEGIN OF LINE.
      PARAMETERS: &1 RADIOBUTTON GROUP &3.
      SELECTION-SCREEN COMMENT 3(60) &2.
      SELECTION-SCREEN END OF LINE.
    END-OF-DEFINITION.
    SELECTION-SCREEN BEGIN OF BLOCK A0 WITH FRAME TITLE T000.
    From Config File
    MAKE_RADIOBUTTON_1 RB_1  ALL_DATA SRC AAA.
    SELECTION-SCREEN BEGIN OF BLOCK A1 WITH FRAME TITLE T001.
    Config file from Presentation server
    PARAMETERS: P_FILE1   LIKE T390D-DBNAME MODIF ID FIL. "
    SELECTION-SCREEN END OF BLOCK A1.
    From database table
    MAKE_RADIOBUTTON_2 RB_2 INC_DOWN SRC.
    SELECTION-SCREEN END OF BLOCK A0.
    AT SELECTION-SCREEN OUTPUT.
      IF RB_2 = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'FIL'.
            SCREEN-ACTIVE = 0.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Max

  • To display the user login details in selection-screen( input screen )

    HI Experts,
    I have a requirement.
    Assume there is a report on travel details. Report access has been given to all in the organization based on authorization level.
    Before excecuting the report, in the selection-screen(input screen) itself I need to display the login user details.
    suppose user A belongs to ITS-business unit and user B-belongs to RDS-business unit and Industry group-Multi markets.
    so when User B logs into production system and try to access the report, in the selection screen, i need to display like
    user-id-- XXXX          Business Unit---RDS             and IG -
    Multi Markets 
    how to achieve this? User details will vary based on login.
    Regards,
    Praveen

    check this
    REPORT  Z_demo.
    *& Function Modules:  HR_GET_EMPLOYEE_DATA
    *&                    HR_IMAGE_EXISTS
    *&                    SCMS_DOC_URL_READ
    *&                    HR_IMAGE_RESET
    *& Class & Methods :  CL_GUI_DOCKING_CONTAINER
    *&                    CL_GUI_PICTURE->SET_POSITION
    *&                    CL_GUI_PICTURE->SET_DISPLAY_MODE
    *&                    CL_GUI_PICTURE->DISPLAY_MODE_FIT
    *&                    CL_GUI_PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
    *REPORT  ZEMPLOYEE.
    TABLES: PA0001, PERSON.
    *----------------------Declaration for Image------------------------*
    DATA: DOCKING_CONT TYPE REF TO CL_GUI_DOCKING_CONTAINER, " Custom Container
          PICTURE TYPE REF TO CL_GUI_PICTURE.
    *--------------------Declaration of Internal table------------------*
    DATA: ITAB_EMPDATA LIKE TABLE OF PERSON.
    DATA: ITAB_DATA LIKE TABLE OF PERSON WITH HEADER LINE.
    DATA:  P_CONNECT_INFO LIKE TABLE OF TOAV0 WITH HEADER LINE.
    DATA:  P_DOCUMENT_TYPE LIKE TOAV0-RESERVE.
    DATA:  URL(255) TYPE C.
    DATA:  HANDLE TYPE I.
    DATA:  PPERNR TYPE PA0001-PERNR.
    *----------------------Start of Selection Screen----------------------*
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE text-099.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN COMMENT 40(25) TEXT-010  .
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-002 FOR FIELD PERNR.
    PARAMETERS PERNR TYPE PA0001-PERNR.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-008 FOR FIELD ENAME.
    PARAMETERS ENAME TYPE PA0001-ENAME.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-003 FOR FIELD PERSG.
    PARAMETERS PERSG TYPE PA0001-PERSG.
    SELECTION-SCREEN COMMENT 45(15) TEXT-009 FOR FIELD WERKS.
    PARAMETERS WERKS TYPE PA0001-WERKS.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-004 FOR FIELD PERSK.
    PARAMETERS PERSK TYPE PA0001-PERSK.
    SELECTION-SCREEN COMMENT 45(15) TEXT-005 FOR FIELD KOSTL.
    PARAMETERS KOSTL TYPE PA0001-KOSTL.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-006 FOR FIELD ORGEH.
    PARAMETERS ORGEH TYPE PA0001-ORGEH.
    PARAMETERS ORGEHTXT TYPE PERSON-ORGEH_TXT .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(15) TEXT-007 FOR FIELD PLANS.
    PARAMETERS PLANS TYPE PA0001-PLANS.
    PARAMETERS PLANSTXT TYPE PERSON-PLANS_TXT .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN END OF BLOCK B1.
    *AT SELECTION-SCREEN OUTPUT.
    AT SELECTION-SCREEN OUTPUT .
      LOOP AT SCREEN.
        IF SCREEN-NAME = 'ENAME'
        OR SCREEN-NAME = 'PERSG'
        OR SCREEN-NAME = 'PERSK'
        OR SCREEN-NAME = 'KOSTL'
        OR SCREEN-NAME = 'WERKS'
        OR SCREEN-NAME = 'ORGEH'
        OR SCREEN-NAME = 'PLANS'
        OR SCREEN-NAME = 'ORGEHTXT'
        OR SCREEN-NAME = 'PLANSTXT'.
          SCREEN-INPUT = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    LOOP AT SCREEN.
        IF SCREEN-NAME = 'ORGEHTXT'
        OR SCREEN-NAME = 'PLANSTXT'.
          SCREEN-OUTPUT = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    PERFORM GET_PIC.
    *AT SELECTION-SCREEN .
    AT SELECTION-SCREEN .
      PPERNR = PERNR.
      CALL FUNCTION 'HR_GET_EMPLOYEE_DATA'
        EXPORTING
          PERSON_ID             = PPERNR
          SELECTION_BEGIN       = SY-DATUM
          SELECTION_END         = SY-DATUM
        IMPORTING
          PERSONAL_DATA         = ITAB_DATA
        EXCEPTIONS
          PERSON_NOT_FOUND      = 1
          NO_ACTIVE_INTEGRATION = 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.
      ENAME = ITAB_DATA-ENAME.
      PERSG = ITAB_DATA-PERSG.
      PERSK = ITAB_DATA-PERSK.
      ORGEH = ITAB_DATA-ORGEH.
      PLANS = ITAB_DATA-PLANS.
      KOSTL = ITAB_DATA-KOSTL.
      WERKS = ITAB_DATA-WERKS.
      ORGEHTXT = ITAB_DATA-ORGEH_TXT.
      PLANSTXT = ITAB_DATA-PLANS_TXT.
    *Function Module To check Existance of Image
      CALL FUNCTION 'HR_IMAGE_EXISTS'
        EXPORTING
          P_PERNR        = PPERNR
        IMPORTING
          P_CONNECT_INFO = P_CONNECT_INFO
        EXCEPTIONS
          OTHERS         = 2.
         P_DOCUMENT_TYPE = P_CONNECT_INFO-RESERVE.
    *Function Module To Get the URL of Image
      CALL FUNCTION 'SCMS_DOC_URL_READ'
        EXPORTING
          STOR_CAT    = SPACE
          CREP_ID     = P_CONNECT_INFO-ARCHIV_ID
          DOC_ID      = P_CONNECT_INFO-ARC_DOC_ID
          COMP_ID     = 'DATA'
          DP_URL_ONLY = 'X'
        IMPORTING
          URL         = URL
        EXCEPTIONS
          OTHERS      = 10.
      IF SY-SUBRC <> 0.
      ENDIF.
    *Method To load Image from URL
      CALL METHOD PICTURE->LOAD_PICTURE_FROM_URL_ASYNC
        EXPORTING
          URL = URL.
      IF SY-SUBRC NE 0.
      ENDIF.
      IF PPERNR NE PERNR.
    *Function Module To Reset Image
        CALL FUNCTION 'HR_IMAGE_RESET'
          EXPORTING
            HANDLE         = HANDLE
          EXCEPTIONS
            INVALID_HANDLE = 1
            OTHERS         = 2.
        IF SY-SUBRC <> 0.
        ENDIF.
      ENDIF.
    *& Form Get_Pic
    FORM GET_PIC.
      DATA: REPID LIKE SY-REPID.
      REPID = SY-REPID.
      IF PICTURE IS INITIAL.
    *Object To Create the Custom Container
        CREATE OBJECT PICTURE
          EXPORTING
            PARENT = DOCKING_CONT.
        CHECK SY-SUBRC = 0.
    *Method To Set Position of Image
        CALL METHOD PICTURE->SET_POSITION
          EXPORTING
            HEIGHT = 47
            LEFT   = 610
            TOP    = 25
            WIDTH  = 70.
    *Method To Set Display Mode Fit to Container
        CALL METHOD PICTURE->SET_DISPLAY_MODE
          EXPORTING
            DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_FIT.
      ELSE.
    *Function Module To Reset Image
        CALL FUNCTION 'HR_IMAGE_RESET'
          EXPORTING
            HANDLE         = HANDLE
          EXCEPTIONS
            INVALID_HANDLE = 1
            OTHERS         = 2.
        IF SY-SUBRC <> 0.
        ENDIF.
      ENDIF.
    ENDFORM. "Get_pic

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • Does anyone has a problem with the screen of the new ipad? (there's a part of the screen which the color in it is "very" bright) and when I move the aluminium part of the smart cover when it's attached to the ipad the colors change!! Help!!!

    Does anyone has a problem with the screen of the new ipad? (there's a part of the screen which the color in it is "very" bright) and when I move the aluminium part of the smart cover when it's attached to the ipad the colors change!! Help!!!

    I'd take it into my local APple store and have them look at it. There may be something wrong inside your device.

  • Problem with Variable screen in WAD

    Hi ,
    I have a problem with variable screen in WAD , in the varable seen it is displaying only Key , it is not giving any description , but in BEX is is displaying both Key and Description , can any only have an idea why is this happening . this is occuring only for one variable , rest are working fine .
    Thanks,
    Abraham

    Hi Abraham,
    thsi could be a problem from the specisic setting of the infocube. Please check the BEx Settings from the infocube. You can find them by the following steps:
    - search for the infocube
    - doubleclick on the infocube
    - choose an specific infoobjekt
    - right mousebutton and click "specific dataprovider settings"
    - check if the right entries are set
    Hope this will help.
    André

  • Problem with selecting text in Adobe Reader XI

    Hi all, I am encountering a problem with Adobe Reader XI and it is very strange I could not find an alike issue on the internet so I guess I have to submit a question with it.
    So here it is, I am using Adobe Reader XI Version 11.0.2, operating system: Windows 7. I do not know it starts from when but it has the problem with selecting text - to be copied in pdf documents. I ensure that the documents are not scanned documents but word-based documents (or whatever you call it, sorry I cannot think of a proper name for it).
    Normally, you will select the text/paragraph you want to copy and the text/paragraph will be highlighted, but the problem in this case that I cannot select the text/paragraph, the blinking pointer (| <-- blinking pointer) will just stays at the same location so I cannot select/highlight anything to be copied. It happens oftenly, not all the time but 90%.
    This is very annoying as my work involves very much with copying text from pdf documents, I have to close the pdf file and then open it again so I can select the text but then after the first copying or second (if I am lucky), the problem happens again. For a few text I have to type it myself, for a paragraph I have to close all opening pdf documents and open again so I could select the paragraph to copy. I ran out of my patience for this, it causes trouble and extra time for me just to copying those texts from pdf documents. Does this problem happen to anyone and do you have a solution for this? I would much appreciate if you could help me out, thank you!

    Yeah,  I totally agree, this is very strange. I have always been using Adobe Reader but this problem only occurred ~three months ago. It must be that some software newly installed I think. But I have no idea.
    About your additional question, after selecting the texts and Ctrl + C, the texts are copied and nothing strange happens. It's just that right after I managed to copy the texts, it takes me a while to be able to select the texts again. For your information, I just tested to select the texts and then pressed Ctrl, the problem happened. And then I tried pressing C and then others letters, it all led to the problem.
    I guess I have to stick with left-clicked + Copy until I/someone figure the source of this problem. Thanks a lot for your help!

  • Problem with:  select 'c' as X from dual

    Problem with 'select 'c' as X from dual'
    I get 2 different results when I execute the above with SQLPlus (or java) depending on the instance I am connected to. For one instance the result is a single character and for the other the character is padded with blanks to 32 chars in the SQLPlus window (and java). Does anyone know what database setting causes this to happen? Is it a version issue ?
    Test #1: Oracle 9.2.0.6 - SQLPlus result is padded with blanks
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:27:58 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
    With the Partitioning option
    JServer Release 9.2.0.6.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>
    Test #2 Oracle 9.2.0.1 SQLPlus result is a single character.
    SQL*Plus: Release 9.2.0.1.0 - Production on Mon Dec 10 09:29:27 2007
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> select 'c' as X from dual;
    X
    c
    SQL>

    Using 9.2.0.6 On AIX 5.2 I get the single byte result:
    UT1 > select 'c' as X from dual;
    X
    c
    If the databases are on different Oracle Homes you may want to check the sqlplus global logon files for any set commands.
    If you executed the two sql statements from different OS directories you may also want to check your sqlpath for sqlplus .logon files.
    Try issueing clear columns and repeating the statement. Are the results the same?
    HTH -- Mark D Powell --

  • Problem with sub-screen actions on Cancel button

    Hi all,
    I have a problem with sub-screen.
    I created a subscreen (screen sequence in MM01/MM02/MM03). When users leave this screen, I call POPUP_TO_CONFIRM to ask if they want to save the data.
    1) My goal is: when they choose Cancel, no actions are performed and users will see the current screen. However, I cannot use command: SET SCREEN 0 or LEAVE TO SCREEN 0 because the system gives an error message:
    *SET SCREEN not allowed in subscreens*.
    2) How can we determine when the user leaves the screen? which value of SY-UCOMM will be used to check this?
    Thanks in advance.

    for dis SET SCREEN is not required.
    Consider d code given below as n eg:
    CALL FUNCTION 'POPUP_TO_CONFIRM'
        EXPORTING
          titlebar              = 'SAVE'
          text_question         = 'SOME _QUS'
          text_button_1         = 'YES'
          text_button_2         = 'NO'
          default_button        = '2'
          display_cancel_button = ' '
        IMPORTING
          answer                = l_ans
        EXCEPTIONS
          text_not_found        = 1
          OTHERS                = 2.
      IF sy-subrc <> 0.
        MESSAGE e066.
      ENDIF.
    IF l_ans EQ '1'.    " when yes is pressed
       MODIFY db.
       commit work.
       leave program.
    ELSEIF l_ans EQ '2'.  "when no is pressed
        leave program.
    ELSE.     " when cancel is pressed
    ENDIF.
    In above module when Yes is pressed it saves data den leave prog.
    As no action is specified for cancel button it will remain on that screen only from which popup is called, in this way ur problem can be solved.
    Reward properly.

Maybe you are looking for

  • Mini display to hdmi adapter problem

    Hi, When I connected my mini display to hdmi adapter to hdmi, and hdmi cable to my ASUS PA238QR monitor, my early 2011 MBP 13" detects the monitor, but the monitor shows "hdmi no signal". I tried unplugging everything, including the adapter and hdmi,

  • How to insert 10 files from a directory to database,can i use dbms_lob??

    Hii I want to load 10files in my local drive into a table...how to do this.I'm able to do this individually using dbms_lob.loadfromfile and bfil but ,I want to copy all the files i that drive at time to my table...Is there any way to do this..?

  • What should I do about wifi issue if reseting SMC didn't work?

    I tried reseting the SMC and the wifi connection issue still exists. I've tried just about everything, from disabling bluetooth on Terminal to reinstalling the wifi. Still having issues with Wifi dropping every 30 or 60 seconds. Does anyone know of a

  • One Excel , Multiple Worksheets

    Hello, I have a requirement to read the excelsheet having multiple worksheets. The excel will have sheet1, sheet2, sheet3 etc with data and I have to read all of them. I searched a lot on SDN and fould the below code which is reading only the Active

  • EXIT_SAPLEBND_002 -- user exit for release strategy

    Hi, This is regarding help on user exit for release strategy, ref: note no. 365604, however after going through all the config part given in the given note we activate the fm in cmod.... but after activating the release tab goes off from  me29n. That