<?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: cmd_ei_api=&amp;gt;maintain_bapi in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341086#M1539474</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Mar 2013 07:01:34 GMT</pubDate>
    <dc:creator>shivakrishna_esakoila</dc:creator>
    <dc:date>2013-03-21T07:01:34Z</dc:date>
    <item>
      <title>cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341081#M1539469</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to write a test program to use this method.  I almost have it working but I am getting an error message that I am missing critical partner functions.  I have tried adding the Partner Functions to the Sales Data component but keep getting an error when attaching the "Functions" table to this component.  Below is my sample program.  It is based on other examples in this forms.  Any ideas?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;report zcreate_customer.

data: wa_header          type cmds_ei_header,
      wa_central_data    type cmds_ei_vmd_central_data,
      wa_central_datax   type cmds_ei_vmd_central_data_xflag,
      wa_address         type bapiad1vl,
      wa_addressx        type bapiad1vlx,
      wa_tax_ind_st      type cmds_ei_tax_ind,
      wa_tax_ind         type cmds_ei_cmd_tax_ind,
      wa_bankdetail_st   type cvis_ei_cvi_bankdetail,
      wa_bankdetail      type cvis_ei_bankdetail,
      wa_company_code_st type cmds_ei_company,
      wa_company_code    type cmds_ei_cmd_company,
      wa_functions_st    type cmds_ei_functions,
      wa_functions_t     type CMDS_EI_FUNCTIONS_T,
      wa_functions       type cmds_ei_cmd_functions,
      wa_sales_data_st   type cmds_ei_sales,
      wa_sales_data      type cmds_ei_cmd_sales,
      wa_customer        type cmds_ei_extern,
      wa_customers       type cmds_ei_main,
      wa_correct         type cmds_ei_main,
      wa_defective       type cmds_ei_main,
      wa_mes_correct     type cvis_message,
      wa_mes_error       type cvis_message.

constants: c_update type c value 'M',
           c_insert type c value 'I'.


start-of-selection.

* A "customer" is made up of 4 Main Sections
*    1. HEADER
*    2. CENTRAL_DATA
*    3. COMPANY_DATA
*    4  SALES_DATA
  free: wa_customer, wa_company_code_st, wa_customer.

  wa_address-name       = 'CUSTOMER NAME'.
  wa_address-city       = 'CITY'.
  wa_address-postl_cod1 = '99999'.
  wa_address-street     = '1400 9TH ST W'.
  wa_address-country    = 'US'.
  wa_address-langu      = 'EN'.
  wa_address-region     = 'FL'.
  wa_address-sort1      = 'SORT1'.
  wa_address-sort2      = ''.
  wa_address-taxjurcode = 'FL0000000'.
* wa_address-time_zone = 'UTC-6'.

* Assign address data directly
  wa_customer-central_data-address-postal-data = wa_address.
  wa_customer-central_data-address-postal-datax = wa_addressx.

* Account account group directly
  wa_customer-central_data-central-data-ktokd = 'Z001'.
*  wa_customer-central_data-central-datax-ktokd = 'X'.

  wa_company_code_st-task           = c_insert.
  wa_company_code_st-data_key-bukrs = '1000'.
  wa_company_code_st-data-zuawa     = '009'.
  wa_company_code_st-data-akont     = '0000121000'.
  wa_company_code_st-data-zwels     = 'ACDETY'.
  wa_company_code_st-data-zterm     = 'Z000'.
  wa_company_code_st-data-zgrup     = '02'.
  wa_company_code_st-data-xausz     = '2'.
  wa_company_code_st-data-xzver     = 'X'.

  append wa_company_code_st to wa_company_code-company.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Continued...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Nov 3, 2010 8:13 AM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: kishan P on Nov 3, 2010 8:15 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 01:47:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341081#M1539469</guid>
      <dc:creator>Stephen3</dc:creator>
      <dc:date>2010-11-03T01:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341082#M1539470</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Part II&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  wa_sales_data_st-task             = c_insert.

  wa_sales_data_st-data_key-vkorg   = '1000'.
  wa_sales_data_st-data_key-vtweg   = '10'.
  wa_sales_data_st-data_key-spart   = '10'.

  wa_sales_data_st-data-kalks       = '1'.
  wa_sales_data_st-data-inco1       = 'FOB'.
  wa_sales_data_st-data-inco2       = 'Free on board'.
  wa_sales_data_st-data-antlf       = '9'.
  wa_sales_data_st-data-kzazu       = 'X'.
  wa_sales_data_st-data-vsbed       = '01'.
  wa_sales_data_st-data-waers       = 'USD'.
  wa_sales_data_st-data-ktgrd       = '01'.
  wa_sales_data_st-data-zterm       = 'Z000'.

