How  to filter by manager's name using selection screen

Hi all,
  I am trying to modify the report to filter data from the report based on the manger name given in selection screen. As the manger's name was given in selection screen.. records have to come only of the employee how were working under that entered manager name.
  I am unable to follow this code to modify.. where to add select criteria to filter... please make modify to my code..
  I am pasting my code here, Can any one kindly help for this scenario.
TABLES: PA0001,  "HR Master Record: Infotype 0001 (Org. Assignment),
        PA0002,
        P0000,
        PA9001,
        PA0007,
        HRP1001, "Infotype 1001 DB Table
        PA0034. "HR Master Record: Infotype 0034 (Corporate Function)
*Internal table for holding output data
DATA: IT_PA0002 LIKE PA0002  OCCURS 100 WITH HEADER LINE,
      IT_PA9001 LIKE PA9001  OCCURS 100 WITH HEADER LINE,
      IT_PA0007 LIKE PA0007  OCCURS 100 WITH HEADER LINE,
      IT_PA0034 LIKE PA0034  OCCURS 100 WITH HEADER LINE.
DATA: IT_RET LIKE BAPIRET2,
      IT_ACT LIKE BAPI_SWHACTOR OCCURS 0,
      IT_STR LIKE BAPI_STRUC OCCURS 0,
      IT_ORG LIKE BAPI_OBJEC OCCURS 0,
      IT_POS LIKE BAPI_OBJEC OCCURS 0,
      IT_SUP LIKE BAPI_OBJEC OCCURS 0,
      IT_FCAT LIKE BAPI_HRAQFIELDDESCRIPTION OCCURS 0,
      IT_FDAT LIKE BAPI_HRFIELDDATA OCCURS 0,
      IT_ORGS TYPE STANDARD TABLE OF BAPI_OBJEC WITH HEADER LINE,
      IT_POSS TYPE STANDARD TABLE OF BAPI_OBJEC WITH HEADER LINE,
      IT_SUPR TYPE STANDARD TABLE OF BAPI_OBJEC WITH HEADER LINE,
      V_DATE  TYPE SY-DATUM,
      IT_T500P LIKE T500P OCCURS 0 WITH HEADER LINE,
      IT_TT500P LIKE T500P OCCURS 0 WITH HEADER LINE,
      IT_T001P LIKE T001P OCCURS 0 WITH HEADER LINE      .
DATA: IT_PA0001 LIKE PA0001 OCCURS 100 WITH HEADER LINE,
      P_ENDDA LIKE sy-datum.
DATA: Begin of I_HRE,
        pernr  like  pa0001-pernr,  "Emp Number
        nachn  like  pa0002-nachn,  "Last Name
        vorna  like  pa0002-vorna,  "First Name
        plans  like  BAPI_OBJEC-LONG_TEXT,  "Position
        div_text  like  pa9001-div_text,
        kztim  like  ZKZTIM_VAUES-name,
        stext  like  T591S-STEXT,     "Corporate function text
        werks  like  BAPI_OBJEC-LONG_TEXT,
        btrtl  like  pa0001-btrtl,
        orgeh  like  BAPI_OBJEC-LONG_TEXT,
        kostl  like  pa0001-kostl,
        mstbr  like  pa0001-mstbr,  "Supervisor
      End of I_HRE.
DATA: I_HR like I_HRE occurs 100 with header line.
DATA: V_PLANS LIKE PA0001-PLANS,
      V_EMP   LIKE PA0001-PERNR,
      V_KOSTL LIKE PA0001-KOSTL,
      V_SUPER LIKE BAPI_OBJEC-LONG_TEXT,
      V_EMP_POS LIKE BAPI_OBJEC-LONG_TEXT,
      V_SUPER_POS LIKE BAPI_OBJEC-LONG_TEXT,
      V_HEADER TYPE N VALUE 1,
      V_COUNTER TYPE N VALUE 1,
      EMP_INDICATOR TYPE N,
      V_ORGEH LIKE BAPI_OBJEC-LONG_TEXT,
      V_WERKS LIKE BAPI_OBJEC-LONG_TEXT,
      V_KZTIM LIKE ZKZTIM_VAUES-NAME,
      V_STEXT LIKE T591S-STEXT.
  DATA: v_file TYPE string,         "Detail Filename
        v_filerecord(1000),
        f_filerecord(1000),
        drive(3),
        mstbr  like  pa0001-mstbr,  "Supervisor
        count  type n value 0.
SELECTION-SCREEN BEGIN OF BLOCK SELECTION WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_PERNR FOR P0000-PERNR,
                S_WERKS FOR PA0001-WERKS,
                S_BTRTL FOR PA0001-BTRTL,
                S_PERSG FOR PA0001-PERSG,
                S_ORGEH FOR PA0001-ORGEH,
                S_DIV   FOR PA9001-DIV_CODE,
                S_KZTIM FOR PA0007-KZTIM,
               S_sname for pa0001-sname, " this is to enter name
                                                         " as manager name
                S_FUNKT FOR PA0034-FUNKT.
