Need Vendor performance report

i want  Vendor performance report based on which you finalise the PO on a particular vendor?
pls give the source code

See this sample code
*"Table declarations...................................................
TABLES:
  EKKO,                                " Purchasing Document Header
  CDHDR,                               " Change document header
  SSCRFIELDS.                          " Fields on selection screens
*"Selection screen elements............................................
SELECT-OPTIONS:
  S_EBELN FOR EKKO-EBELN,              " Purchasing Document Number
  S_LIFNR FOR EKKO-LIFNR,              " Vendor's account number
  S_EKGRP FOR EKKO-EKGRP,              " Purchasing group
  S_BEDAT FOR EKKO-BEDAT,              " Purchasing Document Date
  S_UDATE FOR CDHDR-UDATE.             " Creation date of the change
                                       " document
*" Data declarations...................................................
Field String to hold Purchase Document Number                       *
DATA:
  BEGIN OF FS_EBELN,
    EBELN(90) TYPE C,                  " Purchase Document Number
    ERNAM     TYPE EKKO-ERNAM,         " Name of Person who Created
                                       " the Object
    LIFNR     TYPE EKKO-LIFNR,         " Vendor's account number
    EKGRP     TYPE EKKO-EKGRP,         " Purchasing group
    BEDAT     TYPE EKKO-BEDAT,         " Purchasing Document Date
  END OF FS_EBELN,
Field String to hold Purchase Document Header                       *
  BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN,             " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM,             " Name of Person who Created the
                                       " Object
    LIFNR TYPE EKKO-LIFNR,             " Vendor's account number
    EKGRP TYPE EKKO-EKGRP,             " Purchasing group
    BEDAT TYPE EKKO-BEDAT,             " Purchasing Document Date
  END OF FS_EKKO,
Field String to hold Account Number and name of the Vendor          *
  BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR,             " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1,             " Name1
  END OF FS_LFA1,
Field String to hold Change date and the name of the user           *
  BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS,  " Object Class
    OBJECTID   TYPE CDHDR-OBJECTID,    " Object value
    CHANGENR   TYPE CDHDR-CHANGENR,    " Document change number
    USERNAME   TYPE CDHDR-USERNAME,    " User name
    UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                       " document
  END OF FS_CDHDR,
Field String to hold Change document items                          *
  BEGIN OF FS_CDPOS,
    OBJECTCLAS   TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C,               " Object Value
    CHANGENR     TYPE CDPOS-CHANGENR,  " Document change number
    TABNAME      TYPE CDPOS-TABNAME,   " Table Name
    FNAME        TYPE CDPOS-FNAME,     " Field Name
    VALUE_NEW    TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD    TYPE CDPOS-VALUE_OLD, " Old contents of changed field
  END OF FS_CDPOS,
Field String to hold Date Element Name                              *
  BEGIN OF FS_DATAELE,
    TABNAME   TYPE DD03L-TABNAME,      " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME,    " Field Name
    ROLLNAME  TYPE DD03L-ROLLNAME,     " Data element (semantic domain)
  END OF FS_DATAELE,
Field String to hold Short Text of the Date Element                 *
  BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME,      " Data element (semantic domain)
    DDTEXT   TYPE DD04T-DDTEXT,        " Short Text Describing R/3
                                       " Repository Objects
  END OF FS_TEXT,
Field String to hold data to be displayed on the ALV grid           *
  BEGIN OF FS_OUTTAB,
    EBELN      TYPE EKKO-EBELN,        " Purchasing Document Number
    ERNAM      TYPE EKKO-ERNAM,        " Name of Person who Created the
                                       " Object
    LIFNR      TYPE EKKO-LIFNR,        " Vendor's account number
    EKGRP      TYPE EKKO-EKGRP,        " Purchasing group
    BEDAT      TYPE EKKO-BEDAT,        " Purchasing Document Date
    WERKS      TYPE LFA1-WERKS,        " Plant
    NAME1      TYPE LFA1-NAME1,        " Name1
    USERNAME   TYPE CDHDR-USERNAME,    " User name
    UDATE      TYPE CDHDR-UDATE,       " Creation date of the change
                                       " document
    DDTEXT     TYPE DD04T-DDTEXT,      " Short Text Describing R/3
                                       " Repository Objects
    VALUE_NEW  TYPE CDPOS-VALUE_NEW,   " New contents of changed field
    VALUE_OLD  TYPE CDPOS-VALUE_OLD,   " Old contents of changed field
  END OF FS_OUTTAB,
Internal table to hold Purchase Document Number                     *
  T_EBELN LIKE STANDARD TABLE
            OF FS_EBELN,
Internal table to hold Purchase Document Header                     *
T_EKKO LIKE STANDARD TABLE
          OF FS_EKKO,
Temp Internal table to hold Purchase Document Header                *
T_EKKO_TEMP LIKE STANDARD TABLE
               OF FS_EKKO,
Internal table to hold Account number and Name of the Vendor        *
  T_LFA1 LIKE STANDARD TABLE
           OF FS_LFA1,
Internal Table to hold Change date and the name of the user         *
  T_CDHDR LIKE STANDARD TABLE
            OF FS_CDHDR,
Internal Table to hold Change document items                        *
  T_CDPOS LIKE STANDARD TABLE
            OF FS_CDPOS,
Temp. Internal Table to hold Change document items                  *
  T_CDPOS_TEMP LIKE STANDARD TABLE
                 OF FS_CDPOS,
Internal Table to hold Data Element Name                            *
  T_DATAELE LIKE STANDARD TABLE
              OF FS_DATAELE,
Temp. Internal Table to hold Data Element Name                      *
  T_DATAELE_TEMP LIKE STANDARD TABLE
                   OF FS_DATAELE,
Internal Table to hold Short Text of the Date Element               *
  T_TEXT LIKE STANDARD TABLE
           OF FS_TEXT,
Internal Table to hold data to be displayed on the ALV grid         *
  T_OUTTAB LIKE STANDARD TABLE
             OF FS_OUTTAB.
               C L A S S   D E F I N I T I O N                      *
  CLASS LCL_EVENT_HANDLER  DEFINITION DEFERRED.
*" Data declarations...................................................
Work variables                                                      *
  DATA:
    W_EBELN       TYPE EKKO-EBELN,     " Purchasing Document Number
    W_LIFNR       TYPE EKKO-LIFNR,     " Vendor's account number
    W_EKGRP       TYPE EKKO-EKGRP,     " Purchasing group
    W_VALUE       TYPE EKKO-EBELN,     " Reflected Value
    W_SPACE       VALUE ' ',           " Space
    W_FLAG        TYPE I,              " Flag Variable
    W_VARIANT     TYPE DISVARIANT,     " Variant
*--- ALV Grid
    W_GRID        TYPE REF TO CL_GUI_ALV_GRID,
*--- Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
*--- Field catalog table
    T_FIELDCAT    TYPE LVC_T_FCAT.
                      AT SELECTION-SCREEN EVENT                     *
AT SELECTION-SCREEN ON S_EBELN.
Subroutine to validate Purchase Document Number.
  PERFORM VALIDATE_PD_NUM.
AT SELECTION-SCREEN ON S_LIFNR.
Subroutine to validate Vendor Number.
  PERFORM VALIDATE_VEN_NUM.
AT SELECTION-SCREEN ON S_EKGRP.
Subroutine to validate Purchase Group.
  PERFORM VALIDATE_PUR_GRP.
                      START-OF-SELECTION EVENT                      *
START-OF-SELECTION.
Subroutine to select all Purchase orders.
  PERFORM SELECT_PO.
  CHECK W_FLAG EQ 0.
Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
  CHECK W_FLAG EQ 0.
Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
  CHECK W_FLAG EQ 0.
Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
                      END-OF-SELECTION EVENT                        *
END-OF-SELECTION.
  IF NOT T_EKKO IS INITIAL.
Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
  ENDIF.                               " IF NOT T_EKKO...
CLASS LCL_EVENT_HANDLER DEFINITION
Defining Class which handles events
CLASS LCL_EVENT_HANDLER DEFINITION .
  PUBLIC SECTION .
    METHODS:
        HANDLE_HOTSPOT_CLICK
             FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
                       IMPORTING E_ROW_ID E_COLUMN_ID.
ENDCLASS.                              " LCL_EVENT_HANDLER DEFINITION
CLASS LCL_EVENT_HANDLER IMPLEMENTATION
Implementing the Class which can handle events
CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
*---Handle Double Click
  METHOD HANDLE_HOTSPOT_CLICK .
Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
  ENDMETHOD.                           " HANDLE_HOTSPOT_CLICK
ENDCLASS.                              " LCL_EVENT_HANDLER
*&      Module  STATUS_0100  OUTPUT
      PBO Event
MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'OOPS'.
  SET TITLEBAR 'TIT'.
