How to back up a table in  SAP?Is there tcode to use?

How to back up a table in  SAP?Is there tcode to use?
Please suggest me.
Sai.

Hello Sai
I do not think there is a specific "backup" transaction available.
For the purpose of backing up a couple of customer tables I used the following approach:
(1) Create a workbench request with all required tables (object entries: R3TR TABU <name of table>; key: '' for client-independent or '<client>' for client-dependent tables.
Export the request.
(2) Write a report which creates a new workbench request and copies the object list of (1) to this new request. Finally the request is released.
(3) Schedule the report as daily batch job. Thus, your latest backup is less than 24 hours old.
The nice thing about this approach is that if you need to backup additional tables: just add the object entries and keys to the request in (1). No changes are required in (2) or (3).
Regards
   Uwe

Similar Messages

  • How to Back up the table?

    How to Back up the table in oracle through script.
    Thanks
    Rangan S

    The idea of a table level backup is like not doing xerox of a proper book but rather than just one page of it. Well its not a good idea to xerox just a page.
    That said , you do it with export (or Datapump export). All you need to do is to make sure that the command used, you put in some batch/shell file and allocate proper permissions over that file.
    See here ,
    C:\Documents and Settings\Aman>exp scott/tiger file=d:\e.dump tables=emp
    Export: Release 11.1.0.6.0 - Production on Wed Sep 10 18:34:34 2008
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    With the Partitioning, Oracle Label Security, OLAP, Data Mining,
    Oracle Database Vault and Real Application Testing options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table                            EMP         14 rows exported
    Export terminated successfully without warnings.Now all you need to do is to put this export command in some file and save it for future.
    HTH
    Aman....

  • How to upload data from excel to SAP and options to be used

    How to upload data from excel to SAP and options to be used
    thank you,
    Regards,
    Jagrut Bharatkumar shukla

    Hi Jagrut,
        You can use gui_upload.
    chk the sample program mentioned below.
    REPORT ZFTP .
    DATA: BEGIN OF I_FILE OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE.
    DATA: BEGIN OF I_FILE2 OCCURS 0,
    DATA(2000) TYPE C,
    END OF I_FILE2.
    DATA: W_COUNT TYPE I.
    PARAMETERS: P_FILEN TYPE STRING,
    P_FILE2 TYPE STRING,
    P_NUM(4) TYPE N..
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILEN.
    PERFORM F_FILE_GET USING P_FILEN TEXT-G01.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE2.
    PERFORM F_FILE_GET USING P_FILE2 TEXT-G01.
    START-OF-SELECTION.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = P_FILEN
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    HEADER_LENGTH = 0
    READ_BY_LINE = 'X'
    DAT_MODE = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    CHECK_BOM = ' '
    VIRUS_SCAN_PROFILE =
    NO_AUTH_CHECK = ' '
    IMPORTING
    FILELENGTH =
    HEADER =
    tables
    data_tab = I_FILE
    IF SY-SUBRC <> 0.
    MESSAGE E024(Z1).
    ENDIF.
    LOOP AT I_FILE.
    W_COUNT = W_COUNT + 1.
    IF NOT W_COUNT > P_NUM.
    MOVE I_FILE TO I_FILE2.
    APPEND I_FILE2.
    ENDIF.
    ENDLOOP.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    BIN_FILESIZE =
    filename = P_FILE2
    FILETYPE = 'ASC'
    APPEND = ' '
    WRITE_FIELD_SEPARATOR = 'X'
    HEADER = '00'
    TRUNC_TRAILING_BLANKS = ' '
    WRITE_LF = 'X'
    COL_SELECT = ' '
    COL_SELECT_MASK = ' '
    DAT_MODE = ' '
    CONFIRM_OVERWRITE = ' '
    NO_AUTH_CHECK = ' '
    CODEPAGE = ' '
    IGNORE_CERR = ABAP_TRUE
    REPLACEMENT = '#'
    WRITE_BOM = ' '
    TRUNC_TRAILING_BLANKS_EOL = 'X'
    WK1_N_FORMAT = ' '
    WK1_N_SIZE = ' '
    WK1_T_FORMAT = ' '
    WK1_T_SIZE = ' '
    IMPORTING
    FILELENGTH =
    tables
    data_tab = I_FILE2
    FIELDNAMES =
    *& Form F_FILE_GET
    text
    -->P_P_FILEN text
    -->P_TEXT_G01 text
    FORM F_FILE_GET USING L_FILENA L_TEXT.
    CALL FUNCTION 'WS_FILENAME_GET'
    EXPORTING
    DEF_FILENAME = ' '
    DEF_PATH = ' '
    MASK = ',.,*.TXT.'
    MODE = 'O'
    TITLE = L_TEXT
    IMPORTING
    FILENAME = L_FILENA
    rc =
    EXCEPTIONS
    INV_WINSYS = 1
    NO_BATCH = 2
    SELECTION_CANCEL = 3
    SELECTION_ERROR = 4
    OTHERS = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Reward if helpful.
    Regards,
    Harini.S

  • How to put data in tables in SAP LogOn

    For example,i'm doing company benefits,branching this aspect is Medical leave,taxi fees claims and company insurance,how do i put it inside the tables in SAP LogOn?please help me,thanks=)

    Hi,
    Go to SE16 and enter your table name and click on icon in toolbar to create new entries, there you can add more table contents in your table.
    Regards,
    Deepti

  • How to Access oracle DB table through SAP..problem in code

    Hello Guys
             I have to Access oracle table through SAP and need to create a report.
    From Some source I got the following code .  But it's not working , I am not able to update the table as well not able to access the data from table.
    Can some one provide me the necessary help.
    REPORT  ZORACLE.
    INCLUDE ole2incl.
    DATA: con TYPE ole2_object,
    rec TYPE ole2_object.
    DATA SQL(1023).
    DATA: BEGIN OF SPL OCCURS 0,
    VAL(1023),
    END OF SPL.
    DATA: BEGIN OF I1 OCCURS 0,
    F1(10) ,
    F2 TYPE I,
    END OF I1.
    IF con-header IS INITIAL OR con-handle = -1.
    CREATE OBJECT con 'ADODB.Connection'.
    IF NOT sy-subrc = 0.
    EXIT.
    ENDIF.
    CREATE OBJECT REC 'ADODB.Recordset'.
    IF NOT sy-subrc = 0.
    EXIT.
    ENDIF.
    ENDIF.
    MDB connetion infomations ....
    break-point.
    CONCATENATE 'Provider=' '''OraOLEDB.Oracle''' ';'
    INTO SQL.
    CONCATENATE SQL 'Password=' '''prodx''' ';'
    INTO SQL.
    CONCATENATE SQL 'User ID=' '''prod''' ';'
    INTO SQL.
    CONCATENATE SQL 'Data Source=' '''sterlite''' ';'
    INTO SQL.
    CONCATENATE SQL 'Mode=' '''Share Deny None'''
    INTO SQL.
    MDB connection ...
    CALL METHOD OF CON 'Open'
    EXPORTING #1 = SQL.
    Query (insert) statement ...
    SQL = 'insert into ofusers values('.
    CONCATENATE SQL '''Atul''' ',' '''121''' ')' INTO SQL.
    Query run ...
    CALL METHOD OF REC 'Open'
    EXPORTING #1 = SQL
    #2 = CON
    #3 = '1'.
    Query (select) statement ...
    SQL = 'select * from ofusers'.
    Query run ...
    CALL METHOD OF REC 'Open'
    EXPORTING #1 = SQL
    #2 = CON
    #3 = '1'.
    Selecting MDB record into SAP internal table ...
    DO.
        CALL METHOD OF REC 'getstring' = SQL
        EXPORTING #1 = '2' "Do not modify!
        #2 = 1 "Do not modify!
        #3 = '|' "Do not modify!
        #4 = '|'. "Do not modify!
        IF sy-SUBRC EQ 0.
            REFRESH SPL. CLEAR SPL.
            SPLIT SQL AT '|' INTO TABLE SPL.
            LOOP AT SPL.
              CASE SY-TABIX.
                WHEN 1.
                  I1-F1 = SPL-VAL.
                WHEN OTHERS.
                  I1-F2 = SPL-VAL.
              ENDCASE.
            ENDLOOP.
              APPEND I1. CLEAR I1.
            ELSE.
              EXIT.
        ENDIF.
    ENDDO.
    Result writing ...
    LOOP AT I1.
      WRITE: AT /1(10) I1-F1,
      AT (10) I1-F2.
    ENDLOOP.
    connetion close & destroy
    FREE OBJECT con.
    FREE OBJECT rec.
    Thanks in Advance
    Swati Namdeo

    Hi swati,
    1. for this u will also require help of basis team.
    2. these are the steps.
    a) make an entry in DBCON
    b) make connection string
    (on the physical application server,
    so that it can connect to secondary database)
    (this will be done by basis team,
    in which, they will specify the
    IP address of the secondary database server,
    the DATABASE ID, and the port number)
    c) then using open sql / native sql,
    we can use the secondary database connection,
    just like normal.
    d) if we use open sql,
    then there must be Y/Z table on
    sap as well as secondary database,
    and the field names , their type all should be identical.
    regards,
    amit m.

  • How to deal with Join Table in SAP Query

    Hi buddy,
    I create a Infoset ZTest by some infotype, one of them is 0185, and 3208.
    In 0185 there is a ICTYP and 3208 also SUBTY, and they are Join by that fields.
    It means, add a new record in P0185 with ICTYP = 'RS', there is a new record add in P3208 automaticly.
    Now, in my SAPQuery, I just need to input a ICTYP, and select the result. It always have unnessary records in output.
    Fg.  in P0185 have two records, ICTYP are 'RS', 'FR', so, in P3208 also have.
    And input 'RS' as input selction paramters, it check the records which ICYTP is RS in P0185, but it won't do the check in P3208, because, in selction screen, it just have P0185-ICTYP.
    So, the output will have problem.
    I want to know how to fix this issue, or add some extra code in the SAPQuery....
    Really thanks .

    hi,
    The pdf below gives the steps to create drill down report.
    http://www.sappoint.com/abap/eis.pdf
    also check.
    <a href="http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2">http://72.14.203.104/search?q=cache:k-SFYy_rjPIJ:www.hrexpertonline.com/archive/Volume%252003%2520(2</a>
    regs,
    jaga

  • How to add Additional fields in standard SAP Report RMCLOBJVN ,TCODE CL6BN

    i am facing problem in Report RMclobjvn , TCODE is CL6BN
    i have to add some additional fields on the result screen.
    but when i search inside the report i could not retrieve any user exits but through a search utility i got 4 user exits of which 2 seem to be useful.these are
    <b>Exit name
    CLCLRS01  Additional Fields on the Result Screen
    CLCLRS02  Fill the Additional Fields on the Result Screen</b>
    i activated the these exits and have tried putting in break point in side the include.
    But the problem is this that
    [<b>b]that CL6BN Tcode is not triggering anyhow these userexits.</b></b>
    does anyone has any solution for adding the additional fields.

    Hai Manish
    Check the following Links
    You can do it in two ways using append structure or include structure of that standard table.
    once you added , you need to adjust it and activate using the menu utilities->data base utulity-> Activate and Adjust .
    check this SAP help..
    for append structure
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb61446011d189700000e8322d00/frameset.htm
    for include structure.
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb54446011d189700000e8322d00/content.htm
    Regards
    Sreeni

  • How to export and Import table of another user from user system using expdp

    Hi All,
    How to export a table 'scott.emp' from system user.
    expdp system/password directory=expdp dumpfile=scott_emp.dmp ???? ?? tables=emp ??????????????????????????
    thank you
    ---------------------------------------------------------- Posting solution here to make needed users not to scroll down ------------------------------------------------------
    Finally I got it right!!!
    Task :- Export table_1 of schema_a from database db1 and Import it to schema_b of database db2 as user other than schema owner
    Solution :-
    expdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=expdp_schema_a.table_1.log
    impdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=impdp_schema_a.table_1.log remap_schema=schema_a:schema_b remap_tablespace=table_1_tablespace:schema_b_tablespace
    Thank You All
    Edited by: Ven on Mar 9, 2011 7:52 AM

    Just a example
    SQL> $expdp system/sys directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
    Export: Release 11.2.0.1.0 - Production on Tue Mar 8 10:39:57 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "SCOTT"."EMP" 8.570 KB 14 rows
    Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
    C:\APP\MAZAR\ADMIN\ACEME\DPDUMP\TESTS.DMP
    Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 10:40:01
    SQL>

  • How to look for the Table Name

    Hi Friends,
    Sometimes we need to download the table for the desired information if the same is not available from a particular report. How to look for the table name? Is there a report or a particular feild, where we can find the name of the particular table?
    Thanks for the assistance.
    Regards

    Hi Friend,
    If you want to see the structures then go to SE11. Sometimes it happens that you cannot find the table names but only fields. In such case, if you want to find the Table names which is not available, then go to SE90.
    Abap Dictionary > Fields > Table Fields.
    Now Enter the Field name in Right Hand Side of the screen then Execute. You will see the all tables by which that Fields are used.
    Regards,
    Jigar

  • How to add a page in the SAP Scripts

    Hi All,
    I want to know how to add a page in the sap scripts. there is already sap script developed by some other person.
    Now I have to add a page in front of that and have to add some more data.I added a page in page windows but thats not at all working.
    Please help me out in this.
    Thanks,
    Praveen

    new page will create in sap scripts using new page command.
    you have to set condition like after some number of records displayed in page new page has to be trigger.
    ex:YOU HAVE SO MANY RECORDS FOR PRINTING BUT YOU WANT TO DISPLAY 100 RECORDS IN FIRST PAGE REMAINING IN SECOND PAGE LIKE THAT.
    Here you can use NEW PAGE COMMAND .
    IT IS OPPOSITE PURPOSE OF PROTECT AND ENDPOTECT.
    Reward if useful.

  • How to Client Change Company Logo in SAP BEx

    Hi Guys,
    Could You please How to change Client Company Logo in Sap BW bex broadcaster buy Using the transaction Code:SE80
    Thanks
    Sankar Reddy K

    Hi Sankar,
    Try this:
    1. Goto T.code SMW0.
    2. select radiobutton 'BINATRY DATA FOR WEBRFC...'----> F8
    3. Again execute .
    4. goto create(F5)
    5. enter Object name and Description
    6. Press IMPORT(shift + F6)
    7. Select Picture to import
    Regards,
    Loed

  • How to get a dynamic receiver determination based on a table an SAP PI ABAP Stack

    Hello folks,
    currently I get stuck dealing with a problem about the receiver determination. Let me first describe the Problem: We are using to different SAP ERP- backend system in our test enviroment. But only of this systems is marked as current "actuall" test system. Every once in a while we need to switch between these two systems and mark the other one as the actual test system.
    This is the point were it get's a little bit time consuming for me: We have about 50 interfaces were I need to change the receiver from test system A to test system B or vice versa. So I thought about creating a more dynamic way to determine the actual test system:
    Therefore I have created a table on the ABAP stack of our PI (7.31 double stack) with just one field that holds the current test system. Now I would like to create a dynamic receiver determination where I call the RFC-function RFC_READ_TABLE. But how can I acess a table from the grapchical mapping of the pi which is stored on the PI?
    Is there mybe another fundamental way to retrieve the actuall test system within the mapping?

    You can go for enhanced receiver determination, where in you can determine the receiver system using a graphical mapping.
    Now in that graphical mapping, use the standard function " RFC Look up" and make a call to bapi and get the actual receiver system.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40b64ca6-b1e3-2b10-4c9b-c48234ccea35?QuickLink=index&…
    Step by Step guide to Explain Enhanced Receiver Determination - Application Server Infrastructure - SCN Wiki

  • How to Send Internal table to SAP Spool using Function Modules or Methods?

    Hi Experts,
    How to Send Internal table to SAP Spool using Function Modules or Methods?
    Thanks ,
    Kiran

    This is my code.
    I still get the no ABAP list data for the spool, even tho I can see it sp01?
    REPORT  Z_MAIL_PAYSLIP.
    * Declaration Part *
    tables: PERNR, PV000, T549Q, V_T514D, HRPY_RGDIR.
    infotypes: 0000, 0001, 0105, 0655.
    data: begin of ITAB occurs 0,
      MTEXT(25) type C,
      PERNR like PA0001-PERNR,
      ABKRS like PA0001-ABKRS,
      ENAME like PA0001-ENAME,
      USRID_LONG like PA0105-USRID_LONG,
    end of ITAB.
    data: W_BEGDA like HRPY_RGDIR-FPBEG,
          W_ENDDA like HRPY_RGDIR-FPEND.
    data: RETURN like BAPIRETURN1 occurs 0 with header line.
    data: P_INFO like PC407,
          P_FORM like PC408 occurs 0 with header line.
    data: P_IDX type I,
          MY_MONTH type T549Q-PABRP,
          STR_MY_MONTH(2) type C,
          MY_YEAR type T549Q-PABRJ,
          STR_MY_YEAR(4) type C,
          CRLF(2) type x value '0D0A'.
    data: W_CMONTH(10) type C.
    data: TAB_LINES type I,
          ATT_TYPE like SOODK-OBJTP.
    data: begin of P_INDEX occurs 0,
            INDEX type I,
    end of P_INDEX.
    constants: begin of F__LTYPE, "type of line
       CMD like PC408-LTYPE value '/:',  "command
       TXT like PC408-LTYPE value 's',   "textline
    end of F__LTYPE.
    constants: begin of F__CMD, "commands
      NEWPAGE like PC408-LINDA value '',
    end of F__CMD.
    data: P_LIST like ABAPLIST occurs 1 with header line.
    *data: OBJBIN like SOLISTI1 occurs 10 with header line,
    data: OBJBIN like  LVC_S_1022 occurs 10 with header line,
          DOCDATA like SODOCCHGI1,
          OBJTXT like SOLISTI1 occurs 10 with header line,
          OBJPACK like SOPCKLSTI1 occurs 1 with header line,
          RECLIST like SOMLRECI1 occurs 1 with header line,
          OBJHEAD like SOLISTI1 occurs 1 with header line,
          it_mess_att LIKE solisti1 OCCURS 0 WITH HEADER LINE,
          gd_buffer type string,
          l_no_of_bytes TYPE i,
          l_pdf_spoolid LIKE tsp01-rqident,
          l_jobname     LIKE tbtcjob-jobname.
    data: file_length  type int4,
          spool_id     type rspoid,
          line_cnt     type i.
    *-------------------------------------------------------------------* * INITIALIZATION *
    OBJBIN = ' | '.
    append OBJBIN.
    OBJPACK-HEAD_START = 1.
    data: S_ABKRS like PV000-ABKRS.
    data: S_PABRP like T549Q-PABRP.
    data: S_PABRJ like T549Q-PABRJ.
    * SELECTION SCREEN                                                  *
    selection-screen begin of block BL1.
    parameters: PAY_VAR like BAPI7004-PAYSLIP_VARIANT default 'ESS_PAYSLIPS' obligatory.
    selection-screen end of block BL1.
    START-OF-SELECTION.
      s_ABKRS = PNPXABKR.
      S_PABRP = PNPPABRP.
      s_pabrj = PNPPABRJ.
      w_begda = PN-BEGDA.
      w_endda = PN-ENDDA.
    get pernr.
    *                                 "Check active employees
      rp-provide-from-last p0000 space pn-begda  pn-endda.
      CHECK P0000-STAT2 IN PNPSTAT2.
    *                                 "Check Payslip Mail flag
      rp-provide-from-last p0655 space pn-begda  pn-endda.
      CHECK P0655-ESSONLY = 'X'.
      rp-provide-from-last p0001 space pn-begda  pn-endda.
    *                                 "Find email address
      RP-PROVIDE-FROM-LAST P0105 '0030' PN-BEGDA PN-ENDDA.
      if p0105-usrid_LONG ne ''.
        ITAB-PERNR      = P0001-PERNR.
        ITAB-ABKRS      = P0001-ABKRS.
        ITAB-ENAME      = P0001-ENAME.
        ITAB-USRID_LONG = P0105-USRID_LONG.
        append itab.
        clear itab.
      endif.
      "SY-UCOMM ='ONLI'
    END-OF-SELECTION.
    *------------------------------------------------------------------* start-of-selection.
      write : / 'Payroll Area        : ', S_ABKRS.
      write : / 'Payroll Period/Year : ',STR_MY_MONTH,'-',STR_MY_YEAR. write : / 'System Date : ', SY-DATUM.
      write : / 'System Time         : ', SY-UZEIT.
      write : / 'User Name           : ', SY-UNAME.
      write : / SY-ULINE.
      sort ITAB by PERNR.
      loop at ITAB.
        clear : P_INFO, P_FORM, P_INDEX, P_LIST, OBJBIN, DOCDATA, OBJTXT, OBJPACK, RECLIST, TAB_LINES.
        refresh : P_FORM, P_INDEX, P_LIST, OBJBIN, OBJTXT, OBJPACK, RECLIST.
    *                                                  Retrieve Payroll results sequence number for this run
        select single * from HRPY_RGDIR where PERNR eq ITAB-PERNR
                                        and FPBEG ge W_BEGDA
                                        and FPEND le W_ENDDA
                                        and SRTZA eq 'A'.
    *                                                  Produce payslip for those payroll results
        if SY-SUBRC = 0.
          call function 'GET_PAYSLIP'
            EXPORTING
              EMPLOYEE_NUMBER = ITAB-PERNR
              SEQUENCE_NUMBER = HRPY_RGDIR-SEQNR
              PAYSLIP_VARIANT = PAY_VAR
            IMPORTING
              RETURN          = RETURN
              P_INFO          = P_INFO
            TABLES
              P_FORM          = P_FORM.
          check RETURN is initial.
    *                                                 remove linetype from generated payslip
          loop at p_form.
            objbin = p_form-linda.
            append objbin.
            line_cnt = line_cnt + 1.
          endloop.
          file_length = line_cnt * 1022.
    *                                                 create spool file of paylsip
          CALL FUNCTION 'SLVC_TABLE_PS_TO_SPOOL'
            EXPORTING
              i_file_length = file_length
            IMPORTING
              e_spoolid     = spool_id
            TABLES
              it_textdata   = objbin.
          IF sy-subrc EQ 0.
            WRITE spool_id.
          ENDIF.
          DESCRIBE table objbin.
          DATA PDF LIKE TLINE OCCURS 100 WITH HEADER LINE.
          CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
            EXPORTING
              SRC_SPOOLID                    = spool_id
              NO_DIALOG                      = ' '
              DST_DEVICE                     = 'MAIL'
    *      PDF_DESTINATION                =
    *    IMPORTING
    *      PDF_BYTECOUNT                  = l_no_of_bytes
    *      PDF_SPOOLID                    = l_pdf_spoolid
    *      LIST_PAGECOUNT                 =
    *      BTC_JOBNAME                    =
    *      BTC_JOBCOUNT                   =
            TABLES
              PDF                            = pdf
            EXCEPTIONS
              ERR_NO_ABAP_SPOOLJOB           = 1
              ERR_NO_SPOOLJOB                = 2
              ERR_NO_PERMISSION              = 3
              ERR_CONV_NOT_POSSIBLE          = 4
              ERR_BAD_DESTDEVICE             = 5
              USER_CANCELLED                 = 6
              ERR_SPOOLERROR                 = 7
              ERR_TEMSEERROR                 = 8
              ERR_BTCJOB_OPEN_FAILED         = 9
              ERR_BTCJOB_SUBMIT_FAILED       = 10
              ERR_BTCJOB_CLOSE_FAILED        = 11
              OTHERS                         = 12
          IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    *Download PDF file C Drive
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename = 'C:\itab_to_pdf.pdf'
          filetype = 'BIN'
        TABLES
          data_tab = pdf.
    * Transfer the 132-long strings to 255-long strings
    *  LOOP AT pdf.
    *    TRANSLATE pdf USING ' ~'.
    *    CONCATENATE gd_buffer pdf INTO gd_buffer.
    *  ENDLOOP.
    *  TRANSLATE gd_buffer USING '~ '.
    *  DO.
    *    it_mess_att = gd_buffer.
    *    APPEND it_mess_att.
    *    SHIFT gd_buffer LEFT BY 255 PLACES.
    *    IF gd_buffer IS INITIAL.
    *      EXIT.
    *    ENDIF.
    *  ENDDO.
          OBJHEAD = 'Objhead'.
          append OBJHEAD.
    * preparing email subject
          concatenate W_ENDDA(6)
                    ' Payslip-'
                    ITAB-ENAME+0(28)
                    ITAB-PERNR+4(4) ')'
                 into DOCDATA-OBJ_DESCR.
          DOCDATA-OBJ_NAME = 'Pay Slip'.
          DOCDATA-OBJ_LANGU = SY-LANGU.
          OBJTXT = 'Pay Slip.'.
          append OBJTXT.
    *prepare email lines
          OBJTXT = DOCDATA-OBJ_DESCR.
          append OBJTXT.
          OBJTXT = 'Please find enclosed your current payslip.'.
          append OBJTXT.
    * Write Attachment(Main)
    * 3 has been fixed because OBJTXT has fix three lines
          read table OBJTXT index 3.
    *    DOCDATA-DOC_SIZE = ( 3 - 1 ) * 255 + strlen( OBJTXT ).
          clear OBJPACK-TRANSF_BIN.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = 3.
          OBJPACK-DOC_TYPE = 'RAW'.
          append OBJPACK.
    * Create Message Attachment
          ATT_TYPE = 'PDF'.
          describe table OBJBIN lines TAB_LINES.
          read table OBJBIN index TAB_LINES.
    *    OBJPACK-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + strlen( OBJBIN ).
          OBJPACK-TRANSF_BIN = 'X'.
          OBJPACK-HEAD_START = 1.
          OBJPACK-HEAD_NUM = 0.
          OBJPACK-BODY_START = 1.
          OBJPACK-BODY_NUM = TAB_LINES.
          OBJPACK-DOC_TYPE = ATT_TYPE.
          OBJPACK-OBJ_NAME = 'ATTACHMENT'.
          OBJPACK-OBJ_DESCR = 'Payslip'.
          append OBJPACK.
    * Create receiver list refresh RECLIST.
          clear RECLIST.
          RECLIST-RECEIVER = itab-USRID_long.
          translate RECLIST-RECEIVER to lower case.
          RECLIST-REC_TYPE = 'U'.
          append RECLIST.
    * Send the document
    *SO_NEW_DOCUMENT_ATT_SEND_API1
          call function 'SO_DOCUMENT_SEND_API1'
            exporting
              DOCUMENT_DATA = DOCDATA
              PUT_IN_OUTBOX = 'X'
              COMMIT_WORK = 'X'
    * IMPORTING
    *   SENT_TO_ALL =
    *   NEW_OBJECT_ID =
            tables
              PACKING_LIST  = OBJPACK
              OBJECT_HEADER = OBJHEAD
              CONTENTS_BIN  = pdf
              CONTENTS_TXT  = OBJTXT
    *   CONTENTS_HEX =
    *   OBJECT_PARA =
    *   OBJECT_PARB =
              RECEIVERS = RECLIST
            exceptions
              TOO_MANY_RECEIVERS = 1
              DOCUMENT_NOT_SENT = 2
              DOCUMENT_TYPE_NOT_EXIST = 3
              OPERATION_NO_AUTHORIZATION = 4
              PARAMETER_ERROR = 5
              X_ERROR = 6
              ENQUEUE_ERROR = 7
              others = 8.
          if SY-SUBRC NE 0.
            ITAB-MTEXT = 'Message Not Sent to : '.
          else.
            ITAB-MTEXT = 'Message Sent to : '.
          endif.
    *    else.
    *      ITAB-MTEXT = 'Message Not Sent to : '.
    *    endif.
        else.
          "SY-SUBRC Not = 0
          ITAB-MTEXT = 'Payroll data not found : '.
        endif.
        "end of SY-SUBRC = 0.
        modify ITAB.
      endloop. "end loop at ITAB
      sort ITAB by MTEXT PERNR.
      loop at ITAB.
        at new MTEXT.
          uline.
          write : / ITAB-MTEXT color 4 intensified on.
          write : / 'Emp. Code' color 2 intensified on,
                 12 'Emp. Name' color 2 intensified on,
                 54 'Email ID' color 2 intensified on.
        endat.
        write : / ITAB-PERNR, 12 ITAB-ENAME, 54 ITAB-USRID_LONG.
      endloop.

  • How to Access table in SAP

    Hi Gurus,
    Actually I am new to SAP and was wondering if somebody could tell me how to access a table in SAP where the relavant data is being stored.
    e.g. If I want to check table VBAK, what wouldbe the menupath/t-code?
    Thank you.
    Juhi Singhania

    Hi Juhi,
    Since you are new to SAP you might want to have this link handy.. it has several useful information including the tables list
    http://www.erpgenie.com/abap/tables.htm
    http://www.erpgenie.com/saptech/transactions.htm
    http://www.sap-img.com/general/find-the-list-of-sap-transaction-codes.htm
    http://www.sap-img.com/basis/useful-sap-system-administration-transactions.htm
    Thanks
    Janani
    award points if helpful

  • How to get internal table from SAP Data Provider C#

    Hello.
    ABAP:
       DATA: lt_t001 TYPE TABLE OF t001.
       DATA: url(1000) TYPE c.
      SELECT * INTO TABLE lt_t001 FROM t001.
      CALL FUNCTION 'DP_CREATE_URL'
        EXPORTING
          type                 = 'APPLICATION'
          subtype           = 'X-R3TABLE'
        TABLES
          data                 = lt_t001
        CHANGING
          url                    = url
        EXCEPTIONS
          OTHERS           = 4.
    C#:
    using SAPDataProvider;
    using SAPTableFactoryCtrl;
    public void SetDataFromUrl(string url)
                SAPDataProviderClass p = new SAPDataProviderClass();
                p.SetDataFromURL("APPLICATION", "X-R3TABLE", url);
                ISapDPR3Table tbl = p.GetDataAsR3Table("APPLICATION", "X-R3TABLE");
                SAPTableFactoryClass tf = new SAPTableFactoryClass();
                Table tb = (Table)tf.NewTable();
                tb.ISAPrfcITab = tbl.DataTable; // Exception !!!!!!
    How to get internal table from SAP Data Provider ?

    Hi Sergey,
    I'm trying to do the same, have you found a solution to solved it?
    thanks for your help.
    Regards.
    Jonathan

