Need help in bdc its urgent

hai friends
my reequirement is extracting data from 4.6 c for  purchase order me21 into flat file format.(tab delimitter) .currently we are working on ecc 6 version.i had already written bdc code for me21 in ecc6 version for uploading data.
please help me its urgent.
give any sample code for writing extract program

Hi Friend,
if it help full to u please give me max point.i am sending code.
REPORT ZMXX0295 LINE-SIZE 132 NO STANDARD PAGE HEADING.
+
Comparisom of PIR or Contract price with latest PO price
+
This program was created to compare PIR prices or contract prices
with the latest PO price.
It reads the source lists for the specified materials to determine
the PIR or contract prices. Afterwards it reads the PO history to
get the purchase order prices.
The material to be processed can either be selected from the data
base (material master) or via an PC upload file.
The output can be sorted in different variants.
+
+
*eject
Definition of database tables --------------------------------------+
TABLES: EINA,                     "Purchasing Info Record: General Data
        EINE,                     "PIR: Purchasing Organization Data
        EIPA,                     "Order Price History, Info Record
        EKAB,                     "Contract Release Documentation
        *EKKO,                    "Contract / PO header
        EKKO,                     "Contract / PO header
        *EKPO,                    "Contract / PO item
        EKPO,                     "Contract / PO item
        EORD,                     "Source list
        TCURC.                    "Currency codes
*eject
Definition of internal tables / data -------------------------------+
DATA: BEGIN OF MAT_PRICE OCCURS 0,
        VRTYP LIKE EORD-VRTYP,                   "Document type
        INFNR LIKE EINE-INFNR,                   "Info record / Contract
        MATNR LIKE EINA-MATNR,                   "Material
        WERKS LIKE EINE-WERKS,                   "Plant
        EKORG LIKE EINE-EKORG,                   "Purch. organization
        LIFNR LIKE EINA-LIFNR,                   "Vendor
        FLIFN LIKE EORD-FLIFN,                   "Fix Vendor
        IRPRS LIKE EINE-NETPR,                   "Info record price
        PEINH LIKE EINE-PEINH,                   "Price unit
        EBELN LIKE EIPA-EBELN,                   "PO header
        EBELP LIKE EIPA-EBELP,                   "PO item
        BEDAT LIKE EIPA-BEDAT,                   "PO date
        POPRS LIKE EIPA-LPREI,                   "PO price
        LPEIN LIKE EIPA-LPEIN,                   "Price unit
        MENGE LIKE EKPO-MENGE,                   "PO quantity
        MEINS LIKE EKPO-MEINS,                   "PO unit of measure
      END OF MAT_PRICE.
DATA: BEGIN OF MAT_SEL OCCURS 0,
        MATNR LIKE EINA-MATNR,
      END OF MAT_SEL.
DATA: T_EORD LIKE EORD OCCURS 0 WITH HEADER LINE.
DATA: CURSORFIELD(15),                           "Fieldname of Cusor pos
      INV_DATE LIKE SY-DATUM,                    "Inverted date
      W_EFFPR  LIKE EINE-EFFPR.                  "Hiwi price
DATA: W_FILE TYPE STRING.                        "JAN29NOV05
CONSTANTS: C_0(01)    TYPE C VALUE '0',
           C_F(01)    TYPE C VALUE 'F',
           C_I(01)    TYPE C VALUE 'I',
           C_K(01)    TYPE C VALUE 'K',
           C_X(01)    TYPE C VALUE 'X'.
CONSTANTS: C_ASC(10) TYPE C VALUE 'ASC'.           "JAN29NOV05
*eject
Definition of selection screen -------------------------------------+
SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-B01.
PARAMETERS:     P_DBASE RADIOBUTTON GROUP R01.   "Read mat's via select.
SELECT-OPTIONS: S_MATNR FOR EINA-MATNR.          "Material
SELECTION-SCREEN ULINE.
PARAMETERS:     P_XFILE RADIOBUTTON GROUP R01,   "Read mat's via PC file
                P_DATEI LIKE RLGRAP-FILENAME.    "PC file with MATNR's
SELECTION-SCREEN SKIP.
SELECT-OPTIONS: S_MATKL FOR  EINA-MATKL,         "Material group
                S_WERKS FOR  EINE-WERKS,         "Plant
                S_EKORG FOR  EINE-EKORG,         "Purch. organization
                S_BEDAT FOR  EIPA-BEDAT.         "PO price date
PARAMETERS:     P_WAERS LIKE EINE-WAERS          "Output currency
                        OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B01.
*eject
Process after input ------------------------------------------------+
AT SELECTION-SCREEN ON P_WAERS.
  PERFORM READ_TCURC.
AT SELECTION-SCREEN ON P_DATEI.
  IF NOT P_XFILE IS INITIAL
     AND P_DATEI IS INITIAL.
    MESSAGE E999(ZZ) WITH 'Please sepcify PC file name'.
  ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DATEI.
  PERFORM CALL_WS_EXPLORER.
