<?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: Data Transfer between 2 SAP Systems in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418896#M821149</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Transfer of data through Material Master Idoc   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zmm_mat_master_non_stock
NO STANDARD PAGE HEADING
LINE-SIZE 255.



Standard Include for Selection Screen 
INCLUDE bdcrecx1.


Internal Table for Upload Data 
DATA: BEGIN OF i_mat OCCURS 0,

mbrsh(001), " Industry Sector 
mtart(004), " Material Type 
Views 
Organization Levels 
werks(004), " Plant 
Basic Data1 View 
maktx(040), " Material Description

meins(003), " Unit of Measure 
matkl(009), " Material Group

MTPOS_MARA(004), " Gen Item Category 
Purchasing 
ekgrp(003), " Purchasing Group
END OF i_mat.


Data Variables &amp;amp; Constants 
CONSTANTS : c_x VALUE 'X'. " Flag


Parameters 
PARAMETERS: p_file LIKE ibipparms-path. " Filename


At selection-screen on Value Request for file Name 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.


Get the F4 Values for the File 
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.


Start of Selection 
START-OF-SELECTION.


Open the BDC Session 
PERFORM open_group.


Upload the File into internal Table 
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_mat
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF.


Upload the Data from Internal Table 
LOOP AT i_mat.

Basic Screen 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MBRSH'
'C'."i_mat-mbrsh.
PERFORM bdc_field USING 'RMMG1-MTART'
'NLAG'."i_mat-mtart.

Views Selection 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(08)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
c_x."i_mat-kzsel_01.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(02)'
c_x."i_mat-kzsel_02.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(08)'
c_x."i_mat-kzsel_08.

Organization Levels 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
'2000'."i_mat-werks.

Basic data1 View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
i_mat-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MTPOS_MARA'.
PERFORM bdc_field USING 'MARA-MEINS'
'EA'."i_mat-meins.
PERFORM bdc_field USING 'MARA-MATKL'
i_mat-matkl.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
'NLAG'."i_mat-mtpos_mara.

Basic data2 View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.

Purchasing View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'MARC-EKGRP'
i_mat-ekgrp.

Call The Transaction 
PERFORM bdc_transaction USING 'MM01'.
ENDLOOP.


Close the BDC Session 
PERFORM close_group.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Feb 2008 01:13:07 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-02-13T01:13:07Z</dc:date>
    <item>
      <title>Data Transfer between 2 SAP Systems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418895#M821148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to migrate data for Material Master and Vendor Master from One SAP system to other SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to migrate only certain Vendors and specific materials.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have heard we can do this task using ALE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can any one guide me as how can this be done and any steps would be helpful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2008 19:41:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418895#M821148</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-12T19:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data Transfer between 2 SAP Systems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418896#M821149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Transfer of data through Material Master Idoc   &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
REPORT zmm_mat_master_non_stock
NO STANDARD PAGE HEADING
LINE-SIZE 255.



Standard Include for Selection Screen 
INCLUDE bdcrecx1.


Internal Table for Upload Data 
DATA: BEGIN OF i_mat OCCURS 0,

mbrsh(001), " Industry Sector 
mtart(004), " Material Type 
Views 
Organization Levels 
werks(004), " Plant 
Basic Data1 View 
maktx(040), " Material Description

meins(003), " Unit of Measure 
matkl(009), " Material Group

MTPOS_MARA(004), " Gen Item Category 
Purchasing 
ekgrp(003), " Purchasing Group
END OF i_mat.


Data Variables &amp;amp; Constants 
CONSTANTS : c_x VALUE 'X'. " Flag


Parameters 
PARAMETERS: p_file LIKE ibipparms-path. " Filename


At selection-screen on Value Request for file Name 
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.


Get the F4 Values for the File 
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = p_file.


Start of Selection 
START-OF-SELECTION.


Open the BDC Session 
PERFORM open_group.


