<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ABAP Code for Backup the entire table data in the application server in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181940#M999659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with simple way &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at i_output.
  write i_output to &amp;lt;f_table_data1&amp;gt;. " dyn table using p_table
  append &amp;lt;f_table_data1&amp;gt;.     
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 18 Jul 2008 18:42:02 GMT</pubDate>
    <dc:creator>former_member194669</dc:creator>
    <dc:date>2008-07-18T18:42:02Z</dc:date>
    <item>
      <title>ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181921#M999640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to create the table data Backup and Store the entire table data in the application server and also be able to restore the data back if needed.&lt;/P&gt;&lt;P&gt;this should be dynamic program for any table based on the table name given on the application server.. I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ANy Suggestions on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the program for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ster.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
*---------------------------------------------------------------------*
* Report  YWMM_TABLE_DUMP                                             *
*---------------------------------------------------------------------*

REPORT ywmm_table_dump .

TABLES :
        dd03l.
* Type spool declaration
TYPE-POOLS:
        abap, slis.

DATA: i_table_data1  TYPE REF TO data.
DATA : it_dd03l LIKE dd03l OCCURS 0 WITH HEADER LINE.
*DATA : gt_fieldcat TYPE lvc_s_fcat.
DATA : i_fcat      TYPE STANDARD TABLE OF lvc_s_fcat,
       l_dr_line         TYPE   REF TO data,
       l_v_as4vers       TYPE as4vers.



FIELD-SYMBOLS: &amp;lt;f_table_data1&amp;gt;     TYPE STANDARD TABLE,
               &amp;lt;f_wa_table_data1&amp;gt;  TYPE ANY.

SELECTION-SCREEN: BEGIN OF BLOCK bl1 WITH FRAME TITLE text-001.
PARAMETERS: rb_copy RADIOBUTTON GROUP map DEFAULT 'X',
            rb_rest RADIOBUTTON GROUP map.

SELECTION-SCREEN: END   OF BLOCK bl1.

SELECTION-SCREEN: BEGIN OF BLOCK bl2 WITH FRAME TITLE text-002.
PARAMETERS: p_table  TYPE tabname OBLIGATORY,
            p_plfld TYPE dd03l-fieldname.
SELECTION-SCREEN SKIP 1.
PARAMETERS: p_bkfile TYPE localfile OBLIGATORY.
SELECTION-SCREEN: END   OF BLOCK bl2.

PERFORM get_data.
IF rb_copy = 'X'.
  PERFORM backup.
ELSEIF rb_rest = 'X'.
  PERFORM database_update.
ENDIF.
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  get_data
*&amp;amp;---------------------------------------------------------------------*
FORM get_data.

  CLEAR   i_fcat.
  REFRESH i_fcat.

  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
       EXPORTING
            i_structure_name = p_table  " Table Name
       CHANGING
            ct_fieldcat      = i_fcat
       EXCEPTIONS
            OTHERS           = 1.

  CALL METHOD cl_alv_table_create=&amp;gt;create_dynamic_table
  EXPORTING
    it_fieldcatalog = i_fcat
  IMPORTING
    ep_table        = i_table_data1.
  IF sy-subrc = 0.
    ASSIGN i_table_data1-&amp;gt;* TO &amp;lt;f_table_data1&amp;gt;.
  ELSE.
    WRITE: 'Error creating internal table'.
  ENDIF.

  IF rb_copy = 'X'.


    SELECT  * FROM (p_table) INTO CORRESPONDING FIELDS OF
              TABLE &amp;lt;f_table_data1&amp;gt; UP TO 20 ROWS.

  ELSEIF rb_rest = 'X'.

    CREATE DATA l_dr_line LIKE LINE OF &amp;lt;f_table_data1&amp;gt;.
    ASSIGN l_dr_line-&amp;gt;* TO &amp;lt;f_wa_table_data1&amp;gt;.
*Get Data from Application Server

* Opening the dataset P_BKFILE given in the selection screen
    TRANSLATE p_bkfile TO LOWER CASE.
    OPEN DATASET p_bkfile FOR INPUT IN TEXT MODE." ENCODING DEFAULT.
    IF sy-subrc NE 0.
*    MESSAGE:
    ELSE.
      DO.
* Reading the file from application server
        READ DATASET p_bkfile INTO &amp;lt;f_wa_table_data1&amp;gt;.
        IF sy-subrc = 0.
          APPEND &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_table_data1&amp;gt;.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
* Closing the dataset
      CLOSE DATASET p_bkfile.
    ENDIF.

  ENDIF.
