Adding Data to the database for SAP Transactions

Hi
I'm new to the whole ABAP. I would like to enquire about adding transaction data in SAP through ABAP but it must be immediate.
I know that one can use a BAPI to add data and can rollback if any problems occur.
But if no BAPI exists how does one write code to add a document to the SAP database but with everything SAP transaction requires like the BAPI. What is the process and how???
So let say I wanted to do FB01 which is SAP FI document and must be immediate. There is a BAPI that exists for it but if there was not one how would I do this???
I know one can also use BDC but that creates a batch and then needs to be executed in SM35, I want a way to add data for two or three SAP transactions, if any problems occur with any of the steps rollback everything else commit everything to the database.
Any simple detail examples (code) that satisfy the above will be greatly appreciated and REWARDED.
Thanks in advance

Luis,
i have a code exactly same BDC for FB01.
refer:
REPORT z_etching_fb01
       NO STANDARD PAGE HEADING LINE-SIZE 255.
*etching invoice load
INCLUDE bdcrecx1.
TYPE-POOLS: truxs , slis.
*PARAMETERS: dataset(132) LOWER CASE DEFAULT
*                              'c:\temp\etchingload.txt'.
PARAMETER: pfile LIKE rlgrap-filename." OBLIGATORY.
SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
PARAMETER:    p_kunnr LIKE kna1-kunnr OBLIGATORY,           "kna1-kunnr
              p_bukrs LIKE bseg-bukrs,
              p_mwskz LIKE t007a-mwskz OBLIGATORY,"t007a-mwskz
              p_prctr LIKE cepc-prctr OBLIGATORY,"cepc-prctr
*            p_newko LIKE ska1-saknr OBLIGATORY DEFAULT 41000000,"
            p_budat LIKE bkpf-budat OBLIGATORY ,
            p_hkont LIKE bseg-hkont OBLIGATORY DEFAULT 41000000 ,
            p_waers TYPE waers OBLIGATORY DEFAULT 'GBP'."tcurr-waers
SELECTION-SCREEN END OF BLOCK a.
SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
PARAMETER : report AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b.
***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
*   If it is nessesary to change the data section use the rules:
*   1.) Each definition of a field exists of two lines
*   2.) The first line shows exactly the comment
*       '* data element: ' followed with the data element
*       which describes the field.
*       If you don't have a data element use the
*       comment without a data element name
*   3.) The second line shows the fieldname of the
*       structure, the fieldname must consist of
*       a fieldname and optional the character '_' and
*       three numbers and the field length in brackets
*   4.) Each field must be type C.
*** Generated data section with specific formatting - DO NOT CHANGE  ***
*                          ALV                                           *
DATA: it_fieldcat     TYPE    slis_t_fieldcat_alv,
      wa_fieldcat     LIKE    LINE OF it_fieldcat,
      it_top_of_page  TYPE    slis_t_listheader,
      ls_layout       TYPE    slis_layout_alv,
      gt_events       TYPE    slis_t_event.
DATA: it_raw TYPE truxs_t_text_data.
DATA: BEGIN OF record,
* data element: BLDAT
        bldat_001(010),   "Invoice Date
* data element: BLART
        blart_002(002),   " Doc Type DR or DG if credit
* data element: BUKRS
        bukrs_003(004),   " Company Code
* data element: BUDAT
        budat_004(010),   "Posting Date
* data element: MONAT
        monat_005(002),   "period"
* data element: WAERS
        waers_006(005),   "Currency
* data element: XBLNR1
        xblnr_007(016),   "Invoice Number
* data element: BKTXT
        bktxt_008(025),   "PO number
* data element: SAEOBJART
        docid_009(010),
* data element: NEWBS
        newbs_010(002),   "posting Key
* data element: NEWKO
        newko_011(017),   "Customer number or GL account
* data element: WRBTR
        wrbtr_012(016),   "Amount
* data element: DZTERM
        zterm_013(004),
* data element: DZBD1T
        zbd1t_014(003),
* data element: DZFBDT
        zfbdt_015(010),
* data element: DZUONR
        zuonr_016(018),   "Invoice Number
* data element: SGTXT
        sgtxt_017(050),   " PO number
* data element: NEWBS
        newbs_018(002),
* data element: NEWKO
        newko_019(017),   "GL Account
* data element: WRBTR
        wrbtr_020(016),   "Amount
* data element: MWSKZ
        mwskz_021(002),   "Tax
* data element: DZUONR
        zuonr_022(018),   "Invoice Number
* data element: SGTXT
        sgtxt_023(050),   "PO Number
* data element: PRCTR
        prctr_024(010),   "Profit Center
* data element: WRBTR
        wrbtr_025(016),   " Amount
* data element: MWSKZ
        mwskz_026(002),   "Tax
* data element: DZUONR
        zuonr_027(018),   "Invoice Number
* data element: SGTXT
        sgtxt_028(050),   "PO Number
* data element: FMORE
        fmore_029(001),
* data element: PRCTR
        prctr_030(010),   "Pr Center
* data element: FWSTE
        fwste_01_031(016),
      END OF record.
DATA: BEGIN OF it_excel OCCURS 0,
* data element: XBLNR1
      xblnr_007(016),   "Invoice Number
* data element: BLDAT
      bldat_001(010),   "Invoice Date
* data element: WRBTR
      wrbtr_012(016),   "Amount
* data element: WRBTR
      wrbtr_025(016),   " Tax Amount
* data element: WRBTR
      wrbtr_020(016),   "Gross Amount
* data element: BLART
      blart_002(002),   " No of units
* data element: MONAT
      monat_005(002),   "No of units second test"
* data element: BKTXT
        bktxt_008(025),   "PO number
* data element: SGTXT
      sgtxt_017(050),   " PO number
* data element: BUKRS
      bukrs_003(004),   " Company Code
* data element: BUDAT
      budat_004(010),   "Posting Date
*        budat_004 TYPE string,   "Posting Date
* data element: WAERS
      waers_006(005),   "Currency*
* data element: NEWKO
      newko_011(017),   "Customer number or GL account
* data element : kunnr
      kunnr_019(010),   " customer
      mwskz(002),
     prctr(010),
      date(002),
      month(002),