Subroutine to fill the Variant Structure
  PERFORM FILL_VARIANT.
  IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
      EXPORTING
   I_SHELLSTYLE      = 0
   I_LIFETIME        =
        I_PARENT       = CL_GUI_CONTAINER=>SCREEN0
   I_APPL_EVENTS     =
   I_PARENTDBG       =
   I_APPLOGPARENT    =
   I_GRAPHICSPARENT  =
   I_NAME            =
   I_FCAT_COMPLETE   = SPACE
      EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 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.                             " IF SY-SUBRC <> 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
       I_BUFFER_ACTIVE               =
       I_BYPASSING_BUFFER            =
       I_CONSISTENCY_CHECK           =
       I_STRUCTURE_NAME              =
        IS_VARIANT                    = W_VARIANT
        I_SAVE                        = 'A'
       I_DEFAULT                     = 'X'
       IS_LAYOUT                     =
       IS_PRINT                      =
       IT_SPECIAL_GROUPS             =
       IT_TOOLBAR_EXCLUDING          =
       IT_HYPERLINK                  =
       IT_ALV_GRAPHICS               =
       IT_EXCEPT_QINFO               =
       IR_SALV_ADAPTER               =
      CHANGING
        IT_OUTTAB                     = T_OUTTAB
        IT_FIELDCATALOG               = T_FIELDCAT
       IT_SORT                       =
       IT_FILTER                     =
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        OTHERS                        = 4
    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 <> 0.
  ENDIF.                               " IF W_GRID IS INITIAL
  CREATE OBJECT W_EVENT_CLICK.
  SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
ENDMODULE.                             " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      PAI Event
MODULE USER_COMMAND_0100 INPUT.
  CASE SY-UCOMM.
    WHEN 'BACK'.
      LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'CANCEL'.
      LEAVE TO SCREEN 0.
  ENDCASE.
ENDMODULE.                             " USER_COMMAND_0100  INPUT
*&      Form  PREPARE_FIELD_CATALOG
      Subroutine to build the Field catalog
      <--P_T_FIELDCAT  Field Catalog Table
FORM PREPARE_FIELD_CATALOG  CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
  DATA LS_FCAT TYPE LVC_S_FCAT.
Purchasing group...
  LS_FCAT-FIELDNAME = 'EKGRP'.
  LS_FCAT-REF_TABLE = 'EKKO'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Purchasing Document Number...
  LS_FCAT-FIELDNAME = 'EBELN'.
  LS_FCAT-REF_TABLE = 'EKKO' .
  LS_FCAT-EMPHASIZE = 'C411'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  LS_FCAT-HOTSPOT   = 'X'.
  APPEND LS_FCAT TO PT_FIELDCAT .
  CLEAR LS_FCAT .
Name of Person who Created the Object...
  LS_FCAT-FIELDNAME = 'ERNAM'.
  LS_FCAT-REF_TABLE = 'EKKO'.
  LS_FCAT-OUTPUTLEN = '15' .
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Purchasing Document Date...
  LS_FCAT-FIELDNAME = 'BEDAT'.
  LS_FCAT-REF_TABLE = 'EKKO'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Vendor's account number...
  LS_FCAT-FIELDNAME = 'LIFNR'.
  LS_FCAT-REF_TABLE = 'EKKO'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Account Number of Vendor or Creditor...
  LS_FCAT-FIELDNAME = 'NAME1'.
  LS_FCAT-REF_TABLE = 'LFA1'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  LS_FCAT-COLTEXT   = 'Vendor Name'(001).
  LS_FCAT-SELTEXT   = 'Vendor Name'(001).
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Creation date of the change document...
  LS_FCAT-FIELDNAME = 'UDATE'.
  LS_FCAT-REF_TABLE = 'CDHDR'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  LS_FCAT-COLTEXT   = 'Change Date'(002).
  LS_FCAT-SELTEXT   = 'Change Date'(002).
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
User name of the person responsible in change document...
  LS_FCAT-FIELDNAME = 'USERNAME'.
  LS_FCAT-REF_TABLE = 'CDHDR'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '10'.
  LS_FCAT-COLTEXT   = 'Modified by'(003).
  LS_FCAT-SELTEXT   = 'Modified by'(003).
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Short Text Describing R/3 Repository Objects...
  LS_FCAT-FIELDNAME = 'DDTEXT'.
  LS_FCAT-REF_TABLE = 'DD04T'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '15'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
Old contents of changed field...
  LS_FCAT-FIELDNAME = 'VALUE_OLD'.
  LS_FCAT-REF_TABLE = 'CDPOS'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '12'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
New contents of changed field...
  LS_FCAT-FIELDNAME = 'VALUE_NEW'.
  LS_FCAT-REF_TABLE = 'CDPOS'.
  LS_FCAT-INTTYPE   = 'C'.
  LS_FCAT-OUTPUTLEN = '12'.
  APPEND LS_FCAT TO PT_FIELDCAT.
  CLEAR LS_FCAT.
ENDFORM.                               " PREPARE_FIELD_CATALOG
*& Form  SELECT_PO
Subroutine to select all the Purchase Orders
There are no interface parameters to be passed to this subroutine.
FORM SELECT_PO .
   SELECT EBELN                        " Purchasing Document Number
          ERNAM                        " Name of Person who Created
                                       " the Object
          LIFNR                        " Vendor's account number
          EKGRP                        " Purchasing group
          BEDAT                        " Purchasing Document Date
     FROM EKKO
  PACKAGE SIZE 10000
APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
      AND BEDAT IN S_BEDAT.
   ENDSELECT.
IF SY-SUBRC NE 0.
   W_FLAG = 1.
   MESSAGE S401(M8).
ENDIF.                                " IF SY-SUBRC NE 0
ENDFORM.                               " SELECT_PO
*&  Form  SELECT_OBJ_ID
  Subroutine to select Object ID
  There are no interface parameters to be passed to this subroutine.
FORM SELECT_OBJ_ID .
IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS                  " Object Class
           OBJECTID                    " Object value
           CHANGENR                    " Document change number
           USERNAME                    " User name
           UDATE                       " Creation date
      FROM CDHDR
      INTO TABLE T_CDHDR
   FOR ALL ENTRIES IN T_EBELN
     WHERE OBJECTID EQ T_EBELN-EBELN
       AND UDATE IN S_UDATE
       AND TCODE IN ('ME21N','ME22N','ME23N').
   ENDSELECT.
   IF SY-SUBRC NE 0.
     W_FLAG = 1.
     MESSAGE S833(M8) WITH 'Header Not Found'(031).
   ENDIF.                              " IF SY-SUBRC NE 0.
ENDIF.                                " IF NOT T_EBELN IS INITIAL
ENDFORM.                               " SELECT_OBJ_ID
*&  Form  SELECT_CHANGED_VALUE
  Subroutine to select Changed Values
  There are no interface parameters to be passed to this subroutine.
FORM SELECT_CHANGED_VALUE .
IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS                  " Object class
           OBJECTID                    " Object value
           CHANGENR                    " Document change number
           TABNAME                     " Table Name
           FNAME                       " Field Name
           VALUE_NEW                   " New contents of changed field
           VALUE_OLD                   " Old contents of changed field
      FROM CDPOS
   PACKAGE SIZE 10000
APPENDING TABLE T_CDPOS
   FOR ALL ENTRIES IN T_CDHDR
     WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
       AND OBJECTID   EQ T_CDHDR-OBJECTID
       AND CHANGENR   EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      W_FLAG = 1.
      MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF.                             " IF SY-SUBRC NE 0.
ENDIF.                               " IF NOT T_CDHDR IS INITIAL
  T_CDPOS_TEMP[] = T_CDPOS[].
ENDFORM.                               " SELECT_CHANGED_VALUE
*&   Form  SELECT_PUR_DOC
   Subroutine to select Purchase Order Details
   There are no interface parameters to be passed to this subroutine.
FORM SELECT_PUR_DOC .
IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
      READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
                                      FS_CDPOS-OBJECTID BINARY SEARCH.
      IF SY-SUBRC NE 0.
        DELETE TABLE T_EBELN FROM FS_EBELN.
      ENDIF.                           " IF SY-SUBRC NE 0.
    ENDLOOP.                           " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
      MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
      MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
      MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
      MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
      MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
      APPEND FS_EKKO TO T_EKKO.
    ENDLOOP.                           " LOOP AT T_EBELN...
    T_EKKO_TEMP[] = T_EKKO[].
ENDIF.                               " IF NOT T_CDPOS IS INITIAL
ENDFORM.                               " SELECT_PUR_DOC
*&  Form  SELECT_VENDOR
  Subroutine to select Vendor details
  There are no interface parameters to be passed to this subroutine.
FORM SELECT_VENDOR .
  IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR                       " Account Number of Vendor or
                                       " Creditor
           NAME1                       " Name 1
      FROM LFA1
      INTO TABLE T_LFA1
   FOR ALL ENTRIES IN T_EKKO_TEMP
     WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
   IF SY-SUBRC NE 0.
     MESSAGE S002(M8) WITH 'Master Details'(033).
   ENDIF.                              " IF SY-SUBRC NE 0.
  ENDIF.                               " IF NOT T_EKKO IS INITIAL