ENDFORM.                    " get_data
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  backup
*&amp;amp;---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*  --&amp;gt;  p1        text
*  &amp;lt;--  p2        text
*----------------------------------------------------------------------*
FORM backup.

  TRANSLATE p_bkfile TO LOWER CASE.

  OPEN DATASET p_bkfile FOR OUTPUT IN TEXT MODE.

  IF sy-subrc NE 0.
    WRITE: text-017.
    STOP.
  ELSE.
    LOOP AT &amp;lt;f_table_data1&amp;gt; ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.
      TRANSFER &amp;lt;f_wa_table_data1&amp;gt; TO p_bkfile.
    ENDLOOP.
  ENDIF.
  CLOSE DATASET p_bkfile.

ENDFORM.                    " backup
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  database_update
*&amp;amp;---------------------------------------------------------------------*

FORM database_update.

  DATA : i_mara_u TYPE STANDARD TABLE OF mara WITH HEADER LINE,
         i_ekpo_u TYPE STANDARD TABLE OF ekpo WITH HEADER LINE,
         i_eban_u TYPE STANDARD TABLE OF eban WITH HEADER LINE,
         i_resb_u TYPE STANDARD TABLE OF resb WITH HEADER LINE,
         i_plpo_u TYPE STANDARD TABLE OF plpo WITH HEADER LINE,
         i_stpo_u TYPE STANDARD TABLE OF stpo WITH HEADER LINE,
         i_vbap_u TYPE STANDARD TABLE OF vbap WITH HEADER LINE,
         i_vbrp_u TYPE STANDARD TABLE OF vbrp WITH HEADER LINE,
         i_lips_u TYPE STANDARD TABLE OF lips WITH HEADER LINE,
         i_afvc_u TYPE STANDARD TABLE OF afvc WITH HEADER LINE,
         i_asmd_u TYPE STANDARD TABLE OF asmd WITH HEADER LINE,
*           i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
         i_qmel_u TYPE STANDARD TABLE OF qmel WITH HEADER LINE,
         i_cooi_u TYPE STANDARD TABLE OF cooi WITH HEADER LINE,
         i_esll_u TYPE STANDARD TABLE OF esll WITH HEADER LINE,
         i_t165_u  TYPE STANDARD TABLE OF t165 WITH HEADER LINE,
         i_t165e_u TYPE STANDARD TABLE OF t165e WITH HEADER LINE,
         i_twpko_u TYPE STANDARD TABLE OF twpko WITH HEADER LINE,
         i_tpext_u TYPE STANDARD TABLE OF tpext WITH HEADER LINE,
         i_ce4mxpa_u TYPE STANDARD TABLE OF ce4mxpa WITH HEADER LINE,
         i_ce4mxpa_acct_u TYPE STANDARD TABLE OF ce4mxpa_acct WITH
                                                         HEADER LINE,
         i_zaim_u  TYPE STANDARD TABLE OF zaim WITH HEADER LINE,

         i_s012_d TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
         i_s012_i TYPE STANDARD TABLE OF s012 WITH HEADER LINE,
         i_dummy  TYPE STANDARD TABLE OF mara.


  CASE p_table.
    WHEN 'MARA'.
*     Non-Key
      PERFORM move_to_table USING   &amp;lt;f_table_data1&amp;gt;
                            CHANGING i_mara_u[]
                                     i_mara_u.
      PERFORM update_table USING i_mara_u[].

  ENDCASE.

ENDFORM.                    " database_update
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  move_to_mara
*&amp;amp;---------------------------------------------------------------------*
FORM move_to_table USING    p_tab_from TYPE STANDARD TABLE
                   CHANGING p_tab_to   TYPE STANDARD TABLE
                            p_w_table.

  DATA:  l_wa_fcat TYPE lvc_s_fcat.

  FIELD-SYMBOLS: &amp;lt;f_field_from&amp;gt; TYPE ANY,
                 &amp;lt;f_field_to&amp;gt;   TYPE ANY.

  LOOP AT p_tab_from ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.

    LOOP AT i_fcat INTO l_wa_fcat.
      ASSIGN COMPONENT l_wa_fcat-fieldname
     OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field_from&amp;gt;.
      ASSIGN COMPONENT l_wa_fcat-fieldname
     OF STRUCTURE p_w_table TO &amp;lt;f_field_to&amp;gt;.

      &amp;lt;f_field_to&amp;gt; = &amp;lt;f_field_from&amp;gt;.
    ENDLOOP.

    APPEND p_w_table TO p_tab_to.
  ENDLOOP.