** data element: BKTXT
*      bktxt_008(025),   "PO number
** data element: SAEOBJART
*      docid_009(010),
** data element: NEWBS
*      newbs_010(002),   "posting Key
** data element: DZTERM
*      zterm_013(004),
** data element: DZBD1T
*      zbd1t_014(003),
** data element: DZFBDT
*      zfbdt_015(010),
** data element: DZUONR
*      zuonr_016(018),   "Invoice Number
** data element: NEWBS
*      newbs_018(002),
** data element: NEWKO
*      newko_019(017),   "GL Account
** data element: MWSKZ
*      mwskz_021(002),   "Tax
** data element: DZUONR
*      zuonr_022(018),   "Invoice Number
** data element: SGTXT
*      sgtxt_023(050),   "PO Number
** data element: PRCTR
*      prctr_024(010),   "Profit Center
** data element: MWSKZ
*      mwskz_026(002),   "Tax
** data element: DZUONR
*      zuonr_027(018),   "Invoice Number
** data element: SGTXT
*      sgtxt_028(050),   "PO Number
** data element: FMORE
*      fmore_029(001),
** data element: PRCTR
*      prctr_030(010),   "Pr Center
** data element: FWSTE
*      fwste_01_031(016),
    END OF it_excel.
DATA : BEGIN OF it_bkpf OCCURS 0,
        belnr LIKE bkpf-belnr,
        budat LIKE bkpf-budat,
        bldat LIKE bkpf-bldat,
        xblnr LIKE bkpf-xblnr,
        bktxt LIKE bkpf-bktxt,
        total LIKE bseg-dmbtr,
        numdocs TYPE p DECIMALS 0,
        END OF it_bkpf,
        BEGIN OF it_bseg OCCURS 0,
          belnr LIKE bseg-belnr,
          dmbtr LIKE bseg-dmbtr,
          mwsts LIKE bseg-mwsts,
          pswsl LIKE bseg-pswsl,
          END OF it_bseg,
          BEGIN OF it_final OCCURS 0,
            belnr LIKE bkpf-belnr,
            budat LIKE bkpf-budat,
            bldat LIKE bkpf-bldat,
            xblnr LIKE bkpf-xblnr,
            bktxt LIKE bkpf-bktxt,
            dmbtr LIKE bseg-dmbtr,
            mwsts LIKE bseg-mwsts,
            pswsl LIKE bseg-pswsl,
            END OF it_final.
***** End generated data section ***
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
  PERFORM sub_browse_file. "Get file name
START-OF-SELECTION.
  PERFORM sub_data_load.  " Transfer excel into internal table.
  PERFORM sub_calc_excel.
  IF report = 'X'.
*    PERFORM data_selection.
*    PERFORM data_move.
*********************************GET ALV  DATA
    PERFORM alv_get_data.
*********************************ALV GRID DATA
    PERFORM alv_grid.
  ENDIF.
*if report = ''.
*  PERFORM write.
*  PERFORM open_dataset USING dataset.
  PERFORM open_group.
*  DO.
*    READ DATASET dataset INTO record.
  LOOP AT it_excel.
*   IF sy-subrc <> 0. EXIT. ENDIF.
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF05A-NEWKO'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'BKPF-BLDAT'
                                  it_excel-bldat_001.
    PERFORM bdc_field       USING 'BKPF-BLART'
                                  'DR'." record-blart_002.
    PERFORM bdc_field       USING 'BKPF-BUKRS'
                                  it_excel-bukrs_003.
    PERFORM bdc_field       USING 'BKPF-BUDAT'
                                  it_excel-budat_004.
    PERFORM bdc_field       USING 'BKPF-MONAT'
                                '3'. "record-monat_005.
    PERFORM bdc_field       USING 'BKPF-WAERS'
                                  it_excel-waers_006.
    PERFORM bdc_field       USING 'BKPF-XBLNR'
                                  it_excel-xblnr_007.
    PERFORM bdc_field       USING 'BKPF-BKTXT'
                                  it_excel-bktxt_008.
    PERFORM bdc_field       USING 'FS006-DOCID'
                                 '*' ."record-docid_009.
    PERFORM bdc_field       USING 'RF05A-NEWBS'
                                '01'." record-newbs_010.
    PERFORM bdc_field       USING 'RF05A-NEWKO'
                                it_excel-kunnr_019  .
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'RF05A-NEWKO'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'BSEG-WRBTR'
                                it_excel-wrbtr_020."  it_excel-wrbtr_012.
    PERFORM bdc_field       USING 'BSEG-ZTERM'
                                  'NT30' ."  record-zterm_013.
    PERFORM bdc_field       USING 'BSEG-ZBD1T'
                                  '30'."record-zbd1t_014.
    PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                  it_excel-bldat_001."record-zfbdt_015.
    PERFORM bdc_field       USING 'BSEG-ZUONR'
                                  it_excel-xblnr_007."record-zuonr_016.
    PERFORM bdc_field       USING 'BSEG-SGTXT'
                                  it_excel-sgtxt_017.
    PERFORM bdc_field       USING 'RF05A-NEWBS'
                                 '50'." record-newbs_018.
    PERFORM bdc_field       USING 'RF05A-NEWKO'
                               it_excel-newko_011."  record-newko_019."Gl account
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'BSEG-SGTXT'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '/00'.
    PERFORM bdc_field       USING 'BSEG-WRBTR'
                                  it_excel-wrbtr_012."changes from 12 to 20
    PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                 it_excel-mwskz." record-mwskz_021.
    PERFORM bdc_field       USING 'BSEG-ZUONR'
                                it_excel-xblnr_007."  record-zuonr_022.
    PERFORM bdc_field       USING 'BSEG-SGTXT'
                                 it_excel-sgtxt_017."  record-sgtxt_023.
    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'COBL-PRCTR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTE'.
    PERFORM bdc_field       USING 'COBL-PRCTR'
                                it_excel-prctr ." record-prctr_024.
    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'BSEG-WRBTR'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=STER'.
    PERFORM bdc_field       USING 'BSEG-WRBTR'
                                 it_excel-wrbtr_012." it_excel-wrbtr_025.
    PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                  it_excel-mwskz.
    PERFORM bdc_field       USING 'BSEG-ZUONR'
                                 it_excel-xblnr_007." record-zuonr_027.
    PERFORM bdc_field       USING 'BSEG-SGTXT'
                                 it_excel-sgtxt_017." record-sgtxt_028.
    PERFORM bdc_field       USING 'DKACB-FMORE'
                                 'X' ."record-fmore_029.
    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'COBL-PARGB'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=ENTE'.
    PERFORM bdc_field       USING 'COBL-PRCTR'
                                 it_excel-prctr." record-prctr_030.
    PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
    PERFORM bdc_field       USING 'BDC_CURSOR'
                                  'BSET-FWSTE(01)'.
    PERFORM bdc_field       USING 'BDC_OKCODE'
                                  '=GOBU'.
    PERFORM bdc_field       USING 'BSET-FWSTE(01)'
                                it_excel-wrbtr_025."  record-fwste_01_031.
    PERFORM bdc_transaction USING 'FB01'.
    REFRESH:bdcdata,messtab.
  ENDLOOP.
  REFRESH:bdcdata.