SELECTION-SCREEN END OF BLOCK SELECTION.
SELECTION-SCREEN BEGIN OF BLOCK SELECTION1 WITH FRAME TITLE TEXT-002.
PARAMETERS:     P_BEGDA LIKE SY-DATUM DEFAULT sy-datum.
*                P_ENDDA LIKE SY-DATUM DEFAULT '99991231'.
SELECTION-SCREEN END OF BLOCK SELECTION1.
START-OF-SELECTION.
if P_BEGDA is initial.
  p_begda = sy-datum.
endif.
if P_ENDDA is initial.
  p_endda = sy-datum.
endif.
if S_PERSG is initial.
*    S_PERSG-SIGN = 'I'.
*    S_PERSG-OPTION = 'EQ'.
*    S_PERSG-LOW = '1'.
*    APPEND S_PERSG.
*    S_PERSG-SIGN = 'I'.
*    S_PERSG-OPTION = 'EQ'.
*    S_PERSG-LOW = '6'.
*    APPEND S_PERSG.
    S_PERSG-SIGN = 'I'.
    S_PERSG-OPTION = 'NE'.
    S_PERSG-LOW = '5'.
    APPEND S_PERSG.
endif.
  SELECT * FROM PA0001 into IT_PA0001
    WHERE PERNR IN S_PERNR
      AND WERKS IN S_WERKS
      AND BTRTL IN S_BTRTL
      AND PERSG IN S_PERSG
      AND ORGEH IN S_ORGEH
      AND BEGDA LE P_BEGDA
      AND ENDDA GE P_ENDDA.
    APPEND IT_PA0001.
  ENDSELECT.
  IF not S_DIV[] is initial.
    SELECT * FROM PA9001 into IT_PA9001
      WHERE DIV_CODE IN S_DIV.
      APPEND IT_PA9001.
    ENDSELECT.
  ENDIF.
  IF not S_KZTIM[] is initial.
    SELECT * FROM PA0007 into IT_PA0007
      WHERE KZTIM IN S_KZTIM.
      APPEND IT_PA0007.
    ENDSELECT.
  ENDIF.
  IF not S_FUNKT[] is initial.
    SELECT * FROM PA0034 into IT_PA0034
      WHERE FUNKT IN S_FUNKT.
      APPEND IT_PA0034.
    ENDSELECT.
  ENDIF.
  SORT IT_PA0001 by SNAME.
  LOOP AT IT_PA0001.
    IF not S_DIV[] is initial.
      READ TABLE IT_PA9001 with key pernr = IT_PA0001-PERNR.
      IF sy-subrc ne 0.
        continue.
      ENDIF.
    ENDIF.
    IF not S_KZTIM[] is initial.
      READ TABLE IT_PA0007 with key pernr = IT_PA0001-PERNR.
      IF sy-subrc ne 0.
        continue.
      ENDIF.
    ENDIF.
    IF not S_FUNKT[] is initial.
      READ TABLE IT_PA0034 with key pernr = IT_PA0001-PERNR.
      IF sy-subrc ne 0.
        continue.
      ENDIF.
    ENDIF.
      V_COUNTER = 1.
            V_EMP = IT_PA0001-PERNR.
            V_KOSTL = IT_PA0001-KOSTL.