*eject
Start of main program ----------------------------------------------+
START-OF-SELECTION.
   IF NOT P_XFILE IS INITIAL.
     PERFORM UPLOAD_MATERIAL_SELECTION.          "Read mat's from file
     IF MAT_SEL[] IS INITIAL.
       MESSAGE E999(ZZ) WITH
              'No records were found in file'(E01) P_DATEI(40).
     ELSE.
       PERFORM GET_MATERIAL_SELECTION.           "Process upload file
     ENDIF.
   ENDIF.
   PERFORM SOME_REWORK.
   PERFORM PROCESS_MATERIALS.                    "Process mat. selection
END-OF-SELECTION.
End of Main program ------------------------------------------------+
  SET PF-STATUS 'LIST'.
  SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
  PERFORM AUSGABE.
  IF SY-SUBRC EQ 0.
    MESSAGE I999(ZZ) WITH TEXT-002.
    MESSAGE S999(ZZ) WITH TEXT-001
            'Material/Plant/PurchOrg/PO Price'(003).
  ENDIF.
*eject
User commands - interactive reporting ...
  AT USER-COMMAND.
    IF SY-UCOMM EQ 'ORDR'.
      PERFORM DISPLAY_ORDER.
    ENDIF.
  AT LINE-SELECTION.
    PERFORM CHANGE_SORT_SEQUENCE.
*eject
+
      TOP-OF-PAGE
+
TOP-OF-PAGE.
  PERFORM LIST_HEADER.
*eject
+
      TOP-OF-PAGE during line-selection.
+
TOP-OF-PAGE DURING LINE-SELECTION.
  PERFORM LIST_HEADER.
*eject
      Form  CALL_WS_EXPLORER
FORM CALL_WS_EXPLORER.
  CALL FUNCTION 'WS_FILENAME_GET'
     EXPORTING
        DEF_FILENAME     = '*.txt,'  "JAN29NOV05
          DEF_FILENAME     = '*.txt'   "JAN29NOV05
          DEF_PATH         = 'D:\'
          MASK             =
              Block Changed From Here JAN29NOV05
              'Text files,.txt,Data files,.dat,All files,.,.'(MSK)
                ' Text files,.txt,Data files,.dat,All files,.,.'(MSK)
              Block Changed Till Here JAN29NOV05
          MODE             = 'O'
          TITLE            = 'Upload Materials to be processed'(004)
     IMPORTING
          FILENAME         = P_DATEI
     EXCEPTIONS
          INV_WINSYS       = 1
          NO_BATCH         = 2
          SELECTION_CANCEL = 3
          SELECTION_ERROR  = 4.
ENDFORM.                    " CALL_WS_EXPLORER
*eject
      Form  PROCESS_MATERIALS
      Read source list for specified materials and then process
      either PIR or contracts.
FORM PROCESS_MATERIALS.
  PERFORM READ_MATERIAL_SOURCE_LIST.
  LOOP AT T_EORD.
    CLEAR W_EFFPR.
    TRANSLATE T_EORD-VRTYP USING ' I'.           "Set I = Infor record
    IF T_EORD-VRTYP EQ C_I.
      PERFORM GET_PIR_INFORMATION.
    ELSE.
      T_EORD-FLIFN = T_EORD-FEBEL.
      PERFORM GET_CONTRACT_INFORMATION.
    ENDIF.
  ENDLOOP.
ENDFORM.                    " PROCESS_MATERIALS
*eject
      Form  GET_MATERIAL_SELECTION
FORM GET_MATERIAL_SELECTION.
  SORT MAT_SEL.
  CLEAR S_MATNR.
  S_MATNR-OPTION = 'EQ'.
  S_MATNR-SIGN   = 'I'.
  LOOP AT MAT_SEL WHERE
       MATNR CO ' 0123456789'.
    SHIFT MAT_SEL-MATNR RIGHT DELETING TRAILING ' '.
    TRANSLATE MAT_SEL-MATNR USING ' 0'.
    S_MATNR-LOW = MAT_SEL-MATNR.
    APPEND S_MATNR.
  ENDLOOP.
ENDFORM.                    " GET_MATERIAL_SELECTION
      Form  READ_EIPA
FORM READ_EIPA.
  SELECT EBELN EBELP BEDAT
         INTO CORRESPONDING FIELDS OF EIPA
         FROM EIPA
         UP TO 1 ROWS
         WHERE INFNR EQ EINA-INFNR
         AND   WERKS EQ T_EORD-WERKS
         AND   EKORG EQ T_EORD-EKORG
         AND   BEDAT IN S_BEDAT
         ORDER BY BEDAT DESCENDING.
    PERFORM READ_ADDITIONAL_PO_DATA
            USING EIPA-EBELN EIPA-EBELP.
    CHECK SY-SUBRC EQ 0.
    PERFORM FILL_MAT_PRICE USING 'X' EINA-INFNR
            EINE-EFFPR EINE-PEINH EINE-WAERS.
    APPEND MAT_PRICE.
  ENDSELECT.
ENDFORM.                    " READ_EIPA
*eject
      Form  FILL_MAT_PRICE
