Upload the data using sessoin method

HI All,
  i have a flat file of 1000 records i uploaded 1000 records using session method but some records are missing.In error log i got some errors.then now how can i update the error records.

You haven't provided much information.  What transaction?  What upload method? Custom program or standard?  You either need to process the transactions in foreground or errors only mode to fix them OR you need to fix the errors at the source and re-run them.  A good developer always programs for errors and reprocessing with prevention of duplicates, so that you could run the entire file again without issue.  Did you tag the records/documents with an identifier to prevent duplicates?

Similar Messages

  • Upload the data using BAPI in LSMW

    Hi
      I want to upload the data using the BAPI in LSMW,but i dont know what value should be passed in
      1- Business Object
      2- Method
    fields.
    Ex- Suppose i want to upload the Material Master Data then what should be the value of these two fields.
    Thanks
    Mrutyunjaya Tripathy

    Hi
      Sorry to say that i am little bit confuse with your answer
    1-The business object already contains some object name wheather i have to give object names or different,As you have mentioned to give the tcode than what tcode that would be
    2-If i am giving any internal table name in the method field it is giving me error because this field is related to the business object field
    Thanks
    Tripathy m

  • Error while uploading the data using FM"upload"

    Hi,
    I encountering an error while uploading the data using text file with FM " UPLOAD"
    The error is "File does not exist or cannot be opened "
    But there is a file with name and extenstion right.
    Regards
    Vishnu

    You have to create RC29P-IDNRK(var) using concatenate statement. Try this.
    DATA: new_mark TYPE bdcdata-fnam.
    CONCATENATE 'RC29P-IDNRK(' var ')' INTO new_mark.
    PERFORM bdc_field USING new_mark W_BOM-QTY

  • Error in uploading the data using BDC

    Hi All,
    I developed a BDC to upload the data for Infotype-0195.When I am trying to upload the flatfile using Functional Module option I am getting the error Invalid Date Format.
    Can anyone please help me out giving the solution..........
    Thanks in advance,
    Deepika

    Hi Avinash,
    I am passing the date field in the format MM/DD/YYYY but in the program i am converting to the format YYYYMMDD using concatenate and then passing the value to the FM but still I am getting the error.
    For ur convenience I am sending the code
    *-- Includes Declaration                                               *
    INCLUDE zixx_data_upload.
    INCLUDE zixx_conversion_log.
    INCLUDE bdcrecx1.
    *-- SELECTION SCREEN                                                   *
    SELECTION-SCREEN BEGIN OF BLOCK funcmod WITH FRAME TITLE text-t01.
    PARAMETERS : p_fm   TYPE c AS CHECKBOX.
    PARAMETERS : p_ctumod TYPE ctu_mode DEFAULT '0',
                 p_date TYPE c AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK funcmod.
    TYPES Declaration.
    Types decalration for flat file structure
    *Declaration for internal table/wa for flat file structure
    TYPES: BEGIN OF gt_data,
              pernr TYPE rp50g-pernr,
              begda(10) TYPE c,
              endda(10) TYPE c,
              gcase     TYPE pb10_gcase,
              objps TYPE p0195-objps,
              ordcd TYPE p0195-ordcd,
              rulid TYPE p0195-rulid,
              ibaln(13) TYPE c,
              deduc(13) TYPE c,
              dedut TYPE p0195-dedut,
              li1no TYPE q0195-li1no,
              li1ex TYPE q0195-li1ex,
              nval1(13) TYPE c,
              nuni1 TYPE p0195-nuni1,
              li2no TYPE q0195-li1no,
              li2ex TYPE q0195-li2ex,
              nval2(13) TYPE c,
              nuni2 TYPE p0195-nuni2,
              addno TYPE q0195-addno,
              addex TYPE q0195-addex,
              addvl(13) TYPE c,
              addun TYPE p0195-addun,
              fstat TYPE p0195-fstat,
              exemp TYPE p0195-exemp,
              addde TYPE p0195-addde,
              levda(10) TYPE c,
              fild1 TYPE p0195-fild1,
              fild2 TYPE p0195-fild2,
              fild3 TYPE p0195-fild3,
              fild4 TYPE p0195-fild4,
            END OF gt_data,
            BEGIN OF gt_0194,
               pernr TYPE p0194-pernr,
               begda TYPE p0194-begda,
               endda TYPE p0194-endda,
               subty TYPE p0194-subty,
               lifnr TYPE p0194-lifnr,
               schid TYPE p0194-schid,
               rulnr TYPE p0194-rulnr,
               plain TYPE p0194-plain,
               orign TYPE p0194-orign,
               orcod TYPE p0194-orcod,
               ornam TYPE p0194-ornam,
               orstr TYPE p0194-orstr,
               orort TYPE p0194-orort,
               orreg TYPE p0194-orreg,
               orcnt TYPE p0194-orcnt,
               orplz TYPE p0194-orplz,
               lapdy TYPE p0194-lapdy,
               lapdt TYPE p0194-lapdt,
               gcase TYPE p0194-gcase,
               gprio TYPE p0194-gprio,
               gcate TYPE p0194-gcate,
               gstat TYPE p0194-gstat,
               rcvdd TYPE p0194-rcvdd,
               rlsdd TYPE p0194-rlsdd,
               scrul TYPE p0194-scrul,
            END OF gt_0194.
    TYPES: BEGIN OF gt_data_d,
              pernr TYPE rp50g-pernr,
              begda(10) TYPE c,
              endda(10) TYPE c,
              gcase     TYPE pb10_gcase,
              objps TYPE p0195-objps,
              ordcd TYPE p0195-ordcd,
              rulid TYPE p0195-rulid,
              ibaln(13) TYPE c,
              deduc(13) TYPE c,
              dedut TYPE p0195-dedut,
              li1no TYPE q0195-li1no,
              li1ex TYPE q0195-li1ex,
              nval1(13) TYPE c,
              nuni1 TYPE p0195-nuni1,
              li2no TYPE q0195-li1no,
              li2ex TYPE q0195-li2ex,
              nval2(13) TYPE c,
              nuni2 TYPE p0195-nuni2,
              addno TYPE q0195-addno,
              addex TYPE q0195-addex,
              addvl(13) TYPE c,
              addun TYPE p0195-addun,
              fstat TYPE p0195-fstat,
              exemp TYPE p0195-exemp,
              addde TYPE p0195-addde,
              fild1 TYPE p0195-fild1,
              fild2 TYPE p0195-fild2,
              fild3 TYPE p0195-fild3,
              fild4 TYPE p0195-fild4,
            END OF gt_data_d.
    INTERNAL TABLE/WORK AREA Declaration.
    *Declaration for internal table/wa for flat file structure
    DATA:    gi_data       TYPE TABLE OF gt_data,
             gw_data       TYPE gt_data,
             gi_0194       TYPE TABLE OF gt_0194,
             gw_0194       TYPE gt_0194,
    *Declaration for BDCDATA
            gi_bdcdata     TYPE STANDARD TABLE OF bdcdata,
            gw_bdcdata     TYPE bdcdata,
    *Declaration for BDCMSGCOLL
            gi_bdcmsgcoll  TYPE TABLE OF bdcmsgcoll,
            gw_bdcmsgcoll  TYPE bdcmsgcoll,
             gi_data_d     TYPE TABLE OF gt_data_d,
             gw_data_d     TYPE gt_data_d,
             gw_p0195      TYPE p0195,
             gw_p0194      TYPE pa0194.
    DATA: gw_return TYPE bapireturn1,
    *Declaration for Global Variables
            gv_count(5)    TYPE c VALUE 0.
    *Declaration for constants
    CONSTANTS: gc_update               VALUE 'L',
               gc_msgid(2)             VALUE 'PG',
               gc_s_msgid(3)           VALUE '102',
               gc_pa30 TYPE tstc-tcode VALUE 'PA30',
               gc_200(3)               VALUE '200'.
    *-- AT SELECTION SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      nodata = ' '.
      group = sy-uname.
    *To change the screen attributes dynamically.
      PERFORM upload_screen_output.
    *-- START-OF-SELECTION                                                 *
    START-OF-SELECTION.
      IF p_date = 'X'.
    *-- Routine to upload the file data
        PERFORM upload USING 'X'       "HAS_SEPARATOR
                             'ASC'     "File Type
                             space     "ALT_SEPARATOR Alternate separator
                             'X'       "DISPLAY_ERROR
                             'X'       "ERROR_OCCURRED
                             gi_data. "TABLE Table to upload into
        IF NOT gi_data IS INITIAL.
          SELECT pernr begda endda subty
                 lifnr schid rulnr
                 plain orign orcod
                 ornam orstr orort
                 orreg orcnt orplz
                 lapdy lapdt gcase
                 gprio gcate gstat
                 rcvdd rlsdd scrul
            FROM pa0194
            INTO TABLE gi_0194
             FOR ALL ENTRIES IN gi_data
           WHERE pernr = gi_data-pernr
             AND gcase = gi_data-gcase.
    *-- Routine to perform bdc
          IF sy-subrc IS INITIAL.
            IF p_fm NE 'X'.
              PERFORM bdc.
            ELSE.
              PERFORM function_module.
            ENDIF.
          ENDIF.
        ENDIF.
      ELSE.
    *-- Routine to upload the file data
        PERFORM upload USING 'X'       "HAS_SEPARATOR
                             'ASC'     "File Type
                             space     "ALT_SEPARATOR Alternate separator
                             'X'       "DISPLAY_ERROR
                             'X'       "ERROR_OCCURRED
                             gi_data_d. "TABLE Table to upload into
        IF NOT gi_data_d IS INITIAL.
          IF p_fm EQ 'X'.
            PERFORM function_module.
          ENDIF.
        ENDIF.
      ENDIF.
    *Perform to insert the filename in Z-Table and move the file from New
    *to Processed in APP Server.
      SORT gi_log BY msg_typ.
      READ TABLE gi_log INTO gw_log WITH KEY msg_typ = 'E' BINARY SEARCH.
      IF sy-subrc <> '0'.
        PERFORM file_moving USING gi_data.
      ENDIF.
    *-- END-OF-SELECTION                                                   *
    END-OF-SELECTION.
    *-- Routine to display conversion log
      PERFORM log_display.
      Subroutine Pool
    *&      Form  BDC
          Routine to perform bdc
    FORM bdc .
    *Data declaration for collecting success and error records
      DATA: lv_success(5)     TYPE c VALUE 0,
            lv_begda  TYPE string,
            lv_rlsdd  TYPE string,
            lv_lapdt  TYPE string,
            lv_endda  TYPE string,
            lv_rcvdd  TYPE string.
      gv_count = 0.
      PERFORM open_group.
      SORT gi_0194 BY pernr gcase.
      LOOP AT gi_data INTO gw_data.
        gv_count = gv_count + 1.
        READ TABLE gi_0194 INTO gw_0194 WITH KEY pernr = gw_data-pernr
                                                 gcase = gw_data-gcase.
        IF sy-subrc = 0.
       LOOP AT gi_0194 INTO gw_0194 WHERE gcase = gw_data-grnum.
          MOVE gw_0194-begda TO lv_begda.
          MOVE gw_0194-endda TO lv_endda.
    *FUNCTION MODULE TO CONVERT DATE FORMAT
          CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
            EXPORTING
              if_date = lv_begda
            IMPORTING
              ef_date = lv_begda.
          CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
            EXPORTING
              if_date = lv_endda
            IMPORTING
              ef_date = lv_endda.
          PERFORM bdc_dynpro      USING 'SAPMP50A' '1000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=MOD'.
          PERFORM bdc_field       USING 'RP50G-PERNR'
                                        gw_data-pernr.
          PERFORM bdc_field       USING 'RP50G-TIMR6'
                                        'X'.
          PERFORM bdc_field       USING 'RP50G-CHOIC'
                                        '0194'.
          PERFORM bdc_field       USING 'RP50G-SUBTY'
                                        gw_0194-subty.
          PERFORM bdc_dynpro      USING 'MP019400' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=GROR'.
          PERFORM bdc_field       USING 'P0194-BEGDA'
                                        lv_begda.
          PERFORM bdc_field       USING 'P0194-ENDDA'
                                        lv_endda.
          PERFORM bdc_field       USING 'P0194-LIFNR'
                                        gw_0194-lifnr.
          PERFORM bdc_field       USING 'P0194-SCHID'
                                        gw_0194-schid.
          PERFORM bdc_field       USING 'P0194-RULNR'
                                        gw_0194-rulnr.
          PERFORM bdc_field       USING 'P0194-pLAIN'
                                        gw_0194-plain.
          PERFORM bdc_field       USING 'P0194-ORIGN'
                                        gw_0194-orign.
          PERFORM bdc_field       USING 'P0194-ORCOD'
                                        gw_0194-orcod.
          PERFORM bdc_field       USING 'P0194-ORNAM'
                                        gw_0194-ornam.
          PERFORM bdc_field       USING 'P0194-ORSTR'
                                        gw_0194-orstr.
          PERFORM bdc_field       USING 'P0194-ORORT'
                                        gw_0194-orort.
          PERFORM bdc_field       USING 'P0194-ORREG'
                                        gw_0194-orreg.
          PERFORM bdc_field       USING 'P0194-ORCNT'
                                        gw_0194-orcnt.
          PERFORM bdc_field       USING 'P0194-ORPLZ'
                                        gw_0194-orplz.
          PERFORM bdc_field       USING 'P0194-LAPDY'
                                        gw_0194-lapdy.
          IF gw_0194-lapdt IS NOT INITIAL.
            MOVE gw_0194-lapdt TO lv_lapdt.
            CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
              EXPORTING
                if_date = lv_lapdt
              IMPORTING
                ef_date = lv_lapdt.
            PERFORM bdc_field       USING 'P0194-LAPDT'
                                          lv_lapdt.
          ENDIF.
          PERFORM bdc_field       USING 'P0194-GCASE'
                                        gw_0194-gcase.
          PERFORM bdc_field       USING 'P0194-GPRIO'
                                        gw_0194-gprio.
          PERFORM bdc_field       USING 'P0194-GCATE'
                                        gw_0194-gcate.
          PERFORM bdc_field       USING 'P0194-GSTAT'
                                        gw_0194-gstat.
          IF gw_0194-rcvdd IS NOT INITIAL.
            MOVE gw_0194-rcvdd TO lv_rcvdd.
            CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
              EXPORTING
                if_date = lv_rcvdd
              IMPORTING
                ef_date = lv_rcvdd.
            PERFORM bdc_field       USING 'P0194-RCVDD'
                                          lv_rcvdd.
          ENDIF.
          IF gw_0194-rlsdd IS NOT INITIAL.
            MOVE gw_0194-rlsdd TO lv_rlsdd.
            CALL FUNCTION '/SAPDII/SPP05_CONVERT_DATE'
              EXPORTING
                if_date = lv_rlsdd
              IMPORTING
                ef_date = lv_rlsdd.
            PERFORM bdc_field       USING 'P0194-RLSDD'
                                          lv_rlsdd.
          ENDIF.
          PERFORM bdc_field       USING 'P0194-SCRUL'
                                        gw_0194-scrul.
         PERFORM bdc_dynpro      USING 'SAPLSPO1' '0200'.
         PERFORM bdc_field       USING 'BDC_CURSOR'
                                       'SPOP-TEXTLINE1'.
         PERFORM bdc_field       USING 'BDC_OKCODE'
                                       '=YES'.
          PERFORM bdc_dynpro      USING 'SAPLSPO1' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'SPOP-TEXTLINE1'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=YES'.
          PERFORM bdc_dynpro      USING 'MP019500' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=UPD'.
          PERFORM bdc_field       USING 'P0195-BEGDA'
                                        gw_data-begda.
          PERFORM bdc_field       USING 'P0195-ENDDA'
                                        gw_data-endda.
          PERFORM bdc_field       USING 'P0195-ORDCD'
                                        gw_data-ordcd.
          PERFORM bdc_field       USING 'P0195-RULID'
                                        gw_data-rulid.
          PERFORM bdc_field       USING 'P0195-IBALN'
                                        gw_data-ibaln.
          PERFORM bdc_field       USING 'P0195-DEDUC'
                                        gw_data-deduc.
          PERFORM bdc_field       USING 'P0195-DEDUT'
                                        gw_data-dedut.
    Begin of Insertion V2.0 by S.NATARAJAN
         IF ( ( gw_data-li1no = '1' AND gw_data-li1ex = ''  ) OR
              ( gw_data-li1no = ''  AND gw_data-li1ex = ''  ) ).
          IF ( ( gw_data-li1no = '1' AND gw_data-li1ex = ''  ) OR
               ( gw_data-li1no = ''  AND gw_data-li1ex = ''  ) OR
               ( gw_data-li1no = ''  AND gw_data-li1ex = '2' ) ).
    End of Insertion V2.0 by S.NATARAJAN
            PERFORM bdc_field       USING 'Q0195-LI1NO'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-NVAL1'
                                          gw_data-nval1.
            PERFORM bdc_field       USING 'P0195-NUNI1'
                                          gw_data-nuni1.
    Begin of Insertion V2.0 by S.NATARAJAN
         ELSEIF  gw_data-li1no = '' AND gw_data-li1ex = '2'  .
          ELSEIF ( gw_data-li1no = '' AND gw_data-li1ex = '1' ) .
    End of Insertion V2.0 by S.NATARAJAN
            PERFORM bdc_field       USING 'Q0195-LI1EX'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-NVAL1'
                                          gw_data-nval1.
            PERFORM bdc_field       USING 'P0195-NUNI1'
                                          gw_data-nuni1.
          ENDIF.
    Begin of Insertion V2.0 by S.NATARAJAN
         IF ( ( gw_data-li2no = '1' AND gw_data-li2ex = ''  ) OR
              ( gw_data-li2no = ''  AND gw_data-li2ex = ''  ) ).
          IF ( ( gw_data-li2no = '1' AND gw_data-li2ex = ''  ) OR
               ( gw_data-li2no = ''  AND gw_data-li2ex = ''  ) OR
               ( gw_data-li2no = ''  AND gw_data-li2ex = '2' ) ).
            PERFORM bdc_field       USING 'Q0195-LI2NO'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-NVAL2'
                                          gw_data-nval2.
            PERFORM bdc_field       USING 'P0195-NUNI2'
                                          gw_data-nuni2.
    Begin of Insertion V2.0 by S.NATARAJAN
         ELSEIF  ( gw_data-li2no = '' AND gw_data-li2ex = '2' ).
          ELSEIF  ( gw_data-li2no = '' AND gw_data-li2ex = '1' ).
    End of Insertion V2.0 by S.NATARAJAN
            PERFORM bdc_field       USING 'Q0195-LI2EX'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-NVAL2'
                                          gw_data-nval2.
            PERFORM bdc_field       USING 'P0195-NUNI2'
                                          gw_data-nuni2.
          ENDIF.
    Begin of Insertion V2.0 by S.NATARAJAN
         IF ( ( gw_data-addno = '1' AND gw_data-addex = ''  ) OR
              ( gw_data-addno = ''  AND gw_data-addex = ''  ) ).
    End of Insertion V2.0 by S.NATARAJAN
          IF ( ( gw_data-addno = '1' AND gw_data-addex = ''  ) OR
               ( gw_data-addno = ''  AND gw_data-addex = ''  ) OR
               ( gw_data-addno = ''  AND gw_data-addex = '2' ) ) .
            PERFORM bdc_field       USING 'Q0195-ADDNO'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-ADDVL'
                                          gw_data-addvl.
            PERFORM bdc_field       USING 'P0195-ADDUN'
                                          gw_data-addun.
    Begin of Insertion V2.0 by S.NATARAJAN
    *ELSEIF  gw_data-addno = '' AND gw_data-addex = '2' .
          ELSEIF ( gw_data-addno = '' AND gw_data-addex = '1' ).
    End of Insertion V2.0 by S.NATARAJAN
            PERFORM bdc_field       USING 'Q0195-ADDEX'
                                          'X'.
            PERFORM bdc_field       USING 'P0195-ADDVL'
                                          gw_data-addvl.
            PERFORM bdc_field       USING 'P0195-ADDUN'
                                          gw_data-addun.
          ENDIF.
          PERFORM bdc_dynpro      USING 'MP019500' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=UPD'.
          PERFORM bdc_dynpro      USING 'MP019400' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '/EBCK'.
          PERFORM bdc_dynpro      USING 'SAPLSPO1' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'SPOP-TEXTLINE1'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=YES'.
          PERFORM bdc_dynpro      USING 'SAPLSPO1' '0200'.
          PERFORM bdc_field       USING 'BDC_CURSOR'
                                        'SPOP-TEXTLINE1'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=YES'.
          PERFORM bdc_dynpro      USING 'MP019500' '2000'.
          PERFORM bdc_field       USING 'BDC_OKCODE'
                                        '=UPD'.
         CALL TRANSACTION gc_pa30 USING gi_bdcdata
                                   MODE p_ctumod
                                 UPDATE gc_update
                               MESSAGES INTO gi_bdcmsgcoll.
          PERFORM bdc_transaction USING gc_pa30.
          gi_bdcmsgcoll[] = messtab[].
          LOOP AT gi_bdcmsgcoll INTO gw_bdcmsgcoll.
            IF gw_bdcmsgcoll-msgnr NE gc_200.
              IF gw_bdcmsgcoll-msgid = gc_msgid.
                IF gw_bdcmsgcoll-msgnr EQ gc_s_msgid.
                  ADD 1 TO lv_success.
                ENDIF.
              ENDIF.
              gw_log-msg_id   = gw_bdcmsgcoll-msgid.
              gw_log-msg_num  = gw_bdcmsgcoll-msgnr.
              gw_log-msg_key  = gw_bdcmsgcoll-msgv1.
              gw_log-msg_typ  = gw_bdcmsgcoll-msgtyp.
              gw_log-rec_no   = gv_count.
              CALL FUNCTION 'FORMAT_MESSAGE'
                EXPORTING
                  id        = gw_log-msg_id
                  no        = gw_log-msg_num
                  v1        = gw_bdcmsgcoll-msgv1
                  v2        = gw_bdcmsgcoll-msgv2
                  v3        = gw_bdcmsgcoll-msgv3
                  v4        = gw_bdcmsgcoll-msgv4
                IMPORTING
                  msg       = gw_log-msg_txt
                EXCEPTIONS
                  not_found = 1
                  OTHERS    = 2.
              IF sy-subrc <> 0.
                MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
              ENDIF.
              CONCATENATE gw_log-msg_txt 'for Personnel No -' ''''
                          gw_data-pernr '''' 'Case -' '''' gw_data-gcase
                          '''' INTO gw_log-msg_txt SEPARATED BY space.
              APPEND gw_log TO gi_log.
              REFRESH gi_bdcmsgcoll.
            ENDIF.
          ENDLOOP.
          CLEAR : lv_begda,lv_endda,
                  lv_lapdt,lv_rlsdd.
        ELSE.
          gw_log-msg_id = 'CUST'.
          gw_log-msg_num = 'XXX'.
          gw_log-msg_key  = 'USK'.
          gw_log-msg_typ  = 'E'.
          gw_log-rec_no   = gv_count.
          CONCATENATE 'Case -' '''' gw_data-gcase ''''
                      'does not exists for Personnel No -'
                      '''' gw_data-pernr ''''
                       INTO gw_log-msg_txt SEPARATED BY space.
          APPEND gw_log TO gi_log.
        ENDIF.
       ENDLOOP.
        CLEAR : gw_0194, gw_data.
        REFRESH gi_bdcdata.
      ENDLOOP.
      FREE gi_data.
      gv_tot_rec = gv_count.
      gv_suc_rec = lv_success.
      gv_err_rec = gv_count - lv_success.
      gv_ifnam   = p_upfile.
      PERFORM close_group.
    ENDFORM.                    " BDC
    *&      Form  FUNCTION_MODULE
          text
    FORM function_module .
      IF p_date = 'X'.
        LOOP AT gi_data INTO gw_data.
          gv_count = gv_count + 1.
          SELECT SINGLE pernr begda endda subty grnum
            FROM pa0194
            INTO CORRESPONDING FIELDS OF gw_p0194
           WHERE pernr = gw_data-pernr
             AND gcase = gw_data-gcase.
          IF sy-subrc = 0.
            MOVE-CORRESPONDING gw_data TO gw_p0195.
            CONCATENATE gw_data-begda6(4) gw_data-begda3(2)
                        gw_data-begda+0(2)
                       INTO gw_p0195-begda.
            CONCATENATE gw_data-endda6(4) gw_data-endda3(2)
                        gw_data-endda+0(2)
                       INTO gw_p0195-endda.
            CONCATENATE gw_data-levda6(4) gw_data-levda3(2)
                        gw_data-levda+0(2)
                       INTO gw_p0195-levda.
            gw_p0195-grnum = gw_p0194-grnum.
            gw_p0195-nein1 = ' '.
            gw_p0195-nein2 = ' '.
            gw_p0195-addin = ' '.
            IF ( gw_data-li1no = '' AND gw_data-li1ex = '1' ) .
              gw_p0195-nein1 = '1'.
            ELSEIF ( gw_data-li1ex = '2' OR gw_data-li1ex = '' ).
              gw_p0195-nein1 = '2'.
            ENDIF.
            IF ( gw_data-li2no = '' AND gw_data-li2ex = '1' ) .
              gw_p0195-nein2 = '1'.
            ELSEIF ( gw_data-li2ex = '2' OR gw_data-li2ex = '' ).
              gw_p0195-nein2 = '2'.
            ENDIF.
            IF ( gw_data-addno = '' AND gw_data-addex = '1' ) .
              gw_p0195-addin = '1'.
            ELSEIF ( gw_data-addex = '2' OR gw_data-addex = '' ).
              gw_p0195-addin = '2'.
            ENDIF.
            CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
              EXPORTING
                number = gw_p0195-pernr
              IMPORTING
                return = gw_return.
            IF gw_return-type NE 'E'.
              CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                EXPORTING
                  infty         = '0195'
                  number        = gw_p0195-pernr
                  validityend   = gw_p0195-endda
                  validitybegin = gw_p0195-begda
                  record        = gw_p0195
                  operation     = 'INS'
                  dialog_mode   = p_ctumod                      "Mod-01
                  tclas         = 'A'
                  nocommit      = ' '
                IMPORTING
                  return        = gw_return.
              CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
                EXPORTING
                  number = gw_p0195-pernr.
            ENDIF.
            IF gw_return IS NOT INITIAL.
              gw_log-msg_id = gw_return-id.
              gw_log-msg_num = gw_return-number.
              CONCATENATE gw_data-pernr gw_data-gcase INTO
              gw_log-msg_key SEPARATED BY '|'.
              gw_log-msg_typ  = gw_return-type.
              gw_log-rec_no   = gv_count.
              gw_log-msg_txt  = gw_return-message.
            ELSE.
              gw_log-msg_id = 'CUST'.
              gw_log-msg_num =  '000'.
              CONCATENATE gw_data-pernr gw_data-gcase INTO
              gw_log-msg_key SEPARATED BY '|'.
              gw_log-msg_typ  = 'S'.
              gw_log-rec_no   = gv_count.
              gw_log-msg_txt  = 'Record Created'(t02).
            ENDIF.
          ELSE.
            gw_log-msg_id = 'CUST'.
            gw_log-msg_num = 'XXX'.
            CONCATENATE gw_data-pernr gw_data-gcase INTO
            gw_log-msg_key SEPARATED BY '|'.
            gw_log-msg_typ  = 'E'.
            gw_log-rec_no   = gv_count.
            gw_log-msg_txt  =  'Case does not exists for Personnel No'(t03).
          ENDIF.
          APPEND gw_log TO gi_log.
          CLEAR : gw_log,gw_return,gw_data,gw_p0194,gw_p0195.
        ENDLOOP.
      ELSE.
        LOOP AT gi_data_d INTO gw_data_d.
          gv_count = gv_count + 1.
          SELECT SINGLE pernr begda endda subty grnum
            FROM pa0194
            INTO CORRESPONDING FIELDS OF gw_p0194
           WHERE pernr = gw_data_d-pernr
             AND gcase = gw_data_d-gcase.
          IF sy-subrc = 0.
            MOVE-CORRESPONDING gw_data_d TO gw_p0195.
            CONCATENATE gw_data_d-begda6(4) gw_data_d-begda3(2)
         gw_data_d-begda+0(2)
                       INTO gw_p0195-begda.
            CONCATENATE gw_data_d-endda6(4) gw_data_d-endda3(2)
         gw_data_d-endda+0(2)
                       INTO gw_p0195-endda.
            gw_p0195-grnum = gw_p0194-grnum.
            gw_p0195-nein1 = ' '.
            gw_p0195-nein2 = ' '.
            gw_p0195-addin = ' '.
            IF ( gw_data_d-li1no = '' AND gw_data_d-li1ex = '1' ) .
              gw_p0195-nein1 = '1'.
            ELSEIF ( gw_data_d-li1ex = '2' OR gw_data_d-li1ex = '' ).
              gw_p0195-nein1 = '2'.
            ENDIF.
            IF ( gw_data_d-li2no = '' AND gw_data_d-li2ex = '1' ) .
              gw_p0195-nein2 = '1'.
            ELSEIF ( gw_data_d-li2ex = '2' OR gw_data_d-li2ex = '' ).
              gw_p0195-nein2 = '2'.
            ENDIF.
            IF ( gw_data_d-addno = '' AND gw_data_d-addex = '1' ) .
              gw_p0195-addin = '1'.
            ELSEIF ( gw_data_d-addex = '2' OR gw_data_d-addex = '' ).
              gw_p0195-addin = '2'.
            ENDIF.
            CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
              EXPORTING
                number = gw_p0195-pernr
              IMPORTING
                return = gw_return.
            IF gw_return-type NE 'E'.
              CALL FUNCTION 'HR_INFOTYPE_OPERATION'
                EXPORTING
                  infty         = '0195'
                  number        = gw_p0195-pernr
                  validityend   = gw_p0195-endda
                  validitybegin = gw_p0195-begda
                  record        = gw_p0195
                  operation     = 'INS'
                  dialog_mode   = p_ctumod                      "Mod-01
                  tclas         = 'A'
                  nocommit      = ' '
                IMPORTING
                  return        = gw_return.
              CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
                EXPORTING
                  number = gw_p0195-pernr.
            ENDIF.
            IF gw_return IS NOT INITIAL.
              gw_log-msg_id = gw_return-id.
              gw_log-msg_num = gw_return-number.
              CONCATENATE gw_data_d-pernr gw_data_d-gcase INTO
              gw_log-msg_key SEPARATED BY '|'.
              gw_log-msg_typ  = gw_return-type.
              gw_log-rec_no   = gv_count.
              gw_log-msg_txt  = gw_return-message.
            ELSE.
              gw_log-msg_id = 'CUST'.
              gw_log-msg_num =  '000'.
              CONCATENATE gw_data_d-pernr gw_data_d-gcase INTO
              gw_log-msg_key SEPARATED BY '|'.
              gw_log-msg_typ  = 'S'.
              gw_log-rec_no   = gv_count.
              gw_log-msg_txt  = 'Record Created'(t02).
            ENDIF.
          ELSE.
            gw_log-msg_id = 'CUST'.
            gw_log-msg_num = 'XXX'.
            CONCATENATE gw_data_d-pernr gw_data_d-gcase INTO
            gw_log-msg_key SEPARATED BY '|'.
            gw_log-msg_typ  = 'E'.
            gw_log-rec_no   = gv_count.
           gw_log-msg_txt  =  'Case does not exists for Personnel No '(t03).
          ENDIF.
          APPEND gw_log TO gi_log.
          CLEAR : gw_log,gw_return,gw_data_d,gw_p0194,gw_p0195.
        ENDLOOP.
      ENDIF.
    ENDFORM.
    Thanks.

  • Upload the data using bapi

    hi,
    i am new for bapi , can anyone tell me how to upload data using bapi with example?
    plz tell how to find bapi & how to use in coding to upload the data?

    Hi ,
             To find Bapi There a tcode Bapi which will take you to bapi Explorer From there you can find required
              the Bapi Function Module and its Documentation .
      [  www.sap-img.com/abap/bapi-step-by-step-guidance.htm ]
    [http://www.sappro.com/tag.cfm?session=&tag=bapi%20programming]
    [https://wiki.sdn.sap.com/wiki/display/Snippets/SalesordercreationusingBAPI]
    Regards
    Nilesh

  • Error while uploading the data Using LSMW - Idoc method

    Hi Experts,
       I am working on LSMW using Idoc method. Till 12th step (Display converted data) i wasn't got any problem. For the Idoc method, I have to specify details to Idoc inbound processing from the menu settings.
    In that screen I have to specify file port, partner type and partner no. I have created a file port ZFILE. Can u tell me what ahould I pass in that screen? Where should be the file i.e in the application server or presentation server? What should be the directory and function  module. Can u provide step by step?
    After that I have to specify partn.type. What should I select for that?
    After that I have to specify partner no. Whether it is inbound or outbound?
    I got No data found for the following detials.
    port - ZFILE
    in the inbound file tab, e:\ as physical directory; EDI_PATH_CREATE_USERNAME as function module.
    Partner type - US
    Parnter no.  - LSMW with the inbound parameters message type - MATMAS and Process code - MATM.
    Please tell me how can I upload properly? Please don't ignore as i am asking same question again becasue I have gone through related threads also. But i didn't find the exact requirement.
    proper documentation will be rewarded.
    Thanks in Advance.
    James.

    Hello,
    I could identify the error. It was due to incorrect UOM. Problem resolved.
    Thanks,
    Madhura

  • I want to get the web cam and hide the data using steganography method ?

    i want to do steganography on web cam data, untill now i am able to do the video transmitting using jmf and now i am trying to get the actual video frame data and try to edit that and hide my secrete message. can anyone have any idea how to do this ?? i am a newbie in JMF please help me to get out of this stuff...!!!
    thank you

    http://web.archive.org/web/20080216001605/java.sun.com/products/java-media/jmf/2.1.1/solutions/RotationEffect.html
    For my senior capstone project, we had to hide binary data in a BMP image by encoding the bits into the LSB of the components of the pixel colors. You could do a similar thing with video data.
    The above sample code demonstrates the concept of a custom Effect class... something that modifies a data stream. You can extend it to create two Effect classes, one of which that would write secret data, and one of which that would read the secret data.
    Implementation details of how to get it working are up to you, but you can use the BufferToImage and ImageToBuffer classes to decode and encode the images into buffers.

  • Uploading the Data into BDC using Excel sheet

    HI Gurus,
    Iam uploading the Data Using Excel sheet.TCode:qp01.
    Upto 3 screens the data is passing in a very fine manner.
    From the fourth screen I'v to enter the Lineitem for a single material.
    Ex: Matnr is PJBRIX.
    For this material upto 3 screens the data is same ,but from the line item data,the PJBRIX has 3 characterstics.
    How can I upload that data.
    Structure:
    Matnr  Group GroupCounter MicCode Method  Lower Upper
    Pjbrix     5         6                  zsr001    zsr001   1       15
    Pjbrix     5         6                  zsr002     zsr003   4       20
    Pjbrix     5         6                  zsr006     zsr0018  2       18
    This is the Structure.
    Pls gv me the advise or Gv me the code asap.
    thanks in advance.

    HI Gurus,
    Iam uploading the Data Using Excel sheet.TCode:qp01.
    Upto 3 screens the data is passing in a very fine manner.
    From the fourth screen I'v to enter the Lineitem for a single material.
    Ex: Matnr is PJBRIX.
    For this material upto 3 screens the data is same ,but from the line item data,the PJBRIX has 3 characterstics.
    How can I upload that data.
    Structure:
    Matnr  Group GroupCounter MicCode Method  Lower Upper
    Pjbrix     5         6                  zsr001    zsr001   1       15
    Pjbrix     5         6                  zsr002     zsr003   4       20
    Pjbrix     5         6                  zsr006     zsr0018  2       18
    This is the Structure.
    Pls gv me the advise or Gv me the code asap.
    thanks in advance.

  • Upload the data for sales order using BAPI

    hi experts,
    how to upload the data for sales order using BAPI.
    what is the FM?
    it would be much helpful if i have the sample code as i am very new to BAPI.
    thanks and Regards
    Shyam

    Hi  Shyam
    Its very useful for u
    BAPISDORDER_GETDETAILEDLIST
    BAPI_ACC_SALES_ORDER_CHECK
    BAPI_ACC_SALES_ORDER_POST
    BAPI_ACC_SALES_QUOTA_CHECK
    BAPI_ACC_SALES_QUOTA_POST
    Reward all the helpful answers..
    With Regards
    Navin Khedikar

  • Transaction code used to upload the data in the application server SCM syst

    Hi
    Could you please anyone tell me the transaction code which has been used to upload the data into the application server in SCM ( APO) system from presentation server. 
    For ex : R/3 system CG3Y , CG3Z has been used to upload the data into application server similarly way could you please tell me the transaction code is used in the APO system for uploading the data into application server.
    Thanks advance for your support.
    Regards,
    Kiran

    try tcode SXDA_TOOLS - copy
    (1st you must fill all obligatory fields)
    A.

  • How to upload the data to 'abzu' transaction using bapi

    Hi Experts ,
    I need to upload the data to the (asset write up ) transaction 'abzu' and please help me inthis regard
    i found some bapi's like below
    BAPI_FIXEDASSET_CHANGE Changes an Asset
    BAPI_FIXEDASSET_CREATE Creates an Asset
    BAPI_FIXEDASSET_CREATE1 Creates an Asset
    BAPI_FIXEDASSET_GETDETAIL Display Detailed Information on a Fixed Asset
    BAPI_FIXEDASSET_GETLIST Information on Selected Assets
    BAPI_FIXEDASSET_OVRTAKE_CREATE BAPI for Legacy Data Transfer
    BAPI_FIXEDASSET_TEST BAPI for Legacy Data Transfer
    i tried with this bapies but unable to do the transfer the data ,
    please help me ,
    which is the exactly suitable bapi for uploading the data to 'abzu' transaction
    i apriciate you advanced ,
    please give me the exactly solution for this ,
    Regards.,

    Hi Experts ,
    I need to upload the data to the (asset write up ) transaction 'abzu' and please help me inthis regard
    i found some bapi's like below
    BAPI_FIXEDASSET_CHANGE Changes an Asset
    BAPI_FIXEDASSET_CREATE Creates an Asset
    BAPI_FIXEDASSET_CREATE1 Creates an Asset
    BAPI_FIXEDASSET_GETDETAIL Display Detailed Information on a Fixed Asset
    BAPI_FIXEDASSET_GETLIST Information on Selected Assets
    BAPI_FIXEDASSET_OVRTAKE_CREATE BAPI for Legacy Data Transfer
    BAPI_FIXEDASSET_TEST BAPI for Legacy Data Transfer
    i tried with this bapies but unable to do the transfer the data ,
    please help me ,
    which is the exactly suitable bapi for uploading the data to 'abzu' transaction
    i apriciate you advanced ,
    please give me the exactly solution for this ,
    Regards.,

  • Problem in the BDC program to upload the data from a flat file.

    Hi,
    I am required to write a BDC program to upload the data from a flat file. The conditions are as mentioned below:-
    1) Selection Screen will be prompted to user and user needs to provide:- File Path on presentation server (with F4 help for this obligatory parameter) and File Separator e.g. @,#,$,%,... etc(fields in the file will be separated by using this special character) or fields may be separated by tab(tab delimited).
    2) Finally after the data is uploaded, following messages need to be displayed:-
    a) Total Number of records successfully uploaded.
    b) Session Name
    c) Number of Sessions created.
    Problem is when each record is fetched from flat file, the record needs to be split into individual fields separated by delimiter or in case tab separated, then proceeding in usual manner.
    It would be great if you provide me either the logic, pseudocode, or sample code for this BDC program.
    Thanks,

    Here is an example program,  if you require the delimitor to be a TAB, then enter TAB on the selection screen, if you require the delimitor to be a comma, slash, pipe, whatever, then simply enter that value.  This example is simply the uploading of the file, not the BDC, I assume that you know what to do once you have the data into the internal table.
    REPORT zrich_0001.
    TYPES: BEGIN OF ttab,
            rec TYPE string,
           END OF ttab.
    TYPES: BEGIN OF tdat,
           fld1(10) TYPE c,
           fld2(10) TYPE c,
           fld3(10) TYPE c,
           fld4(10) TYPE c,
           END OF tdat.
    DATA: itab TYPE TABLE OF ttab.
    data: xtab like line of itab.
    DATA: idat TYPE TABLE OF tdat.
    data: xdat like line of idat.
    DATA: file_str TYPE string.
    DATA: delimitor TYPE string.
    PARAMETERS: p_file TYPE localfile.
    PARAMETERS: p_del(5) TYPE c.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      DATA: ifiletab TYPE filetable.
      DATA: xfiletab LIKE LINE OF ifiletab.
      DATA: rc TYPE i.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        CHANGING
          file_table = ifiletab
          rc         = rc.
      READ TABLE ifiletab INTO xfiletab INDEX 1.
      IF sy-subrc = 0.
        p_file = xfiletab-filename.
      ENDIF.
    START-OF-SELECTION.
      TRANSLATE p_del TO UPPER CASE.
      CASE p_del.
        WHEN 'TAB'.
          delimitor = cl_abap_char_utilities=>horizontal_tab.
        WHEN others.
          delimitor = p_del.
      ENDCASE.
      file_str = p_file.
      CALL METHOD cl_gui_frontend_services=>gui_upload
        EXPORTING
          filename = file_str
        CHANGING
          data_tab = itab.
      LOOP AT itab into xtab.
        CLEAR xdat.
        SPLIT xtab-rec AT delimitor INTO xdat-fld1
                                         xdat-fld2
                                         xdat-fld3
                                         xdat-fld4.
        APPEND xdat to idat.
      ENDLOOP.
      LOOP AT idat into xdat.
        WRITE:/ xdat-fld1, xdat-fld2, xdat-fld3, xdat-fld4.
      ENDLOOP.
    Regards,
    Rich Heilman

  • How to upload a data using BAPI_SALESORDER_CREATEFROMDAT2 without using LSM

    Hi,
           I want to upload a data from an input file on the presentation server using BAPI_SALESORDER_CREATEFROMDAT2 first uploading the data and then creating sales orders out of it.
           I will be highly obliged if anyone can guide me with it.
           I have tried the same using LSMW got succeeded in posting the idocs correctly and now I want to do it without using LSMW. The main intention of not using LSMW is that after creating sales orders, I want to display the messages related to number of sales order created, Number of records uploaded, Number of records.

    Hi
    BAPI_SALESORDER_CREATEFROMDAT2
    Text
    Sales order: Create Sales Order
    Functionality
    You can use this method to create sales orders.
    You must enter at least sales order header data (via ORDER_HEADER_IN structure) and partner data (via the ORDER_PARTNERS table) as input parameters.
    Enter the item data via the ORDER_ITEMS_IN table. You can allocate item numbers manually, by filling in the relevant fields, or the system does it, according to the settings for Customizing, by leaving the relevant fields blank.
    If you have configurable items, you must enter the configuration data in the ORDER_CFGS_REF, ORDER_CFGS_INST, ORDER_CFGS_PART_OF and ORDER_CFGS_VALUE tables.
    Credit cards can be transferred via the BAPICCARD structure, on the one hand, data for card identification, on the other, data for a transaction which has taken place in an external system.
    Once you have created the sales order successfully, you will receive the document number (SALESDOCUMENT field). Any errors that may occur will be announced via the RETURN parameter.
    If no sales area has been created in the sales order header, then the system creates the sales area from the sold-to party or ship-to party, who has been entered in the partner table. If a clear sales area cannot be created, you will receive a system message, and the sales order will not be created.
    Notes
    1. Mandatory entries:
    ORDER_HEADER_IN : DOC_TYPE     Sales document type
                       SALES_ORG    Sales organization
                       DISTR_CHAN   Distribution channel
                       DIVISION     Division
    ORDER_PARTNERS..: PARTN_ROLE   Partner role, SP sold-to party
                       PARTN_NUMB   Customer number
    ORDER_ITEMS_IN..: MATERIAL     Material number
    2. Ship-to party:
    If no ship-to party is entered, use the following: Ship-to party =
    sold-to party.
    3. Commit control:
    The BAPI does not have a database commit. This means that the relevant application must leave the commit, in order that can be carried out on on the database. The BAPI BAPI_TRANSACTION_COMMIT is available for this.
    4. German key words:
    The following key words must be entered in German, independantly of
    the logon language:
    DOC_TYPE     Sales document type, for example: TA for standard order
    PARTN_ROLE   Partner role, for example: WE for ship-to party
    Further Information
    You can find further information in the OSS. The note 93091 contains general information on the BAPIs in SD.
    Parameters
    SALESDOCUMENTIN
    ORDER_HEADER_IN
    ORDER_HEADER_INX
    SENDER
    BINARY_RELATIONSHIPTYPE
    INT_NUMBER_ASSIGNMENT
    BEHAVE_WHEN_ERROR
    LOGIC_SWITCH
    TESTRUN
    CONVERT
    SALESDOCUMENT
    RETURN
    ORDER_ITEMS_IN
    ORDER_ITEMS_INX
    ORDER_PARTNERS
    ORDER_SCHEDULES_IN
    ORDER_SCHEDULES_INX
    ORDER_CONDITIONS_IN
    ORDER_CONDITIONS_INX
    ORDER_CFGS_REF
    ORDER_CFGS_INST
    ORDER_CFGS_PART_OF
    ORDER_CFGS_VALUE
    ORDER_CFGS_BLOB
    ORDER_CFGS_VK
    ORDER_CFGS_REFINST
    ORDER_CCARD
    ORDER_TEXT
    ORDER_KEYS
    EXTENSIONIN
    PARTNERADDRESSES
    Regards
    Raj

  • Upload XML data using XSQL and HTTP Post ?

    Upload XML data using XSLQ and HTTP Post: is that possible ?
    An xsql contains an <xsql:insert-request table="aTable">
    The XML data file follows the ROWSET/ROW paradigm.
    What is the HTML form to upload the xml file to the XSQL ?
    I tried:
    <form action="myXSQL.xsql" method="POST" ENCTYPE="multipart/form-data">
    XML data file to upload: <input type="file">
    <input type="submit">
    </form>
    But the answer of myXSQL is:
    <xsql-status action="xsql:insert-request" result="No posted document to process" />
    Where is the problem ?
    Thank you.

    Hello,
    You are posting your XML file as a parameter therefore you should use the <xsql:insert-params/> tag, not the <xsql:insert-request/>. The insert-request can only handle data not posted via a parameter.
    Usage:
    <form action="myXSQL.xsql" method="GET" ENCTYPE="multipart/form-data">
    XML data file to upload: <input type="file" name="myXML">
    <input type="submit">
    </form>
    in combination with
    <xsql>
    <xsql:insert-params name="myXML" table="your table"/>
    </xsql>
    2 remarks:
    I was not able to succesfully POST the form. The answer was <xsql-status action="xsql:insert-request" result="No posted document to process" />. With GET is was succesfull.
    Second, if you use MSInternet explorer 5 or higher use could post the XML directly (not aw parameter) using an ActiveX object.
    Regards,
    Harm Verschuren

  • " Can not interpret the data in file " error while uploading the data in DB

    Dear All ,
    After running the below report I am getting the " Can not interpret the data in file " error.
    Need to upload the data in DB through excel or .txt file.
    Kindly advise to resolve the issue.
    REPORT  ZTEST_4.
    data : it like ZPRINT_LOC occurs 0 with header line,
    FILETABLE type table of FILE_TABLE,
    wa_filetable like line of filetable,
    wa_filename type string,
    rc type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    CHANGING
    FILE_TABLE = filetable
    RC = rc.
    IF SY-SUBRC = 0.
    read table filetable into wa_filetable index 1.
    move wa_filetable-FILENAME to wa_filename.
    Else.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = wa_filename
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = it.
    IF SY-SUBRC = 0.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    insert ZPRINT_LOC from table it.
    if sy-subrc = 0.
    commit work.
    else.
    rollback work.
    endif.
    Regards
    Machindra Patade
    Edited by: Machindra Patade on Apr 9, 2010 1:34 PM

    Dear dedeepya reddy,
    Not able to upload the excel but have sucess to upload the .csv file to db through the below code. Thanks for your advise.
    REPORT  ZTEST_3.
             internal table declaration
    DATA: itab TYPE STANDARD TABLE OF ZPRINT_LOC,
          wa LIKE LINE OF itab,
          wa1 like line of itab.
                       variable  declaration
    DATA: v_excel_string(2000) TYPE c,
           v_file LIKE v_excel_string VALUE    'C:\Documents and Settings\devadm\Desktop\test.csv',  " name of the file
            delimiter TYPE c VALUE ' '.         " delimiter with default value space
         read the file from the application server
      OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
        WHILE ( sy-subrc EQ 0 ).
          READ DATASET v_file INTO wa.
          IF NOT wa IS INITIAL.
            append wa TO itab.
          ENDIF.
          CLEAR wa.
        ENDWHILE.
      ENDIF.
    CLOSE DATASET v_file.
    EXEC SQL.
         TRUNCATE TABLE "ZPRINT_LOC"
    ENDEXEC.
    *------display the data from the internal table
    LOOP AT itab into wa1.
    WRITE:/ wa1-mandt,wa1-zloc_code,wa1-zloc_desc,wa1-zloc,wa1-zstate.
    ENDLOOP.
    insert ZPRINT_LOC from table itab.