*            WRITE: (10) V_EMP, (20) PA0002-NACHN, (20) PA0002-VORNA.
      WRITE: / SY-VLINE.                   " Left border
        WHILE V_EMP NE ''.
            PERFORM GET_SUPER CHANGING V_EMP V_SUPER
                                V_EMP_POS.
          if v_emp ne ''.
              select single * into it_pa0002 from pa0002
                where pernr = v_emp
                  and begda LE p_begda
                  and endda GE p_endda.
              IF V_HEADER = 1.
                    PERFORM HEADING.
                V_HEADER = 0.
              ENDIF.
              WRITE:  (10) V_EMP, (17) IT_PA0002-NACHN
                      ,(17) IT_PA0002-VORNA, (40) V_EMP_POS.
              move v_emp  to  i_hr-pernr.
              move IT_PA0002-NACHN  to  i_hr-nachn.
              move IT_PA0002-VORNA  to  i_hr-vorna.
              move V_EMP_POS  to  i_hr-plans.
              EMP_INDICATOR = V_COUNTER.
              IF V_COUNTER = 1.
                select single * into it_pa9001 from pa9001
                  where pernr = v_emp
                    and begda LE p_begda
                    and endda GE p_endda.
                select single * into it_pa0007 from pa0007
                  where pernr = v_emp
                    and begda LE p_begda
                    and endda GE p_endda.
                PERFORM GET_KZTIM_TEXT CHANGING it_pa0007-kztim V_KZTIM.
                select single * into it_pa0034 from pa0034
                  where pernr = v_emp
                    and begda LE p_begda
                    and endda GE p_endda.
                PERFORM GET_FUNKT_TEXT CHANGING it_pa0034-funkt v_stext.
                write: (8) IT_PA9001-DIV_CODE, (17) V_KZTIM,
                       (25) V_STEXT.
                move  IT_PA9001-DIV_CODE  to  i_hr-div_text.
                move  v_KZTIM  to  i_hr-kztim.
              ENDIF.
              IF V_COUNTER = 0.
                WRITE: (1) '|'.
              ENDIF.
              IF V_COUNTER = 1.
                PERFORM GET_NAMES.
                WRITE: (20) V_WERKS, (5) IT_PA0001-BTRTL
                        ,(20) V_ORGEH,(11) V_KOSTL, (3) '|'.
                V_COUNTER = 0.
                move  V_WERKS  to  i_hr-werks.
                move  IT_PA0001-BTRTL  to  i_hr-btrtl.
                move  V_ORGEH  to  i_hr-orgeh.
                move  V_KOSTL  to  i_hr-kostl.
              ENDIF.
            clear it_pa0002.
            refresh it_pa0002.
          endif.
            V_EMP = V_SUPER.
            move V_SUPER to i_hr-mstbr.
            if EMP_INDICATOR EQ 1.
              append i_hr.
            endif.
            clear i_hr.
        ENDWHILE.
  NEW-LINE.
  CLEAR : V_KZTIM, it_pa9001, it_PA0007.
  ENDLOOP.
* Check if its a background Job
  IF SY-BATCH NE SPACE.
    perform write_file.     "Output File
  ENDIF.
  ULINE.
*&      Form  GET_SUPER
*       This subroutine takes the position number and get the position
* number that it reports to and then who is holding that position and
* then the name of the person who is holding that position in order to
* provide the supervisors name for the person in that position.
*  -->  p1        text
*  <--  p2        text
FORM GET_SUPER CHANGING EMP_SUB EMP_SUPER
                           EMP_SUB_POS  .
  DATA: v_reporto like hrp1001-varyf value space,
        v_holder  like hrp1001-varyf value space,
        v_filled  like hrp1001-varyf value space,
        v_otype   like hrp1001-otype value space,
        v_objid   like hrp1001-objid value space.
  CLEAR: v_reporto, v_holder, v_filled, v_otype, v_objid,
                          EMP_SUB_POS.
  Select single plans
    into v_plans
    from pa0001
        where pernr = emp_sub
          and begda LE p_begda
          and endda GE p_endda.
        CALL FUNCTION 'BAPI_ORGUNITEXT_DATA_GET'
           EXPORTING
              PLVAR                = '01'
              OTYPE                = 'S'
              OBJID                = v_PLANS
              KEYDATE              = SY-DATUM
              SCENARIO             = '    '
*                 EVALPATH             = 0
              EVALDEPTH            = 0
           IMPORTING
              RETURN               = IT_RET
           TABLES
*                 ACTORTAB             = IT_ACT
*                 STRUCTURALDATA       = IT_STR
              OBJECTSDATA          = IT_SUP
*                 FIELDCATALOGUE       = IT_FCAT
*                 FIELDDATA            = IT_FDAT
        IF SY-SUBRC EQ 0.
          READ TABLE IT_SUP INTO IT_SUPR
             WITH KEY PLAN_VERS  = '01'
                      OBJECTTYPE = 'S'
                      OBJECT_ID  = v_PLANS.
          IF SY-SUBRC EQ 0.
            MOVE IT_SUPR-LONG_TEXT TO EMP_SUB_POS.
          ENDIF.
        ENDIF.
  Select Single varyf
     into v_reporto
     from hrp1001
        where otype = 'S'
          and objid = v_plans
          and rsign = 'A'
          and relat = '002'
          and begda LE p_begda
          and endda GE p_endda.
  if sy-subrc = 0.
    move v_reporto+0(1) to v_otype.
    move v_reporto+2(8) to v_objid.
    Select single varyf
       into v_holder
       from hrp1001
          where otype = v_otype
            and objid = v_objid
            and rsign = 'A'
            and relat = '008'
          and begda LE p_begda
          and endda GE p_endda.
    if sy-subrc = 0.
      move v_holder+0(1) to v_otype.
      move v_holder+2(8) to v_objid.
      EMP_SUPER = v_objid.
    IF EMP_SUB = EMP_SUPER.
       EMP_SUPER = ''.
    ENDIF.