ENDFORM.                               " SELECT_VENDOR
*&  Form  DESCRIPTION
  Subroutine to get the description
  There are no interface parameters to be passed to this subroutine.
FORM DESCRIPTION .
IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME                     " Table Name
           FIELDNAME                   " Field Name
           ROLLNAME                    " Data element
      FROM DD03L
      INTO TABLE T_DATAELE
   FOR ALL ENTRIES IN T_CDPOS_TEMP
     WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
       AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP[] = T_DATAELE[].
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
      SELECT ROLLNAME                  " Data element
             DDTEXT                    " Short Text Describing R/3
                                       " Repository Objects
        FROM DD04T
        INTO TABLE T_TEXT
     FOR ALL ENTRIES IN T_DATAELE_TEMP
       WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
         AND DDLANGUAGE EQ SY-LANGU.
      IF SY-SUBRC NE 0.
        EXIT.
      ENDIF.                           " IF SY-SUBRC NE 0.
    ENDIF.                             " IF NOT T_DATAELE IS INITIAL.
ENDIF.                               " IF NOT T_CDPOS IS INITIAL.
ENDFORM.                               " DESCRIPTION
*&  Form  FILL_OUTTAB
  Subroutine to populate the Outtab
  There are no interface parameters to be passed to this subroutine.
FORM FILL_OUTTAB .
  SORT T_CDHDR   BY OBJECTCLAS OBJECTID CHANGENR.
  SORT T_EKKO    BY EBELN.
  SORT T_LFA1    BY LIFNR.
  SORT T_DATAELE BY TABNAME FIELDNAME.
  SORT T_TEXT    BY ROLLNAME.
  LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
                                   OBJECTCLAS = FS_CDPOS-OBJECTCLAS
                                   OBJECTID = FS_CDPOS-OBJECTID
                                   CHANGENR = FS_CDPOS-CHANGENR
                                   BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
        MOVE FS_CDHDR-UDATE    TO FS_OUTTAB-UDATE.
        READ TABLE T_EKKO INTO FS_EKKO WITH KEY
                                       EBELN = FS_CDHDR-OBJECTID
                                       BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
            MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
            MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
            MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
            MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
            READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
                                           LIFNR = FS_EKKO-LIFNR
                                           BINARY SEARCH.
              IF SY-SUBRC EQ 0.
                MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
              ENDIF.                   " IF SY-SUBRC EQ 0.
          ENDIF.                       " IF SY-SUBRC EQ 0.
      ENDIF.                           " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
                                         TABNAME = FS_CDPOS-TABNAME
                                         FIELDNAME = FS_CDPOS-FNAME
                                         BINARY SEARCH.
      IF SY-SUBRC EQ 0.
        READ TABLE T_TEXT INTO FS_TEXT WITH KEY
                                       ROLLNAME = FS_DATAELE-ROLLNAME
                                       BINARY SEARCH.
          IF SY-SUBRC EQ 0.
            MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
          ENDIF.                       " IF SY-SUBRC EQ 0.
      ENDIF.                           " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
  ENDLOOP.
ENDFORM.                               " FILL_OUTTAB
*&   Form  GET_CELL_INFO
   Subroutine to get the Cell Information
-->  W_VALUE   Holds the value of Hotspot clicked
FORM GET_CELL_INFO .
  CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
     E_ROW     =
      E_VALUE   = W_VALUE
     E_COL     =
     ES_ROW_ID =
     ES_COL_ID =
     ES_ROW_NO =
ENDFORM.                               " GET_CELL_INFO
*&   Form  VALIDATE_PD_NUM
   Subroutine to validate Purchase Document Number
   There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PD_NUM .
  IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN                       " Purchase Document Number
      FROM EKKO
      INTO W_EBELN
     UP TO 1 ROWS
     WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      CLEAR SSCRFIELDS-UCOMM.
      MESSAGE E717(M8).
    ENDIF.                             " IF SY-SUBRC NE 0
  ENDIF.                               " IF NOT S_EBELN[]...
ENDFORM.                               " VALIDATE_PD_NUM
*&   Form  VALIDATE_VEN_NUM
   Subroutine to validate Vendor Number
   There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_VEN_NUM .
  IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR                       " Vendor Number
      FROM LFA1
      INTO W_LIFNR
     UP TO 1 ROWS
     WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      CLEAR SSCRFIELDS-UCOMM.
      MESSAGE E002(M8) WITH W_SPACE.
    ENDIF.                             " IF SY-SUBRC NE 0
  ENDIF.                               " IF NOT S_LIFNR[]...
ENDFORM.                               " VALIDATE_VEN_NUM
*&   Form  VALIDATE_PUR_GRP
   Subroutine to validate the Purchase Group
   There are no interface parameters to be passed to this subroutine.
FORM VALIDATE_PUR_GRP .
  IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP                       " Purchase Group
      FROM T024
      INTO W_EKGRP
     UP TO 1 ROWS
     WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
      CLEAR SSCRFIELDS-UCOMM.
      MESSAGE E622(M8) WITH W_SPACE.
    ENDIF.                             " IF SY-SUBRC NE 0
  ENDIF.                               " IF NOT S_EKFRP[]...
ENDFORM.                               " VALIDATE_PUR_GRP
*& Form  FILL_VARIANT
Subroutine to fill the Variant Structure
There are no interface parameters to be passed to this subroutine
FORM FILL_VARIANT .
Filling the Variant structure
  W_VARIANT-REPORT = SY-REPID.
  W_VARIANT-USERNAME = SY-UNAME.
ENDFORM.                               " FILL_VARIANT
Regards,
Pavan.