**    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'RF05A-NEWKO'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '/00'.
*    PERFORM bdc_field       USING 'BKPF-BLDAT'
*                                  record-bldat_001.
*    PERFORM bdc_field       USING 'BKPF-BLART'
*                                  record-blart_002.
*    PERFORM bdc_field       USING 'BKPF-BUKRS'
*                                  record-bukrs_003.
*    PERFORM bdc_field       USING 'BKPF-BUDAT'
*                                  record-budat_004.
*    PERFORM bdc_field       USING 'BKPF-MONAT'
*                                  record-monat_005.
*    PERFORM bdc_field       USING 'BKPF-WAERS'
*                                  record-waers_006.
*    PERFORM bdc_field       USING 'BKPF-XBLNR'
*                                  record-xblnr_007.
*    PERFORM bdc_field       USING 'BKPF-BKTXT'
*                                  record-bktxt_008.
*    PERFORM bdc_field       USING 'FS006-DOCID'
*                                  record-docid_009.
*    PERFORM bdc_field       USING 'RF05A-NEWBS'
*                                  record-newbs_010.
*    PERFORM bdc_field       USING 'RF05A-NEWKO'
*                                  record-newko_011.
*    PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'RF05A-NEWKO'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '/00'.
*    PERFORM bdc_field       USING 'BSEG-WRBTR'
*                                  record-wrbtr_012.
*    PERFORM bdc_field       USING 'BSEG-ZTERM'
*                                  record-zterm_013.
*    PERFORM bdc_field       USING 'BSEG-ZBD1T'
*                                  record-zbd1t_014.
*    PERFORM bdc_field       USING 'BSEG-ZFBDT'
*                                  record-zfbdt_015.
*    PERFORM bdc_field       USING 'BSEG-ZUONR'
*                                  record-zuonr_016.
*    PERFORM bdc_field       USING 'BSEG-SGTXT'
*                                  record-sgtxt_017.
*    PERFORM bdc_field       USING 'RF05A-NEWBS'
*                                  record-newbs_018.
*    PERFORM bdc_field       USING 'RF05A-NEWKO'
*                                  record-newko_019.
*    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'BSEG-SGTXT'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '/00'.
*    PERFORM bdc_field       USING 'BSEG-WRBTR'
*                                  record-wrbtr_020.
*    PERFORM bdc_field       USING 'BSEG-MWSKZ'
*                                  record-mwskz_021.
*    PERFORM bdc_field       USING 'BSEG-ZUONR'
*                                  record-zuonr_022.
*    PERFORM bdc_field       USING 'BSEG-SGTXT'
*                                  record-sgtxt_023.
*    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'COBL-PRCTR'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '=ENTE'.
*    PERFORM bdc_field       USING 'COBL-PRCTR'
*                                  record-prctr_024.
*    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'BSEG-WRBTR'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '=STER'.
*    PERFORM bdc_field       USING 'BSEG-WRBTR'
*                                  record-wrbtr_025.
*    PERFORM bdc_field       USING 'BSEG-MWSKZ'
*                                  record-mwskz_026.
*    PERFORM bdc_field       USING 'BSEG-ZUONR'
*                                  record-zuonr_027.
*    PERFORM bdc_field       USING 'BSEG-SGTXT'
*                                  record-sgtxt_028.
*    PERFORM bdc_field       USING 'DKACB-FMORE'
*                                  record-fmore_029.
*    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'COBL-PARGB'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '=ENTE'.
*    PERFORM bdc_field       USING 'COBL-PRCTR'
*                                  record-prctr_030.
*    PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
*    PERFORM bdc_field       USING 'BDC_CURSOR'
*                                  'BSET-FWSTE(01)'.
*    PERFORM bdc_field       USING 'BDC_OKCODE'
*                                  '=GOBU'.
*    PERFORM bdc_field       USING 'BSET-FWSTE(01)'
*                                  record-fwste_01_031.
*    PERFORM bdc_transaction USING 'FB01'.
*  ENDDO.
  PERFORM close_group.
*  PERFORM close_dataset USING dataset.
*endif.
*&      Form  sub_browse_file
*       text
*  -->  p1        text
*  <--  p2        text
FORM sub_browse_file .
  CALL FUNCTION 'F4_FILENAME'
   EXPORTING
     program_name        = syst-cprog
     dynpro_number       = syst-dynnr
*   FIELD_NAME          = ' '
   IMPORTING
     file_name           = pfile.
ENDFORM.                    " sub_browse_file
*&      Form  sub_data_load
*       text
*  -->  p1        text
*  <--  p2        text
FORM sub_data_load .
  CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
    EXPORTING
*     I_FIELD_SEPERATOR          =
      i_line_header              = 'X'
      i_tab_raw_data             = it_raw
      i_filename                 = pfile
    TABLES
      i_tab_converted_data       = it_excel[]