*      Select single varyf
*         into v_filled
*            from hrp1001
*               where otype = v_otype
*                 and objid = v_objid
*                 and rsign = 'A'
*                 and relat = '209'.
*      if sy-subrc = 0.
*        CLEAR: IT_RET, IT_ACT, IT_STR,  IT_FCAT, IT_FDAT,
*               IT_SUP, IT_SUPR.
*        REFRESH: IT_POSS.
*        move v_filled+0(2) to v_otype.
*        move v_filled+2(8) to v_objid.
*        CALL FUNCTION 'BAPI_ORGUNITEXT_DATA_GET'
*           EXPORTING
*              PLVAR                = '01'
*              OTYPE                = v_otype
*              OBJID                = v_objid
*              KEYDATE              = V_DATE
*              SCENARIO             = '    '
**                 EVALPATH             = 0
*              EVALDEPTH            = 0
*           IMPORTING
*              RETURN               = IT_RET
*           TABLES
**                 ACTORTAB             = IT_ACT
**                 STRUCTURALDATA       = IT_STR
*              OBJECTSDATA          = IT_SUP
**                 FIELDCATALOGUE       = IT_FCAT
**                 FIELDDATA            = IT_FDAT
*        IF SY-SUBRC EQ 0.
*          READ TABLE IT_SUP INTO IT_SUPR
*             WITH KEY PLAN_VERS  = '01'
*                      OBJECTTYPE = v_otype
*                      OBJECT_ID  = v_objid.
*          IF SY-SUBRC EQ 0.
*            MOVE IT_SUPR-LONG_TEXT TO EMP_SUPER.
*          ENDIF.
*        ENDIF.
*      endif.
    endif.
  endif.
    if sy-subrc <> 0.
       EMP_SUPER = ''.
    endif.
ENDFORM.                    " GET_SUPER
*&      Form  HEADING
*       text
*  -->  p1        text
*  <--  p2        text
FORM HEADING .
  FORMAT INTENSIFIED OFF.              " Remove any INTENSIFIED
  FORMAT COLOR COL_HEADING INTENSIFIED." Title color
  WRITE:  (10) 'Employee', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position'
                      ,(8) 'Division', (17) 'Management Type'
                      ,(25) 'Corporate Function'
      ,(20) 'Personnel Area', (5) 'PSA'
      ,(20) 'Org. Unit',(11) 'Cost Center',(3) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
          ,(10) 'Supervisor', (17) 'Last Name'
                      ,(17) 'First Name', (40) 'Position', (1) '|'
  ULINE  .                    " Line below titles
    NEW-LINE.
      WRITE: / SY-VLINE.                   " Left border
  FORMAT COLOR OFF.
ENDFORM.                    " HEADING
*&      Form  GET_NAMES
*       text
*  -->  p1        text
*  <--  p2        text
FORM GET_NAMES .
  CLEAR: IT_RET, IT_ACT, IT_STR, IT_ORG, IT_POS, IT_FCAT, IT_FDAT,
         IT_ORGS, IT_POSS, V_ORGEH, V_WERKS.
  REFRESH: IT_ORGS, IT_POSS.
  MOVE SY-DATUM TO V_DATE.
  CALL FUNCTION 'BAPI_ORGUNITEXT_DATA_GET'
     EXPORTING
        PLVAR                = '01'
        OTYPE                = 'O '
        OBJID                = IT_PA0001-ORGEH
        KEYDATE              = V_DATE
        SCENARIO             = '    '
*         SCENARIO             = 'MDT1'
*         EVALPATH             = '0       '
        EVALDEPTH            = 0
     IMPORTING
        RETURN               = IT_RET
     TABLES
*         ACTORTAB             = IT_ACT
*         STRUCTURALDATA       = IT_STR
         OBJECTSDATA          = IT_ORG
*         FIELDCATALOGUE       = IT_FCAT
*         FIELDDATA            = IT_FDAT
  IF SY-SUBRC EQ 0.
    READ TABLE IT_ORG INTO IT_ORGS
       WITH KEY PLAN_VERS  = '01'
                OBJECTTYPE = 'O '
                OBJECT_ID  = IT_PA0001-ORGEH.
    IF SY-SUBRC EQ 0.
      MOVE IT_ORGS-LONG_TEXT TO V_ORGEH.
    ENDIF.
  ENDIF.
  CALL FUNCTION 'HR_TMW_READ_T500P'
    EXPORTING
      PERSA          = IT_PA0001-WERKS
    IMPORTING
      W500P          = IT_T500P
    EXCEPTIONS
      NO_ENTRY_FOUND = 1
      OTHERS         = 2.
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  IF SY-SUBRC EQ 0.
    MOVE IT_T500P-NAME1 TO V_WERKS.
    CLEAR:  IT_T500P.
    REFRESH: IT_T500P.
  ENDIF.
