Problem in BDC..its Urgent !!!

Hello everyone,
I'm working on  a BDC program for standard transaction CJ01 (Project Master creation).I need to create 3 WBS elements for each project. For creating a WBS, I have to double click on the node to create new WBS. Then the other screen appears where we have to enter the details for WBS. This event is captured in recording.
But during processing the session in foreground mode,  I need to manually double click on the node. The next screen doesn't get called automaticlly, even after entering the okcode. The error says, No batch input data for screen __ .
Can anybody please tell me the solution.
Its really urgent.
Thanks.

hi
good
go through th is link
http://help.sap.com/saphelp_40b/helpdata/es/81/e32c7dd435d1118b3f0060b03ca329/content.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/MYSAP/SR_PS.pdf
thanks
mrutyun^

Similar Messages

  • 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

  • Problem in SO01 (its urgent)

    Hi Experts
    One of my SAP user is not getting any message in SO01. She wants to get all the messages as one of her  colleague.
    How can I proceed ?
    Thanks in advance.
    Karuna

    Hi,
    I your col is having sap id , he shud get mesages w/o any setting..
    She shud just go to transaction SBWP to check her message..
    To test this just send a simple mail from your SAP inbox to her SAP id..
    and ask her to check iin SBWP if she received mail in her SAP inbox..
    Let us knw ur result.
    Enjoy SAP.
    Pankaj Singh

  • Process chain problem...., its urgent

    Hi all
    in my process chain we are loading 4 loads into ODS. After 3 loads, 4th load didn't take place. its not yet started even 3rd one successfully ran. its not showing error also. what can i do. after 4th one ODS activation process is there.
    Please advice me. will i go for manual loading. if i do manual, what abt activation after 4th load. will i do activation also manual or else it will trigger automatically as part of process chain........../
    Advice me frnds..., its urgent
    Regards
    swetha

    Hi Swetha,
    Sometimes, it doesn't help to just set a request to green status in order to run the process chain from that step on to the end.
    You need to set the failed request/step to green in the database as well as you need to raise the event that will force the process chain to run to the end from the next request/step on.
    Therefore you need to open the messages of a failed step by right clicking on it and selecting 'display messages'.
    In the opened popup click on the tab 'Chain'.
    In a parallel session goto transaction se16 for table rspcprocesslog and display the entries with the following selections:
    1. copy the variant from the popup to the variante of table rspcprocesslog
    2. copy the instance from the popup to the instance of table rspcprocesslog
    3. copy the start date from the popup to the batchdate of table rspcprocesslog
    Press F8 to display the entries of table rspcprocesslog.
    Now open another session and goto transaction se37. Enter RSPC_PROCESS_FINISH as the name of the function module and run the fm in test mode.
    Now copy the entries of table rspcprocesslog to the input parameters of the function module like described as follows:
    1. rspcprocesslog-log_id -> i_logid
    2. rspcprocesslog-type -> i_type
    3. rspcprocesslog-variante -> i_variant
    4. rspcprocesslog-instance -> i_instance
    5. enter 'G' for parameter i_state (sets the status to green).
    Now press F8 to run the fm.
    Now the actual process will be set to green and the following process in the chain will be started and the chain can run to the end.
    Of course you can also set the state of a specific step in the chain to any other possible value like 'R' = ended with errors, 'F' = finished, 'X' = cancelled ....
    Check out the value help on field rspcprocesslog-state in transaction se16 for the possible values.
    Try this solution with your 3rd ODS..hope this will solve your problem for this instance. This is just a workaround.
    Before next scheduel of the process chain..remove the link between 3rd ODS and 4th ODS and then reconnect once again and activate the process chain and schedule it as per your schedule cycle. From next upload onwards everything works fine.
    Assign points if it is helpful.
    Regards,
    Sreedhar

  • Hi All, How we can handle a table control in bdc - in detail its urgent pls

    Hi All, How we can handle a table control in bdc - in detail its urgent. Please send me the explanation in detail.
    Thanks&regards.
    Bharat

    hi,
    Create Table Control
    • Step 1 (Create new structure for table control)
    Type is name of structure (ZTC_EKKO) and press create
    • Step 2 (Create Program)
    Goto transaction SE80(Object Navigator) -> Repository Browser -> Program.
    Enter your program name, please ensure that is begins with SAPMZ…… as this is a module pool (dialog program).
    Press enter to create, and press yes!
    Ensure that you create a top include, and press Enter.
    Accept the name created for the top include.
    Press Enter.
    Press Save
    • Step 3 (Create TOP include)
    Double click on the top include and enter following ABAP code:
    Tables: ZTC_EKKO.
    controls: tc100 type tableview using screen 100.
    data: ok_code type sy-ucomm.
    data: it_ekko type standard
    table of ZTC_EKKO initial size 0,
    wa_ekko type ZTC_EKKO.
    data: ok_code type sy-ucomm.
    Press Save and Activate
    • Step 4 (Create screen)
    Right click the program to create a screen 100 for the dialog. Enter Short description, set screen type to Normal and enter 0 or blank into Next screen. Then move to Element List tab and enter the OK code as OK_CODE (i.e. the same as what you declared in the top include with data: ok_code type sy-ucomm).
    • Step 5 (Create table control)
    Press the Layout button to bring up the screen painter editor.
    Press table control button and drag it on to the screen, enter the name of table control created in TOP include (TC100). Now press the yellow button for attributes and set the table control as below options
    • Step 6 (Populate table control )
    Press the orange button (Fields). On the next screen enter ZTC_EKKO and press the ‘Get from Dict’ button. Select the fields you want (all) and press enter. Now drag them onto your Table Control.
    Below is the result, there will been syntax errors if we check now! So Save and go back into the flow logic tab.
    • Step 7 (Create flow control )
    Within the flow logic of screen 100 and create two modules, one to select the data from the database and the other to move the selected fields into the table control. Also insert the two loop statements to populate and retrieve the lines of the table control.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    module data_retrieval.
    loop at it_ekko into wa_ekko with control TC100.
    module populate_screen.
    endloop.
    PROCESS AFTER INPUT.
    loop at it_ekko.
    endloop.
    MODULE USER_COMMAND_0100.
    Double click the module data_retrieval to create and click yes to get past the popup. Ensure that a new include is created to hold all the PBO modules (default). Press enter.
    Select 10 rows of data from the EKKO table and load into the internal table it_ekko. Go back to the flow logic to load this data into the Table Control.
    check this one
    REPORT ZCALL_TRANS_TAB1 .
    TABLES: LFA1,LFBK,lfb1.
    data: BEGIN OF it_vendor occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    bukrs like lfb1-bukrs,
    END OF it_vendor.
    DATA: BEGIN OF IT_BANK occurs 0,
    LIFNR LIKE LFA1-LIFNR,
    BANKS LIKE LFBK-BANKS,
    BANKL LIKE LFBK-BANKL,
    BANKN LIKE LFBK-BANKN,
    koinh like lfbk-koinh,
    END OF IT_BANK.
    data: it_bdcdata like bdcdata occurs 0 with header line.
    data: it_messages like bdcmsgcoll occurs 0 with header line.
    *selection screen.
    selection-screen: begin of block b1 with frame.
    parameters: p_file like rlgrap-filename default 'c:/vendor.txt'
    obligatory.
    parameters: p_file1 like rlgrap-filename default 'c:/xyz.txt'
    obligatory.
    selection-screen: end of block b1.
    *at selection screen.
    at selection-screen on value-request for p_file.
    perform f4_help using p_file.
    at selection-screen on value-request for p_file1.
    perform f4_help1 using p_file1.
    *start of selection
    start-of-selection.
    *******uploading file
    perform upload_file using p_file P_FILE1.
    ******open session.
    perform populate_data.
    *& Form f4_help
    form f4_help using p_p_file.
    data: l_file type ibipparms-path.
    call function 'F4_FILENAME'
    importing
    file_name = l_file.
    p_file = l_file.
    endform. " f4_help
    *& Form POPULATE_DATA
    form populate_data .
    DATA: L_STRING TYPE STRing.
    DATA: L_COUNTER(2) TYPE n.
    loop at it_vendor.
    perform bdc_dynpro using 'SAPMF02K' '0106'.
    perform bdc_field using 'BDC_CURSOR'
    'RF02K-D0130'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'RF02K-LIFNR'
    it_vendor-lifnr.
    perform bdc_field using 'RF02K-BUKRS'
    it_vendor-bukrs.
    perform bdc_field using 'RF02K-D0130'
    'X'.
    perform bdc_dynpro using 'SAPMF02K' '0130'.
    perform bdc_field using 'BDC_CURSOR'
    'LFBK-bankn(03)'.
    perform bdc_field using 'BDC_OKCODE'
    '=UPDA'.
    *********bank details
    CLEAR l_COUNTER.
    LOOP AT IT_BANK WHERE LIFNR = IT_VENDOR-LIFNR.
    l_COUNTER = l_COUNTER + 1.
    clear l_string.
    CONCATENATE 'lfbk-banks(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-banks.
    clear l_string.
    CONCATENATE 'lfbk-bankl(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankl.
    clear l_string.
    CONCATENATE 'lfbk-bankn(' l_counter ')' into l_string.
    perform bdc_field using l_string
    it_bank-bankn.
    endloop.
    ******CALL TRANSACTION.
    call transaction 'FK02' using it_bdcdata mode 'A'
    messages into it_messages.
    write:/ sy-subrc.
    perform format_messages.
    clear it_bdcdata.
    refresh it_bdcdata.
    endloop.
    endform. " POPULATE_DATA
    *& Form FORMAT_MESSAGES
    form format_messages .
    data: l_msg(100).
    loop at it_messages.
    call function 'FORMAT_MESSAGE'
    exporting
    id = it_messages-msgid
    lang = sy-langu
    no = it_messages-msgnr
    v1 = it_messages-msgv1
    v2 = it_messages-msgv2
    v3 = it_messages-msgv3
    v4 = it_messages-msgv4
    importing
    msg = l_msg
    exceptions
    not_found = 1
    others = 2
    write:/ l_msg.
    endloop.
    endform. " FORMAT_MESSAGES
    *& Form bdc_dynpro
    form bdc_dynpro using value(p_program)
    value(p_screen).
    it_bdcdata-program = p_program.
    it_bdcdata-dynpro = p_screen.
    it_bdcdata-dynbegin = 'X'.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_dynpro
    *& Form bdc_field
    form bdc_field using value(p_fnam)
    value(p_fval).
    it_bdcdata-fnam = p_fnam.
    it_bdcdata-fval = p_fval.
    append it_bdcdata.
    clear it_bdcdata.
    endform. " bdc_field
    *& Form upload_file
    form upload_file using p_p_file
    p_p_file1.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_VENDOR
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    *******UPLOADING BANK DETAILS
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    CODEPAGE = ' '
    FILENAME = P_P_FILE1
    FILETYPE = 'DAT'
    HEADLEN = ' '
    LINE_EXIT = ' '
    TRUNCLEN = ' '
    USER_FORM = ' '
    USER_PROG = ' '
    DAT_D_FORMAT = ' '
    IMPORTING
    FILELENGTH =
    TABLES
    data_tab = IT_BANK
    EXCEPTIONS
    CONVERSION_ERROR = 1
    FILE_OPEN_ERROR = 2
    FILE_READ_ERROR = 3
    INVALID_TYPE = 4
    NO_BATCH = 5
    UNKNOWN_ERROR = 6
    INVALID_TABLE_WIDTH = 7
    GUI_REFUSE_FILETRANSFER = 8
    CUSTOMER_ERROR = 9
    NO_AUTHORITY = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE I000(ZZ) WITH 'UNABLE TO UPLOAD'.
    STOP.
    ENDIF.
    endform. " upload_file
    *& Form f4_help1
    -->P_P_FILE1 text
    form f4_help1 using p_p_file1.
    data:l_file1 type ibipparms-path.
    CALL FUNCTION 'F4_FILENAME'
    IMPORTING
    FILE_NAME = l_file1.
    p_file1 = l_file1.
    endform. " f4_help1
    http://sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    Regards,
    Sankar

  • Problem with connecting ipad 2 with crestron cp2e...help plss its urgent... I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while t

    problem with connecting ipad 2 with crestron cp2e...help plss its urgent...
    I hv a ipad 2 with mobile pro g connected with cp2e. when i pressed any button in ipad its connet with cp2e but after 4-5 sec one error comes (warning wifi was powered off while the device was in auto -lock(sleep)press connect to reconnect) when i pressed again its connected with cp2e. i am using netgear wireless access point . i also has been changed access point as well as updated ipad firmware bt problem is as it is .. pls help.

    Hi have you solved the issue ?
    Cause I have the same problem.
    Tnx

  • Problem in BDC Background

    Hi
    I am facing a problem in BDC ,call trasaction, for FB01
    While the recording is done, the confi has BSEG-DMBTR field (Local Currecny)
    and now its not there is the screen.
    If i run my BDC is foreground, it says Field does not exist as sucess message and then i press enter and it let me post the record.
    But in Background, its not letting me post the document.
    wether its because , in background if any screen elements is message , being a succes message, it doesnot post ?
    please help

    Hi Munish singh,
            Actually this  error because of currency field.
    1) declare the character variable equal to the dmbtr field output length. ex: data: v_dmbtr type c length 18.
    2) before passing to the screen field.
    3) move itab-dmbtr to v_dmbtr.
        condence v_dmbtr.
    4) And pass this v_dmbtr to the screen field ....
      then your issue positively will resolved.
    Dont forgot to Reward me points .....
    All the very best....
    Regards,
    Sreenivasa sarma K.

  • PLZ ITS URGENT!!!!!!!!!!

    hi i developed a smartforms......
    in it i am using 'SSF_OPEN' and 'SSF_CLOSE' functions to suppress the print preview box which was coming again n again.....
    firstly it was working properly bt i made some changes in my smartforms and then it started giving me the problem n giving the error after executing'Previous Output Request was not finished'...
    plz help me out how to solve this problem....
    PLZ ITS URGENT!!!!!!!!!!!!!!!!!
    plz tell me anyone...........
    Edited by: Pardeep Sharma on Dec 24, 2007 11:38 AM
    Edited by: Pardeep Sharma on Dec 24, 2007 11:57 AM
    Edited by: Pardeep Sharma on Dec 24, 2007 12:12 PM

    Hi,
    Is the requirement to supress the print preview or the dailog box containing the parameters for the print?
    Regards,
    Kk

  • Problem in bdc PROG

    Dear All,
                Iam facing the problem in BDC Program..the code is..
    LOOP AT IT_RECORD.
    perform bdc_dynpro      using 'SAPMF05A' '0300'.
    perform bdc_field       using 'BDC_CURSOR'  'RF05A-NEWKO'.
    perform bdc_field       using 'BDC_OKCODE'  '/00'.
    perform bdc_field       using 'BSEG-WRBTR'                IT_RECORD-vramt.  "'100000'.
    perform bdc_field       using 'RF05A-NEWBS'                          it_record-pkey.  "'50'.
    perform bdc_field       using 'RF05A-NEWKO'                          it_Record-vrac.  "'24450024'.
    perform bdc_field       using 'DKACB-FMORE'                          'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'  'COBL-GSBER'.
    perform bdc_field       using 'BDC_OKCODE'  '=ENTE'.
    perform bdc_field       using 'COBL-GSBER'                            it_record-gsber.  "'KABA' .
    COUNT = COUNT + 1.
    WRITE:/ COUNT.
    IF COUNT = 4.
      perform bdc_dynpro      using 'SAPMF05A' '0302'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'BSEG-GSBER'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'BSEG-WRBTR'                        IT_RECORD-VRAMT.   "'50000'.
      perform bdc_field       using 'BSEG-MWSKZ'                           '**'.
      perform bdc_field       using 'BSEG-GSBER'                        IT_RECORD-GSBER ."'kaba'.
      perform bdc_field       using 'BSEG-ZFBDT'                           '03.12.2007'.
      perform bdc_dynpro      using 'SAPMF05A' '0302'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'BSEG-WRBTR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BS'.
      perform bdc_field       using 'BSEG-WRBTR'                          IT_RECORD-VRAMT. "'50,000.00'.
      perform bdc_field       using 'BSEG-MWSKZ'
      perform bdc_field       using 'BSEG-BUPLA'                            '1800'.
      perform bdc_field       using 'BSEG-GSBER'                            IT_RECORD-GSBER."'KABA'.
      perform bdc_field       using 'BSEG-ZFBDT'                            '03.12.2007'.
      perform bdc_dynpro      using 'SAPMF05A' '0700'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'RF05A-NEWBS'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
    ELSE.
      CONTINUE.
    ENDIF.
    ENDLOOP.
    here iam using 4 line item(in text file) ..if count = 4 its not going to next screen, its repeating..its not simulating and posting the doc..
    pls guide me friends.

    hi i send the code here, if u can understand clear it..
    report ZBDC_FI_MVF_02 no standard page heading line-size 255.
    DATA : BEGIN OF IT_RECORDS OCCURS 0,
           BLDAT LIKE BKPF-BLDAT,
           BLART LIKE BKPF-BLART,
           BUKRS LIKE BKPF-BUKRS,
           BUDAT LIKE BKPF-BUDAT,
           MONAT LIKE BKPF-MONAT,
           WAERS LIKE BKPF-WAERS,
           NEWBS LIKE RF05A-NEWBS,
           NEWKO LIKE RF05A-NEWKO,
           END OF IT_RECORDS.
    DATA : BEGIN OF IT_RECORD OCCURS 0,
           VRAMT(15),  " LIKE BSEG-WRBTR,
           PKEY  LIKE RF05A-NEWBS,
           VrAC(10),  " LIKE RF05A-NEWKO,
           GSBER LIKE COBL-GSBER,
           END OF IT_RECORD.
    DATA : BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,
           DATE1 LIKE SY-DATUM,
           DATE2 LIKE SY-DATUM,
           LOOP(3).
           DATA : COUNT(3).
    start-of-selection.
      PERFORM GET_DATA1.
      PERFORM GET_DATA2.
      PERFORM PROCESS_DATA.
    FORM PROCESS_DATA.
    perform bdc_dynpro      using 'SAPMF05A' '0100'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RF05A-NEWKO'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
        date1 = it_RecordS-bldat.
        CONCATENATE DATE16(2) DATE14(2) DATE1+0(4) INTO DATE1.
    perform bdc_field       using 'BKPF-BLDAT'               DATE1.  "'03.12.2007'.
    perform bdc_field       using 'BKPF-BLART'               IT_RECORDS-BLART.  "'SA'.
    perform bdc_field       using 'BKPF-BUKRS'               IT_RECORDS-BUKRS.  "'1800'.
        date2 = it_RecordS-bUdat.
        CONCATENATE DATE26(2) DATE24(2) DATE2+0(4) INTO DATE2.
    perform bdc_field       using 'BKPF-BUDAT'               DATE2.  "'03.12.2007'.
    perform bdc_field       using 'BKPF-MONAT'               IT_RECORDS-MONAT.  "'9'.
    perform bdc_field       using 'BKPF-WAERS'               IT_RECORDS-WAERS.  "'INR'.
    perform bdc_field       using 'FS006-DOCID'              '*'.
    perform bdc_field       using 'RF05A-NEWBS'               IT_RECORDS-NEWBS.  "'40'.
    perform bdc_field       using 'RF05A-NEWKO'               IT_RECORDS-NEWKO.  "'24450024'.
    *perform bdc_field       using 'RF05A-NEWBS'               IT_RECORDS-PKEY.  "'50'.
    *perform bdc_field       using 'RF05A-NEWKO'               IT_RECORDS-VENAC.  "'24450024'.
    *perform bdc_field       using 'DKACB-FMORE'  'X'.
    COUNT = '0'.
    LOOP AT IT_RECORD.
    perform bdc_dynpro      using 'SAPMF05A' '0300'.
    perform bdc_field       using 'BDC_CURSOR'  'RF05A-NEWKO'.
    perform bdc_field       using 'BDC_OKCODE'  '/00'.
    perform bdc_field       using 'BSEG-WRBTR'                IT_RECORD-vramt.  "'100000'.
    perform bdc_field       using 'RF05A-NEWBS'                          it_record-pkey.  "'50'.
    perform bdc_field       using 'RF05A-NEWKO'                          it_Record-vrac.  "'24450024'.
    perform bdc_field       using 'DKACB-FMORE'                          'X'.
    perform bdc_dynpro      using 'SAPLKACB' '0002'.
    perform bdc_field       using 'BDC_CURSOR'  'COBL-GSBER'.
    perform bdc_field       using 'BDC_OKCODE'  '=ENTE'.
    perform bdc_field       using 'COBL-GSBER'                            it_record-gsber.  "'KABA' .
    COUNT = COUNT + 1.
    IF COUNT = 4.
    clear count.
      perform bdc_dynpro      using 'SAPMF05A' '0302'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'BSEG-GSBER'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '/00'.
      perform bdc_field       using 'BSEG-WRBTR'                        IT_RECORD-VRAMT.   "'50000'.
      perform bdc_field       using 'BSEG-MWSKZ'                           '**'.
      perform bdc_field       using 'BSEG-GSBER'                        IT_RECORD-GSBER ."'kaba'.
      perform bdc_field       using 'BSEG-ZFBDT'                           '03.12.2007'.
      perform bdc_dynpro      using 'SAPMF05A' '0302'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'BSEG-WRBTR'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BS'.
      perform bdc_field       using 'BSEG-WRBTR'                          IT_RECORD-VRAMT. "'50,000.00'.
      perform bdc_field       using 'BSEG-MWSKZ'
      perform bdc_field       using 'BSEG-BUPLA'                            '1800'.
      perform bdc_field       using 'BSEG-GSBER'                            IT_RECORD-GSBER."'KABA'.
      perform bdc_field       using 'BSEG-ZFBDT'                            '03.12.2007'.
      perform bdc_dynpro      using 'SAPMF05A' '0700'.
      perform bdc_field       using 'BDC_CURSOR'
                                    'RF05A-NEWBS'.
      perform bdc_field       using 'BDC_OKCODE'
                                    '=BU'.
      CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
    ELSE.
      CONTINUE.
    ENDIF.
    ENDLOOP.
    perform bdc_dynpro      using 'SAPMF05A' '0302'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'BSEG-GSBER'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '/00'.
    perform bdc_field       using 'BSEG-WRBTR'                '50000'.
    perform bdc_field       using 'BSEG-MWSKZ'                '**'.
    perform bdc_field       using 'BSEG-GSBER'                'kaba'.
    perform bdc_field       using 'BSEG-ZFBDT'                '03.12.2007'.
    perform bdc_dynpro      using 'SAPMF05A' '0302'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'BSEG-WRBTR'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BS'.
    perform bdc_field       using 'BSEG-WRBTR'                IT_RECORD-VRAMT.  "'50,000.00'.
    perform bdc_field       using 'BSEG-MWSKZ'                '**'.
    perform bdc_field       using 'BSEG-BUPLA'                '1800'.
    perform bdc_field       using 'BSEG-GSBER'                IT_RECORD-GSBER.  "'KABA'.
    perform bdc_field       using 'BSEG-ZFBDT'                '03.12.2007'.
    perform bdc_dynpro      using 'SAPMF05A' '0700'.
    perform bdc_field       using 'BDC_CURSOR'
                                   'RF05A-NEWBS'.
    perform bdc_field       using 'BDC_OKCODE'
                                   '=BU'.
    perform bdc_transaction using 'F-02'.
    *CALL TRANSACTION 'F-02' USING BDCDATA MODE 'A'.
      ENDFORM.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR BDCDATA.
      BDCDATA-PROGRAM  = PROGRAM.
      BDCDATA-DYNPRO   = DYNPRO.
      BDCDATA-DYNBEGIN = 'X'.
      APPEND BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
      IF FVAL <> ' '.
        CLEAR BDCDATA.
        BDCDATA-FNAM = FNAM.
        BDCDATA-FVAL = FVAL.
        APPEND BDCDATA.
      ENDIF.
    ENDFORM.
    *&      Form  GET_DATA
    form GET_DATA1 .
      CALL FUNCTION 'UPLOAD'
       EXPORTING
         FILENAME                      = 'C:\MVF-02_1.txt'
         FILETYPE                      = 'DAT'
        TABLES
         data_tab                      = IT_RECORDS
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         INVALID_TABLE_WIDTH           = 2
         INVALID_TYPE                  = 3
         NO_BATCH                      = 4
         UNKNOWN_ERROR                 = 5
         GUI_REFUSE_FILETRANSFER       = 6
         OTHERS                        = 7.
      IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " GET_DATA
    *&      Form  GET_DATA2
    form GET_DATA2 .
      CALL FUNCTION 'UPLOAD'
       EXPORTING
         FILENAME                      = 'C:\MVF-02_2.TXT'
         FILETYPE                      = 'DAT'
        TABLES
         data_tab                      = IT_RECORD
       EXCEPTIONS
         CONVERSION_ERROR              = 1
         INVALID_TABLE_WIDTH           = 2
         INVALID_TYPE                  = 3
         NO_BATCH                      = 4
         UNKNOWN_ERROR                 = 5
         GUI_REFUSE_FILETRANSFER       = 6
         OTHERS                        = 7
      IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    endform.                    " GET_DATA2

  • Hi All requirement on Purchase Order.Its Urgent

    Hi All,
            Pls provide me the soure code for the following requirement ASAP. Its urgent.
    Program: Z_PO_PRINT_MAIL
    Transaction: ZPOP
    Purchase order number: (should be a parameter not a select option) (Code the lookup using search help MEKK)
    Radio button for:     1. Print Preview
                   2. Print
                   3. E-mail
    Additional parameters based on above selection:
    1.     No additional parameters needed
    2.     Printer (code the F4 to search printers)(default user’s default printer)
    3.     E-mail address, cc (should also have same validations as e-mail address)
    Description:
    On pressing enter, use the Purchase order number to look up vendor number and name and display either to the right or below the purchase order number.
    Vendor Number: EKPO-LIFNR
    Vendor Name:    LFA1-NAME1
    1.     Print Preview: Use function ME_DISPLAY_PURCHASE_DOCUMENT with 2 parameters only:
    I_EBELN = PO Number
    I_PREVIEW = ‘X’
    2.     Print:  For this we have to do a BDC.Use transaction ME9F. Enter the purchase order number, blank out the rest. Select the first message, hit ‘Message details’. Enter a new message via Edit>new Entries. For new entries, you will need to enter ‘NEU’ for Output type with Medium 1 (Print output). Hit enter. Select the message and click on further data. Set dispatch time to 4. Green arrow back. Select the message and click on “Communication” method. Enter the ‘Logical destination’ as the printer, select ‘Print Immediately’ and ‘Release after output’. Green arrow back and save.
    3.     E-mail: Use the following function modules:
    ECP_PO_OTF_CREATE
    CONVERT_OTF_2_PDF
    SO_NEW_DOCUMENT_ATT_SEND_API1

    Hi,
    You can explore following link for more details;
    http://www.sap-basis-abap.com/sapmo017.htm
    http://www.erpgenie.com/sap/sapfunc/purchasing.htm
    Bye,
    Muralidhara

  • Syntax problem with BDC perform

    Dear Friends,
    small problem in BDC Perform syntax but I am not getting how to do this..
    I have writen the code like this in my BDC byt its throughing the error...Here I want to do the validation on each and every field. I mean If that field values are empty i don't want to change the SAP field value.
    my code is like this.
        PERFORM dynpro USING:
        'X' 'SAPLMGMM' '0080'.
        IF NOT p_int_matl-werks IS INITIAL.
        ' ' 'RMMG1-WERKS' p_int_matl-werks.
        ENDIF.
        IF NOT p_int_matl-werks IS INITIAL.
        ' ' 'RMMG1-LGORT' p_int_matl-lgort.
          ENDIF.
        ' ' 'BDC_OKCODE' '/00'.
    pls give me exact code how to do this...
    Thanks
    Sridhar

    Hi sridher,
    1. this kind of syntax ie. IF will give error.
    2. If ur requirement is : blank value should not be put in bdc,
    3. then one way is to change / write the logic
        inside the form itself.
    4. ie. inside the routine/form DYNPRO.
    5. So, it will be then general for all performs.
    regards,
    amit m.

  • PROBLEM IN BDC F-04 --NO PAGE DOWN

    HI
    Experts,
    Getting problem in bdc for f-04 , The data is split on basis of
    business area (gsber) , and for one business area there are more
    then 2000 document number, till the screen of doc.no the data is
    coming into fields but i have to put all the doc number for that
    b.area. And only i can enter 16 doc.no as there is no page down i
    have to enter so that it takes another 16 doc.no .
    but i tried it by at new command and then i tried it by on chage of
    but it picks only first doc.no its not piclking all doc.no.
    LOOP AT i_final.
        MOVE i_final TO wa_itab.
        ON CHANGE OF wa_itab-gsber  .
          CLEAR w_count.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0122'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-NEWKO'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          PERFORM bdc_field       USING 'BKPF-BLDAT'
                                         wa_itab-bldat .                       "'27.07.2006'.
          PERFORM bdc_field       USING 'BKPF-BLART'
                                         wa_itab-blart.                        "'SA'.
          PERFORM bdc_field       USING 'BKPF-BUKRS'
                                         wa_itab-bukrs.                         "'NPIL'.
          PERFORM bdc_field       USING 'BKPF-BUDAT'
                                         wa_itab-budat.                         "'27.07.2006'.
          PERFORM bdc_field       USING 'BKPF-WAERS'
                                         wa_itab-waers.                          "'INR'.
          PERFORM bdc_field       USING 'BKPF-XBLNR'
                                         wa_itab-xblnr.                         "'INR'.
          PERFORM bdc_field       USING 'BKPF-BKTXT'
                                        wa_itab-bktxt.                          "'INR'.
          PERFORM bdc_field       USING 'RF05A-XPOS1(04)'
                                         wa_itab-xpos1.
          PERFORM bdc_field       USING 'RF05A-NEWBS'
                                         wa_itab-newbs.         "'50'.
          PERFORM bdc_field       USING 'RF05A-NEWKO'
                                        wa_itab-newko.          "'9991010'.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'BSEG-WRBTR'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PA'.
          PERFORM bdc_field       USING 'BSEG-WRBTR'
                                        wa_itab-wrbtr.                            "'826532.58'.
          PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'COBL-FIPOS'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=ENTE'.
          PERFORM bdc_field       USING 'COBL-GSBER'
                                         wa_itab-gsber.         "'1101'.
          PERFORM bdc_field       USING 'COBL-PRCTR'
                                         wa_itab-prctr.         "'2000'.
          PERFORM bdc_dynpro      USING 'SAPMF05A' '0710'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-XPOS1(03)'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=PA'.
          PERFORM bdc_field       USING 'RF05A-AGKON'
                                         wa_itab-agkon.         "'2810200'.
          PERFORM bdc_field       USING 'RF05A-XPOS1(03)'
                                         'X'.
        ENDON.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0731'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-SEL01(06)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=PA'.
        w_count = w_count + 1.
        CONCATENATE 'RF05A-SEL01(' w_count ')' INTO w_bdc.
        PERFORM bdc_field       USING   w_bdc
                                        wa_itab-sel01.
        IF w_count >= 16.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/00'.
          w_count = 0.
        ENDIF.
       ENDON.
       AT END OF gsber.
    *IF W_FLAG = 'X'.
          PERFORM bdc_dynpro      USING 'SAPDF05X' '3100'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=BU'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'RF05A-ABPOS'.
          PERFORM bdc_field       USING 'RF05A-ABPOS'
                                        '1'.
          PERFORM bdc_transaction USING 'F-04'.
       ENDAT. "At end of
    *ENDIF.
      ENDLOOP.
      PERFORM close_group.

    Iam doing a bdc for F-04 (post with clearing header date)
    i got a file in which the data is splited on business area wise,
    and when i enter the details on first screen
    with post key 40 and enter after entering the details here like
    busines area profit cenrter i have to click
    process open item .
    here i have to select the doc.no and enter acct no and again
    have to process the open item .. where exactly my problem is
    when i process it i will get ascreen in which
    the doc.no are
    from to
    and i can enter only 16 doc no here but where as there are more
    then 50 doc number for one businees area in file ..there is
    HOPE U GOT MY POINT NOW .
    REGARDS

  • Routine--- help its urgent.

    hai gurus,
    Here is the scenario.
    I am extracting the data from r/3.There is one field called "ITM_DESCRIPTION" in this i am gettting an # char only for single record and due to this delta loads are getting failed.
    we had already wriiten the code for eliminating # for that field but dont know its not working. So i am planning out to skip that particular record for a particular Purchase order number.
    Is there any such code to eliminate the particular record.
    Many thanks in advance.
    any one has the code plz send the code.
    Help its urgent.
    full points assured
    regards
    KP

    hai Oscar,
    I had already done this one.
    still geting the same problem.
    can u send me any code that i can add in SR of TR.
    regards
    Kp

  • Plz tell ...its urgent......give ur answer

    I want to connect ORACLE 9i and ASP.NET 2005
    now plz plz plz can any body tell me wht are the steps 4 tht.....
    wht to do...because i dont know anything
    plz tell me all the steps from starting
    thanks in advance
    from chintan

    > plz tell ...its urgent......give ur answer
    Forums like this work better when people can see what you asking by glancing at the subject line. A better subject line might have been "Connect to Oracle 9i from ASP.NET 2005".
    Also I'm afraid it is your problem if it is urgent, not ours.

  • InitialDirContext  red underline problem... Urgent

    Hello everybody, i'm facing a strange error when i try to set the enviroument created to access the LDAP to the InitialDirContext. I'm running the following code under window xp and i'm getting a red underline with "ctx = new InitialDirContext(env);". It specify that i either remove the "env" or to set it as boolean to satisfy the constructors.
    The code is:
    Hashtable env = new Hashtable();
                             env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
                             env.put(Context.SECURITY_PRINCIPAL, "cn=Manager,dc=mydomain");
                             env.put(Context.SECURITY_CREDENTIALS, "secret");
                             DirContext ctx = null;
                   NamingEnumeration results = null;
                   boolean answer = false;
                   try {
                        ctx = new InitialDirContext(env);
                   SearchControls controls = new SearchControls();
                   controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
                   results = ctx.search("", "(objectclass=person)", controls);
    I tried to resolve it by downloading the jdni.jar file and include it in the path variable. Nothing is changed and i still get that red underline ..
    Please support.
    Regards,
    Ahmed Banihammad

    95% of the code you posted has absolutely nothing to do with selecting the text in a combobox when it gains focus. If you want to create a simple executable example that contains two components so we can tab from one component to the other, then maybe I'll take some time to look at your problem, but frankly its not urgent to me and I'm not going to read throught unnecessary code in an attempt to find the problem.

  • Problem with BDC on VA02

    Hi All,
    I am facing a problem with bdc on va02. After hitting enter on the first screen it pops an info message "consider subsequent douments". It doesn't get recorded in recorded. Hence I am not able to run the transaction with no screen mode. Please help me to suppress the info message
    Navin

    Hi Navin,
    These kind of messages and pop ups are precisely the reason why use of BDC for updating transactions is NOT advisable.
    If you were to bypass such messages, you would have to put a check to see why the message appears (in this case probably because the sales document flow for the sales order in table VBFA has some documents) and then write a logic to either handle the message or not.
    Instead i would recommend you use the BAPI functions provided by SAP to change the sales order.
    Have a look the BAPI for sales order change attached to the business object BUS2012. For this goto transaction SWO1 and enter the BUS2012 business object. Then goto methods and look for the "change" method. Double click on the method and look at the BAPI used to implement the method. Go ahead and use this method in your program as against a BDC.
    I am sure it will be a much better option.
    Otherwise if you still want to proceed with a BDC, please debug at the point where the message/pop up appears to ascertain reason for the same and then incorporate the same check in your program to handle the pop up.
    Regards,
    Aditya

Maybe you are looking for

  • Errors while transaction download from ECC- CRM

    we are trying to download transactions from ECC 5.0 to CRM 5.0. the initial download has stopped in between and we get an error "SysFail" in the Inbound queue (SMQ2). Information on this error is "The current application triggered a termination with

  • [b]How to validate user's digital signature by ClientAuthentication?[u]HELP

    Hello, My Problem: By client-certificate-based authentication the first step is to prove "Does user�s public key validate user�s digital signature?". How can I prove this on the ServerSide manually, resp. I want to verify it with java classes on the

  • Configuration DATA / ETL objects

    Hi All, HOw can one remember all Configuration parameter for all the Data and ETL Objects. Is there any way to identify which parameter should be set for the task. I read the OWB user guide but I am configusing with that. Please drop ur suggesions. I

  • HT201210 how i recover my ipad 1 it is disable now

    how should i recover ipad 1

  • Screen selection for CO11

    Hi All, Here in the CO11 screen, i need to check which are the Production Orders that are open for a particular material. We have lot of Production Orders to confirm. From the Menu i click on Selection -> Order Selection -> Orders/Material. Then I wi