*  wa_sales_data_st-functions-functions-data_key-parvw = 'SP'.
  wa_functions_st-data_key-parvw    = 'SP'.
  wa_functions_st-data_key-parza    = '000'.
  append wa_functions_st to wa_functions_t.

  wa_functions_st-data_key-parvw    = 'BP'.
  wa_functions_st-data_key-parza    = '000'.
  append wa_functions_st to wa_functions_t.

  wa_functions_st-data_key-parvw    = 'PY'.
  wa_functions_st-data_key-parza    = '000'.
  append wa_functions_st to wa_functions_t.

  wa_functions_st-data_key-parvw    = 'SH'.
  wa_functions_st-data_key-parza    = '000'.
  append wa_functions_st to wa_functions_t.

*  wa_functions = wa_functions_t.

*  wa_sales_data_st-functions        = wa_functions.

  append wa_sales_data_st to wa_sales_data-sales.

  wa_customer-header-object_instance-kunnr = ''.
  wa_customer-header-object_task = c_insert.
  wa_customer-company_data = wa_company_code.
  wa_customer-sales_data   = wa_sales_data.

  append wa_customer to wa_customers-customers.

  call method cmd_ei_api=&amp;gt;maintain_bapi
    EXPORTING
      iv_test_run         = 'X'
      iv_collect_messages = 'X'
      is_master_data      = wa_customers
    IMPORTING
      es_master_data_correct   = wa_correct
      es_message_correct       = wa_mes_correct
      es_master_data_defective = wa_defective
      es_message_defective     = wa_mes_error.

  if wa_mes_error-is_error is initial.
    commit work.
  endif.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 02:45:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341082#M1539470</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-11-03T02:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341083#M1539471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I finally figured it out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append wa_functions_st to wa_functions_t.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; has to be    append wa_functions_st to wa_functions-functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note, there are still other issues with this code, but it is close to working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 14:37:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341083#M1539471</guid>
      <dc:creator>Stephen3</dc:creator>
      <dc:date>2010-11-03T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341084#M1539472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please note one thing while using this.&lt;/P&gt;&lt;P&gt;There will be field called CURRENT_STATE in some of the structures. &lt;/P&gt;&lt;P&gt;mark it as space if you are passing incomplete data and as X when you are passing complete data.&lt;/P&gt;&lt;P&gt;It once happened for me like i was just passsing the deletion indicator for vendor master , for example in XK02 there are some mandatory fields which were already aving value filled in it . when i passed X to CURRENT_STATE only with the deletion indicator as X . It deleted all the values i the mandatory fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyways this case was while using VMD_EI_API . Not sure how it is in CMD_EI_API&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 14:55:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341084#M1539472</guid>
      <dc:creator>kesavadas_thekkillath</dc:creator>
      <dc:date>2010-11-03T14:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341085#M1539473</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I now have this working.  I had to replace the SD Partner Functions with their Germany code and not use their English code (i.e. use RE instead of BP).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am however still having problems getting it to create a Business Partner in Collections Management when the customer is created via this class.  When I create a customer using XD01, the Business Partner gets created in Collections Management automatically so I would have thought that the class should have done the same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, what is the difference between cmd_ei_api=&amp;gt;maintain and cmd_ei_api=&amp;gt;maintain_bapi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Nov 2010 20:33:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341085#M1539473</guid>
      <dc:creator>Stephen3</dc:creator>
      <dc:date>2010-11-03T20:33:27Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341086#M1539474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This message was moderated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Mar 2013 07:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341086#M1539474</guid>
      <dc:creator>shivakrishna_esakoila</dc:creator>
      <dc:date>2013-03-21T07:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: cmd_ei_api=&gt;maintain_bapi</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341087#M1539475</link>
      <description>&lt;P&gt;cmd_ei_api =&amp;gt; maintain  &lt;/P&gt;

&lt;P&gt;The result output has no new customer number&lt;/P&gt;&lt;P&gt;cmd_ei_api=&amp;gt;maintain_bapi.&lt;/P&gt;&lt;P&gt;The result output has the new customer number。---es_vmds_ei_main&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2021 16:11:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/cmd-ei-api-gt-maintain-bapi/m-p/7341087#M1539475</guid>
      <dc:creator>former_member644753</dc:creator>
      <dc:date>2021-04-21T16:11:32Z</dc:date>
    </item>
  </channel>
</rss>

