<?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 Restriction when using Business object in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107566#M440010</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;Currently i want to use Business Object to create a new Company code. After searching the Business object in Transaction SWO1, I find 'BUS0002' can realize it. But there is only one import parameter of method 'create' , that's the company code key id.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution to import other parameters,such as description of the company code, currency etc. when using the business object to create the company code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Vivi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Apr 2007 01:21:06 GMT</pubDate>
    <dc:creator>WeijiaSun</dc:creator>
    <dc:date>2007-04-02T01:21:06Z</dc:date>
    <item>
      <title>Restriction when using Business object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107566#M440010</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;Currently i want to use Business Object to create a new Company code. After searching the Business object in Transaction SWO1, I find 'BUS0002' can realize it. But there is only one import parameter of method 'create' , that's the company code key id.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any solution to import other parameters,such as description of the company code, currency etc. when using the business object to create the company code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Vivi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 01:21:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107566#M440010</guid>
      <dc:creator>WeijiaSun</dc:creator>
      <dc:date>2007-04-02T01:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Restriction when using Business object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107567#M440011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes you can add that to your method...just click on the parameters for the method&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 01:42:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107567#M440011</guid>
      <dc:creator>aakash_neelaperumal2</dc:creator>
      <dc:date>2007-04-02T01:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Restriction when using Business object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107568#M440012</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;All the fields you are talking about are in BUS0002.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you see the method 'create' of this business object, you have to pass "Object key" here. Object key is not only the company code. This is concatenation of fields required for creating company code.  These fields are.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Fields	Data type      Length	Description
-----   -----------   --------    -----------------
BUKRS	CHAR		4	Company Code
BUTXT	CHAR		25	Name of the company code or company
ORT01	CHAR		25	City
LAND1	CHAR		3	Country key
WAERS	CUKY		5	Currency Key
SPRAS	LANG		1	Language key&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just define a structure with this field, assing the values and then pass it to 'object key'. See below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: BEGIN OF objectkey,
       bukrs LIKE t001-bukrs,
       butxt LIKE t001-butxt,
       ort01 LIKE t001-ort01,
       land1 LIKE t001-land1,
       waers LIKE t001-waers,
       spras LIKE t001-spras,
     END OF objectkey.

objectkey-bukrs = '2010'.
objectkey-butxt = 'My company code description'.
objectkey-ort01 = 'NEW YORK'.
objectkey-land1 = 'US'.
objectkey-waers = 'USD'.
objectkey-spras = 'E'.

*" When you use object BUS0002, assing this structure OBJECTKEY to field
*" OBJECTKEY of  'CREATE' method&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if you need any other information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;RS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 01:47:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107568#M440012</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-04-02T01:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Restriction when using Business object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107569#M440013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aakash,&lt;/P&gt;&lt;P&gt;  Thanks a lot for your reply!&lt;/P&gt;&lt;P&gt;  Is that means i should inherit the standard Business object to a new Z-object, afterwards, add some new parameters and coding to the 'create' method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Vivi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 01:57:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107569#M440013</guid>
      <dc:creator>WeijiaSun</dc:creator>
      <dc:date>2007-04-02T01:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Restriction when using Business object</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107570#M440014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi RS&lt;/P&gt;&lt;P&gt;   just writes a test program :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA: BEGIN OF objectkey,&lt;/P&gt;&lt;P&gt;         bukrs LIKE t001-bukrs,&lt;/P&gt;&lt;P&gt;         butxt LIKE t001-butxt,&lt;/P&gt;&lt;P&gt;         ort01 LIKE t001-ort01,&lt;/P&gt;&lt;P&gt;         land1 LIKE t001-land1,&lt;/P&gt;&lt;P&gt;         waers LIKE t001-waers,&lt;/P&gt;&lt;P&gt;         spras LIKE t001-spras,&lt;/P&gt;&lt;P&gt;       END OF objectkey.&lt;/P&gt;&lt;P&gt;       &lt;/P&gt;&lt;P&gt;  objectkey-bukrs = '2010'.&lt;/P&gt;&lt;P&gt;  objectkey-butxt = 'My company code description'.&lt;/P&gt;&lt;P&gt;  objectkey-ort01 = 'NEW YORK'.&lt;/P&gt;&lt;P&gt;  objectkey-land1 = 'US'.&lt;/P&gt;&lt;P&gt;  objectkey-waers = 'USD'.&lt;/P&gt;&lt;P&gt;  objectkey-spras = 'EN'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  swc_container container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  lv_object_type = 'BUS0002'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  swc_create_object obj lv_object_type ''.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  swc_create_container container.&lt;/P&gt;&lt;P&gt;  swc_set_element container 'objectkey' objectkey.&lt;/P&gt;&lt;P&gt;  swc_set_element container 'CORR_NUMBER' 'EB2K900952'.&lt;/P&gt;&lt;P&gt;  swc_set_element container 'SUPPRESSDIALOG' ' '.&lt;/P&gt;&lt;P&gt;  swc_call_method obj 'Create' container.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At runtime session, there is no value transfered to the maintainence view except the company code id.&lt;/P&gt;&lt;P&gt;When i go through the program of 'create' method,&lt;/P&gt;&lt;P&gt;i found that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call maintenance of CompanyCodeId&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CLEAR V_T001.&lt;/P&gt;&lt;P&gt;  V_T001-MANDT = SY-MANDT.&lt;/P&gt;&lt;P&gt;  V_T001-BUKRS = OBJECT-KEY-COMPANYCODEID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  CALL FUNCTION 'VIEW_MAINTENANCE_SINGLE_ENTRY'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            ACTION                       = 'INS '&lt;/P&gt;&lt;P&gt;            CORR_NUMBER                  = CORR_NUMBER&lt;/P&gt;&lt;P&gt;            VIEW_NAME                    = 'V_T001'&lt;/P&gt;&lt;P&gt;            SUPPRESSDIALOG               = SUPPRESSDIALOG&lt;/P&gt;&lt;P&gt;            INSERT_KEY_NOT_FIXED         = INSERT_KEY_NOT_FIX&lt;/P&gt;&lt;P&gt;       IMPORTING&lt;/P&gt;&lt;P&gt;            CORR_NUMBER                  = CORR_NUMBER&lt;/P&gt;&lt;P&gt;       CHANGING&lt;/P&gt;&lt;P&gt;            ENTRY                        = V_T001.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i guess, it should be enhanced some coding here, something like&lt;/P&gt;&lt;P&gt;V_T001-BUTXT = OBJECT-KEY-description  ?&lt;/P&gt;&lt;P&gt;but i am not sure about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you think about it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again for your kindly help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Vivi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Vivi Sun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2007 02:19:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/restriction-when-using-business-object/m-p/2107570#M440014</guid>
      <dc:creator>WeijiaSun</dc:creator>
      <dc:date>2007-04-02T02:19:12Z</dc:date>
    </item>
  </channel>
</rss>