*   EXCEPTIONS
*     CONVERSION_FAILED          = 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.
ENDFORM.                    " sub_data_load
**&      Form  data_selection
**       text
**  -->  p1        text
**  <--  p2        text
*FORM data_selection .
*  SELECT * FROM bkpf
*      INTO CORRESPONDING FIELDS OF TABLE it_bkpf
*      WHERE budat = p_budat AND
*      bukrs = p_bukrs.
*  IF NOT it_bkpf[] IS INITIAL.
*    SELECT belnr dmbtr mwsts pswsl
*        FROM bseg INTO TABLE it_bseg
*        FOR ALL ENTRIES IN it_bkpf
*        WHERE belnr = it_bkpf-belnr AND
*        kunnr = p_kunnr AND
*        hkont = p_hkont AND
*        pswsl = p_waers.
*  ENDIF.
*ENDFORM.                    " data_selection
**&      Form  data_move
**       text
**  -->  p1        text
**  <--  p2        text
*FORM data_move.
*  SORT : it_bseg BY belnr,
*          it_bkpf BY belnr.
*  LOOP AT it_bseg.
*    it_final-dmbtr = it_bseg-dmbtr.
*    it_final-belnr = it_bseg-belnr.
*    it_final-mwsts = it_bseg-mwsts.
*    it_final-pswsl = it_bseg-pswsl.
*    READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr BINARY SEARCH.
*    IF sy-subrc = 0.
*      it_final-budat = it_bkpf-budat.
*      it_final-bldat = it_bkpf-bldat.
*      it_final-xblnr = it_bkpf-xblnr.
*      it_final-bktxt = it_bkpf-bktxt.
*    ENDIF.
*    APPEND it_final.
*    CLEAR it_final.
*  ENDLOOP.
*ENDFORM.                    " data_move
*&      Form  alv_get_data
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_get_data .
  CLEAR it_fieldcat.
***************** Document number
*  wa_fieldcat-col_pos    = '1'.                    " ALV O/P COL-1
  wa_fieldcat-fieldname  = 'XBLNR_007'.
  wa_fieldcat-seltext_m  = 'Document number'.
  wa_fieldcat-just       = 'L'.
  wa_fieldcat-no_zero(1) = 'X'.
  wa_fieldcat-outputlen  = 15.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
***************** Posting Date
*  wa_fieldcat-col_pos    = '2'.                    " ALV O/P COL-1
  wa_fieldcat-fieldname  = 'BUDAT_004'.
  wa_fieldcat-seltext_m  = 'Posting Date'.
  wa_fieldcat-just       = 'L'.
  wa_fieldcat-no_zero(1) = 'X'.
  wa_fieldcat-outputlen  = 20.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
******************** Document Date
*  wa_fieldcat-col_pos    = '3'.                     " ALV O/P COL-2
  wa_fieldcat-fieldname  = 'BLDAT_001'.
  wa_fieldcat-seltext_m  = 'Document Date'.
  wa_fieldcat-just       = 'L'.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  wa_fieldcat-outputlen  = 15.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
********************* REFERENCE DOCUMENT
**  wa_fieldcat-col_pos    = '4'.                     " ALV O/P COL-2
*  wa_fieldcat-fieldname  = 'XBLNR'.
*  wa_fieldcat-seltext_m  = 'REFERENCE DOCUMENT'.
*  wa_fieldcat-just       = 'L'.
*  wa_fieldcat-tabname    = 'IT_EXCEL'.
**  wa_fieldcat-outputlen  = 15.
*  APPEND wa_fieldcat TO it_fieldcat.
*  CLEAR wa_fieldcat.
***************** DOCUMENT HEADER TEXT
*  wa_fieldcat-col_pos    = '5'.                     " ALV O/P COL-3
  wa_fieldcat-fieldname  = 'SGTXT_017'.
  wa_fieldcat-seltext_m  = 'DOCUMENT HEADER TEXT'.
  wa_fieldcat-just       = 'L'.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
*  wa_fieldcat-outputlen  = 15.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
*******************Invoice Net amount
*  wa_fieldcat-col_pos    = '6'.                     " ALV O/P COL-4
  wa_fieldcat-fieldname  = 'WRBTR_012'.
  wa_fieldcat-seltext_m  = 'Invoice Net amount'.
  wa_fieldcat-just       = 'L'.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
*  wa_fieldcat-outputlen  = 15.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
*********** Tax Amount
*  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
  wa_fieldcat-fieldname  = 'WRBTR_025'.
  wa_fieldcat-seltext_m  = 'Tax Amount'.
  wa_fieldcat-just       = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
*********** NEt Amount
*  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
  wa_fieldcat-fieldname  = 'WRBTR_020'.
  wa_fieldcat-seltext_m  = 'Net Amount'.
  wa_fieldcat-just       = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
*********** General ledger currency
*  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
  wa_fieldcat-fieldname  = 'WAERS_006'.
  wa_fieldcat-seltext_l  = 'General ledger currency'.
  wa_fieldcat-just       = 'L'.
* wa_fieldcat-no_zero(1) = 'X'.
  wa_fieldcat-outputlen  = 25.
  wa_fieldcat-tabname    = 'IT_EXCEL'.
  APPEND wa_fieldcat TO it_fieldcat.
  CLEAR wa_fieldcat.
ENDFORM.                    " alv_get_data
*&      Form  alv_grid
*       text
*  -->  p1        text
*  <--  p2        text
FORM alv_grid .
*  PERFORM fill_list_header USING it_top_of_page[].
*  PERFORM event-build USING gt_events[].
  PERFORM fill_layout USING ls_layout.
MESSAGE 'Please press F3 to generate a session or call transaction method after getting report!' TYPE 'I'.
  CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      i_callback_program = sy-repid
      is_layout          = ls_layout
      it_fieldcat        = it_fieldcat
      it_events          = gt_events[]
      i_save             = 'A'
    TABLES
      t_outtab           = it_excel
    EXCEPTIONS
      program_error      = 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.
ENDFORM.                    " alv_grid
*                                     FORM FILL_LAYOUT                      *
FORM fill_layout  USING    p_ls_layout  TYPE slis_layout_alv.
  p_ls_layout-zebra       = 'X'.
  p_ls_layout-cell_merge  = 'X'.
ENDFORM.                                                         "fill_layout
*&      Form  sub_calc_excel
*       text
*  -->  p1        text
*  <--  p2        text
FORM sub_calc_excel .
      data: idate TYPE sy-datum,
          tdat8 type string.
  LOOP AT it_excel.
    CONCATENATE  it_excel-blart_002 '/' it_excel-monat_005 '/' it_excel-bktxt_008 INTO
        it_excel-sgtxt_017.
    it_excel-bukrs_003 = p_bukrs.