Similar Messages

  • What are the main tables using in vendor performance report.

    what are the main tables using in vendor performance report.
    how many select statements are in ABAP reports.

    Refer the links -
    vendor performance report !!!
    vendor performance report
    vendor performance report
    I need standard vendor performance report
    Regards,
    Amit
    Reward all helpful replies.

  • Functiona Spec For VENDOR PERFORMANCE REPORT

    Hi experts
    I need to develope a VENDOR PERFORMANCE REPORT. But due to some reason i cant be able to get the Functional Specification for that object. So could you please help me by sending  the above mention functional Specification.
    thnaks and regadrs
    Pratik

    Pratik,
    Bad question in ABAP forum.
    can you please close this thread and put it into MM forum for quick reply.
    Amit.

  • What is vendor performance report what are the fields using in the report

    What is vendor performance report what are the fields using in the report and i need some sample reports for that particular topic (clasical report)not using any alvs or any advance topics.
    U R Satish Patnaik

    hi
    good
    *"Table declarations...................................................
    TABLES:
    EKKO, " Purchasing Document Header
    CDHDR, " Change document header
    SSCRFIELDS. " Fields on selection screens
    *"Selection screen elements............................................
    SELECT-OPTIONS:
    S_EBELN FOR EKKO-EBELN, " Purchasing Document Number
    S_LIFNR FOR EKKO-LIFNR, " Vendor's account number
    S_EKGRP FOR EKKO-EKGRP, " Purchasing group
    S_BEDAT FOR EKKO-BEDAT, " Purchasing Document Date
    S_UDATE FOR CDHDR-UDATE. " Creation date of the change
    " document
    *" Data declarations...................................................
    Field String to hold Purchase Document Number *
    DATA:
    BEGIN OF FS_EBELN,
    EBELN(90) TYPE C, " Purchase Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created
    " the Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EBELN,
    Field String to hold Purchase Document Header *
    BEGIN OF FS_EKKO,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    END OF FS_EKKO,
    Field String to hold Account Number and name of the Vendor *
    BEGIN OF FS_LFA1,
    LIFNR TYPE LFA1-LIFNR, " Account Number of Vendor
    NAME1 TYPE LFA1-NAME1, " Name1
    END OF FS_LFA1,
    Field String to hold Change date and the name of the user *
    BEGIN OF FS_CDHDR,
    OBJECTCLAS TYPE CDHDR-OBJECTCLAS, " Object Class
    OBJECTID TYPE CDHDR-OBJECTID, " Object value
    CHANGENR TYPE CDHDR-CHANGENR, " Document change number
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    END OF FS_CDHDR,
    Field String to hold Change document items *
    BEGIN OF FS_CDPOS,
    OBJECTCLAS TYPE CDPOS-OBJECTCLAS," Object class
    OBJECTID(10) TYPE C, " Object Value
    CHANGENR TYPE CDPOS-CHANGENR, " Document change number
    TABNAME TYPE CDPOS-TABNAME, " Table Name
    FNAME TYPE CDPOS-FNAME, " Field Name
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_CDPOS,
    Field String to hold Date Element Name *
    BEGIN OF FS_DATAELE,
    TABNAME TYPE DD03L-TABNAME, " Table Name
    FIELDNAME TYPE DD03L-FIELDNAME, " Field Name
    ROLLNAME TYPE DD03L-ROLLNAME, " Data element (semantic domain)
    END OF FS_DATAELE,
    Field String to hold Short Text of the Date Element *
    BEGIN OF FS_TEXT,
    ROLLNAME TYPE DD04T-ROLLNAME, " Data element (semantic domain)
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    END OF FS_TEXT,
    Field String to hold data to be displayed on the ALV grid *
    BEGIN OF FS_OUTTAB,
    EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    ERNAM TYPE EKKO-ERNAM, " Name of Person who Created the
    " Object
    LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    EKGRP TYPE EKKO-EKGRP, " Purchasing group
    BEDAT TYPE EKKO-BEDAT, " Purchasing Document Date
    WERKS TYPE LFA1-WERKS, " Plant
    NAME1 TYPE LFA1-NAME1, " Name1
    USERNAME TYPE CDHDR-USERNAME, " User name
    UDATE TYPE CDHDR-UDATE, " Creation date of the change
    " document
    DDTEXT TYPE DD04T-DDTEXT, " Short Text Describing R/3
    " Repository Objects
    VALUE_NEW TYPE CDPOS-VALUE_NEW, " New contents of changed field
    VALUE_OLD TYPE CDPOS-VALUE_OLD, " Old contents of changed field
    END OF FS_OUTTAB,
    Internal table to hold Purchase Document Number *
    T_EBELN LIKE STANDARD TABLE
    OF FS_EBELN,
    Internal table to hold Purchase Document Header *
    T_EKKO LIKE STANDARD TABLE
    OF FS_EKKO,
    Temp Internal table to hold Purchase Document Header *
    T_EKKO_TEMP LIKE STANDARD TABLE
    OF FS_EKKO,
    Internal table to hold Account number and Name of the Vendor *
    T_LFA1 LIKE STANDARD TABLE
    OF FS_LFA1,
    Internal Table to hold Change date and the name of the user *
    T_CDHDR LIKE STANDARD TABLE
    OF FS_CDHDR,
    Internal Table to hold Change document items *
    T_CDPOS LIKE STANDARD TABLE
    OF FS_CDPOS,
    Temp. Internal Table to hold Change document items *
    T_CDPOS_TEMP LIKE STANDARD TABLE
    OF FS_CDPOS,
    Internal Table to hold Data Element Name *
    T_DATAELE LIKE STANDARD TABLE
    OF FS_DATAELE,
    Temp. Internal Table to hold Data Element Name *
    T_DATAELE_TEMP LIKE STANDARD TABLE
    OF FS_DATAELE,
    Internal Table to hold Short Text of the Date Element *
    T_TEXT LIKE STANDARD TABLE
    OF FS_TEXT,
    Internal Table to hold data to be displayed on the ALV grid *
    T_OUTTAB LIKE STANDARD TABLE
    OF FS_OUTTAB.
    C L A S S D E F I N I T I O N *
    CLASS LCL_EVENT_HANDLER DEFINITION DEFERRED.
    *" Data declarations...................................................
    Work variables *
    DATA:
    W_EBELN TYPE EKKO-EBELN, " Purchasing Document Number
    W_LIFNR TYPE EKKO-LIFNR, " Vendor's account number
    W_EKGRP TYPE EKKO-EKGRP, " Purchasing group
    W_VALUE TYPE EKKO-EBELN, " Reflected Value
    W_SPACE VALUE ' ', " Space
    W_FLAG TYPE I, " Flag Variable
    W_VARIANT TYPE DISVARIANT, " Variant
    *--- ALV Grid
    W_GRID TYPE REF TO CL_GUI_ALV_GRID,
    *--- Event Handler
    W_EVENT_CLICK TYPE REF TO LCL_EVENT_HANDLER,
    *--- Field catalog table
    T_FIELDCAT TYPE LVC_T_FCAT.
    AT SELECTION-SCREEN EVENT *
    AT SELECTION-SCREEN ON S_EBELN.
    Subroutine to validate Purchase Document Number.
    PERFORM VALIDATE_PD_NUM.
    AT SELECTION-SCREEN ON S_LIFNR.
    Subroutine to validate Vendor Number.
    PERFORM VALIDATE_VEN_NUM.
    AT SELECTION-SCREEN ON S_EKGRP.
    Subroutine to validate Purchase Group.
    PERFORM VALIDATE_PUR_GRP.
    START-OF-SELECTION EVENT *
    START-OF-SELECTION.
    Subroutine to select all Purchase orders.
    PERFORM SELECT_PO.
    CHECK W_FLAG EQ 0.
    Subroutine to select Object values.
    PERFORM SELECT_OBJ_ID.
    CHECK W_FLAG EQ 0.
    Subroutine to select Changed values.
    PERFORM SELECT_CHANGED_VALUE.
    CHECK W_FLAG EQ 0.
    Subroutine to Select Purchase Orders.
    PERFORM SELECT_PUR_DOC.
    Subroutine to select Vendor Details.
    PERFORM SELECT_VENDOR.
    Subroutine to select Text for the Changed values.
    PERFORM DESCRIPTION.
    END-OF-SELECTION EVENT *
    END-OF-SELECTION.
    IF NOT T_EKKO IS INITIAL.
    Subroutine to populate the Output Table.
    PERFORM FILL_OUTTAB.
    Subroutine to build Field Catalog.
    PERFORM PREPARE_FIELD_CATALOG CHANGING T_FIELDCAT.
    CALL SCREEN 100.
    ENDIF. " IF NOT T_EKKO...
    CLASS LCL_EVENT_HANDLER DEFINITION
    Defining Class which handles events
    CLASS LCL_EVENT_HANDLER DEFINITION .
    PUBLIC SECTION .
    METHODS:
    HANDLE_HOTSPOT_CLICK
    FOR EVENT HOTSPOT_CLICK OF CL_GUI_ALV_GRID
    IMPORTING E_ROW_ID E_COLUMN_ID.
    ENDCLASS. " LCL_EVENT_HANDLER DEFINITION
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION
    Implementing the Class which can handle events
    CLASS LCL_EVENT_HANDLER IMPLEMENTATION .
    *---Handle Double Click
    METHOD HANDLE_HOTSPOT_CLICK .
    Subroutine to get the HotSpot Cell information.
    PERFORM GET_CELL_INFO.
    SET PARAMETER ID 'BES' FIELD W_VALUE.
    CALL TRANSACTION 'ME23N'.
    ENDMETHOD. " HANDLE_HOTSPOT_CLICK
    ENDCLASS. " LCL_EVENT_HANDLER
    *& Module STATUS_0100 OUTPUT
    PBO Event
    MODULE STATUS_0100 OUTPUT.
    SET PF-STATUS 'OOPS'.
    SET TITLEBAR 'TIT'.
    Subroutine to fill the Variant Structure
    PERFORM FILL_VARIANT.
    IF W_GRID IS INITIAL.
    CREATE OBJECT W_GRID
    EXPORTING
    I_SHELLSTYLE = 0
    I_LIFETIME =
    I_PARENT = CL_GUI_CONTAINER=>SCREEN0
    I_APPL_EVENTS =
    I_PARENTDBG =
    I_APPLOGPARENT =
    I_GRAPHICSPARENT =
    I_NAME =
    I_FCAT_COMPLETE = SPACE
    EXCEPTIONS
    ERROR_CNTL_CREATE = 1
    ERROR_CNTL_INIT = 2
    ERROR_CNTL_LINK = 3
    ERROR_DP_CREATE = 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. " IF SY-SUBRC <> 0
    CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
    I_BUFFER_ACTIVE =
    I_BYPASSING_BUFFER =
    I_CONSISTENCY_CHECK =
    I_STRUCTURE_NAME =
    IS_VARIANT = W_VARIANT
    I_SAVE = 'A'
    I_DEFAULT = 'X'
    IS_LAYOUT =
    IS_PRINT =
    IT_SPECIAL_GROUPS =
    IT_TOOLBAR_EXCLUDING =
    IT_HYPERLINK =
    IT_ALV_GRAPHICS =
    IT_EXCEPT_QINFO =
    IR_SALV_ADAPTER =
    CHANGING
    IT_OUTTAB = T_OUTTAB
    IT_FIELDCATALOG = T_FIELDCAT
    IT_SORT =
    IT_FILTER =
    EXCEPTIONS
    INVALID_PARAMETER_COMBINATION = 1
    PROGRAM_ERROR = 2
    TOO_MANY_LINES = 3
    OTHERS = 4
    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 <> 0.
    ENDIF. " IF W_GRID IS INITIAL
    CREATE OBJECT W_EVENT_CLICK.
    SET HANDLER W_EVENT_CLICK->HANDLE_HOTSPOT_CLICK FOR W_GRID.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0100 INPUT
    PAI Event
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'EXIT'.
    LEAVE PROGRAM.
    WHEN 'CANCEL'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Form PREPARE_FIELD_CATALOG
    Subroutine to build the Field catalog
    <--P_T_FIELDCAT Field Catalog Table
    FORM PREPARE_FIELD_CATALOG CHANGING PT_FIELDCAT TYPE LVC_T_FCAT .
    DATA LS_FCAT TYPE LVC_S_FCAT.
    Purchasing group...
    LS_FCAT-FIELDNAME = 'EKGRP'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Number...
    LS_FCAT-FIELDNAME = 'EBELN'.
    LS_FCAT-REF_TABLE = 'EKKO' .
    LS_FCAT-EMPHASIZE = 'C411'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-HOTSPOT = 'X'.
    APPEND LS_FCAT TO PT_FIELDCAT .
    CLEAR LS_FCAT .
    Name of Person who Created the Object...
    LS_FCAT-FIELDNAME = 'ERNAM'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-OUTPUTLEN = '15' .
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Purchasing Document Date...
    LS_FCAT-FIELDNAME = 'BEDAT'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Vendor's account number...
    LS_FCAT-FIELDNAME = 'LIFNR'.
    LS_FCAT-REF_TABLE = 'EKKO'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Account Number of Vendor or Creditor...
    LS_FCAT-FIELDNAME = 'NAME1'.
    LS_FCAT-REF_TABLE = 'LFA1'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Vendor Name'(001).
    LS_FCAT-SELTEXT = 'Vendor Name'(001).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Creation date of the change document...
    LS_FCAT-FIELDNAME = 'UDATE'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Change Date'(002).
    LS_FCAT-SELTEXT = 'Change Date'(002).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    User name of the person responsible in change document...
    LS_FCAT-FIELDNAME = 'USERNAME'.
    LS_FCAT-REF_TABLE = 'CDHDR'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '10'.
    LS_FCAT-COLTEXT = 'Modified by'(003).
    LS_FCAT-SELTEXT = 'Modified by'(003).
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Short Text Describing R/3 Repository Objects...
    LS_FCAT-FIELDNAME = 'DDTEXT'.
    LS_FCAT-REF_TABLE = 'DD04T'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '15'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    Old contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_OLD'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    New contents of changed field...
    LS_FCAT-FIELDNAME = 'VALUE_NEW'.
    LS_FCAT-REF_TABLE = 'CDPOS'.
    LS_FCAT-INTTYPE = 'C'.
    LS_FCAT-OUTPUTLEN = '12'.
    APPEND LS_FCAT TO PT_FIELDCAT.
    CLEAR LS_FCAT.
    ENDFORM. " PREPARE_FIELD_CATALOG
    *& Form SELECT_PO
    Subroutine to select all the Purchase Orders
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PO .
    SELECT EBELN " Purchasing Document Number
    ERNAM " Name of Person who Created
    " the Object
    LIFNR " Vendor's account number
    EKGRP " Purchasing group
    BEDAT " Purchasing Document Date
    FROM EKKO
    PACKAGE SIZE 10000
    APPENDING TABLE T_EBELN
    WHERE EBELN IN S_EBELN
    AND BEDAT IN S_BEDAT.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S401(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDFORM. " SELECT_PO
    *& Form SELECT_OBJ_ID
    Subroutine to select Object ID
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_OBJ_ID .
    IF NOT T_EBELN IS INITIAL.
    SELECT OBJECTCLAS " Object Class
    OBJECTID " Object value
    CHANGENR " Document change number
    USERNAME " User name
    UDATE " Creation date
    FROM CDHDR
    INTO TABLE T_CDHDR
    FOR ALL ENTRIES IN T_EBELN
    WHERE OBJECTID EQ T_EBELN-EBELN
    AND UDATE IN S_UDATE
    AND TCODE IN ('ME21N','ME22N','ME23N').
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Header Not Found'(031).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EBELN IS INITIAL
    ENDFORM. " SELECT_OBJ_ID
    *& Form SELECT_CHANGED_VALUE
    Subroutine to select Changed Values
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_CHANGED_VALUE .
    IF NOT T_CDHDR IS INITIAL.
    SELECT OBJECTCLAS " Object class
    OBJECTID " Object value
    CHANGENR " Document change number
    TABNAME " Table Name
    FNAME " Field Name
    VALUE_NEW " New contents of changed field
    VALUE_OLD " Old contents of changed field
    FROM CDPOS
    PACKAGE SIZE 10000
    APPENDING TABLE T_CDPOS
    FOR ALL ENTRIES IN T_CDHDR
    WHERE OBJECTCLAS EQ T_CDHDR-OBJECTCLAS
    AND OBJECTID EQ T_CDHDR-OBJECTID
    AND CHANGENR EQ T_CDHDR-CHANGENR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    W_FLAG = 1.
    MESSAGE S833(M8) WITH 'Item Not Found'(032).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_CDHDR IS INITIAL
    T_CDPOS_TEMP[] = T_CDPOS[].
    ENDFORM. " SELECT_CHANGED_VALUE
    *& Form SELECT_PUR_DOC
    Subroutine to select Purchase Order Details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_PUR_DOC .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_EBELN BY EBELN.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_EBELN INTO FS_EBELN WITH KEY EBELN =
    FS_CDPOS-OBJECTID BINARY SEARCH.
    IF SY-SUBRC NE 0.
    DELETE TABLE T_EBELN FROM FS_EBELN.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDLOOP. " LOOP AT T_CDPOS...
    LOOP AT T_EBELN INTO FS_EBELN.
    MOVE FS_EBELN-EBELN TO FS_EKKO-EBELN.
    MOVE FS_EBELN-ERNAM TO FS_EKKO-ERNAM.
    MOVE FS_EBELN-LIFNR TO FS_EKKO-LIFNR.
    MOVE FS_EBELN-EKGRP TO FS_EKKO-EKGRP.
    MOVE FS_EBELN-BEDAT TO FS_EKKO-BEDAT.
    APPEND FS_EKKO TO T_EKKO.
    ENDLOOP. " LOOP AT T_EBELN...
    T_EKKO_TEMP[] = T_EKKO[].
    ENDIF. " IF NOT T_CDPOS IS INITIAL
    ENDFORM. " SELECT_PUR_DOC
    *& Form SELECT_VENDOR
    Subroutine to select Vendor details
    There are no interface parameters to be passed to this subroutine.
    FORM SELECT_VENDOR .
    IF NOT T_EKKO IS INITIAL.
    SORT T_EKKO_TEMP BY LIFNR.
    DELETE ADJACENT DUPLICATES FROM T_EKKO_TEMP COMPARING LIFNR.
    SELECT LIFNR " Account Number of Vendor or
    " Creditor
    NAME1 " Name 1
    FROM LFA1
    INTO TABLE T_LFA1
    FOR ALL ENTRIES IN T_EKKO_TEMP
    WHERE LIFNR EQ T_EKKO_TEMP-LIFNR.
    IF SY-SUBRC NE 0.
    MESSAGE S002(M8) WITH 'Master Details'(033).
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_EKKO IS INITIAL
    ENDFORM. " SELECT_VENDOR
    *& Form DESCRIPTION
    Subroutine to get the description
    There are no interface parameters to be passed to this subroutine.
    FORM DESCRIPTION .
    IF NOT T_CDPOS IS INITIAL.
    SORT T_CDPOS_TEMP BY TABNAME FNAME.
    DELETE ADJACENT DUPLICATES FROM T_CDPOS_TEMP COMPARING TABNAME FNAME
    SELECT TABNAME " Table Name
    FIELDNAME " Field Name
    ROLLNAME " Data element
    FROM DD03L
    INTO TABLE T_DATAELE
    FOR ALL ENTRIES IN T_CDPOS_TEMP
    WHERE TABNAME EQ T_CDPOS_TEMP-TABNAME
    AND FIELDNAME EQ T_CDPOS_TEMP-FNAME.
    IF NOT T_DATAELE IS INITIAL.
    T_DATAELE_TEMP[] = T_DATAELE[].
    SORT T_DATAELE_TEMP BY ROLLNAME.
    DELETE ADJACENT DUPLICATES FROM T_DATAELE_TEMP COMPARING ROLLNAME.
    SELECT ROLLNAME " Data element
    DDTEXT " Short Text Describing R/3
    " Repository Objects
    FROM DD04T
    INTO TABLE T_TEXT
    FOR ALL ENTRIES IN T_DATAELE_TEMP
    WHERE ROLLNAME EQ T_DATAELE_TEMP-ROLLNAME
    AND DDLANGUAGE EQ SY-LANGU.
    IF SY-SUBRC NE 0.
    EXIT.
    ENDIF. " IF SY-SUBRC NE 0.
    ENDIF. " IF NOT T_DATAELE IS INITIAL.
    ENDIF. " IF NOT T_CDPOS IS INITIAL.
    ENDFORM. " DESCRIPTION
    *& Form FILL_OUTTAB
    Subroutine to populate the Outtab
    There are no interface parameters to be passed to this subroutine.
    FORM FILL_OUTTAB .
    SORT T_CDHDR BY OBJECTCLAS OBJECTID CHANGENR.
    SORT T_EKKO BY EBELN.
    SORT T_LFA1 BY LIFNR.
    SORT T_DATAELE BY TABNAME FIELDNAME.
    SORT T_TEXT BY ROLLNAME.
    LOOP AT T_CDPOS INTO FS_CDPOS.
    READ TABLE T_CDHDR INTO FS_CDHDR WITH KEY
    OBJECTCLAS = FS_CDPOS-OBJECTCLAS
    OBJECTID = FS_CDPOS-OBJECTID
    CHANGENR = FS_CDPOS-CHANGENR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_CDHDR-USERNAME TO FS_OUTTAB-USERNAME.
    MOVE FS_CDHDR-UDATE TO FS_OUTTAB-UDATE.
    READ TABLE T_EKKO INTO FS_EKKO WITH KEY
    EBELN = FS_CDHDR-OBJECTID
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_EKKO-EBELN TO FS_OUTTAB-EBELN.
    MOVE FS_EKKO-ERNAM TO FS_OUTTAB-ERNAM.
    MOVE FS_EKKO-LIFNR TO FS_OUTTAB-LIFNR.
    MOVE FS_EKKO-EKGRP TO FS_OUTTAB-EKGRP.
    MOVE FS_EKKO-BEDAT TO FS_OUTTAB-BEDAT.
    READ TABLE T_LFA1 INTO FS_LFA1 WITH KEY
    LIFNR = FS_EKKO-LIFNR
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_LFA1-NAME1 TO FS_OUTTAB-NAME1.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    MOVE FS_CDPOS-VALUE_NEW TO FS_OUTTAB-VALUE_NEW.
    MOVE FS_CDPOS-VALUE_OLD TO FS_OUTTAB-VALUE_OLD.
    READ TABLE T_DATAELE INTO FS_DATAELE WITH KEY
    TABNAME = FS_CDPOS-TABNAME
    FIELDNAME = FS_CDPOS-FNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    READ TABLE T_TEXT INTO FS_TEXT WITH KEY
    ROLLNAME = FS_DATAELE-ROLLNAME
    BINARY SEARCH.
    IF SY-SUBRC EQ 0.
    MOVE FS_TEXT-DDTEXT TO FS_OUTTAB-DDTEXT.
    ENDIF. " IF SY-SUBRC EQ 0.
    ENDIF. " IF SY-SUBRC EQ 0.
    APPEND FS_OUTTAB TO T_OUTTAB.
    CLEAR FS_OUTTAB.
    ENDLOOP.
    ENDFORM. " FILL_OUTTAB
    *& Form GET_CELL_INFO
    Subroutine to get the Cell Information
    --> W_VALUE Holds the value of Hotspot clicked
    FORM GET_CELL_INFO .
    CALL METHOD W_GRID->GET_CURRENT_CELL
    IMPORTING
    E_ROW =
    E_VALUE = W_VALUE
    E_COL =
    ES_ROW_ID =
    ES_COL_ID =
    ES_ROW_NO =
    ENDFORM. " GET_CELL_INFO
    *& Form VALIDATE_PD_NUM
    Subroutine to validate Purchase Document Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PD_NUM .
    IF NOT S_EBELN[] IS INITIAL.
    SELECT EBELN " Purchase Document Number
    FROM EKKO
    INTO W_EBELN
    UP TO 1 ROWS
    WHERE EBELN IN S_EBELN.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E717(M8).
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EBELN[]...
    ENDFORM. " VALIDATE_PD_NUM
    *& Form VALIDATE_VEN_NUM
    Subroutine to validate Vendor Number
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_VEN_NUM .
    IF NOT S_LIFNR[] IS INITIAL.
    SELECT LIFNR " Vendor Number
    FROM LFA1
    INTO W_LIFNR
    UP TO 1 ROWS
    WHERE LIFNR IN S_LIFNR.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E002(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_LIFNR[]...
    ENDFORM. " VALIDATE_VEN_NUM
    *& Form VALIDATE_PUR_GRP
    Subroutine to validate the Purchase Group
    There are no interface parameters to be passed to this subroutine.
    FORM VALIDATE_PUR_GRP .
    IF NOT S_EKGRP[] IS INITIAL.
    SELECT EKGRP " Purchase Group
    FROM T024
    INTO W_EKGRP
    UP TO 1 ROWS
    WHERE EKGRP IN S_EKGRP.
    ENDSELECT.
    IF SY-SUBRC NE 0.
    CLEAR SSCRFIELDS-UCOMM.
    MESSAGE E622(M8) WITH W_SPACE.
    ENDIF. " IF SY-SUBRC NE 0
    ENDIF. " IF NOT S_EKFRP[]...
    ENDFORM. " VALIDATE_PUR_GRP
    *& Form FILL_VARIANT
    Subroutine to fill the Variant Structure
    There are no interface parameters to be passed to this subroutine
    FORM FILL_VARIANT .
    Filling the Variant structure
    W_VARIANT-REPORT = SY-REPID.
    W_VARIANT-USERNAME = SY-UNAME.
    ENDFORM. " FILL_VARIANT
    reward point if helpful.
    thanks
    mrutyun^

  • Vendor performance report

    hai
    how to create an vendor performance report which display purchase order issued to a vendor, material supplied delivery times, payment terms, prices during a period of time.
        for this report what are the tables and fields we have to use pls give me sample report..
                  thank you..

    Hi,
    Against the RFQ's vendor submit quotations and the Based on the RFQ's data we have to compare the different Vendors with the respective data like terms and prices
    Fetch the data of all RFQ's from EKKO and EKPO tables
    and take the EKKO-KNUMV field and pass to KONV table and fetch the different prices based on the Condition types  for each RFQ and put it in a tabular format  and compare.
    see the sample code
    *& Report  ZRFQ_COMP
    *& Quotation Comparison Report
    REPORT  ZRFQ_COMP no standard page heading line-size 187 line-count 35.
    *&Tables
    Tables : ekko,
             ekpo,
             konp,
             a016.
    *&Data Decleration
    Data : v_pos type i value 19.
    Data : begin of it_rfq occurs 0,
            ebeln type ekko-ebeln,
            ekorg type ekko-ekorg,
            lifnr type ekko-lifnr,
            matnr type ekpo-matnr,
            WERKS type ekpo-WERKS,
           end of it_rfq.
    Data : begin of it_a016 occurs 0,
            ebeln type ekko-ebeln,
            knumh type knumh,
           end of it_a016.
    Data : begin of it_a363 occurs 0,
            werks type werks,
            lifnr type lifnr,
            matnr type matnr,
            knumh type knumh,
           end of it_a363.
    Data : begin of it_pr_details occurs 0,
            knumh type knumh,
            kschl type kschl,
            kbetr type kwert,
           end of it_pr_details.
    Data : begin of it_final occurs 0,
            ebeln type ebeln,
            lifnr type lifnr,
            name1 type lfa1-name1,
            pb00  type kbetr,
            zpac  type kbetr,
            zb00  type kbetr,
            ZIN1  type kbetr,
            JEC1  type kbetr,
            JHX1  type kbetr,
            JMOP  type kbetr,
            JMX1  type kbetr,
            JMX3  type kbetr,
            JSEP  TYPE KBETR,
            JVRD  type kbetr,
           end of it_final.
    Data : begin of it_vendorname occurs 0,
            lifnr type lifnr,
            name1 type lfa1-name1,
           end of it_vendorname.
    *&Selection Screen
    Selection-screen: begin of block blk1 with frame title text-001.
      parameters     : p_matnr like ekpo-matnr obligatory.
      select-options : s_ebeln for ekko-ebeln,
                       s_ekorg for ekko-ekorg,
                       s_lifnr for ekko-lifnr.
    Selection-screen: end of block blk1.
    *&Start-of-Selection.
    Start-of-selection.
      Select ekko~ebeln
             ekko~ekorg
             ekko~lifnr
             ekpo~matnr
             ekpo~werks
        into table it_rfq
        from ekko
       inner join ekpo
          on ekkoebeln eq ekpoebeln
        where ekko~ebeln in s_ebeln
          and ekko~ekorg in s_ekorg
          and ekko~lifnr in s_lifnr
          and ekpo~matnr eq p_matnr
          and ekko~bstyp eq 'A'.
      if sy-subrc eq 0.
    *--> Condition number from A tables.
      Perform get_connum.
    *--> Getting the Pricing Details from Konp Table.
      Perform get_prices.
    *--> Populate Vendor Name.
      Perform pop_vendor_name.
    *--> Populating the Final Internal table for Report.
      Perform pop_final_tab.
      else.
       message 'Purchase Document does not exist' type 'E'.
      endif.
    *&End-of-Selection.
    End-of-Selection.
    write :/ sy-vline,
           2 'Vendor Number',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 1.
      write at v_pos it_final-lifnr.
      v_pos = v_pos + 35.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Gross Price',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-pb00.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Packing & Forward',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zpac.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Surcharge',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zb00.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Installation',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zin1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Ed cess on BED%',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jec1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'A/P Secess set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jhx1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Basic Excise Duty',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-zpac.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'A/P BED set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jmx1.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Ecess % set off',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jmx3.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'Sec ED Cess on BED',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jsep.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    write :/ sy-vline,
           2 'VAT%',
           19 sy-vline.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 20.
      write at v_pos it_final-jvrd.
      v_pos = v_pos + 16.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    *&Top-of-Page.
    Top-of-Page.
    format color 1.
    Write: 'Material Number :' color 1, p_matnr color 1.
    loop at it_final.
      v_pos = v_pos + 1.
      v_pos = v_pos + 35.
    endloop.
    write at: /(v_pos) sy-uline,/ sy-vline,2 'Vendor Name'.
    v_pos = 19.
    loop at it_final.
      write at v_pos sy-vline.
      v_pos = v_pos + 1.
      write at v_pos it_final-name1.
      v_pos = v_pos + 35.
    endloop.
    write at: v_pos sy-vline,
              /(v_pos) sy-uline.
    *&      Form  get_connum
          Condition number from A tables
    form get_connum .
        Select EVRTN
               knumh
          from a016
          into table it_a016
           for all entries in it_rfq
         where EVRTN eq it_rfq-ebeln.
        Select werks
               lifnr
               matnr
               knumh
          from a363
          into table it_a363
           for all entries in it_rfq
         where werks eq it_rfq-werks
           and lifnr eq it_rfq-lifnr
           and matnr eq it_rfq-matnr.
    endform.                    " get_connum
    *&      Form  get_prices
          Getting the Pricing Details from Konp Table.
    form get_prices .
      if not it_a016[] is initial.
        select knumh
               kschl
               kbetr
          from konp
          into table it_pr_details
           for all entries in it_a016
         where knumh eq it_a016-knumh.
      endif.
      if not it_a363[] is initial.
        select knumh
               kschl
               kbetr
          from konp
    appending table it_pr_details
           for all entries in it_a016
         where knumh eq it_a016-knumh.
      endif.
    endform.                    " get_prices
    *&      Form  pop_final_tab
          Populating the Final Internal table for Report
    form pop_final_tab .
    data : l_subrc like sy-subrc.
      sort it_a016 by ebeln.
      loop at it_rfq.
        clear l_subrc.
        read table it_a016 with key ebeln = it_rfq-ebeln
        binary search.
        if sy-subrc eq 0.
          loop at it_pr_details where knumh eq it_a016-knumh.
            it_final-ebeln = it_rfq-ebeln.
            it_final-lifnr = it_rfq-lifnr.
            read table it_vendorname with
            key lifnr = it_rfq-lifnr.
            it_final-name1 = it_vendorname-name1.
            case it_pr_details-kschl.
            when 'PBOO'.
              it_final-pb00 = it_pr_details-kbetr.
              if it_pr_details-kbetr eq 0.
               clear it_final.
               continue.
              endif.
            when 'ZPAC'.
              it_final-zpac = it_pr_details-kbetr.
            when 'ZB00'.
              it_final-ZB00 = it_pr_details-kbetr.
            when 'ZIN1'.
              it_final-ZIN1 = it_pr_details-kbetr.
            endcase.
          endloop.
        else.
          l_subrc = sy-subrc.
        endif.
        read table it_a363 with key lifnr = it_rfq-lifnr
                                    werks = it_rfq-werks
                                    matnr = it_rfq-matnr.
        if sy-subrc eq 0.
          loop at it_pr_details where knumh eq it_a016-knumh.
            it_final-ebeln = it_rfq-ebeln.
            it_final-lifnr = it_rfq-lifnr.
            read table it_vendorname with
            key lifnr = it_rfq-lifnr.
            it_final-name1 = it_vendorname-name1.
            case it_pr_details-kschl.
            when 'JEC1'.
              it_final-JEC1 = it_pr_details-kbetr.
            when 'JHX1'.
              it_final-JHX1 = it_pr_details-kbetr.
            when 'JMOP'.
              it_final-JMOP = it_pr_details-kbetr.
            when 'JMX1'.
              it_final-JMX1 = it_pr_details-kbetr.
            when 'JMX3'.
              it_final-JMX3 = it_pr_details-kbetr.
            when 'JSEP'.
              it_final-JSEP = it_pr_details-kbetr.
            when 'JVRD'.
              it_final-JVRD = it_pr_details-kbetr.
            endcase.
          endloop.
        elseif l_subrc ne 0.
       continue.
        endif.
        append it_final.
        clear  it_final.
      endloop.
    endform.                    " pop_final_tab
    *&      Form  pop_vendor_name
          Populate Vendor Name
    form pop_vendor_name .
      if not it_rfq[] is initial.
      Select lifnr
             name1
        from lfa1
        into table it_vendorname
       where lifnr eq it_rfq-lifnr.
      endif.
    endform.                    " pop_vendor_name
    Reward points if useful
    Regards
    Anji

  • U0095     Vendor performance report this report gives performance of supplier to se

    Vendor performance report this report gives performance of supplier to send an order to customer

    Kiran,
    The functionality you are asking sounds like standard functionality. Doesn't make sense to custom develop the same.
    Make sure you search and confirm that standard reports are NOT available for the same.
    Regards,
    Ravi
    Note : please mark the helpful answers

  • I need standard vendor performance report

    I need a standard vendor performance report

    You will find multiple vendor-related reports on the main SAP menu under this path:
    SAP menu --> Accounting --> Financial accounting --> Accounts Payable --> Information System --> Reports for Accounts Payable Accounting --> Vendor Balances
    and also under:
    SAP menu --> Accounting --> Financial accounting --> Accounts Payable --> Information System --> Reports for Accounts Payable Accounting --> Vendors: Items
    I hope this helps.
    - April King

  • Vendor performance reports

    Hi Gurus,
    are there any reports in LIS that show the vendor performance based on quality, on time delivery and etc. we do not want to use the supplier delivery vendor evaluation componenet of the MM. But can anybody please tell me what reports are out there that will meet the criteria
    Thanks
    Anusha

    You can perform standard analyses with key figures (scores) from Vendor Evaluation. The Standard analysis function is integrated in the Logistics Information System (LIS), but it can also be invoked from the Purchasing menu.
    Refer to the documentation LO Logistics Information System to familiarize yourself with the Logistics Information System. You will find information on the functions in the section Standard Analyses and information on key figures in the section How the Key Figures are Calculated.
    Using the standard analysis, you can generate various views of Vendor Evaluation data and generate a graphical display of each view. In contrast to the other analyses and reports in Vendor Evaluation, the standard analysis provides you with
    the cumulative scores from all periods, and
    the score for just one period.
    Standard Analysis and LIS
    The data determined in Vendor Evaluation is written to a special statistics file (information structure S013) within the LIS and from there utilized for analysis purposes. The data (or key figures) are the scores for the following criteria:
    Quantity reliability
    On-time delivery performance
    Adherence to confirmation date
    Inbound delivery (currently not updated)
    Compliance with shipping instructions
    Quality audit (currently not updated)
    Quality of external service provision
    Timeliness of external service provision
    You wish to monitor whether vendor ACME delivers material A on time and in the right quantity. You want to see his scores for the months January, February, and March - both the scores for each month and the cumulative score.
    Procedure
    Starting from the system menu, choose Logistics ® Materials management ® Purchasing, master data ® Vendor evaluation ® Standard analysis.
    You can also invoke the function via Logistics ® Logistics Controlling ® Purchasing information system, Standard analyses ® Vendor evaluation.
    Enter the desired parameters.
    Choose Vendor evaluation analysis ® Execute.
    You will obtain a list of results with characteristic values (e.g. all vendors for a purchasing organization with their scores).
    You can process the list according to a variety of criteria:
    a. Position the cursor on a characteristic value (e.g. a vendor) and choose, for example, View ® Drill down by.
    b. Select the desired type of view (e.g. Material) and confirm.
    A list of characteristic values will appear (for example, all materials for a vendor plus their scores).
    c. Carry out steps a) and b) for the other types of view too, if desired (for example, Month).
    d. For a better overview generate the view via Goto ® Graphic.

  • Vendor performance analysis report

    Hi all,
    requirement to create an ALV report for vendor performance analysis...  wat r d tables n feilds which are to be used fr this... any help is appreciated..

    Refer the links -
    vendor performance report !!!
    vendor performance report
    vendor performance report
    I need standard vendor performance report

  • Need standrad program for vendor aging report

    Hi
      Need standrad program for vendor aging report.
    Please reply me only standrad programs.
    Point are sure.
    Regards,
    kumar

    Hi Pankaj
       sorry to say that this is not my required program.
    I need vendor aging report like s_alr_87012178 tc leads to customer aging report.
    Thanks for your effort.
    points are awarded.
    Regards,
    kumar

  • I need information about reports

    hi gurus,
      i need information about Trending reports and Management reports. Can any body provide me the scenario regarding this issues:

    Hi
    Trend reports are the reports which show a certain trend all over the years
    Say, Sales revenue for the year compared to all the previous years...This show what is the trend in the last few years
    Management reports high level reports with summarized data which helps in decision making. Say, Vendor performance report...this report shows list of default vendors by ranking them and management can decide to continue or not to continue with certain vendors
    Regards
    N Ganesh

  • Vendor variance report

    vendor variance report and vendor performance report both are same . pls tell in detail . points will be rewarded  definitely.

    Hi
    Both are same
    Before purchasing some thing from Vendor We ask for quotations from different vendors
    After receiving them all will be compared in terms of the Prices, different Taxes and other conditions and a single vendor is shortlisted asking him to supply the goods. We will issue a PO for that vendor.
    Reward points if useful
    Regards
    Anji

  • Regarding Vendor Performance....

    hii experts,
    I am working on Vendor Performance report and finding problem in it.pls tell how can i analyse Vendor Performance report . what is the purpose of it? tables used . if possible give sample coding for this .
    Any pointer will be highly appreciable..
    Thanks in advance,
    Ashok

    Hi Ashok,
       I have worked on Vendor performance and i am sending you
       the code as per your requirement.....
       Hope this will help you!!!!!!!!!!!!!!
    REPORT  ZVENDOR_PERFORMANCE.
    TABLES: lfa1, lfm1, j_1inewjcode.
    *STRUCTURES
    DATA: BEGIN OF wa_lfm1,
    lifnr LIKE lfm1-lifnr,
    ekorg LIKE lfm1-ekorg.
    DATA: END OF wa_lfm1.
    DATA: BEGIN OF wa_lfa1,
    lifnr LIKE lfa1-lifnr,
    txjcd LIKE lfa1-txjcd,
    adrnr LIKE lfa1-adrnr .
    DATA: END OF wa_lfa1.
    DATA: BEGIN OF wa_lfb1,
    lifnr LIKE lfa1-lifnr,
    bukrs LIKE t001-bukrs.
    DATA: END OF wa_lfb1.
    DATA: it_lfa1 LIKE wa_lfa1 OCCURS 10 WITH HEADER LINE,
    it_lfm1 LIKE wa_lfm1 OCCURS 10 WITH HEADER LINE.
    DATA jcode LIKE j_1inewjcode-txjcd.
    DATA count TYPE i.
    DATA: new_lfa1 LIKE wa_lfa1 OCCURS 0 WITH HEADER LINE.
    DATA : it_adrc LIKE adrc OCCURS 10 WITH HEADER LINE.
    DATA : bukrs LIKE t001-bukrs, porg LIKE t024e-ekorg.
    DATA: it_lfb1 LIKE wa_lfb1 OCCURS 10 WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK block1 WITH FRAME TITLE text-001.
    PARAMETERS:
    p_bukrs LIKE t001-bukrs OBLIGATORY,
    p_ekorg LIKE t024e-ekorg OBLIGATORY MEMORY ID buk.
    SELECTION-SCREEN END OF BLOCK block1.
    SELECTION-SCREEN BEGIN OF BLOCK block2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS: p_lifnr FOR lfm1-lifnr.
    SELECTION-SCREEN END OF BLOCK block2.
    PARAMETERS: test AS CHECKBOX DEFAULT 'X'.
    AT SELECTION-SCREEN ON p_bukrs.
    SELECT SINGLE j_1ibukrs FROM j_1iindcus
    INTO bukrs
    WHERE j_1ibukrs = p_bukrs.
    IF sy-subrc <> 0.
    MESSAGE e128(8i).
    ENDIF.
    AT SELECTION-SCREEN ON p_ekorg.
    SELECT SINGLE ekorg INTO porg FROM t024e
    WHERE ekorg = p_ekorg
    AND bukrs = bukrs.
    IF sy-subrc NE 0 .
    MESSAGE e015(me) WITH p_ekorg space.
    ENDIF .
    *-------header print.
    TOP-OF-PAGE.
    NEW-LINE NO-SCROLLING.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE : / ,
    05 'Vendor', "#EC NOTEXT
    22 'New Jud Code'." 38 'Old Jud code'.
    FORMAT COLOR OFF.
    NEW-LINE SCROLLING.
    START-OF-SELECTION.
    Get the dummy Jur Code
    SELECT SINGLE txjcd FROM j_1inewjcode
    INTO jcode
    WHERE aland = 'IN'.
    IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'Jur code not defined in Table J_1INEWJCODE'.
    ENDIF.
    CHECK for lfB1 if the customer exists for company code
    SELECT lifnr bukrs FROM lfb1 INTO TABLE it_lfb1
    WHERE
    lifnr IN p_lifnr
    AND bukrs = p_bukrs.
    IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'No vendors defined for company code'.
    ENDIF.
    Check if vendor defined for purchasing
    SELECT lifnr ekorg FROM lfm1 INTO TABLE it_lfm1
    FOR ALL ENTRIES IN it_lfb1[]
    WHERE lifnr = it_lfb1-lifnr
    AND ekorg = p_ekorg.
    Get data from General data of vendor master
    IF sy-subrc <> 0.
    MESSAGE e000(8i) WITH 'No Vendors defined for purchasing organization '.
    ENDIF.
    SELECT lifnr txjcd adrnr FROM lfa1 INTO TABLE it_lfa1
    FOR ALL ENTRIES IN it_lfm1[]
    WHERE lifnr = it_lfm1-lifnr.
    SORT it_lfa1 BY txjcd.
    DELETE it_lfa1[] WHERE txjcd = space.
    SELECT * FROM adrc INTO TABLE it_adrc FOR ALL ENTRIES IN it_lfa1
    WHERE addrnumber = it_lfa1-adrnr.
    CLEAR count.
    LOOP AT it_lfa1.
    IF test <> 'X'.
    UPDATE lfa1 SET txjcd = jcode
    WHERE lifnr = it_lfa1-lifnr.
    ENDIF.
    count = count + 1.
    WRITE : / , 5 it_lfa1-lifnr, 25 jcode.
    ENDLOOP.
    LOOP AT it_adrc.
    IF test <> 'X'.
    UPDATE adrc SET taxjurcode = jcode
    WHERE addrnumber = it_adrc-addrnumber.
    ENDIF.
    ENDLOOP.
    IF test <> 'X'.
    WRITE : / 'The No of Vendor Master updated with new Jur Code is:',
    count.
    ENDIF.
    <u><i><b>"Kindly reward points if answer is useful"</b></i></u>
    Regards,
    mandeep.

  • Vendor perfomance report

    plz.explain me about vendor performance report and using tables and fields without bapi.

    plz.explain me about vendor performance report and using tables and fields without bapi.

  • Vendor Scorecard Performance Report

    The Vendor Scorecard Performance Report data is based on dates entered in the PO (dates provided by the vendor to us at the time we cut the PO or even months after the PO is cut-this date can change) as opposed to our expected lead time (lead time promised by the vendor in general).We always need to put the vendor's advised date in the PO so that our back-order reports have the correct ETA info. Currently, the report will show the vendor as having an almost perfect record because our expected receipt date is based on the vendor's production schedule (whether it is within our expected lead time or not).
    We need some kind of indicator in the vendor set up which tells the system that the expected delivery date is "out of tolerance". Is there any way to achieve this and have the report based on expected lead time as opposed to PO dates?
    Could somebody please help me to achieve this...?

    No database version? No example tables and data? No attempt to solve this yourself?
    Please provide the necessary details as mentioned in the SQL and PL/SQL FAQ:
    {message:id=9360002}

