<?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: BDC Program for customer master data in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-program-for-customer-master-data/m-p/3073268#M728624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the BDC sample code Customer Master Upload:&lt;/P&gt;&lt;P&gt;report ZSDBDCP_CUSTOMER_VD01&lt;/P&gt;&lt;P&gt;no standard page heading&lt;/P&gt;&lt;P&gt;line-size 255.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Includes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include zbdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Tables&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Internal Table to hold customer data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : begin of it_customer occurs 0,&lt;/P&gt;&lt;P&gt;f1(4), " Sales Org.&lt;/P&gt;&lt;P&gt;f2(2), " Distribution Channel&lt;/P&gt;&lt;P&gt;f3(2), " Division&lt;/P&gt;&lt;P&gt;f4(4), " Acct Group&lt;/P&gt;&lt;P&gt;f5(30), " Tittle&lt;/P&gt;&lt;P&gt;f6(40), " Name1&lt;/P&gt;&lt;P&gt;f7(40), " Name2&lt;/P&gt;&lt;P&gt;f8(20), " Search Term 1&lt;/P&gt;&lt;P&gt;f9(20), " Search Term 2&lt;/P&gt;&lt;P&gt;f10(10), " Postal Code&lt;/P&gt;&lt;P&gt;f11(40), " City&lt;/P&gt;&lt;P&gt;f12(3), " Country&lt;/P&gt;&lt;P&gt;f13(2), " Language&lt;/P&gt;&lt;P&gt;f14(2), " Shipping Condition&lt;/P&gt;&lt;P&gt;end of it_customer.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of selection&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;Clear it_customer.&lt;/P&gt;&lt;P&gt;Refresh it_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To Upload Flat file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;filename = 'C:\WINDOWS\Desktop\cst_vd01.txt'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;data_tab = it_customer&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;conversion_error = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invalid_table_width = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invalid_type = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;no_batch = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;unknown_error = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gui_refuse_filetransfer = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WRITE : / 'Upload of Customer Ext. from ', P_FNAME, ' on ', SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write : / 'File could not be uploaded.. Check file name.'.&lt;/P&gt;&lt;P&gt;stop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;CLEAR : IT_CUSTOMER[], IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET P_FNAME INTO V_STR.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write v_str.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;translate v_str using '#/'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SPLIT V_STR AT ',' INTO IT_CUSTOMER-F1 IT_CUSTOMER-F2 IT_CUSTOMER-F3&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F4 IT_CUSTOMER-F5 IT_CUSTOMER-F6&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F7 IT_CUSTOMER-F8 IT_CUSTOMER-F9&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F10&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F11 IT_CUSTOMER-F12&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F13 IT_CUSTOMER-F14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;CLEAR IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IT_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;WRITE : / 'No data found to upload'.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0107'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'USE_ZAV'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-VKORG'&lt;/P&gt;&lt;P&gt;it_customer-f1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-VTWEG'&lt;/P&gt;&lt;P&gt;it_customer-f2.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-SPART'&lt;/P&gt;&lt;P&gt;it_customer-f3.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-KTOKD'&lt;/P&gt;&lt;P&gt;it_customer-f4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_KUNNR'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_VKORG'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_VTWEG'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_SPART'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'USE_ZAV'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0111'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'ADDR1_DATA-POST_CODE1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'SZA1_D0100-TITLE_MEDI'&lt;/P&gt;&lt;P&gt;it_customer-f5.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-NAME1'&lt;/P&gt;&lt;P&gt;it_customer-f6.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-NAME2'&lt;/P&gt;&lt;P&gt;it_customer-f7.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-SORT1'&lt;/P&gt;&lt;P&gt;it_customer-f8.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-SORT2'&lt;/P&gt;&lt;P&gt;it_customer-f9.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-POST_CODE1'&lt;/P&gt;&lt;P&gt;it_customer-f10.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-CITY1'&lt;/P&gt;&lt;P&gt;it_customer-f11.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-COUNTRY'&lt;/P&gt;&lt;P&gt;it_customer-f12.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-LANGU'&lt;/P&gt;&lt;P&gt;it_customer-f13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNA1-LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0125'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNA1-NIELS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0340'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVA-ABLAD(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0370'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNEX-LNDEX(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNA1-CIVVE'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0360'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVK-NAMEV(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVV-BEGRU'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0315'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVV-ANTLF'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-KZAZU'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-VSBED'&lt;/P&gt;&lt;P&gt;it_customer-f14.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-ANTLF'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0324'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVP-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--To call Transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'VD01'.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2007 11:53:48 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-22T11:53:48Z</dc:date>
    <item>
      <title>BDC Program for customer master data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-program-for-customer-master-data/m-p/3073267#M728623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;   Please provide me the BDC Program to upload the customer master data.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Saleem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 11:50:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-program-for-customer-master-data/m-p/3073267#M728623</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T11:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: BDC Program for customer master data</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-program-for-customer-master-data/m-p/3073268#M728624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the BDC sample code Customer Master Upload:&lt;/P&gt;&lt;P&gt;report ZSDBDCP_CUSTOMER_VD01&lt;/P&gt;&lt;P&gt;no standard page heading&lt;/P&gt;&lt;P&gt;line-size 255.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Includes&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;include zbdcrecx1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Internal Tables&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*-- Internal Table to hold customer data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : begin of it_customer occurs 0,&lt;/P&gt;&lt;P&gt;f1(4), " Sales Org.&lt;/P&gt;&lt;P&gt;f2(2), " Distribution Channel&lt;/P&gt;&lt;P&gt;f3(2), " Division&lt;/P&gt;&lt;P&gt;f4(4), " Acct Group&lt;/P&gt;&lt;P&gt;f5(30), " Tittle&lt;/P&gt;&lt;P&gt;f6(40), " Name1&lt;/P&gt;&lt;P&gt;f7(40), " Name2&lt;/P&gt;&lt;P&gt;f8(20), " Search Term 1&lt;/P&gt;&lt;P&gt;f9(20), " Search Term 2&lt;/P&gt;&lt;P&gt;f10(10), " Postal Code&lt;/P&gt;&lt;P&gt;f11(40), " City&lt;/P&gt;&lt;P&gt;f12(3), " Country&lt;/P&gt;&lt;P&gt;f13(2), " Language&lt;/P&gt;&lt;P&gt;f14(2), " Shipping Condition&lt;/P&gt;&lt;P&gt;end of it_customer.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Start of selection&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;----&lt;/STRONG&gt;&lt;/P&gt;&lt;HR originaltext="-----------------------------------------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;start-of-selection.&lt;/P&gt;&lt;P&gt;Clear it_customer.&lt;/P&gt;&lt;P&gt;Refresh it_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*To Upload Flat file&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;CALL FUNCTION 'UPLOAD'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;filename = 'C:\WINDOWS\Desktop\cst_vd01.txt'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;filetype = 'DAT'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;data_tab = it_customer&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;conversion_error = 1&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invalid_table_width = 2&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;invalid_type = 3&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;no_batch = 4&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;unknown_error = 5&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;gui_refuse_filetransfer = 6&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;OTHERS = 7.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;WRITE : / 'Upload of Customer Ext. from ', P_FNAME, ' on ', SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform open_group.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OPEN DATASET P_FNAME FOR INPUT IN TEXT MODE.&lt;/P&gt;&lt;P&gt;if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;write : / 'File could not be uploaded.. Check file name.'.&lt;/P&gt;&lt;P&gt;stop.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;CLEAR : IT_CUSTOMER[], IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DO.&lt;/P&gt;&lt;P&gt;READ DATASET P_FNAME INTO V_STR.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC NE 0.&lt;/P&gt;&lt;P&gt;EXIT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;write v_str.&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;translate v_str using '#/'.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SPLIT V_STR AT ',' INTO IT_CUSTOMER-F1 IT_CUSTOMER-F2 IT_CUSTOMER-F3&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F4 IT_CUSTOMER-F5 IT_CUSTOMER-F6&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F7 IT_CUSTOMER-F8 IT_CUSTOMER-F9&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F10&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F11 IT_CUSTOMER-F12&lt;/P&gt;&lt;P&gt;IT_CUSTOMER-F13 IT_CUSTOMER-F14.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;APPEND IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;CLEAR IT_CUSTOMER.&lt;/P&gt;&lt;P&gt;ENDDO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF IT_CUSTOMER[] IS INITIAL.&lt;/P&gt;&lt;P&gt;WRITE : / 'No data found to upload'.&lt;/P&gt;&lt;P&gt;STOP.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0107'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'USE_ZAV'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'/00'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-VKORG'&lt;/P&gt;&lt;P&gt;it_customer-f1.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-VTWEG'&lt;/P&gt;&lt;P&gt;it_customer-f2.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-SPART'&lt;/P&gt;&lt;P&gt;it_customer-f3.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-KTOKD'&lt;/P&gt;&lt;P&gt;it_customer-f4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_KUNNR'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_VKORG'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_VTWEG'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'RF02D-REF_SPART'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'USE_ZAV'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0111'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'ADDR1_DATA-POST_CODE1'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'SZA1_D0100-TITLE_MEDI'&lt;/P&gt;&lt;P&gt;it_customer-f5.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-NAME1'&lt;/P&gt;&lt;P&gt;it_customer-f6.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-NAME2'&lt;/P&gt;&lt;P&gt;it_customer-f7.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-SORT1'&lt;/P&gt;&lt;P&gt;it_customer-f8.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-SORT2'&lt;/P&gt;&lt;P&gt;it_customer-f9.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-POST_CODE1'&lt;/P&gt;&lt;P&gt;it_customer-f10.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-CITY1'&lt;/P&gt;&lt;P&gt;it_customer-f11.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-COUNTRY'&lt;/P&gt;&lt;P&gt;it_customer-f12.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'ADDR1_DATA-LANGU'&lt;/P&gt;&lt;P&gt;it_customer-f13.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0120'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNA1-LIFNR'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0125'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNA1-NIELS'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0340'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVA-ABLAD(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0370'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNEX-LNDEX(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNA1-CIVVE'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0360'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVK-NAMEV(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0310'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVV-BEGRU'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0315'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVV-ANTLF'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=VW'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-KZAZU'&lt;/P&gt;&lt;P&gt;'X'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-VSBED'&lt;/P&gt;&lt;P&gt;it_customer-f14.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'KNVV-ANTLF'&lt;/P&gt;&lt;P&gt;''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPMF02D' '0324'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;'KNVP-PARVW(01)'.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;'=UPDA'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*--To call Transaction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_transaction using 'VD01'.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;perform close_group.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2007 11:53:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-program-for-customer-master-data/m-p/3073268#M728624</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-22T11:53:48Z</dc:date>
    </item>
  </channel>
</rss>

