<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ABAP Tutorials &#187; Upload Download</title>
	<atom:link href="http://www.abap-tutorials.com/category/upload-download/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.abap-tutorials.com</link>
	<description>ABAP Tutorials, Guides, Training, Manuals</description>
	<lastBuildDate>Thu, 17 Nov 2011 07:43:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Upload File from Application Server into ABAP Internal Table in SAP</title>
		<link>http://www.abap-tutorials.com/2011/08/06/upload-file-from-application-server-into-abap-internal-table-in-sa/</link>
		<comments>http://www.abap-tutorials.com/2011/08/06/upload-file-from-application-server-into-abap-internal-table-in-sa/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 07:02:59 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[application server]]></category>
		<category><![CDATA[data from application server to internal table]]></category>
		<category><![CDATA[internal table]]></category>
		<category><![CDATA[OPEN DATASET]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[upload data to tables]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1914</guid>
		<description><![CDATA[The following code helps in uploading the data from flat file on Application Server to ABAP Internal Table. Download Program : Upload Flat File on Application Server to Internal Table You might also be interested in these posts:SAP ABAP Transferring Internal Table Contents to a file on the Application Server Best way to Loop At &#8216;Standard&#8217; Internal [...]]]></description>
			<content:encoded><![CDATA[<p>The following code helps in uploading the data from flat file on Application Server to ABAP Internal Table.</p>
<div style="width: 100%; float: left;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2011/08/upload_to_itab.jpg"><img class="aligncenter size-full wp-image-1915" title="Upload To Itab" src="http://www.abap-tutorials.com/wp-content/uploads/2011/08/upload_to_itab.jpg" alt="Upload To Itab" width="420" height="291" /></a></div>
<p><span id="more-1914"></span></p>
<p>Download Program : <a href="http://www.abap-tutorials.com/wp-content/uploads/2011/08/ZUPLOADTAB.txt">Upload Flat File on Application Server to Internal Table</a></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2011/07/01/sap-abap-transferring-internal-table-contents-to-a-file-on-the-application-server/' rel='bookmark' title='SAP ABAP Transferring Internal Table Contents to a file on the Application Server'>SAP ABAP Transferring Internal Table Contents to a file on the Application Server</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/11/best-way-to-loop-at-standard-internal-table/' rel='bookmark' title='Best way to Loop At &#8216;Standard&#8217; Internal Table in ABAP'>Best way to Loop At &#8216;Standard&#8217; Internal Table in ABAP</a></li>
<li><a href='http://www.abap-tutorials.com/2011/06/11/upload-download-data-from-sap-tables/' rel='bookmark' title='Upload / Download Data from SAP Tables'>Upload / Download Data from SAP Tables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2011/08/06/upload-file-from-application-server-into-abap-internal-table-in-sa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP ABAP Transferring Internal Table Contents to a file on the Application Server</title>
		<link>http://www.abap-tutorials.com/2011/07/01/sap-abap-transferring-internal-table-contents-to-a-file-on-the-application-server/</link>
		<comments>http://www.abap-tutorials.com/2011/07/01/sap-abap-transferring-internal-table-contents-to-a-file-on-the-application-server/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 11:56:36 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Report]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[application server]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[download data]]></category>
		<category><![CDATA[download file]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[flat file]]></category>
		<category><![CDATA[presentation server]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1884</guid>
		<description><![CDATA[In SAP ABAP you can transfer the contents of the internal table to a file. This is required when you wish to extract data from SAP tables into a flat file. This file can then be used to transfer data to another SAP or NON SAP system. This can also be used for an interfacing [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In SAP ABAP you can transfer the contents of the internal table to a file. This is required when you wish to extract data from SAP tables into a flat file.</p>
<p style="text-align: justify;">This file can then be used to transfer data to another SAP or NON SAP system. This can also be used for an interfacing when you wish to transfer data on a daily or a weekly basis from R/3 to NON R/3 or SAP.</p>
<div style="width: 100%; float: left;">
<p style="text-align: justify;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2011/07/download.jpg"><img class="aligncenter size-medium wp-image-1887" title="download" src="http://www.abap-tutorials.com/wp-content/uploads/2011/07/download-300x225.jpg" alt="download" width="300" height="225" /></a></p>
</div>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">The command used to create a file on the application server is as follows.</p>
<p><span id="more-1884"></span></p>
<p><strong>OPEN DATASET</strong></p>
<p style="text-align: justify;">Download the sample code : <a href="http://www.abap-tutorials.com/wp-content/uploads/2011/07/download_to_app_server.txt">download_internal_table_to_app_server</a></p>
<p style="text-align: justify;">Once the file is downloaded to the Application Server, user can use the T-Code <strong>CG3y, </strong>to download the file from Application Server to Presentation Server.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2011/08/06/upload-file-from-application-server-into-abap-internal-table-in-sa/' rel='bookmark' title='Upload File from Application Server into ABAP Internal Table in SAP'>Upload File from Application Server into ABAP Internal Table in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/11/18/abap-program-to-create-formatted-excel-using-xml/' rel='bookmark' title='ABAP program to create Formatted Excel File using XML'>ABAP program to create Formatted Excel File using XML</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/11/best-way-to-loop-at-standard-internal-table/' rel='bookmark' title='Best way to Loop At &#8216;Standard&#8217; Internal Table in ABAP'>Best way to Loop At &#8216;Standard&#8217; Internal Table in ABAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2011/07/01/sap-abap-transferring-internal-table-contents-to-a-file-on-the-application-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Upload / Download Data from SAP Tables</title>
		<link>http://www.abap-tutorials.com/2011/06/11/upload-download-data-from-sap-tables/</link>
		<comments>http://www.abap-tutorials.com/2011/06/11/upload-download-data-from-sap-tables/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 05:50:53 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[Utility]]></category>
		<category><![CDATA[download data from tables]]></category>
		<category><![CDATA[SAP tables]]></category>
		<category><![CDATA[table data]]></category>
		<category><![CDATA[upload data to tables]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1820</guid>
		<description><![CDATA[There have been some cases where we, as an ABAP programmer, want to take SAP table data backup. Specially for the case where Basis Team refuses to get it back-up and restore the data for us. There have been some codes available on net where data is backed-up but not restored back to SAP. It [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">There have been some cases where we, as an ABAP programmer, want to take SAP table data backup. Specially for the case where Basis Team refuses to get it back-up and restore the data for us.</p>
<p style="text-align: justify;">There have been some codes available on net where data is backed-up but not restored back to SAP.</p>
<div style="width: 100%; float: left; text-align: justify;">
<p style="text-align: center;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2011/06/backup.jpg"><img class="size-full wp-image-1814 aligncenter" title="backup" src="http://www.abap-tutorials.com/wp-content/uploads/2011/06/backup.jpg" alt="backup" width="300" height="259" /></a></p>
</div>
<p style="text-align: justify;">It is basically Dynamic table export / import facility.</p>
<p style="text-align: justify;"><span id="more-1820"></span></p>
<p style="text-align: justify;">There are some restrictions for using the code:</p>
<p style="text-align: justify;">*                   &#8211; Table definition MUST exist on target system for import.</p>
<p>*                   &#8211; Entire table is exported / imported.</p>
<p>*                   &#8211; Must be WIN95/98 WIN-NT long filenames.</p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">Download code : <a href="http://www.abap-tutorials.com/wp-content/uploads/2011/06/zsptud01.txt"></a><a href="http://www.abap-tutorials.com/wp-content/uploads/2011/06/zsptud011.txt">Upload/Download Program</a></p>
<p style="text-align: justify;">&nbsp;</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2011/08/06/upload-file-from-application-server-into-abap-internal-table-in-sa/' rel='bookmark' title='Upload File from Application Server into ABAP Internal Table in SAP'>Upload File from Application Server into ABAP Internal Table in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/10/20/downloading-pf-statusgui-status-in-sap/' rel='bookmark' title='Downloading PF-Status(GUI Status) in SAP'>Downloading PF-Status(GUI Status) in SAP</a></li>
<li><a href='http://www.abap-tutorials.com/2009/12/11/abap-hr-program-to-download-employee-data/' rel='bookmark' title='ABAP HR program to download Employee data'>ABAP HR program to download Employee data</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2011/06/11/upload-download-data-from-sap-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Step by Step LSMW Tutorial</title>
		<link>http://www.abap-tutorials.com/2010/06/16/step-by-step-lsmw-tutorial/</link>
		<comments>http://www.abap-tutorials.com/2010/06/16/step-by-step-lsmw-tutorial/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 07:07:39 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[BDC]]></category>
		<category><![CDATA[data migration]]></category>
		<category><![CDATA[LSMW]]></category>
		<category><![CDATA[LSMW tool]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1667</guid>
		<description><![CDATA[In an SAP implementation the data from legacy system (non SAP) normally transferred to the SAP system. Periodic data transfer between SAP and other system (interfacing) is also required. Both of the above form a part of data migration. In SAP, known tools for data migration are: BDC (Batch Data Communication) LSMW (Legacy System Migration Workbench) This document [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">In an SAP implementation the data from legacy system (non SAP) normally transferred to the SAP system. Periodic data transfer between SAP and other system (interfacing) is also required. Both of the above form a part of data migration. In SAP, known tools for data migration are:</p>
<ul style="text-align: justify;">
<li><strong>BDC (Batch Data Communication)</strong></li>
<li><strong>LSMW (Legacy System Migration Workbench)</strong></li>
</ul>
<p style="text-align: justify;">This document presents <strong>Overview of LSMW</strong> and to provides you information about how to use this functionality.</p>
<div style="width: 100%; float: left;">
<p style="text-align: justify;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/06/lsmw.gif"><img class="aligncenter size-full wp-image-1669" title="LSMW" src="http://www.abap-tutorials.com/wp-content/uploads/2010/06/lsmw.gif" alt="LSMW" width="450" height="304" /></a></p>
</div>
<p style="text-align: justify;"><span id="more-1667"></span> </p>
<p style="text-align: justify;">Following are the highlights from this presentation:</p>
<ul style="text-align: justify;">
<li><a title="Apart from this document see previously posted article for differences between BDC and LSMW" href="http://www.abap-tutorials.com/2010/06/14/difference-between-lsmw-and-bdc/" target="_blank">Difference between BDC &amp; LSMW</a></li>
<li><strong>What is LSMW ?</strong> Principles, Features and Pre-Requisities for LSMW</li>
<li>Import methods defined: IDOC’ s,BAPI’s, Standart/Direct Input, Batch Input</li>
<li>Steps for using conversion tool LSMW</li>
<li style="text-align: justify;">Procedures for Direct Input Method, Batch Input Method, BAPI in LSMW and so on..</li>
</ul>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;">Download Link: <a href="http://www.abap-tutorials.com/wp-content/uploads/2010/06/step-by-step-lsmw-tutorial.ppt" target="_blank">Step by Step LSMW Tutorial</a></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2010/06/14/difference-between-lsmw-and-bdc/' rel='bookmark' title='Difference Between LSMW and BDC'>Difference Between LSMW and BDC</a></li>
<li><a href='http://www.abap-tutorials.com/2010/11/16/ecatt-tutorial/' rel='bookmark' title='eCATT Tutorial'>eCATT Tutorial</a></li>
<li><a href='http://www.abap-tutorials.com/2010/03/16/complete-reference-to-abap-basics/' rel='bookmark' title='Complete Reference to ABAP Basics'>Complete Reference to ABAP Basics</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/06/16/step-by-step-lsmw-tutorial/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BDC to insert Wage Type in Infotype 0008 (Basic Pay)</title>
		<link>http://www.abap-tutorials.com/2010/05/25/bdc-to-insert-wage-type-in-infotype-0008/</link>
		<comments>http://www.abap-tutorials.com/2010/05/25/bdc-to-insert-wage-type-in-infotype-0008/#comments</comments>
		<pubDate>Tue, 25 May 2010 10:18:24 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP HR]]></category>
		<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Upload Download]]></category>
		<category><![CDATA[basic Pay]]></category>
		<category><![CDATA[BDC]]></category>
		<category><![CDATA[HR infotypes]]></category>
		<category><![CDATA[infotype0008]]></category>
		<category><![CDATA[wagetype]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1651</guid>
		<description><![CDATA[Addition of new WageTypes to Infotype 0008 often comes as an urgent requirement. Instead of adding WageTypes to individuals, we can upload it through a BDC. BDC Source Code: *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* *&#38; Report  ZHR_BDC_0008_INSERT                                         * *&#38;                                                                     * *&#38;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;* *&#38; About: the BDC inserts a new Wage Type into the infotype0008 for    * *&#38;        Per.No. provided in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Addition of new WageTypes to Infotype 0008 often comes as an urgent requirement. Instead of adding WageTypes to individuals, we can upload it through a BDC.</p>
<div style="width: 100%; float: left;">
<p style="text-align: center;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/05/Insert_wage_type_in_infotype_0008.jpg"><img class="aligncenter size-full wp-image-1652" title="Insert Wage Type In Infotype0008" src="http://www.abap-tutorials.com/wp-content/uploads/2010/05/Insert_wage_type_in_infotype_0008.jpg" alt="Insert Wage Type In Infotype0008" width="368" height="267" /></a></p>
</div>
<p><span id="more-1651"></span></p>
<p><strong><span style="color: #3366ff;">BDC Source Code:</span></strong></p>
<p>*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp; Report  ZHR_BDC_0008_INSERT                                         *<br />
*&amp;                                                                     *<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp; About: the BDC inserts a new Wage Type into the infotype0008 for    *<br />
*&amp;        Per.No. provided in flat file.                               *<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp; BDC / Flat File Structure:                                          *<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp; PersonnelNo  BeginDate EndDate WageType  Amount                     *<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*</p>
<p>REPORT  ZHR_BDC_0008_INSERT no standard page heading line-size 255.</p>
<p>DATA : BDCTAB LIKE BDCDATA OCCURS 100 WITH HEADER LINE.</p>
<p>DATA BEGIN OF itab1 OCCURS 0.<br />
        INCLUDE STRUCTURE p0001.<br />
DATA END OF itab1.<br />
DATA BEGIN OF itab7 OCCURS 0.<br />
        INCLUDE STRUCTURE p0007.<br />
DATA END OF itab7.<br />
DATA BEGIN OF itab8 OCCURS 0.<br />
        INCLUDE STRUCTURE p0008.<br />
DATA END OF itab8.<br />
DATA BEGIN OF itabn OCCURS 0.<br />
        INCLUDE STRUCTURE pbwla.<br />
DATA END OF itabn.<br />
DATA: pos(2).</p>
<p>SELECTION-SCREEN SKIP 1.<br />
SELECTION-SCREEN BEGIN OF BLOCK K1 WITH FRAME TITLE TEXT-001.<br />
SELECTION-SCREEN SKIP 1.<br />
PARAMETERS : READFILE like rlgrap-filename DEFAULT<br />
             &#8216;c:\textfile.txt&#8217; LOWER CASE.<br />
SELECTION-SCREEN SKIP 1.<br />
SELECTION-SCREEN END OF BLOCK K1.</p>
<p>data: begin of record OCCURS 10,<br />
      pernr like PA0001-pernr,<br />
      begda like PA0001-begda,<br />
      endda like PA0001-endda,<br />
      lgart like PA0008-lga01,<br />
      amount(12),<br />
      end of record.</p>
<p>start-of-selection.</p>
<p>  PERFORM OPEN_GROUP.<br />
  PERFORM UPLOAD.</p>
<p>  if record[] is NOT INITIAL.<br />
*do.<br />
    LOOP AT record.<br />
*read dataset dataset into record.<br />
      if sy-subrc &lt;&gt; 0. exit. endif.<br />
      data: tbegda(10),<br />
            tendda(10).<br />
      write: record-begda to tbegda,<br />
             record-endda to tendda.<br />
      data: wgtype(20),<br />
            amount(20).<br />
* Get Personnel Data<br />
      PERFORM GET_PERS_DATA.<br />
      clear: pos.<br />
      LOOP AT itabn where endda = &#8217;99991231&#8242;.<br />
        pos = pos + 1.<br />
      ENDLOOP.<br />
* Move to new line<br />
      pos = pos + 1.<br />
* Setting position in Table Control<br />
      concatenate &#8216;Q0008-LGART(&#8216; pos &#8216;)&#8217; into wgtype.<br />
      concatenate &#8216;Q0008-BETRG(&#8216; pos &#8216;)&#8217; into amount.<br />
      perform bdc_dynpro      using &#8216;SAPMP50A&#8217; &#8217;1000&#8242;.<br />
      perform bdc_field       using &#8216;BDC_OKCODE&#8217;<br />
                                    &#8216;=COP&#8217;.<br />
      perform bdc_field       using &#8216;RP50G-PERNR&#8217;<br />
*                              &#8217;1341&#8242;.<br />
                                     record-pernr.<br />
*perform bdc_field       using &#8216;RP50G-TIMR6&#8242;<br />
*                              &#8216;X&#8217;.<br />
      perform bdc_field       using &#8216;BDC_CURSOR&#8217;<br />
                                    &#8216;RP50G-CHOIC&#8217;.<br />
      perform bdc_field       using &#8216;RP50G-CHOIC&#8217;<br />
                                    &#8217;8&#8242;.<br />
      perform bdc_dynpro      using &#8216;MP000800&#8242; &#8217;2040&#8242;.<br />
      perform bdc_field       using &#8216;BDC_OKCODE&#8217;<br />
                                    &#8216;/00&#8242;.<br />
      perform bdc_field       using &#8216;P0008-BEGDA&#8217;<br />
*                              &#8217;01.04.2010&#8242;.<br />
                                     tbegda.<br />
      perform bdc_field       using &#8216;P0008-ENDDA&#8217;<br />
*                              &#8217;31.12.9999&#8242;.<br />
                                     tendda.<br />
*perform bdc_field       using &#8216;P0008-TRFAR&#8217;<br />
*                              &#8216;SK&#8217;.<br />
*perform bdc_field       using &#8216;P0008-BSGRD&#8217;<br />
*                              &#8217;100.00&#8242;.<br />
*perform bdc_field       using &#8216;P0008-TRFGB&#8217;<br />
*                              &#8216;SK&#8217;.<br />
*perform bdc_field       using &#8216;P0008-DIVGV&#8217;<br />
*                              &#8217;100.00&#8242;.<br />
*perform bdc_field       using &#8216;P0008-TRFGR&#8217;<br />
*                              &#8216;JT MGR&#8217;.<br />
*perform bdc_field       using &#8216;P0008-TRFST&#8217;<br />
*                              &#8216;GE&#8217;.<br />
*perform bdc_field       using &#8216;P0008-ANCUR&#8217;<br />
*                              &#8216;INR&#8217;.<br />
*perform bdc_field       using &#8216;Q0008-IBBEG&#8217;<br />
*                              &#8217;25.05.2010&#8242;.<br />
*perform bdc_field       using &#8216;P0008-WAERS&#8217;<br />
*                              &#8216;INR&#8217;.<br />
*perform bdc_field       using &#8216;Q0008-LGART(07)&#8217;<br />
*                              &#8217;1MDA&#8217;.<br />
*perform bdc_field       using &#8216;Q0008-LGART(07)&#8217;<br />
*                              &#8217;1MDA&#8217;.<br />
      perform bdc_field       using  wgtype<br />
                                     record-lgart.<br />
*perform bdc_field       using &#8216;Q0008-BETRG(07)&#8217;<br />
*                              &#8216;               500&#8242;.<br />
      perform bdc_field       using  amount<br />
                                     record-amount.<br />
      perform bdc_dynpro      using &#8216;MP000800&#8242; &#8217;2040&#8242;.<br />
      perform bdc_field       using &#8216;BDC_CURSOR&#8217;<br />
                                    &#8216;P0008-BEGDA&#8217;.<br />
      perform bdc_field       using &#8216;BDC_OKCODE&#8217;<br />
                                    &#8216;=UPD&#8217;.<br />
      perform bdc_field       using &#8216;P0008-BEGDA&#8217;<br />
*                              &#8217;01.04.2010&#8242;.<br />
                                     tbegda.<br />
      perform bdc_field       using &#8216;P0008-ENDDA&#8217;<br />
*                              &#8217;31.12.9999&#8242;.<br />
                                     tendda.<br />
*perform bdc_field       using &#8216;P0008-TRFAR&#8217;<br />
*                              &#8216;SK&#8217;.<br />
*perform bdc_field       using &#8216;P0008-BSGRD&#8217;<br />
*                              &#8217;100.00&#8242;.<br />
*perform bdc_field       using &#8216;P0008-TRFGB&#8217;<br />
*                              &#8216;SK&#8217;.<br />
*perform bdc_field       using &#8216;P0008-DIVGV&#8217;<br />
*                              &#8217;100.00&#8242;.<br />
*perform bdc_field       using &#8216;P0008-TRFGR&#8217;<br />
*                              &#8216;JT MGR&#8217;.<br />
*perform bdc_field       using &#8216;P0008-TRFST&#8217;<br />
*                              &#8216;GE&#8217;.<br />
*perform bdc_field       using &#8216;P0008-ANCUR&#8217;<br />
*                              &#8216;INR&#8217;.<br />
*perform bdc_field       using &#8216;Q0008-IBBEG&#8217;<br />
*                              &#8217;25.05.2010&#8242;.<br />
*perform bdc_field       using &#8216;P0008-WAERS&#8217;<br />
*                              &#8216;INR&#8217;.<br />
*perform bdc_transaction using &#8216;PA30&#8242;.<br />
      CALL FUNCTION &#8216;BDC_INSERT&#8217;<br />
          EXPORTING<br />
               TCODE             = &#8216;PA30&#8242;<br />
*         POST_LOCAL       = NOVBLOCAL<br />
*         PRINTING         = NOPRINT<br />
           TABLES<br />
                DYNPROTAB        = BDCTAB<br />
*    EXCEPTIONS<br />
*         INTERNAL_ERROR   = 1<br />
*         NOT_OPEN         = 2<br />
*         QUEUE_ERROR      = 3<br />
*         TCODE_INVALID    = 4<br />
*         PRINTING_INVALID = 5<br />
*         POSTING_INVALID  = 6<br />
*         OTHERS           = 7<br />
                .<br />
      IF SY-SUBRC &lt;&gt; 0.<br />
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO<br />
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.<br />
      ENDIF.<br />
      REFRESH BDCTAB.<br />
    endloop.</p>
<p>    CALL FUNCTION &#8216;BDC_CLOSE_GROUP&#8217;<br />
*    EXCEPTIONS<br />
*         NOT_OPEN    = 1<br />
*         QUEUE_ERROR = 2<br />
*         OTHERS      = 3<br />
              .<br />
    IF SY-SUBRC &lt;&gt; 0.<br />
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO<br />
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.<br />
    ENDIF.<br />
*perform close_group.<br />
*perform close_dataset using dataset.<br />
  endif.<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;      Form  BDC_DYNPRO<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*       text<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*<br />
FORM BDC_DYNPRO USING PROGRAM DYNPRO.<br />
  CLEAR BDCTAB.<br />
  BDCTAB-PROGRAM  = PROGRAM.<br />
  BDCTAB-DYNPRO   = DYNPRO.<br />
  BDCTAB-DYNBEGIN = &#8216;X&#8217;.<br />
  APPEND BDCTAB.</p>
<p>ENDFORM.                    &#8220;BDC_DYNPRO</p>
<p>*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;      Form  BDC_FIELD<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*       text<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*<br />
FORM BDC_FIELD USING FNAM FVAL.<br />
*  IF FVAL &lt;&gt; NODATA.<br />
  CLEAR BDCTAB.<br />
  BDCTAB-FNAM = FNAM.<br />
  BDCTAB-FVAL = FVAL.<br />
  APPEND BDCTAB.<br />
*  ENDIF.<br />
ENDFORM.                    &#8220;BDC_FIELD<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;      Form  UPLOAD<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*       text<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*<br />
FORM UPLOAD .</p>
<p>  CALL FUNCTION &#8216;UPLOAD&#8217;<br />
    EXPORTING<br />
      FILENAME                = READFILE<br />
      FILETYPE                = &#8216;DAT&#8217;<br />
    TABLES<br />
      DATA_TAB                = record<br />
    EXCEPTIONS<br />
      CONVERSION_ERROR        = 1<br />
      FILE_OPEN_ERROR         = 2<br />
      FILE_READ_ERROR         = 3<br />
      INVALID_TYPE            = 4<br />
      NO_BATCH                = 5<br />
      UNKNOWN_ERROR           = 6<br />
      INVALID_TABLE_WIDTH     = 7<br />
      GUI_REFUSE_FILETRANSFER = 8<br />
      CUSTOMER_ERROR          = 9<br />
      OTHERS                  = 10.</p>
<p>ENDFORM.                    &#8221; UPLOAD</p>
<p>*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;      Form  OPEN_GROUP<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*       text<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*<br />
FORM OPEN_GROUP .</p>
<p>  CALL FUNCTION &#8216;BDC_OPEN_GROUP&#8217;<br />
      EXPORTING<br />
           CLIENT              = SY-MANDT<br />
           GROUP               = sy-uname &#8220;&#8216;HR_DELIMT&#8217;<br />
           KEEP                = &#8216;X&#8217;<br />
           USER                = SY-UNAME<br />
      EXCEPTIONS<br />
           CLIENT_INVALID      = 1<br />
           DESTINATION_INVALID = 2<br />
           GROUP_INVALID       = 3<br />
           GROUP_IS_LOCKED     = 4<br />
           HOLDDATE_INVALID    = 5<br />
           INTERNAL_ERROR      = 6<br />
           QUEUE_ERROR         = 7<br />
           RUNNING             = 8<br />
           SYSTEM_LOCK_ERROR   = 9<br />
           USER_INVALID        = 10<br />
           OTHERS              = 11<br />
            .</p>
<p>ENDFORM.                    &#8221; OPEN_GROUP<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*&amp;      Form  GET_PERS_DATA<br />
*&amp;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*<br />
*       text<br />
*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-*<br />
FORM GET_PERS_DATA .<br />
  CLEAR : itab1,itab7,itab8,itabn.<br />
  REFRESH : itab1,itab7,itab8,itabn.</p>
<p>  CALL FUNCTION &#8216;RP_FILL_WAGE_TYPE_TABLE_EXT&#8217;<br />
    EXPORTING<br />
      begda                        = record-begda &#8220;i0008-begda<br />
      endda                        = &#8217;99991231&#8242;<br />
      infty                        = &#8217;0008&#8242;<br />
      tclas                        = &#8216;A&#8217;<br />
      pernr                        = record-pernr &#8220;i0008-pernr<br />
    TABLES<br />
      pp0001                       = itab1<br />
      pp0007                       = itab7<br />
      pp0008                       = itab8<br />
      ppbwla                       = itabn<br />
    EXCEPTIONS<br />
      error_at_indirect_evaluation = 1<br />
      OTHERS                       = 2.</p>
<p>ENDFORM.                    &#8221; GET_PERS_DATA</p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">Note:</span></strong> The WageTypes should be updated one at a time (i.e., run BDC for all employee for a specific Wage Type. Execute it from SM35. Now repeat the process for another WageType).</p>
<p style="text-align: justify;">BDC Source Code: <a href="http://www.abap-tutorials.com/wp-content/uploads/2010/05/BDC_INSERT_0008.txt" target="_blank">BDC Insert WageType in Infotype 0008</a></p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/12/11/abap-hr-program-to-download-employee-data/' rel='bookmark' title='ABAP HR program to download Employee data'>ABAP HR program to download Employee data</a></li>
<li><a href='http://www.abap-tutorials.com/2009/11/20/macros-in-abap-hr-programming-i/' rel='bookmark' title='Macros in ABAP-HR Programming &#8211; I'>Macros in ABAP-HR Programming &#8211; I</a></li>
<li><a href='http://www.abap-tutorials.com/2010/07/31/mm02-bdc/' rel='bookmark' title='MM02 BDC &#8211; Select Specific Material Master View'>MM02 BDC &#8211; Select Specific Material Master View</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/05/25/bdc-to-insert-wage-type-in-infotype-0008/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