*  CALL FUNCTION 'HR_TMW_READ_T001P'
*    EXPORTING
*      PERSA          = PA0001-WERKS
*      BTRTL          = PA0001-BTRTL
*    IMPORTING
*      W001P          = IT_T001P
*    EXCEPTIONS
*      NO_ENTRY_FOUND = 1
*      OTHERS         = 2.
*  IF SY-SUBRC <> 0.
*    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*  ENDIF.
*  IF SY-SUBRC EQ 0.
*    MOVE IT_T001P-BTEXT TO IT_HRR05-BTRTL.
*  ENDIF.
ENDFORM.                    " GET_NAMES
*&      Form  GET_KZTIM_TEXT
*       text
*      <--P_V_EMP  text
*      <--P_V_KZTIM  text
FORM GET_KZTIM_TEXT  CHANGING P_KZTIM_ID
                              P_KZTIM.
  select single NAME into P_KZTIM from ZKZTIM_VAUES
          where TYPE eq P_KZTIM_ID.
ENDFORM.                    " GET_KZTIM_TEXT
*&      Form  GET_FUNKT_TEXT
*       text
*      <--P_V_EMP  text
*      <--P_V_KZTIM  text
FORM GET_FUNKT_TEXT  CHANGING P_FUNKT_ID
                              P_STEXT.
  select single STEXT into P_STEXT from T591S
          where SPRSL eq 'EN' and
                INFTY eq '0034' and
                SUBTY eq P_FUNKT_ID.
ENDFORM.                    " GET_KZTIM_TEXT
*&      Form  write_file
*       text
*  -->  p1        text
*  <--  p2        text
FORM write_file .
*   Checking the System ID
  if sy-sysid = 'RD1'.
    drive = 'D:\'.
  else.
    drive = 'M:\'.
  endif.
*  concatenate drive sy-sysid
*              '\Output\Reports\HR\HR_Public\Emp_Hierarchy'
*              sy-datum
*              '.xls' into v_file.
  concatenate drive sy-sysid
              '\Output\Reports\HR\HR_Public\Emp_Hierarchy.xls'
              into v_file.
  OPEN DATASET v_file FOR OUTPUT in text mode encoding default.
  concatenate 'Employee'
              'Last Name'
              'First Name'
              'Position'
              'Division'
              'Management Type'
              'Corporate Function'
              'Personnel Area '
              'PSA'
              'Org. Unit'
              'Cost Center'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
              'Supervisor'
              'Last Name'
              'First Name'
              'Position'
               into v_filerecord
               separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
  transfer v_filerecord to v_file.    "Writing to file
  clear v_filerecord.
  loop at IT_PA0001.
    do.
      if count eq 0.
        read table i_hr with key pernr = IT_PA0001-pernr.
        concatenate i_hr-pernr
                    i_hr-nachn
                    i_hr-vorna
                    i_hr-plans
                    i_hr-div_text
                    i_hr-kztim
                    i_hr-stext
                    i_hr-werks
                    i_hr-btrtl
                    i_hr-orgeh
                    i_hr-kostl
                    into v_filerecord
                    separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
         mstbr = i_hr-mstbr.
         count = count + 1.
      else.
        read table i_hr with key pernr = mstbr.
        concatenate v_filerecord
                    i_hr-pernr
                    i_hr-nachn
                    i_hr-vorna
                    i_hr-plans
                    into f_filerecord
                    separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
        v_filerecord = f_filerecord.
        mstbr = i_hr-mstbr.
        clear i_hr.
      endif.
      if mstbr eq space.
        exit.
      endif.
    enddo.
    transfer v_filerecord to v_file.  "Writing to file
    clear: v_filerecord, f_filerecord, count.
  endloop.
  CLOSE DATASET v_file.
ENDFORM.                    " write_file
Edited by: Surender Batlanki on Feb 20, 2008 7:50 AM
Edited by: Surender Batlanki on Feb 20, 2008 7:59 AM
Edited by: Surender Batlanki on Feb 20, 2008 8:12 AM
Edited by: Surender Batlanki on Feb 20, 2008 3:16 PM
Edited by: Alvaro Tejada Galindo on Feb 20, 2008 9:26 AM

Hi Surender,
In the Perform GET_SUPER, you are getting manager's OBJID. Use this OBJID and from PA0001 get Manger's name.
While passing data to output table, filter that table by Manager's name and then pass output table for display.
Hope this helps u.
<REMOVED BY MODERATOR>
Regards,
Preeti
Edited by: Alvaro Tejada Galindo on Feb 20, 2008 9:26 AM