Maybe you are looking for

  • In MM02 taking long time to open views

    Hi,    In MM02 I had taken the material T-BBD09,and select views i selected Basic Data1 and executed its taking very long time to open its going to time out after 1 hr,how to rectify the same to open. Thanku

  • Photoshop CS6 will not open any graphics files

    Photoshop cs6 will not open graphic files, i have reset the settings. I get to see all the files in preview but when I try to open a file nothing happens, no error messages, no file opens, nothing. When I use bridge I try to open the file with open i

  • Bad version number on Mac, but not PC

    I have a java applet that works fine in Windows. It works fine on Macs as long as I compile it with JDK 1.5. However, once I compile it with JDK 1.6 it loads in Windows, but it doesn't load at all in Mac OSX. I've tried compiling it with javac using

  • Problem with static vars of SQLJ java stored procedure

    Hi, When I'm calling a PL/SQL stored procedure that call a Java stored procedure from another Java stored procedure, the second call to the Java stored procedure does not see the first Java stored procedure static variables. Why is that? Can I config

  • STO with delivery and Billing

    HI, STO with delivery and Billing Material is valuated in MAP When doing PGI system picks the MAP of the issuing batch and this is what SAP provided Nw we need to transfer(PGI) @ the purchase price of the material in the supplying plant How to config