<?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: Lsmw in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969937#M1158254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link..&lt;/P&gt;&lt;P&gt;&lt;A href="http://learningabap.wordpress.com/2007/03/28/step-by-step-guide-for-using-lsmw-to-update-customer-master-records/" target="test_blank"&gt;http://learningabap.wordpress.com/2007/03/28/step-by-step-guide-for-using-lsmw-to-update-customer-master-records/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2009 07:20:52 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-01-08T07:20:52Z</dc:date>
    <item>
      <title>Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969935#M1158252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt; any body can give me he steps and proper file format for uploading LONGTEXTS thru direct input program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Murty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __default_attr="red" __jive_macro_name="color"&gt;&lt;STRONG&gt;&amp;lt;LOCKED BY MODERATOR - USE APPROPRIATE TITLES&amp;gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Alvaro Tejada Galindo on Jan 8, 2009 4:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:17:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969935#M1158252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:17:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969936#M1158253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;using function mod&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call funcation 'Save_test'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:19:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969936#M1158253</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969937#M1158254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this link..&lt;/P&gt;&lt;P&gt;&lt;A href="http://learningabap.wordpress.com/2007/03/28/step-by-step-guide-for-using-lsmw-to-update-customer-master-records/" target="test_blank"&gt;http://learningabap.wordpress.com/2007/03/28/step-by-step-guide-for-using-lsmw-to-update-customer-master-records/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969937#M1158254</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969938#M1158255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Registered: 4/4/07 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt;Total Questions:  84 (75 unresolved) &lt;/P&gt;&lt;P&gt;Vague title&lt;/P&gt;&lt;P&gt;Wrong Forum&lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN __jive_macro_name="color"&gt; &lt;STRONG&gt;Reported!!&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969938#M1158255</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969939#M1158256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this is enough coding to understand it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xeing is an normal textfile, which was uploaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
FORM verarbeitung.
  data: merker type i,
        zaehler type i.

  sort xeing by matnr spras LFDZL.

  loop at xeing where matnr ne space.
    add 1 to zaehler.
    dmatnr = xeing-matnr.
    replace '.' with '' into dmatnr.
    replace '-' with '' into dmatnr.
    condense dmatnr no-gaps.

    vmatnr = xeing-matnr.
    vmtart = xeing-mtart.
    vmstae = xeing-mstae.
    vdline = xeing-dline.

    select single * from mara where matnr eq dmatnr.
    if sy-subrc eq 0.
      at new spras.
        perform werte_setzen.
        refresh: xtxt, xtxt_read.
      endat.
      at new matnr.
        perform werte_setzen.
        refresh: xtxt, xtxt_read.
        Move: xeing-matnr to new_mara-matnr,
              'Grunddatentext' to new_mara-vpsta.
        append new_mara.

        Move: xeing-matnr to old_mara-matnr.
        append old_mara.

      endat.

      *xtxt-TDFORMAT  = '/'.*
      data: dtext1(74) type c,
            dtext2(74) type c.

*     laenge = strlen( xeing-dline ).
*     if laenge = 1.
      lh_return = '0D'.
      split xeing-dline at lh_return
        into dtext1
             dtext2.
      xtxt-tdline    = dtext1.
*     else.
*        split xeing-dline at lh_horizontal_tab
*           into dtext1
*                dtext2.
*        xtxt-tdline    = dtext1.
*      endif.
      append xtxt.
      ld_count = ld_count + 1.

      dmatnr = xeing-matnr.
      replace '.' with '' into dmatnr.
      replace '-' with '' into dmatnr.
      condense dmatnr no-gaps.

      clear merker.

      at end of spras.
        if pa_test is initial.
          merker = 1.
* Text ändern
          perform text_aendern.
        endif.
      endat.
      at end of matnr.
        if pa_test is initial and merker ne 1.
* Text ändern
          perform text_aendern.
        endif.
      endat.
      write: /.
      write: xeing-matnr, ' = ', dmatnr, ' = ', zaehler, ' = OK'.
    else.
      move: dmatnr              to imail-matnr,
            xeing-spras         to imail-spras.
      write: /.
      write: xeing-matnr, ' = ', dmatnr, ' = ', zaehler, ' = NO'.
      collect imail.
    endif.

  endloop.
ENDFORM.                    " verarbeitung