FORM FILL_MAT_PRICE USING
*ID X_EBELN X_EFFPR X_PEINH X_WAERS                  "JAN29NOV05
   Block added from here JAN29NOV05
                           ID      TYPE C
                           X_EBELN TYPE C
                           X_EFFPR TYPE EINE-EFFPR
                           X_PEINH TYPE EINE-PEINH
                           X_WAERS TYPE EINE-WAERS.
   Block added till here JAN29NOV05
  CLEAR MAT_PRICE.
  IF X_WAERS NE P_WAERS.
    PERFORM CONVERT_TO_OTHER_CURRENCY USING
            X_EFFPR X_WAERS P_WAERS.
  ENDIF.
  MAT_PRICE-VRTYP = T_EORD-VRTYP.                "PIR / Contract no.
  MAT_PRICE-INFNR = X_EBELN.                     "PIR / Contract no.
  MAT_PRICE-MATNR = T_EORD-MATNR.                "Material
  MAT_PRICE-LIFNR = T_EORD-LIFNR.                "Vendor
  MAT_PRICE-FLIFN = T_EORD-FLIFN.                "Fix Vendor
  MAT_PRICE-WERKS = T_EORD-WERKS.                "Plant
  MAT_PRICE-EKORG = T_EORD-EKORG.                "Purch. organization
  MAT_PRICE-IRPRS = X_EFFPR.                     "PIR / Contract price
  MAT_PRICE-PEINH = X_PEINH.                     "PIR / Contract pr.unit
  CHECK ID NE SPACE.                             "PO history found ?
latest PO data ...
  IF EKKO-WAERS NE P_WAERS.
    PERFORM CONVERT_TO_OTHER_CURRENCY USING
            EKPO-EFFWR EKKO-WAERS P_WAERS.
  ENDIF.
  MAT_PRICE-EBELN = EKPO-EBELN.                  "PO number
  MAT_PRICE-EBELP = EKPO-EBELP.                  "PO item
  MAT_PRICE-BEDAT = EKKO-BEDAT.                  "PO date
  IF EKPO-MENGE NE 0.
    MAT_PRICE-POPRS = EKPO-EFFWR / ( EKPO-MENGE  "Last PO price = value
EKPO-BPUMZ / EKPO-BPUMN ). " / Qty. in sales unit
  ELSE.
    MAT_PRICE-POPRS = EKPO-EFFWR.                "Last PO value
  ENDIF.                                         "PO price unit
  MAT_PRICE-LPEIN = EKPO-PEINH.                  "PO price unit
  MAT_PRICE-MENGE = EKPO-MENGE.                  "PO quantity
  MAT_PRICE-MEINS = EKPO-MEINS.                  "PO unit of measure
ENDFORM.                    " FILL_MAT_PRICE
*eject
      Form  CONVERT_TO_OTHER_CURRENCY
FORM CONVERT_TO_OTHER_CURRENCY USING
                       XVALUE FR_CURR TO_CURR.     "JAN29NOV05
   Block added from here JAN29NOV05
                           XVALUE  TYPE ANY
                           FR_CURR TYPE EKKO-WAERS
                           TO_CURR TYPE EINE-WAERS.
   Block added till here JAN29NOV05
  CALL FUNCTION 'MS_CONVERT_TO_OTHER_CURRENCY'
       EXPORTING
            DATE             = SY-DATUM
            FROM_CURRENCY    = FR_CURR
            FROM_AMOUNT      = XVALUE
            TO_CURRENCY      = TO_CURR
            COMPANY_CURRENCY = 'EUR'
       IMPORTING
            TO_AMOUNT        = XVALUE
       EXCEPTIONS
            OTHERS           = 1.
  IF SY-SUBRC NE 0.
    MESSAGE E999(ZZ) WITH 'Currency conversion error from'(E02)
                          FR_CURR 'to' TO_CURR.
  ENDIF.
ENDFORM.                    " CONVERT_TO_OTHER_CURRENCY
*eject
      Form  UPLOAD_MATERIAL_SELECTION
FORM UPLOAD_MATERIAL_SELECTION.
   Block commented from here JAN29NOV05
CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
           FILENAME            = P_DATEI
           FILETYPE            = 'DAT'
      TABLES
           DATA_TAB            = MAT_SEL
      EXCEPTIONS
           CONVERSION_ERROR    = 1
           FILE_OPEN_ERROR     = 2
           FILE_READ_ERROR     = 3
           INVALID_TABLE_WIDTH = 4
           INVALID_TYPE        = 5
           NO_BATCH            = 6
           UNKNOWN_ERROR       = 7
           OTHERS              = 8.
   Block commented till here JAN29NOV05
   Block added from here JAN29NOV05
  MOVE P_DATEI TO W_FILE.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
   FILENAME                      =  W_FILE
   FILETYPE                      =  C_ASC
   HAS_FIELD_SEPARATOR           =  C_X
  TABLES
    DATA_TAB                     = MAT_SEL
EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17.
   Block added till here JAN29NOV05
  IF SY-SUBRC NE 0.
    MESSAGE E999(ZZ) WITH 'Error uploading from file'
                     P_DATEI(40).
  ENDIF.
ENDFORM.                    " UPLOAD_MATERIAL_SELECTION
*eject
      Form  AUSGABE
