<?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; BDC / LSMW</title>
	<atom:link href="http://www.abap-tutorials.com/category/bdc-lsmw/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>Batch Input &#8211; Frequently Asked Questions(FAQs)</title>
		<link>http://www.abap-tutorials.com/2010/08/23/batch-input-faqs/</link>
		<comments>http://www.abap-tutorials.com/2010/08/23/batch-input-faqs/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 10:21:22 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Batch Imput Session]]></category>
		<category><![CDATA[BDC]]></category>
		<category><![CDATA[BDC Session]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1720</guid>
		<description><![CDATA[Batch Input FAQs :  The attached file takes you to the in depths of the BDC concepts. The concepts ranges from Concepts, Recording (SHDB), Content of Data, Influencing the execution, Troubleshooting the execution, Special Development, and Miscellaneous questions.   Download Link: BDC_concepts.     *source = Sandra Rossi You might also be interested in these posts:eCATT &#8211; Frequently Asked [...]]]></description>
			<content:encoded><![CDATA[<h3 style="text-align: justify;"><span style="color: #3366ff;">Batch Input FAQs :</span></h3>
<p style="text-align: justify;"> The attached file takes you to the in depths of the BDC concepts. The concepts ranges from Concepts, Recording (SHDB), Content of Data, Influencing the execution, Troubleshooting the execution, Special Development, and Miscellaneous questions.</p>
<div style="float: left; width: 100%;">
<p style="text-align: justify;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/08/BDC_SM35.jpg"><img class="aligncenter size-full wp-image-1726" title="BDC_SM35" src="http://www.abap-tutorials.com/wp-content/uploads/2010/08/BDC_SM35.jpg" alt="BDC SM35" width="459" height="222" /></a> </p>
</div>
<p style="text-align: justify;"><span id="more-1720"></span></p>
<p style="text-align: justify;"><strong>Download Link</strong>: <a href="http://www.abap-tutorials.com/wp-content/uploads/2010/08/BDC_concepts.doc">BDC_concepts</a>.</p>
<h6 style="text-align: justify;"><span style="color: #c0c0c0;"> </span></h6>
<h6 style="text-align: justify;"><span style="color: #c0c0c0;"> </span></h6>
<h6 style="text-align: justify;"><span style="color: #c0c0c0;">*source = Sandra Rossi</span></h6>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2010/11/10/ecatt-faqs/' rel='bookmark' title='eCATT &#8211; Frequently Asked Questions (FAQs)'>eCATT &#8211; Frequently Asked Questions (FAQs)</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/06/16/step-by-step-lsmw-tutorial/' rel='bookmark' title='Step by Step LSMW Tutorial'>Step by Step LSMW Tutorial</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/08/23/batch-input-faqs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MM02 BDC &#8211; Select Specific Material Master View</title>
		<link>http://www.abap-tutorials.com/2010/07/31/mm02-bdc/</link>
		<comments>http://www.abap-tutorials.com/2010/07/31/mm02-bdc/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 04:42:58 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[BDC for MM02]]></category>
		<category><![CDATA[Materail Master view specific BDC]]></category>
		<category><![CDATA[MM01]]></category>
		<category><![CDATA[MM02]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1698</guid>
		<description><![CDATA[Creating a BDC of the MM02 will not be an easy task. As soon as we enter the material and hit enter it will ask us to choose the required Material master views. This popup contains the available material master views and they are not constant. Sometimes MRP1 comes at the 12th line and sometimes [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Creating a BDC of the MM02 will not be an easy task. As soon as we enter the material and hit enter it will ask us to choose the required Material master views. This popup contains the available material master views and they are not constant. Sometimes MRP1 comes at the 12th line and sometimes it comes to 6th line. This dynamic of the views are solely depended on the Status (MARA-VPSTA).</p>
<div style="float: left; width: 100%;">
<p style="text-align: center;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/07/mm02_BDC.jpg"><img class="aligncenter size-full wp-image-1699" title="MM02 BDC" src="http://www.abap-tutorials.com/wp-content/uploads/2010/07/mm02_BDC.jpg" alt="MM02 BDC" width="421" height="353" /></a></p>
</div>
<p style="text-align: justify;"> <span id="more-1698"></span></p>
<p style="text-align: justify;">To overcome of this dynamics we need to get to know where exactly our required view will appear e.g. line 6 or line 10 or line 15. We will use the FM SELECTION_VIEWS_FIND to find out which view will come at which position.</p>
<p style="text-align: justify;">In our BDC, we will follow these steps:<br />
1. Always select the Basic Data 1<br />
2. Get the respective user command for the tab by Executing the FM SELECTION_VIEWS_FIND.</p>
<p style="text-align: justify;">Status (MARA-VPSTA) contains the combination of the View indicator. You can find the relation of the status indicator and view name in the documentation of the data element PSTAT_D or follow this table:</p>
<p style="text-align: justify;"> <strong><span style="color: #339966;">User department    Maintenance status</span></strong> </p>
<p style="text-align: justify;"> Work scheduling                A<br />
Accounting                     B<br />
Classification                 C<br />
MRP                            D<br />
Purchasing                     E<br />
Production resources/tools     F<br />
Costing                        G<br />
Basic data                     K<br />
Storage                        L<br />
Forecasting                    P<br />
Quality management             Q<br />
Warehouse management           S<br />
Sales                          V<br />
Plant stocks                   X<br />
Storage location stocks        Z</p>
<p style="text-align: justify;">In this my test BDC, I want to update the MRP type. MRP type comes under the &#8220;MRP 1&#8243; view of the material master. So, I will first select the Basic Data and than move to MRP 1 view and update the MRP type.</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong><span style="color: #339966;">BDC Code:</span></strong></p>
<p style="text-align: justify;">REPORT ztest_np_mm02<br />
       NO STANDARD PAGE HEADING LINE-SIZE 255.<br />
*<br />
* Local data<br />
DATA:   messtab LIKE bdcmsgcoll OCCURS 0 WITH HEADER LINE.<br />
DATA:   bdcdata LIKE bdcdata    OCCURS 0 WITH HEADER LINE.<br />
*<br />
* Selection Screen<br />
PARAMETERS: p_matnr TYPE mara-matnr OBLIGATORY,<br />
            p_werks TYPE marc-werks OBLIGATORY,<br />
            p_lgort TYPE rmmg1-lgort OBLIGATORY,<br />
            p_dismm TYPE marc-dismm OBLIGATORY.<br />
*<br />
*<br />
START-OF-SELECTION.<br />
*<br />
* Material views &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
  DATA:  l_vpsta LIKE t130m-pstat.<br />
*<br />
  SELECT SINGLE vpsta<br />
         INTO   l_vpsta<br />
         FROM   mara<br />
         WHERE  matnr = p_matnr.<br />
*<br />
* Get View sequence &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<br />
  DATA: l_bild  LIKE t133a-bilds,<br />
        lt_bild LIKE mbildtab OCCURS 0 WITH HEADER LINE.<br />
*<br />
* Screen Sequence for Standard Industry tab pages in material master<br />
  l_bild = &#8217;21&#8242;.<br />
*<br />
* Get screen sequence<br />
  CALL FUNCTION &#8216;SELECTION_VIEWS_FIND&#8217;<br />
    EXPORTING<br />
      bildsequenz     = l_bild<br />
      pflegestatus    = l_vpsta<br />
    TABLES<br />
      bildtab         = lt_bild<br />
    EXCEPTIONS<br />
      call_wrong      = 1<br />
      empty_selection = 2<br />
      OTHERS          = 3.<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 />
*<br />
* Get the Tab page for MRP1 &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br />
  DATA: l_tab_mrp1 TYPE sy-ucomm.<br />
*<br />
* reading table with MRP view<br />
  READ TABLE lt_bild WITH KEY pstat = &#8216;D&#8217;.<br />
  IF sy-subrc = 0.<br />
    l_tab_mrp1 = lt_bild-guifu.<br />
  ENDIF.<br />
*<br />
* make ok code for the MRP1<br />
  CONCATENATE &#8216;=&#8217; l_tab_mrp1 INTO l_tab_mrp1.<br />
*<br />
* BDC &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;<br />
  PERFORM bdc_dynpro      USING &#8216;SAPLMGMM&#8217; &#8217;0060&#8242;.<br />
  PERFORM bdc_field       USING &#8216;RMMG1-MATNR&#8217;<br />
                                 p_matnr.<br />
  PERFORM bdc_field       USING &#8216;BDC_OKCODE&#8217;<br />
                                &#8216;=ENTR&#8217;.<br />
*<br />
  PERFORM bdc_dynpro      USING &#8216;SAPLMGMM&#8217; &#8217;0070&#8242;.<br />
  PERFORM bdc_field       USING &#8216;MSICHTAUSW-KZSEL(01)&#8217;<br />
                                &#8216;X&#8217;.<br />
  PERFORM bdc_field       USING &#8216;BDC_OKCODE&#8217;<br />
                                &#8216;=ENTR&#8217;.<br />
*<br />
  PERFORM bdc_dynpro      USING &#8216;SAPLMGMM&#8217; &#8217;4004&#8242;.<br />
  PERFORM bdc_field       USING &#8216;BDC_OKCODE&#8217;<br />
                                l_tab_mrp1.<br />
*<br />
  PERFORM bdc_dynpro      USING &#8216;SAPLMGMM&#8217; &#8217;0081&#8242;.<br />
  PERFORM bdc_field       USING &#8216;RMMG1-WERKS&#8217;<br />
                                p_werks.<br />
  PERFORM bdc_field       USING &#8216;RMMG1-LGORT&#8217;<br />
                                p_lgort.<br />
  PERFORM bdc_field       USING &#8216;BDC_OKCODE&#8217;<br />
                                &#8216;=ENTR&#8217;.<br />
*<br />
  PERFORM bdc_dynpro      USING &#8216;SAPLMGMM&#8217; &#8217;4000&#8242;.<br />
  PERFORM bdc_field       USING &#8216;MARC-DISMM&#8217;<br />
                                p_dismm.<br />
  PERFORM bdc_field       USING &#8216;BDC_OKCODE&#8217;<br />
                                &#8216;=BU&#8217;.<br />
*<br />
  PERFORM bdc_transaction USING &#8216;MM02&#8242;.<br />
*<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 />
FORM bdc_dynpro USING p_program<br />
                      p_screen.<br />
*<br />
  MOVE: p_program TO bdcdata-program,<br />
        p_screen  TO bdcdata-dynpro,<br />
        &#8216;X&#8217;       TO bdcdata-dynbegin.<br />
*<br />
  APPEND bdcdata.<br />
  CLEAR  bdcdata.<br />
*<br />
ENDFORM.                    &#8221; BDC_DYNPRO<br />
*<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_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 />
FORM bdc_field USING p_field_name<br />
                     p_field_value.<br />
*<br />
  MOVE: p_field_name  TO bdcdata-fnam,<br />
        p_field_value TO bdcdata-fval.<br />
*<br />
  APPEND bdcdata.<br />
  CLEAR  bdcdata.<br />
*<br />
ENDFORM.                    &#8221; BDC_FIELD<br />
*<br />
*<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_TRANSACTION<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 />
FORM bdc_transaction USING tcode.<br />
  DATA: l_mstring(480).<br />
  DATA: l_subrc LIKE sy-subrc.<br />
* batch input session<br />
  REFRESH messtab.<br />
  CALL TRANSACTION tcode USING bdcdata<br />
                   MODE   &#8216;A&#8217;<br />
                   &#8220;A: show all dynpros<br />
                   &#8220;E: show dynpro on error only<br />
                   &#8220;N: do not display dynpro<br />
*<br />
                   UPDATE &#8216;L&#8217;<br />
                   MESSAGES INTO messtab.<br />
  REFRESH bdcdata.<br />
ENDFORM.                    &#8220;BDC_TRANSACTION</p>
<p style="text-align: justify;"> </p>
<p style="text-align: justify;"><strong><span style="color: #339966;">Download Code: </span></strong></p>
<p style="text-align: justify;"><strong><span style="color: #339966;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/07/mm02_bdc.txt">MM02 BDC</a></span></strong></p>
<p style="text-align: justify;"><strong><span style="color: #339966;"> </span></strong></p>
<p style="text-align: justify;"><strong><span style="color: #339966;"> </span></strong></p>
<p style="text-align: justify;"><strong><span style="color: #339966;"> </span></strong></p>
<h6 style="text-align: justify;"><span style="color: #c0c0c0;">*source=nimesh</span></h6>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2010/05/25/bdc-to-insert-wage-type-in-infotype-0008/' rel='bookmark' title='BDC to insert Wage Type in Infotype 0008 (Basic Pay)'>BDC to insert Wage Type in Infotype 0008 (Basic Pay)</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/27/embed-view-in-program/' rel='bookmark' title='Embed SAP View in an ABAP Program'>Embed SAP View in an ABAP Program</a></li>
<li><a href='http://www.abap-tutorials.com/2009/07/17/assign-a-t-code-to-maintenance-view/' rel='bookmark' title='Assign a T-code to Maintenance View in SAP'>Assign a T-code to Maintenance View in SAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/07/31/mm02-bdc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BDC Session &#8211; Automatic Execution from Report</title>
		<link>http://www.abap-tutorials.com/2010/06/20/bdc-session-automatic-execution-from-report/</link>
		<comments>http://www.abap-tutorials.com/2010/06/20/bdc-session-automatic-execution-from-report/#comments</comments>
		<pubDate>Sun, 20 Jun 2010 13:57:18 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[ABAP]]></category>
		<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[Function Modules]]></category>
		<category><![CDATA[Quick Reference]]></category>
		<category><![CDATA[Sample Code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[BDC Session]]></category>
		<category><![CDATA[execute session from program]]></category>
		<category><![CDATA[session execution]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1674</guid>
		<description><![CDATA[When to Use: Upload programs where you use BDC session method to create Sessions, which should later be executed using transaction SM35. Requirements before you start: You need to know the BDC Session name, which is usually an input parameter or is generated by the report programs. Steps to execute BDC Session from the program: [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><span style="color: #3366ff;"><strong>When to Use:</strong></span></p>
<p style="text-align: justify;">Upload programs where you use BDC session method to create Sessions, which should later be executed using transaction SM35.</p>
<p style="text-align: justify;"><span style="color: #3366ff;"><strong>Requirements before you start: </strong></span></p>
<p style="text-align: justify;">You need to know the BDC Session name, which is usually an input parameter or is generated by the report programs.</p>
<div style="width: 100%; float: left;">
<p style="text-align: justify;"><a href="http://www.abap-tutorials.com/wp-content/uploads/2010/06/sm35.jpg"><img class="aligncenter size-full wp-image-1679" title="SM35" src="http://www.abap-tutorials.com/wp-content/uploads/2010/06/sm35.jpg" alt="SM35" width="502" height="377" /></a></p>
</div>
<p style="text-align: justify;">
<p style="text-align: justify;"><span id="more-1674"></span></p>
<p style="text-align: justify;">Steps to execute BDC Session from the program:</p>
<p><span style="color: #3366ff;"><strong>Step 1: Get BDC Queue ID</strong></span></p>
<p>CALL FUNCTION &#8216;BDC_OBJECT_SELECT&#8217;</p>
<p>EXPORTING</p>
<p>name                  = session name</p>
<p>session_creator    = sy-uname</p>
<p>datatype             = &#8216;BDC&#8217;</p>
<p>client                  = sy-mandt</p>
<p>qstate                = &#8216; &#8216;</p>
<p>date_from           = sy-datum</p>
<p>date_to              = sy-datum</p>
<p>TABLES</p>
<p>apqitab               = itab_apqi</p>
<p>EXCEPTIONS</p>
<p>OTHERS              = 1.</p>
<p>Queue ID (QID) = itab_apqi-qid</p>
<p><span style="color: #3366ff;"><strong>Step 2: Get Session Info</strong></span></p>
<p>Get Session info for the queue ID from table APQI.</p>
<p>SELECT SINGLE * FROM apqi INTO session WHERE qid = QID (from Step 1).</p>
<p><span style="color: #3366ff;"><strong>Step3: Lock BDC Queue</strong></span></p>
<p>CALL FUNCTION &#8216;ENQUEUE_BDC_QID&#8217;</p>
<p>EXPORTING</p>
<p>datatyp        = session-datatyp</p>
<p>groupid        = session-groupid</p>
<p>qid            = session-qid</p>
<p>EXCEPTIONS</p>
<p>foreign_lock   = 1</p>
<p>system_failure = 99.</p>
<p><span style="color: #3366ff;"><strong>Step4: OPEN JOB</strong></span></p>
<p>DATA:  jobname   LIKE tbtco-jobname,</p>
<p>jobnumb   LIKE rsjobinfo-jobnumb,</p>
<p>Jobname = wa_session-groupid.</p>
<p>CALL FUNCTION &#8216;JOB_OPEN&#8217;</p>
<p>EXPORTING</p>
<p>jobgroup         = &#8216;BATCH-INPUT&#8217;</p>
<p>jobname          = jobname</p>
<p>sdlstrtdt        = sy-datum</p>
<p>sdlstrttm        = sy-uzeit</p>
<p>IMPORTING</p>
<p>jobcount         = jobnumb</p>
<p>EXCEPTIONS</p>
<p>cant_create_job  = 1</p>
<p>invalid_job_data = 2</p>
<p>jobname_missing  = 3</p>
<p>OTHERS           = 99.</p>
<p><span style="color: #3366ff;"><strong>Step5: Execute the Queue</strong></span></p>
<p>Execute the QUEUE using Submit to Report RSBDCBTC.</p>
<p>SUBMIT rsbdcbtc</p>
<p>TO SAP-SPOOL</p>
<p>DESTINATION   space</p>
<p>IMMEDIATELY   space</p>
<p>KEEP IN SPOOL space</p>
<p>WITHOUT SPOOL DYNPRO</p>
<p>USER session-userid</p>
<p>VIA JOB       jobname</p>
<p>NUMBER        jobnumb</p>
<p>WITH queue_id  EQ  wa_session-qid</p>
<p>WITH mappe     EQ  jobname</p>
<p>WITH modus     EQ  &#8216;N&#8217;</p>
<p>WITH logall    EQ  &#8216;X&#8217;  &#8221; Extended Log</p>
<p>AND RETURN.</p>
<p>If Sy-subrc = 0</p>
<p style="text-align: justify;"><span style="color: #3366ff;"><strong>Step6: Close Job</strong></span></p>
<p>CALL FUNCTION &#8216;JOB_CLOSE&#8217;</p>
<p>EXPORTING</p>
<p>jobcount                   = jobnumb</p>
<p>jobname                    = jobname</p>
<p>strtimmed                  = &#8216;X&#8217;</p>
<p>targetsystem               = &#8221;   &#8221; Target Host</p>
<p>EXCEPTIONS</p>
<p>cant_start_immediate       = 1</p>
<p>invalid_startdate          = 2</p>
<p>jobname_missing            = 3</p>
<p>job_close_failed           = 4</p>
<p>job_nosteps                = 5</p>
<p>job_notex                  = 6</p>
<p>lock_failed                = 7</p>
<p>OTHERS                     = 99.</p>
<p>IF sy-subrc = 0</p>
<p style="text-align: justify;"><span style="color: #3366ff;"><strong>Step 7: Update Session info</strong></span></p>
<p>UPDATE apqi SET   qstate  = &#8216;S&#8217;</p>
<p>WHERE destsys = wa_session-destsys</p>
<p>AND   destapp = wa_session-destapp</p>
<p>AND   datatyp = wa_session-datatyp</p>
<p>AND   groupid = wa_session-groupid</p>
<p>AND   progid  = wa_session-progid</p>
<p>AND   formid  = wa_session-formid</p>
<p>AND   qattrib = wa_session-qattrib</p>
<p>AND   qid     = wa_session-qid.</p>
<p>COMMIT WORK.</p>
<p><span style="color: #3366ff;"><strong>Step 8: Delete Job</strong></span></p>
<p>If Job Not closed (Sy-subrc &lt;&gt; 0 for step 5 or 6), delete Job.</p>
<p>CALL FUNCTION &#8216;BP_JOB_DELETE&#8217;</p>
<p>EXPORTING</p>
<p>jobname    = jobname</p>
<p>jobcount   = jobnumb</p>
<p>forcedmode = &#8216;X&#8217;</p>
<p>EXCEPTIONS</p>
<p>OTHERS     = 99.</p>
<p><span style="color: #3366ff;"><strong>Step 9: Unlock BDC queue</strong></span></p>
<p>CALL FUNCTION &#8216;DEQUEUE_BDC_QID&#8217;</p>
<p>EXPORTING</p>
<p>datatyp = wa_session-datatyp</p>
<p>groupid = wa_session-groupid</p>
<p>qid     = wa_session-qid.</p>
<p>So you are all done. Hope that was simple. ﻿</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2009/07/05/pritty-report-vs-pritty-printer/' rel='bookmark' title='Pretty Report Vs Pretty Printer in ABAP'>Pretty Report Vs Pretty Printer in ABAP</a></li>
<li><a href='http://www.abap-tutorials.com/2011/09/23/display-a-popup-and-get-values-from-user/' rel='bookmark' title='Display a Popup and Get Values from User'>Display a Popup and Get Values from User</a></li>
<li><a href='http://www.abap-tutorials.com/2009/08/22/convert-spool-request-to-pdf-in-sap/' rel='bookmark' title='Convert Spool Request to PDF in SAP'>Convert Spool Request to PDF in SAP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/06/20/bdc-session-automatic-execution-from-report/feed/</wfw:commentRss>
		<slash:comments>8</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>Difference Between LSMW and BDC</title>
		<link>http://www.abap-tutorials.com/2010/06/14/difference-between-lsmw-and-bdc/</link>
		<comments>http://www.abap-tutorials.com/2010/06/14/difference-between-lsmw-and-bdc/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 06:02:35 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[BDC / LSMW]]></category>
		<category><![CDATA[SAP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Batch data communication]]></category>
		<category><![CDATA[BDC]]></category>
		<category><![CDATA[LSMW]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://www.abap-tutorials.com/?p=1661</guid>
		<description><![CDATA[Both LSMW as well as BDC plays important role in new SAP setup as well as in maintenance of the system. Lets have an overview of the differences between the two processes.   The differences between LSMW and BDC are as follows: LSMW is generally for normal SAP applications, while BDC is mainly for any [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Both LSMW as well as BDC plays important role in new SAP setup as well as in maintenance of the system. Lets have an overview of the differences between the two processes.</p>
<div style="width: 100%; float: left;">
<p style="text-align: justify;"> <img class="aligncenter size-full wp-image-1663" title="BDC LSMW" src="http://www.abap-tutorials.com/wp-content/uploads/2010/06/bdc_lsmw.jpg" alt="BDC LSMW" width="346" height="292" /></p>
</div>
<p style="text-align: justify;"><span id="more-1661"></span></p>
<p style="text-align: justify;"><strong><span style="color: #3366ff;">The differences between LSMW and BDC are as follows:</span></strong></p>
<p style="text-align: justify;">LSMW is generally for normal SAP applications, while BDC is mainly for any customized applications.</p>
<p style="text-align: justify;">LSMW is a Non-SAP to SAP communication TOOL, whereas BDC is a SAP to SAP communication UTILITY.</p>
<p style="text-align: justify;">LSMW(Legacy System Migration Workbench) is a more user-friendly tool, through which one can do the same work as the BDC. One just has to follow the 14 steps. LSMW offers four ways to import data into SAP, and they are:</p>
<p style="text-align: justify;"><span style="color: #3366ff;">BDC, Direct Input, BAPI(BO) and IDOC.</span></p>
<p style="text-align: justify;">BDC(Batch Data Communication) is basically a program which is either generated by SAP after a recording or programmed by a abaper. It’s like running the transaction manually but all the data is populated in the screens automatically. It is a bit complex when the screen contains Table Controls.</p>
<p style="text-align: justify;">LSMW provides various methods for migration of data, namely those of Direct Input, Batch Input recording and IDOC. BDC however simply makes use of recording. There are two ways of implementing BDC, the Call transaction metod and the Session method.</p>
<p style="text-align: justify;">In LSMW, mapping is taken care of with the help of SAP, whereas in BDC one has to provide explicit mapping directions.</p>
<p style="text-align: justify;">In BDC, we can schedule the job, so the uploading can be done at the same time or later periodically while in LSMW it has to be done at once only. So through LSMW, one cannot upload huge amount of data. Hence we use LSMW for updating or inserting below 5000 records and we use BDC to upload records more than 5000.</p>
<p style="text-align: justify;">Coding is not very flexible in LSMW, whereas in BDC coding is very flexible and applications can be easily customized. this is mainly because LSMW is devised specially for functional consultants who do not perform coding, while BDC is mainly used by technical consultants, who perform coding.</p>


<p>You might also be interested in these posts:<ol><li><a href='http://www.abap-tutorials.com/2010/06/16/step-by-step-lsmw-tutorial/' rel='bookmark' title='Step by Step LSMW Tutorial'>Step by Step LSMW Tutorial</a></li>
<li><a href='http://www.abap-tutorials.com/2010/03/22/difference-between-bapi-and-rfc/' rel='bookmark' title='Difference Between BAPI and RFC'>Difference Between BAPI and RFC</a></li>
<li><a href='http://www.abap-tutorials.com/2010/08/23/batch-input-faqs/' rel='bookmark' title='Batch Input &#8211; Frequently Asked Questions(FAQs)'>Batch Input &#8211; Frequently Asked Questions(FAQs)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.abap-tutorials.com/2010/06/14/difference-between-lsmw-and-bdc/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