*************************************
FORM text_aendern.

  data: ltext LIKE bapi_mltx OCCURS 0 WITH HEADER LINE,
        lhead like BAPIMATHEAD,
        dreturn like BAPIRET2.

  clear ltext[].
  loop at xtxt.
  move: xtxt-tdformat to ltext-FORMAT_COL,     "xtxt-tdformat = /
          xtxt-tdline   to ltext-TEXT_LINE.      "xtxt-tdline = INITIAL
    ltext-APPLOBJECT  = pa_objec.                "Pa_objec = MATERIAL
    ltext-TEXT_NAME    = dmatnr.                 "dmatnr = 96312103
    ltext-TEXT_ID      = pa_id.                  "pa_id = GRUN
    ltext-LANGU   = xeing-spras.                 "ltext-langu = DE
* NEU
    if ltext-TEXT_LINE = 'LZGRUND'.
      ltext-del_flag = 'X'.
      lhead-basic_view = 'X'.
    else.
      ltext-del_flag = ' '.
      lhead-basic_view = ' '.
    endif.
    append ltext.
  endloop.

  lhead-material = dmatnr.                      "dmatnr = 96312103
* NEU

  *CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'*
       *EXPORTING*
            *HEADDATA         = lhead*
       *IMPORTING*
            *RETURN           = dreturn*
       *TABLES*
            *MATERIALLONGTEXT = ltext.*
  clear xtxt_read.

  if dreturn ne space.
    if dreturn-type eq 'E' or dreturn-type eq 'W'.
      move: ltext-TEXT_NAME          to imail-matnr,
            ltext-LANGU              to imail-spras,
            dreturn-message          to imail-text.
      append imail.
    endif.
  endif.