Similar Messages

  • Quick Viewer SQVI: how to switch to Technical Field Names on select screen?

    Hi all,
    I have created in SQ01 a Quick view and want to see the technical field names (and not the descriptions) on the selection screen.
    In SE16 in the selection screen you go to
    -> Settings
    -> User parameters
    unter 'keywords' you find FIELD NAME / LABEL and you can choose.
    But in SQVI there is not that option.
    Only in the creation of the query you can 'switch between techniucal name and long text'.
    However if you execute and come to the selection screen then there is only the long text....
    Who knows????
    Thanks in advance,
    Thomas

    I also tried with different options but it looks like SAP does not have option to display technical fields in output, however we can see technical names while creating query.

  • How to find Logical database name using selection view

    Hi Experts,
                      How can we find logical database name using selection view in se36.
    Regards,
    Mani

    Hi,
    If you want to see the logincal database used in the report ( tcode se38) in the intial screen select the attribute tab
    and click display you will bw able to see the logical datbase ysed for the report.
    Thanks.

  • Submitting of report using selection screen

    Hi,
                       My requirement is iam having one report so it is executed when we r given site and date it gives one excel file data so now iam having 150 sites so now I want to write the report as date as selection screen and I want to submit that report in this one (new report) so it wants to take the sites automatically from werks (t001w table) and it wants to execute in a loop upto 150 times then it gives 150 excel files so now how can I pass the sites and date to the submitting selection screen date as same for all but only the site wants to varry in the submitting report pls provide the coding ..
    Thanks & Regards,
    Mohan Reddy.

    Hello Mohan Reddy,
    I think we can try in this way
      data:     y_v_rspar_line    LIKE LINE OF y_v_rspar_tab,
                  y_v_rspar_tab     TYPE TABLE OF rsparams,
            y_lk_parm3 TYPE char5 VALUE 'SPERR'.  " Selection screen variable name
      y_v_rspar_line-selname = y_lk_parm3.
      y_v_rspar_line-kind    = y_k_p.
      y_v_rspar_line-sign    = y_k_i.
      y_v_rspar_line-option  = y_k_eq.
      y_v_rspar_line-low     = y_k_e.                "Excel file site value.
      APPEND y_v_rspar_line TO y_v_rspar_tab.
        SUBMIT Program name USING SELECTION-SCREEN '1000'
        WITH SELECTION-TABLE y_v_rspar_tab  AND RETURN.
    But try in 2different ways i.e
    1) Keep the submit program in the loop of the excel file internal table
       and take the site value in the variable and pass the value to this y_v_rspar_line-low
      and call submit program.
    2) Sort the excel file internal table then pass all the values to y_v_rspar_line-low and use the append statement in the same way and then call the SUBMIT program outside the loop.

  • I can't access my itunes account because my aol account is not active, how do i change my user name using gmail?

    I can't access my itunes account because my aol account is not active, how do i change my user name using gmail?
    I need to change my itunes user name to [email protected] instead of [email protected] AOL account is not active anymore.
    Thanks

    Chill out guys. Clare, I suggest that you try this link below. It might be possible taht the email you are using is not what your Apple ID should be:
    How to Recover Your Apple ID
    http://support.apple.com/kb/HE34
    Recovering a forgotten iTunes Store account name
    http://support.apple.com/kb/HT1920

  • How to set my own gui status when i use selection-screen

    how to set my own gui status when i use selection-screen command
    and
    how to set the names in the application tool bar when function keys are created

    Make sure that you do this in event "AT SELECTION-SCREEN OUTPUT".
    Run Txn ABAPDOCU and check 'DEMO_SEL_SCREEN_STATUS' for sample.
    Also check out following discussion -
    Selection Screen PF-STATUS
    Cheers,
    Sanjeev

  • HOW TO USE SELECTION SCREEN

    HOW TO USE SELECTION SCREEN
    I WANT TO INSERT PURCHASE DOCUMENT NUMBER
    AND WANT TO SEE ALL INFORMATION FOR THAT PURCHASE DOCUMNET NUMBER.
    THANKS IN ADVANCED.

    The main use of the selection-screen is to select screen in the back ground
    ex :    
    TABNAME
    IN THE ABOVE FIGURE  TABNAME IS THE FIELD AND THE BACK END IS   CREATED SCREEN IN THE BACK END
    THIS SCREEN CREATION WE CAN USED THE SCREEN SELECTION

  • How to get ME23 screen using selection-screen

    Hi,
    I am trying to get the ME23 screen using selection-screen with following code.
    select-options: purordno for ekko-ebeln NO intervals.
    SUBMIT SAPMM06E VIA SELECTION-SCREEN .
    But at the time of execution i got this error "INCORRECT PROGRAM TYPE WITH SUBMIT".
    Can any one please provide me some sample code how to get the ME23  screen
    using Abap program.
    Regards,
    krishna/rajesh.

    Hi Rajesh,
    You can't submit a pool modul ( SAPMM06E ).
    Only executable prog can be submit .
    What you can try is use "CALL TRANSACTION" statement.
    Hope this helps,
    Erwan

  • How to disabled mutli desktop when I using Full Screen?

    How to disabled mutli desktop when I using Full Screen?
    Some app have a preferences option to do this which like iTerm2
    In Lion-Style FullScreen windows, I can't use command + tab to  quickly switch between in the apps, I must switch to the  app own desktop which is using fullscreen, It's so trouble. I even think this is a flaw in Apple's design.
    So, How can I have use this  feature in others apps such as Google Chrome, Mail, Safari and so on.
    Please Help me!  Thanks! Thanks! Thanks!

    nobody can help me ?

  • How to Create a DropDown Box in a Selection Screen.

    Hi,
    I have a question. i.e, How to create a dropdown box in a Selection Screen. Could you please assist me.
    Thanks & Regards
    Sathish Kumar

    hi satish,
    The following can assist u to create a drop down ....
    Drop down list box can be created in a dialog screen(SE51) as well as selection screen.
      The sap list box allows to select a value from the list but we cannot enter our own value in the list box .The value list that will be displayed consists of two
    fields TEXT field of TYPE 80(C) and internal KEY field of TYPE 40(C).
    In screen painter to create a input/output field into list box we use
    'L" as a value for dropdown attribute for the i/o field.
    In screen painter to determine the type of method that will be used to fill the value
    list we use the attribute value list.
    If it is blank  the value list will be filled by the first column of the input help assigned to the screen field.This input help can be defined in the ABAP Dictionary, on screen using SELECT,VALUES screen statements or in event POV (PROCESS ON VALUE-REQUEST ) and the input help that will be passed to the field should consists of 2 columns ,the key column is filled automatically by the system.SAP recommends value list field should be blank.
    or
    The value  can be 'A' meaning that the value list will be filled in the event PBO(PROCESS BEFORE OUTPUT) or before the screen is displayed.In this method we use function module VRM_SET_VALUES to fill the values and pass it to the i/o field.
    If a function code is attached to the list box the selection of a value triggers a PAI
    otherwise PAI will not trigger.
    Example
    Dropdown list boxes
    REPORT DEMO_DYNPRO_DROPDOWN_LISTBOX.
    TYPE-POOLS VRM.
    DATA: NAME  TYPE VRM_ID,
          LIST  TYPE VRM_VALUES,
          VALUE LIKE LINE OF LIST.
    DATA: WA_SPFLI TYPE SPFLI,
          OK_CODE LIKE SY-UCOMM,
          SAVE_OK LIKE SY-UCOMM.
    TABLES DEMOF4HELP.
    NAME = 'DEMOF4HELP-CONNID'.
    CALL SCREEN 100.
    MODULE CANCEL INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE INIT_LISTBOX OUTPUT.
      CLEAR DEMOF4HELP-CONNID.
      SELECT  CONNID CITYFROM CITYTO DEPTIME
        FROM  SPFLI
        INTO  CORRESPONDING FIELDS OF WA_SPFLI
       WHERE  CARRID = DEMOF4HELP-CARRIER2.
        VALUE-KEY  = WA_SPFLI-CONNID.
        WRITE WA_SPFLI-DEPTIME TO VALUE-TEXT
                               USING EDIT MASK '__:__:__'.
        CONCATENATE VALUE-TEXT
                    WA_SPFLI-CITYFROM
                    WA_SPFLI-CITYTO
                    INTO VALUE-TEXT SEPARATED BY SPACE.
        APPEND VALUE TO LIST.
      ENDSELECT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                ID              = NAME
                VALUES          = LIST.
    ENDMODULE.
    MODULE USER_COMMAND_100.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'CARRIER'
         AND NOT DEMOF4HELP-CARRIER2 IS INITIAL.
        LEAVE TO SCREEN 200.
      ELSE.
        SET SCREEN 100.
      ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_200.
      SAVE_OK = OK_CODE.
      CLEAR OK_CODE.
      IF SAVE_OK = 'SELECTED'.
        MESSAGE I888(BCTRAIN) WITH TEXT-001 DEMOF4HELP-CARRIER2
                                            DEMOF4HELP-CONNID.
      ENDIF.
    ENDMODULE.
    Reward if useful.
    Thank you,
    Regards.

  • Designing a calculator using selection screen(abap)

    hi i just now stepped into this technology. iam learning abap.  i like to jknow how to design a calculator using selection screen. 
    could any one give your  suggestions or any sites having such example programs . 
    thankyou

    Hi
    Welcome to SDN.
    Use the sample peace of code for design Calculator.
    Hi,
    Create push buttons for the + , - , / , * , = in your dialog program.
    Create an input field with the data type that can accept decimal places..
    When the enter 12 then press the push button "+" button store the value 12 in a variable v1..Then clear the input field..
    Then when the user enters another number..lets say "13"..
    Then if the user presses the "=" button...Then sum the values from the variable v1 with the input field..
    Hope this helps..
    Check this sample code..
    MODULE USER_COMMAND.
    CASE SY-UCOMM.
    WHEN 'ADDITION'.
    ASSUMING THE INPUT FIELD NAME IS P_INPUT.
    V_V1 = P_INPUT.
    V_OPERATION = '+'.
    CLEAR: P_INPUT.
    WHEN 'EQUALTO'.
    CASE V_OPERATION.
    ADDITION
    WHEN '+'.
    SUM UP THE VALUES.
    P_INPUT = P_INPUT + V_V1.
    ENDCASE.
    MULTIPLICATION
    WHEN '*'.
    MULTIPLY UP THE VALUES.
    P_INPUT = P_INPUT * V_V1.
    ENDCASE.
    ENDCASE.
    ENDMODULE.
    Regards,
    Sree

  • Can I get field name of Selection screen ?

    Hi, experts.
    I'd like to manage PGM's screens & fields of screens. I need to know field names of selection screen in  external PGMs to manage input values of those fields.
    For values, I'll use 'Dynp_values_read', but what should I use for getting field names of selection screen?
    Is there any functions, classes or tables for PGM's fields of selection screen?
    I've found tables&functions for this and I found D020S, D020T, D021T for PGM's screen. But I counld't see proper field names that shows on a selection screen when I excuted PGM. I guess there's a conversion routine between data that saved in repository and field name on screen.
    Please let me know what should I use a function, tables or else.
    Thanks.

    Hi
    Use Read text pool syntax
    READ TEXTPOOL program name
    INTO T_TPOOL
    LANGUAGE 'NL'.
    within TB_TPOOL all select option field namees will be stored under field ID with type S
    Edited by: Lavanya K on Apr 22, 2009 10:02 AM

  • How to create tcode for modulepool program with selection screen?

    hi,
       How to create tcode for modulepool program with selection screen?
    thanks,
    sagar

    Hi,
    We need to goto SE80.
    In our program we right click on object name and goto create
    -> transaction. Enter the module pool program and screen number and save and activate.
    Or by SE93 also we can create a transaction code for our program.
    Hope ths helps.
    plz reward if useful.
    thanks,
    dhanashri..
    Edited by: Dhanashri Pawar on Jul 22, 2008 8:29 AM

  • How to populate f4 values to standard pnp selection screen fields

    Hi Experts,
    my question is how to populate f4 values to standard pnp selection screen field. i am using LDB PNP for a report , it displays several fields with f4 values, i need to remove all the stadard f4 values and want to place my  f4 values in the selection screen

    Hi Venkat,
    To put ur own values in the F4 help of any field...all u have to do is.
    1st fetch all the records that u need to display in F4 help list...in one internal table.
    and then use the function module  'F4IF_INT_TABLE_VALUE_REQUEST'
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
    retfield =
    value_org =
    tables
    value_tab =
    return_tab =
    exceptions
    parameter_error = 1
    no_values_found = 2
    others = 3.
    where retfield is the field for which u need to give the F4 help.
    and valu_tab is the internal table in which u have the list of records to be displayed.
    this would do the work...
    I dont have the system in front of me...as soon as i have...will try to send a piece of code, to make ur work easy.
    Till then hope this helps u...all the best
    Regards,
    Radhika

  • How can i set dynamice for week on Selection screen..pls help me..Urgent

    Hi..All
    please Help me .. i am very  confused..
    i need to set a varient for week which is dynamic on selection screen.
    b) Week from current week to current week + 2. (<b>Dynamic selection)</b>how can i set dynamice for week on Selection screen,,
    how can i do this..i am alrady set dynamice variant for Date.. there is option for D.. but in case of week there is a no option.
    pls help me..urgent
    thamks in advance.
    mayukh

    Hi,
    I think the way out is use the dynamic select option while setting up the varinat and use sy-datum to sy-datum+9 which should essentially serve the purpose.
    While saving the variant, for that particular date field check the Selection variable checkbox, then Choose D
    option and then choose current days + or - option from there.
    Rgds,
    HR

Maybe you are looking for

  • Shuffle not recognised as an iPod by Windows + not recognised by iTunes???

    Hi, My daughter was bought an iPod Shuffle for her birthday by a friend. When I first went to plug it in, it didn't sync with iTunes (which I use successfully with my own iPod Classic) but instead showed up as 'mp3' on my list on My Computer and prom

  • How to access a Network Share between two servers in same data centre

    I have two dedicated servers (both Windows 2012 Server) hosted in a data centre somewhere.   I want to share a folder on one server with the other server, but it's obviously not as straight forward as one might think.  My servers are called "Maximus"

  • Error: WIS 10901 in Web Intelligence XI in infoview

    Hi, expert! Now I am facing a strange problem, all my webi reports against universe created using Infocube/Bex query (basically SAP data source) get a error message in infoview -A database error occured. The database error text is: A runtime exceptio

  • Database development with jdeveloper

    Hi Thank you for reading my post is it possible to use Jdeveloper to develop Mysql databases ? how i use its diagram <> database capabilities to forward a diagram to a mysql database ? thanks

  • Discount Code for Single Product

    Is it possible to create a discount code for just a single product? I know I can do it for a single catalog - but hoping I can do it on single products, too.