Bdc while uploading Itab one extra record is coming with 000000 values

Hi
am getting one extra record with 00000 values for begda ,endda and object id  dont know why ?
code is like,
TYPES : BEGIN OF tt_record,
plvar  type   hrp1000-plvar,
otype  type   hrp1000-otype,
seark  type   hrp1000-objid,
begda  type   hrp1000-begda,
endda  type   hrp1000-endda,
short  type   hrp1000-short,
stext  type   hrp1000-stext,
END of tt_record.
DATA:gt_record TYPE TABLE OF tt_record,
     gs_record TYPE tt_record.
include bdcrecx1.
start-of-selection.
CLEAR : gt_record,gs_record.
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = 'C:\ABC.TXT'
  FILETYPE                      = 'ASC'
   HAS_FIELD_SEPARATOR           = 'X'
  TABLES
    DATA_TAB                      = gt_record
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
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards
Meeta

Hi  Txs for your response  i have created new file and my that problem solved but i want to know when i run in forground then only it works fine and update records but when i try in background it immd turn into incorrect log and when i run in Display error mode  i got these errors in error log,
Runtime error RAISE_EXCEPTION has occurred
Transaction error
Processing statistics
3 transactions read
0 transactions processed
3 transactions with errors
0 transactions deleted
Batch input processing ended
Any idea any one can guide me on this,
Regards
Meeta