Upload the File into internal Table 
CALL FUNCTION 'UPLOAD'
EXPORTING
filename = p_file
filetype = 'DAT'
TABLES
data_tab = i_mat
EXCEPTIONS
conversion_error = 1
invalid_table_width = 2
invalid_type = 3
no_batch = 4
unknown_error = 5
gui_refuse_filetransfer = 6
OTHERS = 7.

IF sy-subrc 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO 
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. 
ENDIF.


Upload the Data from Internal Table 
LOOP AT i_mat.

Basic Screen 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0060'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-MATNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RMMG1-MBRSH'
'C'."i_mat-mbrsh.
PERFORM bdc_field USING 'RMMG1-MTART'
'NLAG'."i_mat-mtart.

Views Selection 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0070'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MSICHTAUSW-DYTXT(08)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(01)'
c_x."i_mat-kzsel_01.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(02)'
c_x."i_mat-kzsel_02.
PERFORM bdc_field USING 'MSICHTAUSW-KZSEL(08)'
c_x."i_mat-kzsel_08.

Organization Levels 
PERFORM bdc_dynpro USING 'SAPLMGMM' '0080'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RMMG1-WERKS'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'RMMG1-WERKS'
'2000'."i_mat-werks.

Basic data1 View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'MAKT-MAKTX'
i_mat-maktx.
PERFORM bdc_field USING 'BDC_CURSOR'
'MARA-MTPOS_MARA'.
PERFORM bdc_field USING 'MARA-MEINS'
'EA'."i_mat-meins.
PERFORM bdc_field USING 'MARA-MATKL'
i_mat-matkl.
PERFORM bdc_field USING 'MARA-MTPOS_MARA'
'NLAG'."i_mat-mtpos_mara.

Basic data2 View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4004'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'BDC_CURSOR'
'MAKT-MAKTX'.

Purchasing View 
PERFORM bdc_dynpro USING 'SAPLMGMM' '4000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BU'.
PERFORM bdc_field USING 'MARC-EKGRP'
i_mat-ekgrp.

Call The Transaction 
PERFORM bdc_transaction USING 'MM01'.
ENDLOOP.


Close the BDC Session 
PERFORM close_group.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward Points if useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 01:13:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418896#M821149</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T01:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Data Transfer between 2 SAP Systems</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418897#M821150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can &lt;STRONG&gt;use ALE and IDoc technology&lt;/STRONG&gt; to transfer data from one SAP system to another SAP system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAP provides standard programs to transfer master data. You only need to configure the ALE and IDoc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use T.code &lt;STRONG&gt;BD10 for Material Master and BD14 for vendor Master&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Material Master - &lt;STRONG&gt;Standard IDoc is MATMAS&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use MASASGAE TYPE - MATMAS&lt;/P&gt;&lt;P&gt;       IDOC TYPE - MATMAS03&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You  have configure the systems&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T.code SALE for ale customization -&lt;/P&gt;&lt;HR originaltext="---" /&gt;&lt;P&gt;create logical system here.&lt;/P&gt;&lt;P&gt;Steps:&lt;/P&gt;&lt;P&gt;1) Create port(WE21) and logical system and RFC destination(SM59)&lt;/P&gt;&lt;P&gt;1) Create Distribution Model in BD64.&lt;/P&gt;&lt;P&gt;2) Create Partner Profile (WE20)in both systems and disrtibute the model and in receiver system the model will be created itself after distribution.&lt;/P&gt;&lt;P&gt;3) Go to TA :BD10(SMD for material)&lt;/P&gt;&lt;P&gt;4) message type will be MATMASand specify the logical system and press execute.&lt;/P&gt;&lt;P&gt;it will generate the master IDoc and communication IDoc in sender system&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now u can chk the receiver system the Inbound IDOC must be there wth all the materials&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;T.Code  for IDOC  :WE02,WE05.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2008 01:26:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/data-transfer-between-2-sap-systems/m-p/3418897#M821150</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-02-13T01:26:41Z</dc:date>
    </item>
  </channel>
</rss>

