<?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: Bapi problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134224#M1512786</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;     Please debug BApi  when you are passing all required parameters   ,&lt;/P&gt;&lt;P&gt;     Because  then only you will come to know  while passing which parameter  you are getting that error  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Try to go satep by step You will defenatily find  where is problem and according you can find solution also try on your own first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Jul 2010 04:46:54 GMT</pubDate>
    <dc:creator>deepak_dhamat</dc:creator>
    <dc:date>2010-07-24T04:46:54Z</dc:date>
    <item>
      <title>Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134222#M1512784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I getting some errors when I trying to use this BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fields will be filled by an excel file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OBJEK  / OBJTYPE / KLART / CLASS / DESIGNATION_COURT           / GPE_MARCHANDISES&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1754490 / Mat          / 001      / M001   / DLE10 - Chargement Txt Cde  /  0102&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;DIVISION_ARTICLE / MATIERE / CONSTRUCTEUR / CDF_ATELIER /  DCF&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;0273                        /  TEST      / XYZ                     /  02                   / DCF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;into the program, I am coding:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: t_char LIKE bapi1003_alloc_values_char OCCURS 0 WITH HEADER LINE,
      t_num  like BAPI1003_ALLOC_VALUES_NUM OCCURS 0 WITH HEADER LINE,
      t_curr like BAPI1003_ALLOC_VALUES_CURR OCCURS 0 WITH HEADER LINE,
      t_retur LIKE bapiret2 OCCURS 0 WITH HEADER LINE.

DATA: status TYPE bapi1003_key-status.


t_char-charact = 'DESIGNATION_COURTE'.
t_char-value_char = 'DLE10 - Chargement Txt Cde'.

t_char-charact = 'GPE_MARCHANDISES'.
t_char-value_char = '0102'.

t_char-charact = 'DIVISION_ARTICLE'.
t_char-value_char = '0273'.

t_char-charact = 'MATIERE	CONSTRUCTEUR'.
t_char-value_char = 'TEST'.

t_char-charact = 'REF_CONSTRUCTEUR'.
t_char-value_char = 'XYZ'.

t_char-charact = 'CDF_ATELIER'.
t_char-value_char = '02'.

t_char-charact = 'DCF'.
t_char-value_char = 'DCF'.

t_char-charact = 'DIVISION_ARTICLE'.
t_char-value_char = '7852'.

APPEND t_char.

CALL FUNCTION 'BAPI_OBJCL_CREATE'
  EXPORTING
    objectkeynew            = 'TEST'
    objecttablenew          = 'MARA'
    classnumnew             = 'M001'
    classtypenew            = '001'
   status                  = '1'
*   STANDARDCLASS           =
*   CHANGENUMBER            =
   KEYDATE                 = SY-DATUM
*   NO_DEFAULT_VALUES       = ' '
 IMPORTING
   classif_status          = status
  TABLES
*   ALLOCVALUESNUM          =
   allocvalueschar         = t_char