eNDFORM.                    " text_aendern
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Formatted by: Alvaro Tejada Galindo on Jan 8, 2009 4:02 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:22:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969939#M1158256</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969940#M1158257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. TCode : LSMW. &lt;/P&gt;&lt;P&gt;2. Enter Project name, sub project name and object name. &lt;/P&gt;&lt;P&gt;    Execute. &lt;/P&gt;&lt;P&gt;3. Maintain object attributes. &lt;/P&gt;&lt;P&gt;    Execute &lt;/P&gt;&lt;P&gt;    select Batch Input recording  &lt;/P&gt;&lt;P&gt;    goto-&amp;gt;Recording overview &lt;/P&gt;&lt;P&gt;    create &lt;/P&gt;&lt;P&gt;    recording name. &lt;/P&gt;&lt;P&gt;    enter transaction code. &lt;/P&gt;&lt;P&gt;    start recording &lt;/P&gt;&lt;P&gt;    do recording as per ur choice. &lt;/P&gt;&lt;P&gt;    save + back. &lt;/P&gt;&lt;P&gt;    enter recording name in lsmw screen. &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now there will be 14 steps. &lt;/P&gt;&lt;P&gt;2. MAINTAIN SOURCE STRUCTURES. &lt;/P&gt;&lt;P&gt;    Here you have  to enter the name of internal table. &lt;/P&gt;&lt;P&gt;    display change &lt;/P&gt;&lt;P&gt;    create  &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. MAINTAIN SOURCE FIELDS. &lt;/P&gt;&lt;P&gt;    display change &lt;/P&gt;&lt;P&gt;    select structure &lt;/P&gt;&lt;P&gt;    source_fields-&amp;gt;copy fields. &lt;/P&gt;&lt;P&gt;    a dialogue window will come . &lt;/P&gt;&lt;P&gt;    select -&amp;gt; from data file &lt;/P&gt;&lt;P&gt;    apply source fields &lt;/P&gt;&lt;P&gt;    enter No. of fields  &lt;/P&gt;&lt;P&gt;    length of fields &lt;/P&gt;&lt;P&gt;    attach file &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. MAINTAIN STRUCTURE RELATIONS &lt;/P&gt;&lt;P&gt;    display change &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. MAINTAN FIELD MAPPING &amp;amp; CONVERSION RULE &lt;/P&gt;&lt;P&gt;    display change &lt;/P&gt;&lt;P&gt;    click on source field, select exact field from structue and enter &lt;/P&gt;&lt;P&gt;    repeat these steps for all fields. &lt;/P&gt;&lt;P&gt;    save+back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;6. MAINTAIN FIXED VALUES, TRANSACTION, USER DEFINED &lt;/P&gt;&lt;P&gt;    execute  &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7. SPECIFY FILES. &lt;/P&gt;&lt;P&gt;    display change &lt;/P&gt;&lt;P&gt;    click on legacy data &lt;/P&gt;&lt;P&gt;    attah flat file &lt;/P&gt;&lt;P&gt;    give description &lt;/P&gt;&lt;P&gt;    select tabulatore  &lt;/P&gt;&lt;P&gt;    enter &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;8. ASSIGN FILE  &lt;/P&gt;&lt;P&gt;    execute  &lt;/P&gt;&lt;P&gt;    display  change &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;9. IMPORT DATA. &lt;/P&gt;&lt;P&gt;    execute  &lt;/P&gt;&lt;P&gt;    display  change &lt;/P&gt;&lt;P&gt;    save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;10. DISPLAY IMPORTED DATA &lt;/P&gt;&lt;P&gt;      enter ok, it willl show records only. &lt;/P&gt;&lt;P&gt;      back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;11. CONVERT DATA &lt;/P&gt;&lt;P&gt;      execute  &lt;/P&gt;&lt;P&gt;      display  change &lt;/P&gt;&lt;P&gt;      save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;12. DISPLAY CONVERTED DATA &lt;/P&gt;&lt;P&gt;      execute  &lt;/P&gt;&lt;P&gt;      display  change &lt;/P&gt;&lt;P&gt;      save + back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;13. CREATE BATCH INPUT SESSION &lt;/P&gt;&lt;P&gt;      tick keep batch input folder  &lt;/P&gt;&lt;P&gt;      F8 &lt;/P&gt;&lt;P&gt;      back &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;14. RUN BATCH INPUT SESSION. &lt;/P&gt;&lt;P&gt;      sm35 will come &lt;/P&gt;&lt;P&gt;      Object name will be shown here  &lt;/P&gt;&lt;P&gt;      select object &amp;amp; process       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Md.MahaboobKhan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 07:34:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969940#M1158257</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T07:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969941#M1158258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Satya,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use this link:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://wiki.sdn.sap.com/wiki/display/ABAP/Steps" target="test_blank"&gt;https://wiki.sdn.sap.com/wiki/display/ABAP/Steps&lt;/A&gt;&lt;EM&gt;to&lt;/EM&gt;create&lt;EM&gt;a&lt;/EM&gt;simple+LSMW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this solves your problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards,&lt;/P&gt;&lt;P&gt;Tarun Gambhir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 08:42:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969941#M1158258</guid>
      <dc:creator>I355602</dc:creator>
      <dc:date>2009-01-08T08:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lsmw</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969942#M1158259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Step-by-Step Guide for using LSMW to Update Customer Master Records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note! The screen prints in this article are from IDES Release 4.6. They may differ slightly in other versions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Demo Example 2&lt;/P&gt;&lt;P&gt;LSMW to Update Customer Master Records with Standard Object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an alternative to using u2018Transaction Recordingu2019, you could also use a standard SAP object to update Customer Master Records. Business Object u20180050u2019 is already pre-defined in the system with standard Batch Input Interface Program u2018RFBIDE00u2019. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create an Object CUST_OBJ within Project as LSMW_DEMO and Subproject as CUSTOMERS as shown in Figure 20.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 20  LSMW Object with Standard SAP Object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note! For the Demo example 2, I will list only those steps that are different from the first demo example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1: Maintain Object attributes&lt;/P&gt;&lt;P&gt;You will be updating the customer master records with the help of Standard Batch Input; therefore, choose radio-button Standard Batch/Direct Input as shown in Figure 21. Enter Object u20180050u2019 for Customer Master Records and default method u20180000u2019 and click on Save.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 21 Standard Batch/Direct Input Object Attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2. Maintain Source Structures&lt;/P&gt;&lt;P&gt;Give a name and a description to the source structure (Figure 8).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 8 	Source Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 3. Maintain Source Fields&lt;/P&gt;&lt;P&gt;In this step, you need to list what fields are present in the source structure. The easiest way is to click on u2018Table Maintenanceu2019 icon to enter Fieldname, Type and Length for each field   as shown in Figure 9.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 9	 Source fields of source Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that your input file will have four fields as key fields and you need to update three fields in the system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 4: Maintain Structure Relations&lt;/P&gt;&lt;P&gt;Sales view of Customer Master is stored in table KNVV. Accordingly, you need to update structure BKNVV. However, in addition, the Standard Object u20180050u2019 also requires updates to BGR00, BKN00 and BKNA1 structures. (If you do not maintain Structure relations for mandatory entries, you might get a message such as u2018Target structure BKNA1 needs a relation to a source structureu2019.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even though you donu2019t want to update any fields in these structures, you need to create a relationship with source structures. In all, you need to create relationship for four target structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create relationship between source structures XD02S with these target structures with icon u2018Create  Relationshipu2019 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep Cursor on these four target structures and click on icon u2018Create Relationu2019 and structure relations are maintained as shown in Figure 22.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 22 Structure Relation&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 5: Maintain field mapping and conversion rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Keep your cursor on u2018TCODEu2019 field and click on u2018Insert Ruleu2019 icon  &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 23 LSMW Conversion Rules &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose radio button u2018Constantu2019 (Figure 23) to enter value u2018XD02u2019 transaction code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Keep your cursor on field u2018KUNNRu2019 and click on u2018Assign source fieldu2019 icon &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Choose source field u2018Customeru2019 from source structure u2018XD02Su2019. (See Figure 24.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 24 Assign Source fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Similarly, choose source fields for Sales Organization, Distribution Channel, and Division. (See Figure 25.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 25 Field Mapping and Conversion Rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Scroll down to structure BKNVV fields and assign source fields to three fields Sales Office, Sales Group, and Customer Group (Figure 26).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 26 Field Mapping and Conversion Rules&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Save and go back to main screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 6: Maintain fixed values, translations, user-defined routines&lt;/P&gt;&lt;P&gt;You can also maintain re-usable translations and user-defined routines, which can be used across conversion tasks. In this case, that step is not required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 7: Specify files&lt;/P&gt;&lt;P&gt;In this step, we define how the layout of the input file is. The input file is a [Tab] delimited with the first row as field names. It is present on my PC (local drive) as C:\XD02.txt. (See Figure 13.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Figure 13 File attributes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create an Excel file (Figure 14) with your data and save it as a Tab-delimited text file on your local drive (C:\) and name it XD02.txt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 14 Source data in Excel file (saved as Tab delimited file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 8: Assign files&lt;/P&gt;&lt;P&gt;Execute step u2018Assign Filesu2019 (Figure 15) and the system automatically defaults the filename to the source structure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 15 Assign file to Source Structure&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 9: Read data&lt;/P&gt;&lt;P&gt;In this step, LSMW reads the data (Figure 16) from the source file (from your PCu2019s local drive). You have the option to read only selected rows and convert data values to Internal format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 16 Read Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 10: Display read data&lt;/P&gt;&lt;P&gt;This step (Figure 17) is optional. If required, you can review the field contents for the rows of data read.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Figure 17 Display Read Data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 11: Convert data&lt;/P&gt;&lt;P&gt;This is the step that actually converts the source data (in source format) to a target format. Based on the conversion rules defined, source fields are mapped to target fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 12: Display Converted data&lt;/P&gt;&lt;P&gt;When you convert data, LSMW automatically converts into the appropriate structure layouts, as required by Standard program (RFBIDE00). (See Figure 27)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 27 Converted data into multiple structures&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that if you had only one record in source file, the converted file has four records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier, creating this input file, so that the standard interface program can read it, was a big nightmare, the primary reason being that it could have multiple record layouts. Even for a simple conversion with one input record, you would have to create this complex file with many record layouts. The advantage of LSMW is that it prepares these multi-layout files automatically.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 13: Create batch input session&lt;/P&gt;&lt;P&gt;Once source data is converted in internal format, you can create a BDC session to process the updates (Figures 28 and 29). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 28 Create BDC Session&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Figure 29 BDC Session u2018CUST_OBJu2019 created&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 14: Run Batch Input Session&lt;/P&gt;&lt;P&gt;You can execute the BDC session by Run Batch input session. Executing a batch input session is a standard SM35 transaction for managing BDC sessions. Once you have successfully executed the batch input session, the customer master records are updated in the system. You can confirm this by viewing the customer master records (XD03). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note! Browsing thru these 14 steps, you may get a feeling that this is a very lengthy and time-consuming activity. However, for the purposes of demonstration, I have made it detailed. Although it looks lengthy, actually it takes hardly few hours from start-to-finish! After playing around with few simple LSMW scripts, you will find it so easy to change and create more complex ones.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2009 08:59:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/lsmw/m-p/4969942#M1158259</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-01-08T08:59:59Z</dc:date>
    </item>
  </channel>
</rss>