*    it_excel-budat_004 = p_budat.
    it_excel-waers_006 = p_waers.
    it_excel-newko_011 = p_hkont.
    it_excel-kunnr_019 = p_kunnr.
    it_excel-mwskz     = p_mwskz.
    it_excel-prctr     = p_prctr.
    idate              = p_budat.
    CALL FUNCTION 'DATUMSAUFBEREITUNG'
     EXPORTING
*       FLAGM                 = ' '
*       FLAGW                 = ' '
       IDATE                 = idate
*       IMONT                 = ' '
*       IWEEK                 = ' '
     IMPORTING
*       MDAT4                 =
*       MDAT6                 =
*       TDAT4                 =
*       TDAT6                 =
        TDAT8                 = tdat8
*       WDAT4                 =
*       WDAT6                 =
*     EXCEPTIONS
*       DATFM_UNGUELTIG       = 1
*       DATUM_UNGUELTIG       = 2
*       OTHERS                = 3
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      it_excel-budat_004 = tdat8.
*    CONCATENATE it_excel-budat_004+4(2) '/' it_excel-budat_004+6(2) '/'  it_excel-budat_004+0(4)
*                INTO it_excel-budat_004.
*    SPLIT it_excel-bldat_001 AT '/' INTO it_excel-month it_excel-date.
*    CONCATENATE it_excel-date '.' it_excel-month '.' it_excel-bldat_001+6(4) INTO it_excel-bldat_001.
    MODIFY it_excel.
    CLEAR it_excel.
  ENDLOOP.
ENDFORM.                    " sub_calc_excel
*&      Form  write
*       text
*  -->  p1        text
*  <--  p2        text
*form write .
*OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
*data: wa_excel like line of it_excel.
*loop at it_excel into wa_excel.
*TRANSFER wa_excel to dataset.
*endloop.
*CLOSE DATASETdataset.
*endform.                    " write