*   ALLOCVALUESCURR         =
    return                  = t_retur.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After executing this BAPI, I got this message at table t_retur:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;&lt;P&gt; Assignment does not exist or is not valid on &lt;/P&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 15:21:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134222#M1512784</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-23T15:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134223#M1512785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Get the error message class and # and read the long text in transaction SE91.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to me there is something wrong with the values you're entering (e.g. they're simply wrong or configured differently), but I'm not sure how anyone in the forum is supposed to figure this out since we don't have access to your system.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 21:34:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134223#M1512785</guid>
      <dc:creator>Jelena_Perfiljeva</dc:creator>
      <dc:date>2010-07-23T21:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134224#M1512786</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;     Please debug BApi  when you are passing all required parameters   ,&lt;/P&gt;&lt;P&gt;     Because  then only you will come to know  while passing which parameter  you are getting that error  .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Try to go satep by step You will defenatily find  where is problem and according you can find solution also try on your own first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 04:46:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134224#M1512786</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2010-07-24T04:46:54Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134225#M1512787</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;&lt;/P&gt;&lt;P&gt;Take help from this code &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data:&lt;/P&gt;&lt;P&gt;  l_classnumnew         like bapi_class_key-classnum,&lt;/P&gt;&lt;P&gt;  l_classtypenew        like bapi_class_key-classtype,&lt;/P&gt;&lt;P&gt;  l_classbasicdata      like bapi1003_basic,&lt;/P&gt;&lt;P&gt;  l_t_return            like table of bapiret2 with header line,&lt;/P&gt;&lt;P&gt;  l_t_classdescriptions like table of bapi1003_catch with header line,&lt;/P&gt;&lt;P&gt;  l_objectkeynew        like bapi1003_key-object,&lt;/P&gt;&lt;P&gt;  l_counter             like sy-tabix.&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; Neue Klasse anlegen -&lt;HR originaltext="------------------------------" /&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  l_classnumnew           = wagud-filgr.&lt;/P&gt;&lt;P&gt;  l_classtypenew          = wagud-klart.&lt;/P&gt;&lt;P&gt;  l_classbasicdata-status = rwaka-statu.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at g_t_kunnr where not selkz is initial.&lt;/P&gt;&lt;P&gt;    clear   l_t_return.&lt;/P&gt;&lt;P&gt;    refresh l_t_return.&lt;/P&gt;&lt;P&gt;    clear   l_objectkeynew.&lt;/P&gt;&lt;P&gt;    l_objectkeynew = g_t_kunnr-kunnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    call function 'BAPI_OBJCL_CREATE'&lt;/P&gt;&lt;P&gt;       exporting&lt;/P&gt;&lt;P&gt;            objectkeynew    = l_objectkeynew&lt;/P&gt;&lt;P&gt;            objecttablenew  = 'BETR'&lt;/P&gt;&lt;P&gt;            classnumnew     = l_classnumnew&lt;/P&gt;&lt;P&gt;            classtypenew    = l_classtypenew&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          STATUS          = '1'&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          STANDARDCLASS   =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          CHANGENUMBER    =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          KEYDATE         = SY-DATUM&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;       tables&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ALLOCVALUESNUM  =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ALLOCVALUESCHAR =&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;          ALLOCVALUESCURR =&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;            return          = l_t_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;     loop at l_t_return where type eq 'A' or type eq 'E'.&lt;/P&gt;&lt;P&gt;       exit.&lt;/P&gt;&lt;P&gt;     endloop.&lt;/P&gt;&lt;P&gt;     if sy-subrc ne 0.&lt;/P&gt;&lt;P&gt;       l_counter = l_counter + 1.&lt;/P&gt;&lt;P&gt;     endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Deepak.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 04:57:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134225#M1512787</guid>
      <dc:creator>deepak_dhamat</dc:creator>
      <dc:date>2010-07-24T04:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134226#M1512788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you need to append to t_char for each charact and value_char&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
t_char-charact = 'DESIGNATION_COURTE'.
t_char-value_char = 'DLE10 - Chargement Txt Cde'.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;append t_char. clear t_char.&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 06:11:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134226#M1512788</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-24T06:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134227#M1512789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rimeira,&lt;/P&gt;&lt;P&gt;I am new to SAP. But I tried to solve the problem,&lt;/P&gt;&lt;P&gt;First of all, I am not getting any error while executing,&lt;/P&gt;&lt;P&gt;and Second thing I want to ask you that why are you using APPEND statement at last only? before calling the BAPI FM?&lt;/P&gt;&lt;P&gt;I think either I am unable to get the logic, or you have forgotten to write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Rimeira&lt;/P&gt;&lt;P&gt;(Sachin).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 12:12:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134227#M1512789</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-24T12:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bapi problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134228#M1512790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you all for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got a solution with you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First, I had a mistake doing only one append after all itens into the internal table t_char.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After, I did a debug at the FM and found that I was putting the erroneous importing parameters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;instead of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;objectkeynew            = 'TEST'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the parameters should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;objectkeynew            ='000000000001754490' &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The material number with leading zeros.&lt;/P&gt;&lt;P&gt;Now it works!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Jul 2010 21:28:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-problem/m-p/7134228#M1512790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-24T21:28:58Z</dc:date>
    </item>
  </channel>
</rss>