FORM AUSGABE.
  LOOP AT MAT_PRICE.
    FORMAT COLOR 1 INTENSIFIED OFF.
    WRITE: /01 MAT_PRICE-VRTYP,                  "Document type
            03 MAT_PRICE-INFNR,                  "Info record / Contract
            14 MAT_PRICE-MATNR,                  "Material
            23 MAT_PRICE-WERKS,                  "Plant
            28 MAT_PRICE-EKORG,                  "Purch. organization
            33 MAT_PRICE-LIFNR,                  "Vendor
            44 MAT_PRICE-FLIFN,                  "Fixed Vendor
            46 MAT_PRICE-IRPRS NO-SIGN,          "Info record price
            61 MAT_PRICE-PEINH NO-SIGN.          "IR price unit
    FORMAT COLOR 2 INTENSIFIED.
    IF NOT MAT_PRICE-EBELN IS INITIAL.
      WRITE:  68 MAT_PRICE-POPRS NO-SIGN,        "PO price
              83 MAT_PRICE-LPEIN NO-SIGN,        "PO price unit
              90 MAT_PRICE-MENGE,                "PO quantity
             107 MAT_PRICE-MEINS,                "PO unit of measure
             111 MAT_PRICE-EBELN,                "PO number
             123 MAT_PRICE-BEDAT.                "PO date
    ELSE.
      WRITE:  74 'No PO price was found'(005),
             132 ' '.
    ENDIF.
    HIDE MAT_PRICE-VRTYP.
    AT END OF MATNR.
      SKIP.
    ENDAT.
  ENDLOOP.
  CLEAR MAT_PRICE.
ENDFORM.                    " AUSGABE
*eject
      Form  READ_TCURC
FORM READ_TCURC.
  CLEAR TCURC.
  TCURC-WAERS = P_WAERS.
  READ TABLE TCURC.
  IF SY-SUBRC NE 0.
    MESSAGE E999(ZZ) WITH P_WAERS 'Currency code invalid'(E03).
  ENDIF.
ENDFORM.                    " READ_TCURC
*eject
      Form  LIST_HEADER
FORM LIST_HEADER.
  FORMAT INTENSIFIED.
  WRITE: /01 'Output currency'(006), 25 ': ', P_WAERS,
         122 'Page'(007), SY-PAGNO,
         /01 'Plant'(008), 25 ':  from '(009), S_WERKS-LOW,
          46 'to '(010), S_WERKS-HIGH,
         /01 'Purchasing Organization'(011),
          25 ':  from '(009), S_EKORG-LOW,
          46 'to '(010), S_EKORG-HIGH,
         /01 'PO date'(012), 25 ':  from '(009), S_BEDAT-LOW,
          46 'to '(010), S_BEDAT-HIGH.
  ULINE.
  FORMAT COLOR 1.
  WRITE: /01 TEXT-T01.
  ULINE.
ENDFORM.                    " LIST_HEADER
*eject
      Form  CHANGE_SORT_SEQUENCE
FORM CHANGE_SORT_SEQUENCE.
  GET CURSOR FIELD CURSORFIELD.
  CASE CURSORFIELD+10(5).
    WHEN 'EKORG'.
      SORT MAT_PRICE BY MATNR EKORG POPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/Purch.Organization/Info Rec.Price'(013).
    WHEN 'BEDAT'.
      SORT MAT_PRICE BY MATNR BEDAT POPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/PO Date/Info Rec.Price'(014).
    WHEN 'IRPRS'.
      SORT MAT_PRICE BY MATNR IRPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/Plant/Info Rec.Price'(015).
    WHEN 'POPRS'.
      SORT MAT_PRICE BY MATNR POPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/Plant/PO Price'(016).
    WHEN 'LIFNR'.
      SORT MAT_PRICE BY MATNR LIFNR POPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/Vendor/PO Price'(017).
    WHEN OTHERS.
      SORT MAT_PRICE BY MATNR WERKS EKORG POPRS.
      PERFORM AUSGABE.
      MESSAGE S999(ZZ) WITH TEXT-001
              'Material/Plant/PurchOrg/PO Price'(018).
  ENDCASE.
  SY-LSIND = 0.
ENDFORM.                    " CHANGE_SORT_SEQUENCE
*eject
      Form  DISPLAY_ORDER
FORM DISPLAY_ORDER.
  DATA: X_BELNR(10) TYPE C.
  CLEAR CURSORFIELD.
  GET CURSOR FIELD CURSORFIELD.
  IF CURSORFIELD+10(5) NE 'EBELN' AND
     CURSORFIELD+10(5) NE 'INFNR'.
    MESSAGE I999(ZZ) WITH 'Invalid cursor position'.
    EXIT.
  ENDIF.
  GET CURSOR FIELD CURSORFIELD  VALUE X_BELNR.
  CASE CURSORFIELD+10(5).
    WHEN 'EBELN'.                                "Purchase order
      SET PARAMETER ID 'BES' FIELD X_BELNR.
      CALL TRANSACTION 'ME23' AND SKIP FIRST SCREEN.
    WHEN 'INFNR'.                                "Info rec. / Contract
      IF MAT_PRICE-VRTYP EQ C_I.                 "Info Record ...
        SET PARAMETER ID 'INF' FIELD X_BELNR.
        CALL TRANSACTION 'ME13' AND SKIP FIRST SCREEN.
      ELSE.                                      "Contract ...
        SET PARAMETER ID 'VRT' FIELD X_BELNR.
        CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
      ENDIF.
  ENDCASE.
  CLEAR MAT_PRICE.
ENDFORM.
*eject
      Form  SOME_REWORK