ENDFORM.                    " move_to_mara
*&amp;amp;---------------------------------------------------------------------*
*&amp;amp;      Form  update_table
*&amp;amp;---------------------------------------------------------------------*

FORM update_table  USING p_table_update TYPE STANDARD TABLE.
  SELECT SINGLE *
    FROM dd03l
   WHERE fieldname = p_plfld
     AND tabname   = p_table
     AND keyflag   &amp;lt;&amp;gt; 'X'
     AND as4local = 'A'
     AND   as4vers = l_v_as4vers
     AND   ( comptype = 'E' OR comptype = space ).

  IF sy-subrc = 0.
*   Do update
    IF NOT p_table_update IS INITIAL.
      UPDATE (p_table) FROM TABLE p_table_update.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        WRITE: text-003.
        STOP.
      ENDIF.
    ENDIF.
  ELSE.
*delete and insert.
    IF NOT p_table_update IS INITIAL.
*      DELETE (p_table).
      IF sy-subrc = 0.
        INSERT (p_table) FROM TABLE p_table_update.
        IF sy-subrc = 0.
          COMMIT WORK.
        ELSE.
          ROLLBACK WORK.
          WRITE: text-018.
          STOP.
        ENDIF.
      ELSE.
        ROLLBACK WORK.
        WRITE: text-018.
        STOP.
      ENDIF.
    ENDIF.
  ENDIF.
ENDFORM.                    " update_table
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Julius Bussche on Jul 18, 2008 1:43 PM&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Please use a meaningfull subject title!&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:36:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181921#M999640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181922#M999641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ster - please use a meaningfull subject.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:39:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181922#M999641</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181923#M999642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ster,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think u r passing the quantity fields directly to application server. U should convert those into character then only it will take them and print them properly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Subbu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:40:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181923#M999642</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181924#M999643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'd suggest you look at the options on OPEN DATASET.  I think you want to open the datasets in BINARY mode.  Numeric data is stored (most often) as Binary Coded Decimal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really hope this is just an exercise, and that you'd NEVER run this on a real system!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:41:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181924#M999643</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2008-07-18T13:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181925#M999644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;I have developed a program for this but its having problems with the Quantity, amount. Its not writing it correctly at the application level.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quantities, Currencies are not trnasferred to Application server. Before Transfering the Quantities and Amounts you have to convert them to Character format and then Transfer the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:43:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181925#M999644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181926#M999645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THanks All for all ur suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering how would I change them to the CHAR format as everything here is dynamic. Please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:53:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181926#M999645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T13:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181927#M999646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ster,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to convert the quantity field content into character format.&lt;/P&gt;&lt;P&gt;in your form BACKUP you need to convert like the following&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
LOOP AT &amp;lt;f_table_data1&amp;gt; ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.

LOOP AT i_fcat INTO l_wa_fcat.

          if l_wa_fcat-inttype eq 'P'.
            assign component l_wa_fcat-fieldname
                of structure &amp;lt;f_wa_table_data1&amp;gt; to &amp;lt;comp&amp;gt;
                type     fields_int-type
                decimals fields_int-decimals.
          else.
            assign component l_wa_fcat-fieldname
                of structure &amp;lt;f_wa_table_data1&amp;gt; to &amp;lt;comp&amp;gt;
                type     fields_int-type.
          endif.
    " Move &amp;lt;com&amp;gt; to a new table and use this table for download
endloop.
endloop.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 13:57:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181927#M999646</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181928#M999647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am facing a bit difficulties in getting this.&lt;/P&gt;&lt;P&gt;Anyways I will try more and get back to you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 14:24:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181928#M999647</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T14:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181929#M999648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ARS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling a bit to get this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there is a syntax error,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Field "FIELDS_INT-TYPE" is unknown. It is neither in one of thespecified tables nor defined by a "DATA" statement.	&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again you have asked to move to a diffrent table. What is that table and how to build it.&lt;/P&gt;&lt;P&gt;		&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LOOP AT &amp;lt;f_table_data1&amp;gt; ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.

      LOOP AT i_fcat INTO l_fcat.

        IF l_fcat-inttype EQ 'P'.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     fields_int-type
              DECIMALS fields_int-decimals.
        ELSE.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     fields_int-type.
        ENDIF.
        " Move &amp;lt;f_field&amp;gt; to a new table and use this table for download
      ENDLOOP.

      TRANSFER &amp;lt;f_wa_table_data1&amp;gt; TO p_bkfile.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 14:42:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181929#M999648</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T14:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181930#M999649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please change the lines &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
