<?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 help need with bapi for mb1a in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047247#M421633</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;iam creating a good movement with 201 using bapi. I created manually with the data in the t code MB1A. LATER I TRIED WITH THE SAME DATA IN PROGRAM BY PASSING THROOUGH bAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT FOR SOME REASON IAM GETTING AN ERROR SAYING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EKI                  222Cost center ABCD/12345 does not exist on 03/28/2007. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this cost center is valid till 9999. I never passed ABCD what is that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I TRIED WITH SAME COST CENTER IT WORKED WHILE CREATE MANUALLY WITHT THE SAME DATA IN mb1a T-CODE.&lt;/P&gt;&lt;P&gt;tHIS IS MY CODE LET ME IF IAM MISSING ANYTHING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gm_header  type bapi2017_gm_head_01.&lt;/P&gt;&lt;P&gt;data: gm_code    type bapi2017_gm_code.&lt;/P&gt;&lt;P&gt;data: gm_headret type bapi2017_gm_head_ret.&lt;/P&gt;&lt;P&gt;data: gm_item    type table of&lt;/P&gt;&lt;P&gt;                 bapi2017_gm_item_create with header line.&lt;/P&gt;&lt;P&gt;data: gm_return  type bapiret2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: gm_return, gm_retmtd. refresh gm_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setup BAPI header data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gm_header-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;gm_header-doc_date   = sy-datum.&lt;/P&gt;&lt;P&gt;gm_code-gm_code      = '03'.                                " MB1A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write 971 movement to table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear gm_item.&lt;/P&gt;&lt;P&gt;move '201'                 to gm_item-move_type     .&lt;/P&gt;&lt;P&gt;move '90998'  to gm_item-material.&lt;/P&gt;&lt;P&gt;move '1'     to gm_item-entry_qnt.&lt;/P&gt;&lt;P&gt;MOVE 'EA'    TO GM_ITEM-ENTRY_UOM.&lt;/P&gt;&lt;P&gt;move 'PNT'  to gm_item-plant.&lt;/P&gt;&lt;P&gt;move 'PPNT'  to gm_item-stge_loc.&lt;/P&gt;&lt;P&gt;*MOVE '0901'   TO GM_ITEM-MOVE_REAS.&lt;/P&gt;&lt;P&gt;move '12345' to gm_item-COSTCENTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append gm_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call goods movement BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          goodsmvt_header  = gm_header&lt;/P&gt;&lt;P&gt;          goodsmvt_code    = gm_code&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;          goodsmvt_headret = gm_headret&lt;/P&gt;&lt;P&gt;          materialdocument = gm_retmtd&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          goodsmvt_item    = gm_item&lt;/P&gt;&lt;P&gt;          return           = gm_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not gm_retmtd is initial.&lt;/P&gt;&lt;P&gt;  commit work and wait.&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_ALL'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  commit work and wait.&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_ALL'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ gm_retmtd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gm_return.&lt;/P&gt;&lt;P&gt;  write:/ gm_return.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2007 05:00:02 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-28T05:00:02Z</dc:date>
    <item>
      <title>help need with bapi for mb1a</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047247#M421633</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;iam creating a good movement with 201 using bapi. I created manually with the data in the t code MB1A. LATER I TRIED WITH THE SAME DATA IN PROGRAM BY PASSING THROOUGH bAPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT FOR SOME REASON IAM GETTING AN ERROR SAYING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EKI                  222Cost center ABCD/12345 does not exist on 03/28/2007. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this cost center is valid till 9999. I never passed ABCD what is that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I TRIED WITH SAME COST CENTER IT WORKED WHILE CREATE MANUALLY WITHT THE SAME DATA IN mb1a T-CODE.&lt;/P&gt;&lt;P&gt;tHIS IS MY CODE LET ME IF IAM MISSING ANYTHING&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: gm_header  type bapi2017_gm_head_01.&lt;/P&gt;&lt;P&gt;data: gm_code    type bapi2017_gm_code.&lt;/P&gt;&lt;P&gt;data: gm_headret type bapi2017_gm_head_ret.&lt;/P&gt;&lt;P&gt;data: gm_item    type table of&lt;/P&gt;&lt;P&gt;                 bapi2017_gm_item_create with header line.&lt;/P&gt;&lt;P&gt;data: gm_return  type bapiret2 occurs 0 with header line.&lt;/P&gt;&lt;P&gt;data: gm_retmtd  type bapi2017_gm_head_ret-mat_doc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear: gm_return, gm_retmtd. refresh gm_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Setup BAPI header data.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;gm_header-pstng_date = sy-datum.&lt;/P&gt;&lt;P&gt;gm_header-doc_date   = sy-datum.&lt;/P&gt;&lt;P&gt;gm_code-gm_code      = '03'.                                " MB1A&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Write 971 movement to table&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;clear gm_item.&lt;/P&gt;&lt;P&gt;move '201'                 to gm_item-move_type     .&lt;/P&gt;&lt;P&gt;move '90998'  to gm_item-material.&lt;/P&gt;&lt;P&gt;move '1'     to gm_item-entry_qnt.&lt;/P&gt;&lt;P&gt;MOVE 'EA'    TO GM_ITEM-ENTRY_UOM.&lt;/P&gt;&lt;P&gt;move 'PNT'  to gm_item-plant.&lt;/P&gt;&lt;P&gt;move 'PPNT'  to gm_item-stge_loc.&lt;/P&gt;&lt;P&gt;*MOVE '0901'   TO GM_ITEM-MOVE_REAS.&lt;/P&gt;&lt;P&gt;move '12345' to gm_item-COSTCENTER.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append gm_item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Call goods movement BAPI&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;call function 'BAPI_GOODSMVT_CREATE'&lt;/P&gt;&lt;P&gt;     exporting&lt;/P&gt;&lt;P&gt;          goodsmvt_header  = gm_header&lt;/P&gt;&lt;P&gt;          goodsmvt_code    = gm_code&lt;/P&gt;&lt;P&gt;     importing&lt;/P&gt;&lt;P&gt;          goodsmvt_headret = gm_headret&lt;/P&gt;&lt;P&gt;          materialdocument = gm_retmtd&lt;/P&gt;&lt;P&gt;     tables&lt;/P&gt;&lt;P&gt;          goodsmvt_item    = gm_item&lt;/P&gt;&lt;P&gt;          return           = gm_return.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not gm_retmtd is initial.&lt;/P&gt;&lt;P&gt;  commit work and wait.&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_ALL'.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  commit work and wait.&lt;/P&gt;&lt;P&gt;  call function 'DEQUEUE_ALL'.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write:/ gm_retmtd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at gm_return.&lt;/P&gt;&lt;P&gt;  write:/ gm_return.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047247#M421633</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: help need with bapi for mb1a</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047248#M421634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;EKI 222Cost center ABCD/12345 does not exist on 03/28/2007&lt;/P&gt;&lt;P&gt;This ABCD may be one of the Orgn Unit like Plant/Company code/ Controlling area.&lt;/P&gt;&lt;P&gt;It seems that the cost center was not assigned to that ABCD (orgn Unit) that's why you are getting that error. This assignment is needed for this MB1A creation.&lt;/P&gt;&lt;P&gt;Just take the help of the functional consultant and ask him.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;reward if useful&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Anji&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:06:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047248#M421634</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: help need with bapi for mb1a</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047249#M421635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just do one thing - keep another session open and pass all values to MB1A. Also check if there are any default values populated. . And in another session check if all respective fields are getting populated. There must be some field missing. Check if the assignments of Cost center are maintained correctly. If still you are not able to find it, debug program once which will help to identify source of error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 05:07:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047249#M421635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T05:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: help need with bapi for mb1a</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047250#M421636</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;Iam abale to create a goods issue with the same data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference i see when i create through MB1A, in the initial screen i see the collective slip has been selected and in the second when i give the cost center and hit enter it brings up the buisness area and then when i save it it creates a document number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried passing the buisness area but iam getting same error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it work through mB1A then it should work through the BAPI RIGHT?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tAKE A LOOK AT MY BAPI CODE AND LET ME KNOW IF IA M MISSING ANYTHING IN HERE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tHANKS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2007 13:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/help-need-with-bapi-for-mb1a/m-p/2047250#M421636</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-28T13:09:14Z</dc:date>
    </item>
  </channel>
</rss>