FORM SOME_REWORK.
   IF NOT S_BEDAT-LOW IS INITIAL AND             "Align date for output
      S_BEDAT-HIGH IS INITIAL.
     S_BEDAT-HIGH = S_BEDAT-LOW.
     MODIFY S_BEDAT INDEX 1.
   ENDIF.
   CONVERT DATE SY-DATUM INTO INVERTED-DATE      "today's inverted date
           INV_DATE.
ENDFORM.                    " SOME_REWORK
*eject
      Form  READ_ADDITIONAL_PO_DATA
FORM READ_ADDITIONAL_PO_DATA USING
                              X_EBELN X_EBELP.  "JAN29NOV05
   Block added from here JAN29NOV05
                                X_EBELN TYPE EIPA-EBELN
                                X_EBELP TYPE EIPA-EBELP.
   Block added till here JAN29NOV05
  SELECT SINGLE WAERS BEDAT
         INTO CORRESPONDING FIELDS OF EKKO
         FROM EKKO
         WHERE EBELN EQ X_EBELN.
  SELECT SINGLE EBELN EBELP MENGE MEINS
                PEINH EFFWR BPUMZ BPUMN
         INTO CORRESPONDING FIELDS OF EKPO
         FROM EKPO
         WHERE EBELN EQ X_EBELN
         AND   EBELP EQ X_EBELP
         AND   LOEKZ NE 'L'.
ENDFORM.                    " READ_ADDITIONAL_PO_DATA
*eject
      Form  READ_MATERIAL_SOURCE_LIST
      Read source list entries for specified materials
FORM READ_MATERIAL_SOURCE_LIST.
  SELECT * INTO CORRESPONDING FIELDS OF TABLE T_EORD
         FROM EORD
         WHERE MATNR IN S_MATNR
         AND   WERKS IN S_WERKS
         AND   EKORG IN S_EKORG
         AND   VDATU LE SY-DATUM
         AND   BDATU GE SY-DATUM
         AND ( VRTYP EQ SPACE
         OR    VRTYP EQ C_K ).
  IF SY-SUBRC NE 0 OR
     T_EORD[] IS INITIAL.
    MESSAGE S999(ZZ) WITH 'No data found for this selection'(S01).
  ENDIF.
ENDFORM.                    " READ_MATERIAL_SOURCE_LIST
*eject
      Form  GET_PIR_INFORMATION
      Process purchase info records --> purchase order history
FORM GET_PIR_INFORMATION.
  SELECT INFNR
         INTO EINA-INFNR
         FROM EINA
         WHERE LIFNR EQ T_EORD-LIFNR
         AND   MATNR EQ T_EORD-MATNR
         AND   MATKL IN S_MATKL
         AND   LOEKZ EQ SPACE.
    SELECT SINGLE EFFPR PEINH WAERS
           INTO CORRESPONDING FIELDS OF EINE
           FROM EINE
           WHERE INFNR EQ EINA-INFNR
           AND   EKORG EQ T_EORD-EKORG
           AND   ESOKZ EQ C_0
           AND   WERKS EQ T_EORD-WERKS
           AND   LOEKZ EQ SPACE.
    CHECK SY-SUBRC EQ 0.
    PERFORM READ_EIPA.                           "Read PO history
    IF SY-SUBRC NE 0.
      PERFORM FILL_MAT_PRICE USING ' ' EINA-INFNR
              EINE-EFFPR EINE-PEINH EINE-WAERS.
      APPEND MAT_PRICE.
    ENDIF.
  ENDSELECT.
ENDFORM.                    " GET_PIR_INFORMATION
*eject
      Form  GET_CONTRACT_INFORMATION
      text
FORM GET_CONTRACT_INFORMATION.
  SELECT SINGLE WAERS
         INTO *EKKO-WAERS
         FROM EKKO
         WHERE EBELN EQ T_EORD-EBELN
         AND   LOEKZ EQ SPACE.
  SELECT SINGLE EBELN EBELP EFFWR PEINH
                KTMNG BPUMZ BPUMN
         INTO CORRESPONDING FIELDS OF *EKPO
         FROM EKPO
         WHERE EBELN EQ T_EORD-EBELN
         AND   EBELP EQ T_EORD-EBELP
         AND   LOEKZ EQ SPACE.
  CHECK SY-SUBRC EQ 0.
Get effective price in sales unit ...
  IF *EKPO-KTMNG EQ 0 OR
     *EKPO-BPUMN EQ 0.
    W_EFFPR = *EKPO-EFFWR.
  ELSE.
    W_EFFPR = *EKPO-EFFWR / *EKPO-KTMNG
*EKPO-BPUMZ / *EKPO-BPUMN.
  ENDIF.
  PERFORM READ_EKAB.
  IF SY-SUBRC NE 0.
    PERFORM FILL_MAT_PRICE USING ' ' *EKPO-EBELN
            W_EFFPR *EKPO-PEINH *EKKO-WAERS.
    APPEND MAT_PRICE.
  ENDIF.