Maybe you are looking for

  • Minus and - not working in query

    Hi all, I am operating on 10G R/2. I have thsi query where thi sstatement <pre>(COUNT(W_O) - COUNT(W_I))</pre> TOTAL is returning 0.Why is the minus and '-' not working out in this query?. <Pre> SELECT TRUNC(DT) week_start , next_day (TRUNC( DT) - 7,

  • ITunes no longer recognizes iPod mini

    Things with my ipod mini have been going downhill lately. Along with reduced memory (down from 4G to 3.77G last time I checked) and a weaker battery life, then it had when I first bought it. Now for the first time, the ipod is NOT SHOWING UP IN iTUNE

  • Central 5.4 stops printing, a reboot of the server is the only way to fix the problem

    Hi, We are running central 5.4 on windows 2000 SP4, this has worked for ages but has just started with an intermittent fault.  When we send some output it suddenly stops printing, and no forms sent to central will be printed, the only way to get them

  • CPUZ REPORTING FULL SPEED ALL THE TIME, help ?

    I have cpuz 1.52.2, its constantly reporting that my cpu is running at full speed, it didnt used to be like this, and ive not even been doing anything at all in the bios for months, so i know its not the bios to blame. I have a dual boot system, with

  • Using a MacBook as 2nd monitor for iMac?

    Hi. Got a shiny new 20" iMac with the 256MB graphics. I understand this unit can drive an external display without too much stress via the mini-DVI out. Question is, since the household is getting a Macbook soon anyways, and I'll only occasionally ne