Similar Messages

  • BDC while uploading one extra record is coming in Itab

    Hi
    while uploading data using FM am getting one extra record with few '0000000' kind of initial values for few of the fields like begda ,endda  and object id  code is like this,
    TYPES: BEGIN OF tt_record,
    plvar  type   hrp1000-plvar,
    otype  type   hrp1000-otype,
    seark  type   hrp1000-objid,
    begda  type   hrp1000-begda,
    endda  type   hrp1000-endda,
    short  type   hrp1000-short,
    stext  type   hrp1000-stext,
    END of tt_record.
    DATA:gt_record TYPE TABLE OF tt_record,
         gs_record TYPE tt_record.
    include bdcrecx1.
    start-of-selection.
    CLEAR : gt_record,gs_record.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\ABC.TXT'
      FILETYPE                      = 'ASC'
       HAS_FIELD_SEPARATOR           = 'X'
      TABLES
        DATA_TAB                      = gt_record
    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
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    pls let me know why is so ?
    Regards
    Meeta

    Hi  Txs for your response  i have created new file and my that problem solved but i want to know when i run in forground then only it works fine and update records but when i try in background it immd turn into incorrect log and when i run in Display error mode  i got these errors in error log,
    Runtime error RAISE_EXCEPTION has occurred
    Transaction error
    Processing statistics
    3 transactions read
    0 transactions processed
    3 transactions with errors
    0 transactions deleted
    Batch input processing ended
    Any idea any one can guide me on this,
    Regards
    Meeta

  • How to handle table control in BDC while uploading item details for anorder

    How to handle table control in BDC while uploading item details for an order?
    What is the use of CTU_PARAMS structure in BDC?
    In Finance I have done some changes to the layout set by coping to a zscript(duning letter) and how can assign the print program?
    What is the process to test the finance script?
    How can I see the print preview whether it is coming correctly or not?
    Thanks in advance.
    Regards.
    Abhilash.

    hi,
    for the bdc control refer the following link:
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    ctu_params:
    refer to the link
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/abap/dataTransfers-LSMW%2CALE%2C+BDC
    reward if useful,
    thanks and regards

  • While uploading data for employee as a vendor (with their loans and advance

    Hi,
    We are going for one company live. We are not taking HR module as of now.
    We are creating employee as a vendor for all employees with outstanding loans and advances.
    Now while uploading initial data for these employee (created as vendor), business wants personal loan outstanding balances employee as a vendor wise.
    Generally in case of normal vendor, we treat like
    Vendor A/C Dr
    to takeover creditors a/C  Cr
    while going for initial upload.
    In above case what should we do if we want outstanding balances (personal loan) while initial balance upload?
    Thanks,
    Taral Patel

    Hi,
    You can create a separate employee vendor for Advances paid to them with an assignment to a separate recon account titled as Advance to Employees. Later, you can upload the entries by Debiting the Employee Advance Vendor account and crediting Vendor Upload Account.
    Advances paid to employees (recon account) will represent in the TB as a separate line item forming an MIS.
    Regards
    Hari

  • Issue in BDC while uploading vendors in FK01 when processing mode is N

    Hello all,
    Created a BDC program for uploading vendors using FK01 and it was working fine in both the modes ( A and N). A new requirement came for which few postal codes will have tax mandatory jurisdiction code. After entering the adderss details in screen    'SAPMF02K' '0110' , a pop up box appers with the list of jurisdiction code for few postal codes. We need to select the first record and proceed (     'SAPMSSY0' '0120'.) .  This works perfectly in foreground.
    And I know that these pop up diaglog boxes will not appear in background mode.
    Can anyone help me in solving this. The pop up box displays the jurisdiction code from the structure TAX_TXJCD_POPUP_ADDRESS .
    below is the code sinnipet.
        PERFORM bdc_dynpro      USING 'SAPMSSY0' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR' '04/96'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTR'.
        PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
        PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
        PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
    Thanks & Regards,
    Sinthu

    Hi,
    I used the FM  "TAX_TXJCD_DETERMINE_TABLE" to get the tax jurisdiction code for a postal code and i passed it accordingly. Still I get the same error. Here is the code before and after the change.
    Before:
              PERFORM bdc_dynpro      USING 'SAPMSSY0' '0120'.
           PERFORM bdc_field       USING 'BDC_CURSOR' '04/03'.   "  for F4
            PERFORM bdc_field       USING 'BDC_OKCODE' '=ENTR'.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
    After using the FM:
          CALL FUNCTION 'TAX_TXJCD_DETERMINE_TABLE'
          EXPORTING
            im_country                   =  gw_data-land1
            im_region                    =  gw_data-regio
            im_zipcode                   =  gw_data-pstlz
    *   IM_CITY                      = ' '
    *   IM_COUNTY                    = ' '
          TABLES
            t_jurtab                     =  gi_taxcode
    * EXCEPTIONS
    *   INPUT_INCOMPLETE             = 1
    *   NO_TAX_PROCEDURE             = 2
    *   NO_TAXJURCODE_REQUIRED       = 3
    *   RFCDEST_NOT_FOUND            = 4
    *   TAXJURCODE_NOT_FOUND         = 5
    *   OTHER_ERROR                  = 6
    *   OTHERS                       = 7
        clear gw_taxcode.
        IF gi_taxcode IS NOT INITIAL.
          READ TABLE gi_taxcode INTO gw_taxcode INDEX 1.
          IF sy-subrc IS INITIAL.
            PERFORM bdc_dynpro      USING 'SAPMF02K' '0120'.
            PERFORM bdc_field       USING 'BDC_CURSOR' 'LFA1-KUNNR'.
            PERFORM bdc_field       USING 'BDC_OKCODE' '/00'.
            PERFORM bdc_field       USING 'LFA1-TXJCD' gw_taxcode-txjcd.
          endif.
    endif.
    Where am I going wrong? I am getting the value for txjcd.

  • Error in BDOC while uploading the pricing condition record to ECC from CRM

    Hi all,
    I have created a condition record for ECC pricing condition type (I have maintained all settings required for maintaining ECC condition type in CRM 7.0) in CRM 7.0. But theis condition record is not uploaded to ECC. I have checked BDOC, it is showing with error status for BDOC type "CND_M_SUP". The errors are as below.
    1. sBDoc CNBCCPSAP005 does not contain structure CDBD_CONDREF
    Message no. CND_MAST064
    2. sBDoc CNBCCPSAP005 does not contain structure CDBD_CONDREF
    Message no. CND_MAST064
    3. Service that caused the error: CND_MAST_INT_DEEP_MB_TO_SBDOC
    Message no. SMO8047Diagnosis
    A service caused/ reported an error.
    Can some one help me in fixing this issue  please.
    Thanks in advance,
    JM
    Edited by: JM on Sep 7, 2010 4:46 PM

    Hi,
    sBDOCs are not used in ECC to CRM or CRM to ECC data replication scenario. You can either ignore the error or disable mobile bridge.
    Regards
    Prasenjit

  • Error while uploading maximum no of records

    hi all,
    i am uploading my data through a excel sheet its working fine upto 18,000 records
    but when i increased the records to 20,000 its giving an error as
    error during import of clip board contents
    actually my file contains 39,000 records
    points will be rewarded for helpful answers
    Regards,
    phani.

    Hi anji,
    i feel the same and tried 18000 ones and remaining again its working fine
    one more thing now i am not getting the same error now i tried 20000 ones remaining ones now its not giving any error but when i give 39000 records at a
    time it gives a short dump due to time exceeds
    i think i have to run it through background do you say any option than this?
    points will be rewarded for helpful answers
    Regards,
    Phani.

  • How to upload 15 lakhs of record onto ztable with performance

    I have 15 to 20 lakhs of records in my internal table. I'm uploading it onto ztable in se11.
    While doing so, it's taking lot of time.
    I'm writing the following query:
    MODIFY ZTABLE       FROM TABLE  ITAB(INTERNAL TABLE NAME).
    Please let me know if there is any other alternative which gives better performance.
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Feb 2, 2010 11:59 AM

    Hi Rob,
    just trace a
    MODIFY ZTABLE FROM TABLE ITAB
    with ST05 and you will see what the DBI / DB does with this statement.
    If i remember right you are on DB6. Given current releases it migth be possible
    that a MERGE (which can handle arrays) will be used instead of UPDATE / INSERT on
    a row by row basis.
    On most platforms the modify from table is done row by row like this:
    UPDATE dbtab_row.
    IF sy-subrc NE 0.
       INSERT dbtab_row.
       IF sy-subrc NE 0.
          UPDATE dbtab_row.
       ENDIF.
    ENDIF.
    if the rows exist you will only see updates.
    if the rows don't exist you will see updates (no record) followed by an insert (1 record).
    In rare cases you might see update (no record), insert (no record, somebody else inserted this record after the first update), update (1 record).
    Kind regards,
    Hermann

  • Error while uploading mitigation controls

    Dear All,
    While uploading the mitigation controls i am facing with the below error. Can you please help me in resolving this error.
    Error in table dataVIRSA_CC_MITUSER
    SQL:=>Insert into  VIRSA_CC_MITMON(MITREFNO,MONITORID) Values(?,?)
    Record::Line Number :21 : D VIRSA_CC_MITMON TESTC1 TEST1
    Below is the text file which i am uploading into the RAR for test purposes
    M     VIRSA_CC_ADMIN     USERID     NAME     EMAILID     ROLEID               
    D     VIRSA_CC_ADMIN     TEST1     TEST1     test     M          
    M     VIRSA_CC_BUSUNIT     BUSID                              
    D     VIRSA_CC_BUSUNIT     TH                              
    M     VIRSA_CC_BUSUNITT     BUSID     LANG     DESCN                    
    D     VIRSA_CC_BUSUNITT     TH     EN     Thailand                    
    M     VIRSA_CC_BUAPPVR     BUSID     APPROVERID                    
    D     VIRSA_CC_BUAPPVR     TH     TEST1                         
    M     VIRSA_CC_BUMONITOR     BUSID     MONITORID                         
    D     VIRSA_CC_BUMONITOR     TH     TEST1                         
    M     VIRSA_CC_MITREF     MITREFNO     BUSID     APPROVERID               
    D     VIRSA_CC_MITREF     TESTC1     TH     TEST1                    
    M     VIRSA_CC_MITREFT     MITREFNO     LANG     DESCN                    
    D     VIRSA_CC_MITREFT     TESTC1     EN     Test mitigation control               
    M     VIRSA_CC_MITRISK     MITREFNO     RISKID                         
    D     VIRSA_CC_MITRISK     TESTC1     F006*                         
    M     VIRSA_CC_MITMON     MITREFNO     MONITORID                         
    D     VIRSA_CC_MITMON     TESTC1     TEST1                         
    M     VIRSA_CC_MITRPT     MITREFNO     ACTIONS     VSYSKEY     MONITORID     FREQUENCY          
    M     VIRSA_CC_MITUSER     MITREFNO     RISKID     USERID     VALIDFROM     VALIDTO     MONITORID     STATUS
    M     VIRSA_CC_MITROLE     MITREFNO     RISKID     ROLEID     VALIDFROM     VALIDTO     MONITORID     STATUS
    D     VIRSA_CC_MITROLE     TESTC1     F006*     Z1.*.ASST-SC-FINC-MGR     6/9/2010     7/25/2010     TEST1     0     
    M     VIRSA_CC_MITHROBJ     MITREFNO     RISKID     HROBJ     HROBJTYP     VALIDFROM     VALIDTO     MONITORID     STATUS
    M     VIRSA_CC_MITPROF     MITREFNO     RISKID     PROFILE     VALIDFROM     VALIDTO     MONITORID     STATUS
    M     VIRSA_CC_MITUSRORG     MITREFNO     RISKID     USERID     ORGRULEID     VALIDFROM     VALIDTO     MONITORID     STATUS
    M     VIRSA_CC_DETDESC     OBJECT_TYPE     OBJECT_ID     LANG     DETAIL_DESCN     
    D     VIRSA_CC_DETDESC     MIT     TESTC1     EN     Test Mitigation control                    
    We are not mitigating users now. Only roles are getting mitigated and hence we have not provided any values to the MIT USER table.
    Thanks and Best Regard,
    Srihari.K

    Dear Varun,
    Thanks for your reply. It helped me a lot. But however i am facing the following issue while uploading the mitigation controls
    After exporting the mitigation file from RAR, we opened the text file in a spreadsheet format and added few lines to the file and saved in the same text format or in UTF-8 format also
    After uploading the same into RAR again after changes we are facing similar errors mentioned in above query.
    But when we add lines  directly in the wordpad and upload the file then it is successful.
    We have to add so many mitigation controls and roles to be assigned for which excel would be easy way to dump.
    Is there anything wrong we  are doing here in editing and converting the files.
    Thanks and Best Regards,
    Srihari.K

  • Turning off internal monitor while using external one

    Hello, Apple Support Communities.
    Before OSX Lion, anyone could turn off internal monitor while using external one, by waking up computer with lid closed, and the internal monitor will be kept turned off. But now, -I wonder what made Apple to think this way- Lion will turn on the internal one back on.
    I don't care about all sorts of reasons why should I or shouldn't I desire to this. I just want it, because I have nice big monitor, which is apparently bigger than my Macbook Pro. Besides using double monitor will just exhaust my poor laptop. -mine is bit old-
    I found ridicoulus answer from community, saying I should try fridge magnet. Sorry, but I don't want risk my whole computer, especially my HDD from getting magnetic damage. It happened so many times, -thanks my little bro- so now I am sick of magnet. I don't think Apple will cover this AKA magnetic damage anyway. -It wouldn't just damage, just erase your HDD-
    So.... Any helpful insights? Thanks.

    Nevermind. I found solution. Though it cost me 24 bucks.
    Now Apple is seriously making me to consider to roll back to sucking Windows.
    Thanks Jobs!

  • Error While using HR_INFOTYPE_OPERATION to delete records

    Hi All
    I was able to find simlar error in SDN but it did not work for me. I am using HR_INFOTYPE_OPERATION  to delete PA2006 records and update with new values. I get the following error message "No data stored for 2006 in the selected period". But The records exist. I debugged and found it fails for authorization checks. I have all the authorizations as I am able to delete it using PA30.
    FYI inserting works fine.
    Please advice.
    Thanks, Raj

    Hi Santosh
    I used the same code which you have send. Below is the one. FYI, throught my debug, I was able to figure out it fails in authorization, even though I have all authorization and I was able to delete using PA30. Please advice.
    Below is teh code that I used.
        CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
          EXPORTING
            number       = t_file1-pernr
          IMPORTING
            return       = t_return
            locking_user = sy-uname.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '2006'
              NUMBER                 = t_file1-pernr
              SUBTYPE                = t_file1-subty
              VALIDITYEND            = t_file1-endda
              VALIDITYBEGIN          = t_file1-begda
              RECORD                 = P2006
              OPERATION              = 'MOD'
              DIALOG_MODE            = '1'
              NOCOMMIT               = 'X'
             IMPORTING
             RETURN                 = t_return
             KEY                    = personaldatakey.
      "Unlock the employee
          CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = t_file-pernr
            IMPORTING
              return = t_return.
    Thanks, Raj

  • Error  while uploading data in table t_499s through BDC Prog

    Hi
    am facing problem while uploading data in table t_499s through BDC Program  , if there is more than 15 records in file its not allowing to upload kindly suggest what to do
    Thanx
    Mukesh s

    Hi,
    See if you want to update only single table, which has User maintenance allowed
    Use Modify statement.
    EX:
    LOOP AT ITAB INTO WA_TAB.
        MOVE-CORRESPONDING WA_TAB TO T499S.
        MODIFY T499S.
        CLEAR T499S.
      ENDLOOP.
    It will update the table, to check go to sm30 , and check in V_T499S.
    Rgds
    Aeda

  • 'Create' Push button is not working in BDC and LSMW while uploading G/L master data

    Hello Experts:
    I am facing the following problem:
    While uploading G/L master data with the BDC program, 'create' push button is not working  even after executing following lines.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=ACC_CRE'.
    Create G/L account  screen is not coming in BDC. Please suggest me what to do.
    Thanks !!

    Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
    Re: 'Create' Push button is not working in BDC and LSMW while uploading G/L master data
    Hi Glen Anthony
    Thank you for the reply Glen Anthony please take a look at the following code.
    REPORT  ZFI_BDC_FS00
            NO STANDARD PAGE HEADING LINE-SIZE 255.
    *INCLUDE BDCRECX1.
    TYPES : BEGIN OF STR,
       BUKRS TYPE GLACCOUNT_SCREEN_KEY-BUKRS,        "Company Code
       SAKNR TYPE GLACCOUNT_SCREEN_KEY-SAKNR,        "G/L Account Number
       KTOKS TYPE GLACCOUNT_SCREEN_COA-KTOKS,        "G/L Account Group
       XPLACCT TYPE GLACCOUNT_SCREEN_COA-XPLACCT,    "P&L statement account
       XBILK TYPE GLACCOUNT_SCREEN_COA-XBILK,        "Indicator: Account is a balance sheet account?
       TXT20_ML TYPE GLACCOUNT_SCREEN_COA-TXT20_ML,  "G/L account short text
       TXT50_ML TYPE GLACCOUNT_SCREEN_COA-TXT50_ML,  "G/L account short text
       WAERS TYPE GLACCOUNT_SCREEN_CCODE-WAERS,      "Account currency
       XSALH TYPE GLACCOUNT_SCREEN_CCODE-XSALH,      "Indicator: Only Manage Balances in Local Currency
       MWSKZ TYPE GLACCOUNT_SCREEN_CCODE-MWSKZ,      "Tax Category in Account Master Record
       XMWNO TYPE GLACCOUNT_SCREEN_CCODE-XMWNO,      "Indicator: Tax code is not a required field
       MITKZ TYPE GLACCOUNT_SCREEN_CCODE-MITKZ,      "Account is reconciliation account
       XOPVW TYPE GLACCOUNT_SCREEN_CCODE-XOPVW,      "Indicator: Open item management?
       XKRES TYPE GLACCOUNT_SCREEN_CCODE-XKRES,      "Indicator: Can Line Items Be Displayed by Account?
       ZUAWA TYPE GLACCOUNT_SCREEN_CCODE-ZUAWA,      "Key for sorting according to assignment numbers
       FSTAG TYPE GLACCOUNT_SCREEN_CCODE-FSTAG,      "Field status group
       XINTB TYPE GLACCOUNT_SCREEN_CCODE-XINTB,      "Indicator: Is account only posted to automatically?
       END OF STR.
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
            IT_BDCDATA TYPE TABLE OF BDCDATA WITH HEADER LINE,
            TXT(4096) TYPE C OCCURS 0,
            MSG TYPE STRING,
            COUNT(5) TYPE N.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
       PARAMETERS : MY_FILE TYPE RLGRAP-FILENAME.
    SELECTION-SCREEN : END OF BLOCK B1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR MY_FILE.
    CALL FUNCTION 'F4_FILENAME'
      EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
    *   FIELD_NAME          = ' '
      IMPORTING
        FILE_NAME           = MY_FILE
    CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
       EXPORTING
    *   I_FIELD_SEPERATOR          =
    *   I_LINE_HEADER              =
         I_TAB_RAW_DATA             = TXT
         I_FILENAME                 = MY_FILE
       TABLES
         I_TAB_CONVERTED_DATA       = ITAB[]
      EXCEPTIONS
        CONVERSION_FAILED          = 1
        OTHERS                     = 2
    IF SY-SUBRC <> 0.
    * IMPLEMENT SUITABLE ERROR HANDLING HERE
    ENDIF.
    START-OF-SELECTION.
    COUNT = 0.
    LOOP AT ITAB.
    *PERFORM OPEN_GROUP.
    REFRESH  IT_BDCDATA.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_KEY-BUKRS'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=ACC_CRE'.
    *PERFORM BDC_FIELD       USING 'BDC_CURSOR'
    *                              'GLACCOUNT_SCREEN_KEY-BUKRS'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_KEY-SAKNR'
                                   ITAB-SAKNR. "'5'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_KEY-BUKRS'
                                   ITAB-BUKRS. "'TATA'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=2102_GROUP'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-KTOKS'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                   ITAB-XPLACCT. "'X'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=2102_BS_PL'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-XBILK'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XPLACCT'
                                   ITAB-XPLACCT. "''.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                   ITAB-XBILK. "'X'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=TAB02'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-KTOKS'
                                   ITAB-KTOKS. "'GL'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-XBILK'
                                   ITAB-XBILK. "'X'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_COA-TXT50_ML'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-TXT20_ML'
                                   ITAB-TXT20_ML. "'G/L ACCOUNT'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_COA-TXT50_ML'
                                   ITAB-TXT50_ML. "'G/L ACCOUNT'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=TAB03'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-WAERS'
                                   ITAB-WAERS. "'INR'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XSALH'
                                   ITAB-XSALH. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-MWSKZ'
                                   ITAB-MWSKZ. "'*'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XMWNO'
                                   ITAB-XMWNO. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-MITKZ'
                                   ITAB-MITKZ. "''.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_CCODE-ZUAWA'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XOPVW'
                                   ITAB-XOPVW. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XKRES'
                                   ITAB-XKRES. "'X'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-ZUAWA'
                                   ITAB-ZUAWA. "'1'.
    PERFORM BDC_DYNPRO      USING 'SAPLGL_ACCOUNT_MASTER_MAINTAIN' '2001'.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                   '=SAVE'.
    PERFORM BDC_FIELD       USING 'BDC_CURSOR'
                                   'GLACCOUNT_SCREEN_CCODE-XINTB'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-FSTAG'
                                   ITAB-FSTAG. "'G019'.
    PERFORM BDC_FIELD       USING 'GLACCOUNT_SCREEN_CCODE-XINTB'
                                   ITAB-XINTB. "'X'.
    *PERFORM BDC_TRANSACTION USING 'FS00'.
    CALL TRANSACTION 'FS00' USING IT_BDCDATA MODE 'E' UPDATE 'S'.
    COUNT = COUNT + 1.
    *PERFORM CLOSE_GROUP.
    ENDLOOP.
    CONCATENATE COUNT ' RECORDS UPDATED SUCCESSFULLY' INTO MSG.
    MESSAGE MSG TYPE 'I'.
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
       CLEAR IT_BDCDATA.
       IT_BDCDATA-PROGRAM  = PROGRAM.
       IT_BDCDATA-DYNPRO   = DYNPRO.
       IT_BDCDATA-DYNBEGIN = 'X'.
       APPEND IT_BDCDATA.
    ENDFORM.
    *        INSERT FIELD                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
    *  IF FVAL <> NODATA.
         CLEAR IT_BDCDATA.
         IT_BDCDATA-FNAM = FNAM.
         IT_BDCDATA-FVAL = FVAL.
         APPEND IT_BDCDATA.
    *  ENDIF.
    ENDFORM.

  • Suppose one lack records having in BDC uplaod,which one can i propose uploa

    Suppose one lack records having in BDC uplaod,which one can i propose uploading these records?call transaction or session method which one is better?How?

    Hi Hassan,
    The Session method is better and used for processing large amount of data and it will give error log itself if any comes. and the other thing is you can run session method in background but call transaction is not possible to run in background.
    Session method can handle multiple transactions at a time, while in call transaction , only one at a time.
    But call transaction is much faster than Session.
    Database update is synchronous in Session,while it is either synchronous or asynchronous in Call Transaction.
    here is the exact differences..
    Call transaction:
    Session is used to handle larger amount of data and error handling in implicit, while in call transaction, you have to explicitly handle error situation.
    1.Synchronous Processing
    2.You can update the database both synchronously and asynchrounously.
    3.Transfer of data for individual transaction
    4.No batch input session is created.
    5.Faster than other batch input techniques.
    6.No automatic error log and restart capability is available here.
    7.Not recommended for bulk data transfer
    Session.
    1.Asynchronous Processing
    2.Synchronous database updates
    3.Transfer of data for multiple transaction
    4.Batch input sesssion is created here.
    5.Automatic error handling and efficient restart capability incase of error transaction.
    6.SAP's standard approach for data transfer
    7.Highly recommended for Bulk data transfer.
    8.Execution is slower than CALL TRANSACTION.
    for details you can go thru this link
    BDC
    Please go thru this link.
    Reagrds,
    Amit.
    Reward points if useful

  • To Tackle duplicate data while uploading through BDC

    Dear All,
    I am uploading data through BDC in HR for Infotype 2011. While uploading the data i want to check for data which is already available for same date & time and display error accordingly.
    Kindly help me in this. Also is it possible to handle this by setting infotype charactertics to accept only single values or we can handle it through our code.
    Thanks in advance.
    Regards,
    Swapnil

    Hi,
    The only characteristic that handle the availibility of record at one time is the time constraint indicator and won't be very usefull to you for a time event infotype. In your case you will have to check if the entry you are creating already exist in TEVEN table.
    Kr,
    m.

Maybe you are looking for