ENDFORM.                    " GET_CONTRACT_INFORMATION
*eject
      Form  READ_EKAB
      Read released document (PO's) of contract
FORM READ_EKAB.
  SELECT EBELN EBELP BEDAT
         INTO CORRESPONDING FIELDS OF EKAB
         FROM EKAB
         UP TO 1 ROWS
         WHERE KONNR EQ T_EORD-EBELN
         AND   KTPNR EQ T_EORD-EBELP
         AND   WERKS EQ T_EORD-WERKS
         AND   EKORG EQ T_EORD-EKORG
         AND   BEDAT IN S_BEDAT
         AND   BSTYP EQ C_F
         ORDER BY BEDAT DESCENDING.
    PERFORM READ_ADDITIONAL_PO_DATA
            USING EKAB-EBELN EKAB-EBELP.
    CHECK SY-SUBRC EQ 0.
    PERFORM FILL_MAT_PRICE USING 'X' T_EORD-EBELN
            W_EFFPR *EKPO-PEINH *EKKO-WAERS.
    APPEND MAT_PRICE.
  ENDSELECT.
ENDFORM.                    " READ_EKAB

Similar Messages

  • Need help in conversion(its urgent)

    hi,
    have any one tried the BPEL for the conversion process? if so pls let me know immediately.

    hi,
    thanks Marcelo, the information provided will be in the form of flat file. we do use file adapter, db Adapte,OA adapter.
    can you pls tell me what are the ways you hae used for the instances.
    the validations are done thru pl/sql procedures. we do call those procedures for pushing it into interface table and also call the concurrent procedures.
    the information means- the data given or the business rules?
    after this the info will be saved in a oracle database.
    what we want is to handle the errors which are thrown when the process been deployed. its hard to find the error like,(ORA-01401-Insert value to large for column..) and even we cant handle oracle thrown errors. frankly speaking pls tell me about handling all possible exceptions(oracle, apps,bpel-both compilation and deployment).
    if possible could you pls give me your contact information.sorry for asking so, since the timeline for us is very short, we have only a week time more.
    lots of thanks for your immediate reply.
    thanks,
    sneha

  • Error in opening a file .......... plz help ... its urgent

    here is the code
         filename := '/dev60temp/asif.csv';     
         csv_file :=     TEXT_IO.FOPEN(filename,'a');
    when i try to create file using this code, it gives error as
    soon as fopen is called. /dev60temp/ is virtual path which is
    mapped to a folder on my localmachine.
    Plz oracle team help ... its really urgent.

    if u want to open the file from the server u have to use
    utl_file package, the text_io is used only for client side
    files.for that it's not necessary to give out the virtual path.

  • Need help with XML delay   URGENT!!!

    Hi i need help making a flash movie to load everything from
    xml. It has to load text, images and flv, but, it has to load them
    and end them at the time said in the xml. So flash loads and
    unloade the text or image or video at the time specified in the
    XML! PLEASE HELP I NEED THIS DONE TODAY!!!!! VERY IMPORTANT!!!
    Contact me by msn [email protected] or send mail or
    reply here!!

    It was probably a little unclear initially (no offence
    intended ) whether your problem was with getting the data from XML
    or with the sequencing aspect. I assume that its the sequencing
    aspect based on your recent reply.
    So if it was me I would parse the loaded info into Date
    objects for the load and remove times and have this information
    handled by some sort of sequencing code.
    At its simplest, you could compare the xml-derived date/times
    for load/unload with the current system date/time and use a
    setInterval function to initiate the load after the calculated
    difference in milliseconds has passed. Similar for the removeclip
    timing.

  • Need help in date Validation Urgent

    Hi ,
    We need help in Date Validation.
    we have 2 Date fields on the form Start Date, End Date
    The requirement is: End Date (May not be greater than 30 years from the start date).
    I have written following script on End Date Exit event. But the problem is its calculating 30 years from the Current Date not from the Start Date
    var tDate = util.scand("mm/dd/yyyy", new Date());
    var M = tDate.getMonth();
    var D = tDate.getDate();
    var Y = tDate.getFullYear();
    var SRes = util.printd("yyyy-mm-dd", new Date((Y+30), M,D) );
    //app.alert(SRes)if (SRes <= this.rawValue){
    app.alert("May not be greater than 30 years from the start date")
    xfa.host.setFocus(
    this);}
    can someone please help me
    Regards,
    Jay

    Hi,
    You'll need to get javascript date from LCD field, and calculate & compare with the future date in javascript date.
    try following script;
    var sDate = StartDate.rawValue;
    var wkStartDate = util.scand("yyyy-mm-dd", sDate);
    var nYear = wkStartDate.getFullYear();
    var nMonth = wkStartDate.getMonth();
    var nDay = wkStartDate.getDate();
    var wkFutureDate = new Date(nYear  + 30 , nMonth, nDay);
    sDate = EndDate.rawValue;
    var wkEndDate = util.scand("yyyy-mm-dd", sDate);
    if (wkEndDate.getTime() > wkFutureDate.getTime()){
      xfa.host.messageBox("May not be greater than 30 years from the start date");
      xfa.host.setFocus(this);

  • I have lost my files i need help i am in urgent

    hai singsk i have lost all files from my memory card in my nokia asha 311 pls help me how i can recover all files in my memory card i need help pls i am in urgent.is any one know how to solve this problem help me 
    Solved!
    Go to Solution.

    Data recovery software might be able to recover .jpeg for you, but outside remit of this manufacturer's sponsored forum really.
    Happy to have helped forum in a small way with a Support Ratio = 37.0

  • Need a  some1 to help or say need a freelancer and its urgent

    well hello every one.....I have recently joined the company here in saudi n during the interview i was told that i would be trained in oracle 6i forms and report but after joining i was told that u have to learn on ur own n now they are do the learning thing in ur home and implement the project here.....dont know where these managers come from...they got no sense at all.......So i wanna outsource this project ..its basically creating an inventory sheet for the canle reapir process....n i guesss it shud take not more than 15-20 days....
    So i would like to know is thr any1 or any free lancer over here who is ready to help me out.....i am ready to negotiate the amount.....

    Too many alternatives.... , for example:
    http://www.odesk.com/users/PLSQL-Oracle-Forms-Reports-Developer_~~a564c00993bc423a
    http://jobs.trovit.co.uk/jobs/freelance-oracle
    http://www.getafreelancer.com/projects/SQL/Oracle-Forms-Developer.html
    good luck,
    Sim

  • Need help in Idoc--very urgent.

    Hi guys,
    i am working on an object where i need to post the data from legacy system to F-27 transaction using Idoc.i hv found two idocs input_idoc_fidcc1 and input_idoc_fidcc2 for posting the data..
    Can anyone help in finding the right idoc for triggering the f-27 transaction with the reason...
    coz both are perfoming almost the same functionalities...
    its very urgent guys..
    kindly help me full marks wud be given...
    regards
    Sahil

    Hi,
    The function module is related to post the idoc type FIDCPP01
    and posts the complete FI document. and as coming to second function module along with Tax you can post item wise with holding tax dataalso. So you choose the required function module based on the data you need to post. If you need not post with holding tax details dont fo for second function modules.
    Reward if find useful

  • Compatability Issue: Need Help Disabling Additional Functions - URGENT!

    I am experiencing a problem with running Pro Tools 8.0.4 LE on my HP Pavilion dv7, which is encountered as a DAE error -6006 when loading Pro Tools. Research indicates that this error relates somehow to the firewire connection, and I am able to use Pro Tools on this system with a different interface (one that only has two microphone inputs) that allows me to connect via USB.
    Also, when I do run Pro Tools via USB it seems that I can't use the Quick Punch feature without a minimum 10 second (usually a lot longer) delayed response after pressing the playback or record button!
    I have been emailing Pro Tools support back and forth daily for 10 days now, and in the most recent email, they have said:
    "This might be an incompatibility issue. HP Pavilion dv7 laptop is not tested by our US headquarter testing team 
    and not officially supported.
    As you have found by yourself, each PC manufacture pre- installs their own features (as TV tuner) and the program into 
    Windows OS , the motherboard and BIOS. They work differently to Pro Tools and sometimes conflict. That is why we cannot support those PCs we have not tested.
    Please turn off all the additional function by HP from BIOS. Please ask HP support how to do."
    Therefore, I am requesting assistance with disabling all unnecessary services and processes on my HP laptop. I am assuming that the TV tuner is not a necessary service, but I have no idea about most of the others, and obviously I don't want to disable something that is necessary.
    If you could help me ASAP I would really appreciate it, as I need to get on with recording urgently! Thank you.
    This question was solved.
    View Solution.

    UPDATE:
    I have also been advised by Pro Tools support that if I add a supported FireWire card with Texas Instrument FireWire chip onto my computer, it may solve the problem. When I asked them how to go about doing this, they responded:
    "If your PC has Express Card slot, 
    http://avid.custkb.com/avid/app/selfservice/search.jsp?DocId=352647
    SIIG FireWire 2-Port ExpressCard
    is tested and supported FireWire card.
    Please ask HP about the spec of your computer."

  • Need help in BDC for FB01 transaction

    My requirement is like this,
    I have a selection screen in which I need to give file name in and have two radio buttons 1)test mode 2)Update mode
    u2022     On execution of the program in test mode a pop up screen should appear for user stating any errors in the line items.
    u2022     On execution of the program in the Update mode...a pop up screen should appear stating the documents numbers posted.
    u2022     On successful execution the system will open a new screen stating the document number which was generated. In case       of error the new screen should show the error and should not post  any items in that file.
    Could anybody help me in this. And which BDC method is best for this scenario.
    Regards
    Tom

    Hi
    The COMMIT before and after CALL TRANSACTION is useless, The transaction FB01 calls the commit by itself, so u need only:
    CALL TRANSACTION 'FB01' USING BDC_TAB
                                                   MODE 'N'
                                                   UPDATE 'S'
                                                   MESSAGE ITAB.
    Now ITAB is like structure BDCMSGCOLL, so after CALL Transaction u can use message statament in order to show a popup with message:
    CALL TRANSACTION 'FB01' USING BDC_TAB
                                                   MODE 'N'
                                                   UPDATE 'S'
                                                   MESSAGE ITAB.
    LOOP AT ITAB.
    MESSAGE ID ITAB-MSGID TYPE 'I' NUMBER ITAB-MSGNR
             WITH ITAB-MSGV1 ITAB-MSGV2 ITAB-MSGV3 ITAB-MSGV4.
    ENDLOOP.
    Max

  • Draw a rectangle..PLease Help !!Its Urgent

    Hi all
    I need to draw a rectangle on an image background.I caught hold of the graphics object of the image and tried to draw a rectangle but it doesnot seem to work
    Can anyone help me!!Please Its Urgent

    You didn't post any code so I have no idea what you're doing.
    Here is an example how to create an empty image and draw a black rectangle on it:
    BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
    Graphics g = image.createGraphics();
    g.setColor(Color.WHITE);
    g.fillRect(0, 0, image.getWidth(), image.getHeight());
    g.setColor(Color.BLACK);           
    g.drawRect(10, 10, 80, 80);

  • Need help in BDC for Customer master change

    I have an interface for Changing Customer master data and I am using BDC for that. I have three scenarios:
    1. Insert new data.
    2. Change the existing data.
    3. Delete the existing data.
    The BDC is working fine in the first two scenarios, but if i want to delete an the existing data, lets say for e.g. Name3 or Email Id its not working because i need to pass the value as blank in the BDC for this field.How would i check?  i thought i would first get the existing value in customer master and check if the interface value is blank then make this field value to blank in BDC.
    But this is not working because in case the  interface wants to remove only the email id, the other fields would still be blank.
    How to handle this scenario, please advice.

    What is the difference between 2 and 3? Isn't "deleting data" in your context the same as changing to a blank value?
    Why can you not just fill the value as received in the input data into the BDC data?
    Thomas

  • Need help to this request urgent plzz

    Hi i am new to coldfusion i had a form and in form we have two date fields like date1------------ to date2----------------  and i   need to make the second date field default to 7 calendar days from the first date field that was entered.The new date field needs to be non changale
    any help regarding this
    thanks.

    Thanks BKBK for ur help but i had problem with this
    because i had a componet that is used to select date ie datepicker so when i try to do this i am getting
    error , below is my code , would u please help me
    <cfform name="dateForm" id="dateForm">
    <table>
        <td width="440">
        <cfinput type="text"
                       name="avDateFrom"
                       message="Job Available Date missing - please reenter in the mm/dd/yyyy format."
                       validate="date"
                       required="Yes"
                       size="10" > <cf_calendar datefield="avDateFrom">
        <span id="label"> through </span>
        <cfinput type="Text"
                       name="avDateTo"
                       message="Position Available date is missing, please reenter in the mm/dd/yyyy format.  "
                       validate="date"                 
                       size="10" bind="javascript:addDays({dateForm:avDateFrom})" ><img align="absbottom" src="/media/701/calendar.gif" alt="date"/>
        </td>
    </table>
    </cfform>

  • Need Help Bank Account balances-Urgent

    Hi Masters,Can anyone help me to identify if we have any concurrent programme availaible (report) to obtain the daily opening and Closing balances for bank accounts for a SPECIFIED PERIOD
    I looked around but no luck..Even though I found a report in Cash management as 'Bank statement Summary Report' but in that the opening and closing balances are just Net Movements or say amont reconcilled and unreconcilled.My requirement is to have the opening and closing balances at a given point of time.
    It had been almost a week researching but no luck please HELP
    Message was edited by:
    A007

    Also I'll apprecaite if you can tell me which table stores the opening or closing balances if in case I need to develop a customised report for my requirement..
    Thanks
    A
    Still waiting as on Jan 16 2008..I blv it is very easy for you guys..pls respond
    Message was edited by:
    A007

  • Need help with page display URGENTLY!!!

    Hey,
    I'm trying to start up my new iPod nano. I've got the songs for it, but the page won't display all the way. Where it says the licence of agreement it won't show the o.k. button and before that it doesn't say the register button either. It doesn't do this on my internet. Or on anything else. So now I can't put anything on my iPod because I can't get it started up.
    Please help! I really need to put some songs on my new iPod!!!!
    Please and thank you.
    xKeegaNx

    Try increasing the resolution of your computer's screen (right-click on the desktop -> Properties - Settings; you want 1024x768 or higher) and perhaps then you'll be able to see all the buttons and controls in iTunes.