Maybe you are looking for

  • Create a subset of latest images?

    So after i have created my website and had it up and running for a while i have got some feedback from people visiting. One thing i often get is if there is a way to see the latest added photos in my galleries. I have tried and figure it out but can'

  • Error on booting Up Sun Solaris V880

    I'm having Sun Solaris V880 with Solaris 8 OS and it's giving me this error: Boot device: /pci@8,600000/SUNW,qlc@2/fp@0,0/disk@w500000e0101a0e11,0:a File and args. Staring VXVM restore deamon VXVM starting in boot mode /usr/sbin/prtconf:getexecname (

  • Is the apple tv being sold now any faster than the 1st generation ones?

    I have a working Apple TV (40gb) that I purchased the 1st month it came out. Lately it appears to be acting real sluggish and I was wondering if the units they are selling now have better hardware specs? Thanks

  • Can I use my new iMac 20" as a monitor for for Power Mac G5?

    Actually I want to buy the new iMac 20" computer with the intel and then randomly use the iMac as a monitor display for my Power Mac G5 when I am editing video and then unhook it and use the Imac as a stand alone when I'm not editing video with my Po

  • Logic 7 won't install on my New Mac

    Hi, I have version 7.2 of Logic Pro which I've enjoyed using for many years. I recently purchased a MacBook Air and want to continue using Logic Pro. However, when I tried to install it, I got the following message: "you can't open the application Lo