Similar Messages

  • System crash while using Callable objects for SAP transaction !!

    Hi all,
    i have created a CO to use SAP transaction, i have created a system, its connection test is successfull.when i create the CO and specify the system and Tcode, and Test it, its giving a Short dump saying its crashed, do anyone knows the rerason??please guide me
    Thanx in advance

    Hi Audrey
    The Help for SAP Transactional iView can be found here - but although I have followed these steps and an associated blog it still does not work for me.  Perhaps you will have more luck.  See below for my particular error (if your able to help me ;-).)
    SAP Help for SAP Transactional iView
    http://help.sap.com/saphelp_nw04/helpdata/en/02/f9e1ac7da0ee4587d79e8de7584966/frameset.htm
    SAP Blog for the same
    Create SAP Transaction iView using SAPGUI for Windows
    NOTE :  Sadly I cannot get mine to work !! ****
    I'm also trying to create a SAP Transaction iView. Following these steps.
    I can preview the iView OK. So it seems that System and Alias are OK.
    BUT when I logon as a user on the Portal with that iVew it fails with the same type of error you had.
    "Unable to lookup System &#39;SAPDBEAlias&#39;. Please check the system object and the alias.."

  • Failed to retrieve data from the database when adding jdbc datasource

    I'm having problems adding some tables to the selected tables list using the database expert.
    I get the error messages "Failed to retrieve data from the database" followed by "Unknown Database Connection Error".
    I thought it may be a permissions issue as it only affects some tables, but I can access the same tables fine using the same user through Oracle SQL Developer.
    The database is Oracle 10g Express Editions
    Crystal version is 12.0.0.683
    Running on Windows XP
    Any suggestions would be much appreciated.

    Hi Stuart
    Please refer SAP note 1218714 for this issue. The link to this article ia as follows:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333733313334%7D.do
    You can search for this note on the SDN site.
    Hope this helps.
    Thanks!

  • Failed to retrieve data from the database crystal reports 2008 in SAP  B1

    Hello friends,
                 I am using Crystal report 2008 with SAP B1 PL 8.8. When I run any report,  it runs correctly from Crystal Report. But whenever I try to open the same report through SAP ( Tools -> Preview External Crystal Report ), it prompts the parameters for that report and then open up the crystal report window and throws an Error message ("failed to retrieve data from the database. Details [Database Vendor Code: 156]").
               Please any one suggest me the corrective solution.
    Thanks in Advance,
    Keyur Raval.

    I had the same problem in SAP B1 2007. Report worked fine except when it was open from B1. Generally there may be different problems. In my case the same problem was caused by using some procedure which was in a specific schema. Changing the schema into "dbo" solved the problem.
    Radoslaw Blaniarz

  • Why Sybase is not the prefered database for SAP?

    Dear Sir/Madam,
    Why Sybase is not the preferred database for SAP?
    What is the difference between Oracle performance and Sybase!
    I am sure that both are RDBMS!
    Please Clear this doubt.
    Sreevidya.S

    Because Sybase is a much smaller "player" in the DB world.
    Oracle is the industry leader; and it is usually a wise decision for a software product to store it's data into the "best of brand" technology.

  • Tutorials on access the Database for data

    Hello,
    I wanted few good tutorials, on how do retrieve data from the database or info cubes of BI using the webdynpro technology.
    Thanks,
    karthik

    Sample of connection to a DB
              public static Connection startDBCon(String datasource_name){
               DataSource ds;
               InitialContext ctx;
               Properties properties;
           try {
                datasource_name = "jdbc/" + datasource_name; // + "DB";
                String contextUrl = "";
                String contextFactory = "com.sap.engine.services.jndi.InitialContextFactoryImpl";
                properties = new Properties();
                properties.put("java.naming.factory.initial", contextFactory);
                ctx = new InitialContext(properties);
                ds = (DataSource)ctx.lookup(datasource_name);
                return ds.getConnection();
           } catch (Exception e) {
    //            e.printStackTrace();
           return null;
    usually datasource_name is equal to:
                     datasource_name =
                                    "SAP" +
                                    (String) System.getProperties().get("SAPSYSTEMNAME")
                                              + "DB";
    or
    datasource_name = "SAPSR3DB";
    by the way have to call you system administrator and ask, this datasourcename is configurated under Visual Adminstrator.
    Here some SQL call after got connection:
         public Rows[] findByDynamicSelect(String sql, Object[] sqlParams) throws YourException
              // declare variables
              final boolean isConnSupplied = (userConn != null);
              Connection conn = null;
              PreparedStatement stmt = null;
              ResultSet rs = null;
              try {
                   // get the user-specified connection or get a connection from the ResourceManager
                   conn = isConnSupplied ? userConn : ResourceManager.getConnection();
                   // construct the SQL statement
                   final String SQL = sql;
                   // prepare statement
                   stmt = conn.prepareStatement( SQL );
                   // bind parameters
                   for (int i=0; sqlParams!=null && i<sqlParams.length; i++ ) {
                        stmt.setObject( i+1, sqlParams<i> );
                   rs = stmt.executeQuery();
                   // fetch the results
                   return fetchMultiResults(rs);
              catch (SQLException _e) {
                   throw new YourException"SQLException: " + _e.getMessage(), _e );
              catch (Exception _e) {
                   throw new YourException"Exception: " + _e.getMessage(), _e );
              finally {
                   ResourceManager.close(rs);
                   ResourceManager.close(stmt);
                   if (!isConnSupplied) {
                        ResourceManager.close(conn);
    example how to call:
         public Row findByPrimaryKey(String Par1, int Par2, int Par3) throws YourException
              Row ret[] = findByDynamicSelect( SQL_SELECT + " WHERE Par1 = ? AND Par2 = ? AND Par3 = ? ", new Object[] { Par1, new Integer(Par2),  new Integer(Par3) } );
              return ret.length==0 ? null : ret[0];
    after for Row (Resultset) there are method like:
    Row.getInt( COLUMN_FIELD )
    Row.getString( COLUMN_FIELD )
    Row.getDouble( COLUMN_FIELD )

  • ARCHIVIVNG the database for the SAP SOLUTION MANAGER SYSTEM.

    Dear Experts,
       I am in the process of ARCHIVIVNG the database for the SAP SOLUTION MANAGER SYSTEM. Since the solman database is increasing randomly i need to archive the old tickets amd also the tables and also the other objects.
    Can any one help me how to archive and also what are all the objects to archive in the solution manager system.
    Regards,
    Umesh

    Dear ALL,
      I have got he table ARCDEL_OBJ ( Control Table for Archiving / Deletion) table I guess in this table  the archiving objects will be stored.
    The objects i got in this table are
    CA_BUPA
    CMS_PRJASM
    CRM_ACT_ON
    CRM_COMP
    CRM_IPMCON
    CRM_IPMPUC
    CRM_IPMSAC
    CRM_LEAD
    CRM_LEAS
    CRM_MKTPL
    CRM_MKTSC
    CRM_OPPT
    CRM_RAGR
    CRM_SACONT
    CRM_SALDOC
    CRM_SDBPBL
    CRM_SDBSOL
    CRM_SERORD
    CRM_SRCONT
    CRM_SRVCON
    CRM_SUR
    CRM_UBBPOL
    CRM_WTYCLM
    PRODUCT_MD
    CAN I ARCHIVE ALL THESE OBJECTS OR WHICH OBJECT HAS TO TO BE ARCHIVED IN THIS..............?????
    PLEASE LET ME KNOW THE  IMPACT OF ARCHIVING THESE OBJECTS.
    Regards,
    umesh

  • Refresh jTable after inserting new data into the Database

    Hey all,
    I'm using Netbeans 6.5 to create a Desktop Application which is connected to a Java DB (Derby).
    The first simple steps were all very successfull:
    Create the jTable and bind it to the Database => everything works fine. When the application starts it correctly shows all data from the database.
    The problem starts when I try to insert new data to the database.
    For that reason I've created textfields and a button "Save". When I press the button it successfully inserts the data to the database but they are not displayed in the jTable (when the application starts they are all there, they are not updated at runtime) . I've tried table.invalidate() and table.repaint() but they just don't work.
    Any help will be GREATLY appreciated. But please have in mind that most of the code is Netbeans-generated and most of it not editable.
    Many thanks in advance.
    George

    Once again you are right my friend. I jumped to conclusion way too fast, when I shouldn't. (Give me a break, I've been busting my head with this well over a week). The response I saw when I did that was that indeed a line is added to the jTable. Because I falsly set the index of the object to be added to be second to last the row appeared on the table, what I didn't see at the time was that the last one disappeared. Hmm...
    A new adventure begins...
    So after a few hours of messing around with it here are my observations:
    1) It was not an observable list. When I add the new element with employeesList.add(newEmp); , the table gets notified but a get a bunch of exceptions:
    xception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
            at javax.swing.plaf.basic.BasicTableUI.paintCells(BasicTableUI.java:1974)
            at javax.swing.plaf.basic.BasicTableUI.paint(BasicTableUI.java:1897)
            at javax.swing.plaf.ComponentUI.update(ComponentUI.java:154)
            at javax.swing.JComponent.paintComponent(JComponent.java:743)
            at javax.swing.JComponent.paint(JComponent.java:1006)
            at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1602)
            at javax.swing.JViewport.windowBlitPaint(JViewport.java:1568)
            at javax.swing.JViewport.setViewPosition(JViewport.java:1098)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:818)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:807)
            at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
            at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
            at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
            at javax.swing.JScrollBar.setValue(JScrollBar.java:441)
            at javax.swing.plaf.basic.BasicScrollBarUI.scrollByUnits(BasicScrollBarUI.java:907)
            at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.mouseWheelMoved(BasicScrollPaneUI.java:778)
            at javax.swing.plaf.basic.BasicScrollPaneUI$MouseWheelHandler.mouseWheelMoved(BasicScrollPaneUI.java:449)
            at apple.laf.CUIAquaScrollPane$XYMouseWheelHandler.mouseWheelMoved(CUIAquaScrollPane.java:38)
            at java.awt.Component.processMouseWheelEvent(Component.java:5690)
            at java.awt.Component.processEvent(Component.java:5374)
            at java.awt.Container.processEvent(Container.java:2010)
            at java.awt.Component.dispatchEventImpl(Component.java:4068)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchMouseWheelToAncestor(Component.java:4211)
            at java.awt.Component.dispatchEventImpl(Component.java:3955)
            at java.awt.Container.dispatchEventImpl(Container.java:2068)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
            at java.awt.Container.dispatchEventImpl(Container.java:2054)
            at java.awt.Window.dispatchEventImpl(Window.java:1801)
            at java.awt.Component.dispatchEvent(Component.java:3903)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
            at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 84, Size: 84
            at java.util.ArrayList.RangeCheck(ArrayList.java:546)
            at java.util.ArrayList.get(ArrayList.java:321)
            at org.jdesktop.swingbinding.impl.ListBindingManager$ColumnDescriptionManager.validateBinding(ListBindingManager.java:191)
            at org.jdesktop.swingbinding.impl.ListBindingManager.valueAt(ListBindingManager.java:99)
            at org.jdesktop.swingbinding.JTableBinding$BindingTableModel.getValueAt(JTableBinding.java:713)
            at javax.swing.JTable.getValueAt(JTable.java:1903)
            at javax.swing.JTable.prepareRenderer(JTable.java:3911)
            at javax.swing.plaf.basic.BasicTableUI.paintCell(BasicTableUI.java:2072)
    ... and a lot morewhich from my poor understanding means that the jTable succesfully notices the change but it is not able (??) to adjust to the new change. What is more interesting is that when I plainly add the element to the end of the list (without an idex that is), a blank row appears at the end of my Table. The weird thing is that I've bound the table to some text fields below it, and when I select that empty row all the data appear correctly to the text fields.
    I tried going through:
                    org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList).add(newEmp);as well as
                    help = org.jdesktop.observablecollections.ObservableCollections.observableListHelper(employeesList);
                    help.getObservableList().add(newEmp);
                    help.fireElementChanged(employeesList.lastIndexOf(newEmp));and
                    obsemployeesList = org.jdesktop.observablecollections.ObservableCollections.observableList(employeesList);
                    obsemployeesList.add(newEmp);and I still get the same results (both the exeptions and the mysterious empty row at the end of the table
    So, I'm again in terrible need of your advice. I can't thank you enough for the effort you put into this.
    Best regards,
    George
    Edited by: tougeo on May 30, 2009 11:06 AM
    Edited by: tougeo on May 30, 2009 11:21 AM
    Edited by: tougeo on May 30, 2009 11:30 AM

  • Updating data in the database table

    Can any help me in the code for updating data in the database table.
    Regards,
    Rahul

    Hi Rahul,
    A slightly longer procedure that i'm adding here...
    1.) Create the component (i'm sure you have this covered)
    2.) Next on the button click that updates the database - add an action.
    3.) double click the action so that you are taken to the methods section of the view.
    4.) next you need to add the code that is required the update the database - this will be in the form of the above two posts.
    5.) compile and test the application
    Let me know in case you need further information on how to do this with a function module or something.
    Thanks.

  • Failed to retrieve data from the database Database Vendor Code: 2812

    Hi everyone
    Im using Sap Business One Version 2007A SP00 PL49, SQL 2005 and Crystal Reports Basic for Sap Business One (Add on 2.0.0.7). Whenever i try to generate a report from SBO the system displays the following message "Failed to retrieve data from the database DETAILS: [Database Vendor Code: 2812]"
    The scenario is that, according to the Colombia's product local expert, Is not possible to create Stored Procedures, Views, Functions or anything in the customer productive database, in order to improve the performance of the query i created other DB where i created an stored procedure, after that, i called it from Crystal where it's working ok. But when i try to generate it from SBO it show the message promted.
    Someone knows what could be happening
    I'll be thankful

    Hi Cesar,
    Please post your question to the Business One forum.
    I can't move this thread.
    Thank you
    Don

  • Procedure for Standby Database for SAP ERP 6.0

    Hello All,
    We are using SAP ERP 6.0 with Oracle 10g with AIX 5.3.
    We are planning to setup a standby database for our SAP ERP 6.0 production system as part of remote DR site using Oracle Data Guard.
    I was under the assumption that i can first install an erp 6.0 (ABAP) system using homogeneous system copy from my erp 6.0 (ABAP) production system and then start configuring oracle dataguard.
    But the System Copy Guide "System Copy for SAP Systems Based on SAP NetWeaver 7.0 SR3 ABAP" has mentioned that "You cannot create standby systems with a system copy".
    Please suggest the best practise or the procedure for creating standby database for SAP ERP 6.0 system. Iam not looking at the steps for creating a pure oracle 10g standby database, but with SAP instances as well.
    Thanks in advance.
    CVS

    Hi,
    Please refer the below mentioned link for configuring data guard.
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10823/create_ps.htm
    Below mentioned are the sequence of stpes, which needs to be followed for setting up data guard.
    3.1 Configuring the Primary Database
    3.1.1 Enable archiving and define a local archiving destination
    3.1.2 Create a password file
    3.1.3 Configuring the Oracle networking files
    3.1.4 Set initialization parameters on the primary database
    3.1.5 Take Offline/Online backup of the primary database
    3.1.6 Create a control file for the standby database
    3.1.7 Prepare initialization parameter file for the standby database and start the primary database with the changed pfile.
    3.1.8 Copy all files from the primary host to the standby host
    3.2 Configuring the Standby Database
    3.2.1 Configuring the Oracle networking files
    3.2.2 Create a INIT parameter file for the standby database
    3.2.3 Copy the standby controlfile to the appropriate location
    3.2.4 Create Oracle Password File
    3.2.5 Start the physical standby database
    3.2.6 Initiate log apply services
    Regards,
    Ranjith

  • Table Maintenance Events - "Event 02 After Saving the Data in the Database"

    Hi,
    Can we identify the record marked for deletion in the "Event 02 After Saving the Data in the Database" ?
    Thanks & Regards,
    Esha Raj

    Look at online documentation :
    - [Event 02: After Saving the Data in the Database|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . - [Internal Table TOTAL|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . - [Field Symbols <ACTION> and <ACTION_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    . . . - [Constants for Field Symbols <ACTION>, <ACTION_TEXT>, <XACT> and <XACT_TEXT>|https://help.sap.com/saphelp_nw04/helpdata/en/77/06b11859f511d2a6070000e82deaaa/frameset.htm]
    Regards,
    Raymond

  • SQLJ with EJB. Do not insert data in the database

    Hi All!
    I4m developing an application using SQLJ and EJB (session beans,
    container managed transactions), and when I try to insert data
    in the database it doesn't work. All goes well (apparently), but
    the changes do not have effect in the DB.
    I've tried to use bean managed transactions, but when I try to
    insert data, I get the error: NOT IN A TRANSACTION. The code of
    the client in the bean managed is the following:
    public class MiEJBCLiente {
    public static void main(String[] args) {
    String namespaceURL
    = "jdbc:oracle:thin:@rabinf56:1521:prinpal";
    String ejbUrl
    = "sess_iiop://rabinf56:2481:prinpal/test/Bean";
    String username = "xxx";
    String password = "xxx";
    // Setup the environment
    Hashtable environment = new Hashtable();
    // Tell JNDI to speak sess_iiop
    environment.put
    (javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
    // Tell sess_iiop who the user is
    environment.put(Context.SECURITY_PRINCIPAL, username);
    // Tell sess_iiop what the password is
    environment.put(Context.SECURITY_CREDENTIALS, password);
    // Tell sess_iiop to use credential authentication
    environment.put(Context.SECURITY_AUTHENTICATION,
    ServiceCtx.NON_SSL_LOGIN);
    environment.put
    (jdbc_accessURLContextFactory.CONNECTION_URL_PROP, namespaceURL);
    UserTransaction ut = null;
    // Lookup the URL
    hello.MiBeanHome homeInterface = null;
    try {
    Context ic = new InitialContext(environment);
    DriverManager.registerDriver (new
    oracle.jdbc.driver.OracleDriver());
    ut = (UserTransaction)ic.lookup
    ("jdbc_access://test/BeanTrans");
    homeInterface = (hello.MiBeanHome) ic.lookup(ejbUrl);
    catch (SQLException e) {
    // That's it!
    try {
    System.out.println("Creating a new EJB instance");
    hello.MiBean remoteInterface = homeInterface.create();
    ut.begin ();
    remoteInterface.inserta();
    ut.commit();
    catch (Exception e) {
    System.out.println(e.getMessage());
    e.printStackTrace();
    I4m waiting for suggests.
    Thanks in advance...

    Hi,
    Are you sure it's a front-end bug? Try to double check your back-end code.
    If you still believe the bug is in the front-end, try to debug the insertHandler function to see if you are attaching the UserVO properly into the UserEvent.
    Best regards,
    Pablo Souza

  • Deletion of data within the database tables

    The user is trying to clean up the 2014 data within the database tables. He is running a delete function which keeps causing the log files
    to exceed their limit. The tables are large and he is unable to delete the data in one command due to available size and logging. What is the best way to approach this?
    Thanks,

    Hi venkatesh1985,
    According to your description, the user fails to delete data in tables due to the limited space of log file. Based on my research, this issue could occur when you use the delete statement(DELETE FROM ExampleTable) in a single transaction and consume all
    available space on your transaction log disk.
    To avoid this issue, you could use the two methods below to delete the data.
    1. Use a loop combined with TOP and delete rows in smaller transactions as the following example. This method requires you to delete all the tables one by one.
    SELECT 1
    WHILE @@ROWCOUNT > 0
    BEGIN
    DELETE TOP (1000)
    FROM LargeTable
    END
    For more information about the process, please refer to the article:
    http://dbadiaries.com/how-to-delete-millions-of-rows-using-t-sql-with-reduced-impact
    2. If you want to delete all the data from all tables in the specific database, you could script the entire database and all database objects. Then drop the database and recreate it using the script as the steps below.
    a. In Object Explorer, expand the node for the instance containing the database to be scripted.
    b. Point to Tasks, and then click Generate Scripts and click Next.
    c. Select the option of 'Script the entire database and all database objects'.
    d. Specify how scripts should be saved. You could save the script to a file or new query window. Click Next, then click ok.
    e. Drop the database, and run the script in the query window to recreate it. For more information, please refer to the article:
    http://msdn.microsoft.com/en-us/library/bb895179.aspx#Introduction
    In addition, if possible, please increase the size of the log file or move the log file to a different disk with more disk space.
    Regards,
    Michelle Li

  • How to update data in the database through ALV grid

    Hi All,
    I diplayed an ALV grid with five fields in a classical report. I have already set the fieldcat for one field as wa_fcat_edit = 'X'. I am able to edit(modify) the data in that field. But I want to update the data into the database which is modified by me in that field. Can I update the data using BDC or any other procedure?
    This is an urgent require ment for me. Please help me ASAP.
    Thanks & Regards,
    Ramesh.

    Hi
    Please go through the link.
    Link: [http://www.****************/Tutorials/ALV/Edit/demo.htm]
    regards
    ravisankar

Maybe you are looking for

  • Unable to Login SQL server management studio:sql server 2005

    Hello All, I am unbale to login SQL server management studio with below scanario: Server Type:Database Engine Server Name:XXX Authntication:Windows Auth After enter "Connect : button below eeror is displaying Error:"Canot connetc to XXX server Additi

  • Check the database ( Performance , tuning ,  . . . . . . . , etc  )

    Dears,, If i have running database and i need to make check health for it for performance , tuning , . . . , etc Is there any steps or advisors or documentations to go ahead with them enable me to check the database health. Thanks & Regards,,

  • How to: Rotate pages from Portrait to Landscape using Acrobat Pro XI?

    As title states need to know how to do this on a multi-page document. E.g. out of a 10 page document, pages 4-7 need to be changed from portrait to landscape.  Note must keep the document scaling once pages 4-7 are changed to landscape. Tried Tool >

  • CS_WHERE_USED_MAT only returns one level

    Hi all, I need to get the results that CS15 (where-used) gives me when multi-level is checked. I need to write a program and was hoping to use FM CS_WHERE_USED_MAT.  However, this FM only returns the materials that are one level down.  I'm on 4.5b. D

  • Interactive form and web dynpro abap

    Hi All, I'm working on a web dynpro application that embeds an interactive forms. When I sent the property "enabled" of the interactive form to false , the form is displayd. When I sent the property "enabled" of the interactive form to true, the appl