fields_int-type
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
fields l_wa_fcat-inttype
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 14:54:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181930#M999649</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T14:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181931#M999650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ARS for all your suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I am stuck with one more thing and I am wondering would that work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would you move this to another table and download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LOOP AT &amp;lt;f_table_data1&amp;gt; ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.

      LOOP AT i_fcat INTO l_fcat.

        IF l_fcat-inttype EQ 'P'.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     l_fcat-inttype
              decimals l_fcat-decimals.
        ELSE.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     l_fcat-inttype.
        ENDIF.
*   Move &amp;lt;f_field&amp;gt; to a new table and use this table for download
      ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 15:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181931#M999650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T15:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181932#M999651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ANy More suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 16:08:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181932#M999651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T16:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181933#M999652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : begin of i_output occurs 0.
data : sdata(10000) type c.
data : end of i_output.  


   LOOP AT &amp;lt;f_table_data1&amp;gt; ASSIGNING &amp;lt;f_wa_table_data1&amp;gt;.
      clear : line_cursor.   
      LOOP AT i_fcat INTO l_fcat.
        IF l_fcat-inttype EQ 'P'.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     l_fcat-inttype
              decimals l_fcat-decimals.
        ELSE.
          ASSIGN COMPONENT l_fcat-fieldname
              OF STRUCTURE &amp;lt;f_wa_table_data1&amp;gt; TO &amp;lt;f_field&amp;gt;
              TYPE     l_fcat-inttype.
        ENDIF.
       line_cursor = line_cursor + l_fcat-intlen.
       write &amp;lt;f_field&amp;gt; to i_output-sdata + line_cursor(l_fcat-intlen).
      ENDLOOP.
       append i_output.
 ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: a®s on Jul 18, 2008 12:12 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 16:11:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181933#M999652</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T16:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181934#M999653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It writes now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But there is one more concern.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The file on the app server does not have all the data. I mean it has all the rows but for each row some of the fields have disappeared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 17:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181934#M999653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T17:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181935#M999654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check the I_OUTPUT table and closely check the lines&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
       line_cursor = line_cursor + l_fcat-intlen.
       write &amp;lt;f_field&amp;gt; to i_output-sdata + line_cursor(l_fcat-intlen).
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:06:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181935#M999654</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T18:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181936#M999655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Buddy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I have made samlll changes to the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have writted the addition datatement after the write statement and also have included the decimals in addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
        WRITE &amp;lt;f_field&amp;gt; TO i_output-sdata+line_cursor(l_fcat-intlen).
        line_cursor = line_cursor + l_fcat-intlen + l_fcat-decimals.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But Now another challenge, the restore program.&lt;/P&gt;&lt;P&gt;Ster.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181936#M999655</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T18:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181937#M999656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is download working fine now?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:15:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181937#M999656</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T18:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181938#M999657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is I_FCAT-INTLEN  ( i think this contains the total lenth of the field including decials also )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then why are you adding DECIMALS along with INTLEN to line_cursor &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;line_cursor = line_cursor + l_fcat-intlen + l_fcat-decimals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:17:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181938#M999657</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T18:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181939#M999658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes the download is working fine Now. WIll have to look more in details each and every Value. &lt;/P&gt;&lt;P&gt;I have removed the decimals Addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me in getting the restore done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
    LOOP AT i_output.
      CLEAR : line_cursor.
      LOOP AT i_fcat INTO l_fcat.
        &amp;lt;f_wa_table_data1&amp;gt;-l_fcat-fieldname =
                          i_output-sdata+line_cursor(l_fcat-intlen). "Syntax Error
        line_cursor = line_cursor + l_fcat-intlen + l_fcat-decimals.
      ENDLOOP.
      APPEND &amp;lt;f_wa_table_data1&amp;gt; to &amp;lt;f_table_data1&amp;gt;.
    ENDLOOP.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ster&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:25:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181939#M999658</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-07-18T18:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: ABAP Code for Backup the entire table data in the application server</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181940#M999659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with simple way &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
loop at i_output.
  write i_output to &amp;lt;f_table_data1&amp;gt;. " dyn table using p_table
  append &amp;lt;f_table_data1&amp;gt;.     
endloop.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jul 2008 18:42:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/abap-code-for-backup-the-entire-table-data-in-the-application-server/m-p/4181940#M999659</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2008-07-18T18:42:02Z</dc:date>
    </item>
  </channel>
</rss>