Maybe you are looking for

  • How can I organize home videos and photos in ipad

    I don't have a mac or pc, just the new ipad.  I'm planning to buy a camera card reader adapter so I can load my photos and videos directly from my camera card to my ipad.  But then how do I organize my home videos and photos in my ipad into albums? 

  • HT1918 How do I remove my credit card from my itunes account?

    I need to remove my credit card from my itunes account. My daughter doesn't realize when her gift cards run out so she keeps buying not realizing it comes out of my bank acct.

  • External firewire hard drive reverts to slower transfer speeds

    This is the strangest hardware problem I've come across. I'm running a unibody mbp (June 2009) with an external WD 2.0TB Caviar Green drive mounted in a firewire 800 enclosure made by icydock. Lately, I've noticed that after an unknown amount of upti

  • TS1372 when connecting my ipod nano to itunes, it states unknown error (2005) ? Thank you

    When I connect my ipod nano to itunes it shows an error, unknown (2005) and it my ipod doesn't appear. I have a shuffle and it recognises that fine. Has my nano given up or is there something I can do? Thank you for any help

  • Smartform Line printing

    Hi All,         I'm displaying smartform PO which contains line items and subline item. I'm using 3 line type 1. is header 2. for line item and 3. for subline item. i've made line item 2's upper line as bold . Here in output i'm getting line propoerl