<?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: Getting Material Doc number from BDC in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216119#M1206361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;When you maually post it do you see any message that a material doc XXXXX has been create messages? If yes then check MEssage Table in Call Transaction with type S. &lt;/P&gt;&lt;P&gt;If no then use a select query either after each call transaction or after completing your whole process. The Material Documents are stored in Table MSEG and MKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Feb 2009 13:39:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-02-12T13:39:13Z</dc:date>
    <item>
      <title>Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216112#M1206354</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 updating the materail using MSCN tcode in BDC.&lt;/P&gt;&lt;P&gt;When the material is updated successfully through BDC.&lt;/P&gt;&lt;P&gt;I have to capture the Material document number of that particular material.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest me how to get the material documnet number of material which is updated through 'BDC'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thnaks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 06:57:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216112#M1206354</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-11T06:57:52Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216113#M1206355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In BDC call transaction use Messages into addition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else. use FM FORMAT_MESSAGES to get the material number after the sucessful execution of transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 07:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216113#M1206355</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-11T07:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216114#M1206356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may capture the messaggs generated during BDC by adding MESSAGES INTO itab (type msgcoll).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can also use the FM MESSAGE_PREPARE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pushpraj&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 07:07:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216114#M1206356</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-11T07:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216115#M1206357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;After writing the call transaction,use the FM FORMAT_MESSAGES.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; LOOP AT t_msg INTO fs_msg.&lt;/P&gt;&lt;P&gt;    CALL FUNCTION 'FORMAT_MESSAGE'&lt;/P&gt;&lt;P&gt;      EXPORTING&lt;/P&gt;&lt;P&gt;        id        = fs_msg-msgid&lt;/P&gt;&lt;P&gt;        lang      = sy-langu&lt;/P&gt;&lt;P&gt;        no        = fs_msg-msgnr&lt;/P&gt;&lt;P&gt;        v1        = fs_msg-msgv1&lt;/P&gt;&lt;P&gt;        v2        = fs_msg-msgv2&lt;/P&gt;&lt;P&gt;        v3        = fs_msg-msgv3&lt;/P&gt;&lt;P&gt;        v4        = fs_msg-msgv4&lt;/P&gt;&lt;P&gt;      IMPORTING&lt;/P&gt;&lt;P&gt;        msg       = w_message&lt;/P&gt;&lt;P&gt;      EXCEPTIONS&lt;/P&gt;&lt;P&gt;        not_found = 1&lt;/P&gt;&lt;P&gt;        OTHERS    = 2.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;       WRITE:&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;         / W_message.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  ENDLOOP.                      &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Declare the fieldstring fs_msg and table t_msg,then the values will be populated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jaya&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2009 07:09:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216115#M1206357</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-11T07:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216116#M1206358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou jayapradha,&lt;/P&gt;&lt;P&gt;But in my case when iam using call transaction for MSC2N.&lt;/P&gt;&lt;P&gt;It is not populating any messages.&lt;/P&gt;&lt;P&gt;even though iam getting the sy-subrc value as 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 13:19:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216116#M1206358</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T13:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216117#M1206359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;  You can also use BDCMSGCOLL table and you can cature your messgae.&lt;/P&gt;&lt;P&gt;Here s the logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data :&lt;/P&gt;&lt;P&gt;  t_msg type standard table of  bdcmsgcoll with headerline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now you can loop at this table and all youe messages will be catured by the fields MSGV1,MSGV2,MSGV3 and MSGV4.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You ll get it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much Regards,&lt;/P&gt;&lt;P&gt;Amuktha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 13:24:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216117#M1206359</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T13:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216118#M1206360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou amuktha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 13:35:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216118#M1206360</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216119#M1206361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;When you maually post it do you see any message that a material doc XXXXX has been create messages? If yes then check MEssage Table in Call Transaction with type S. &lt;/P&gt;&lt;P&gt;If no then use a select query either after each call transaction or after completing your whole process. The Material Documents are stored in Table MSEG and MKPF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 13:39:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216119#M1206361</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T13:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216120#M1206362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thankyou prashanth.&lt;/P&gt;&lt;P&gt;I did the same thing.&lt;/P&gt;&lt;P&gt;But can you give me the reason why it is not showing in messages. any idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 14:11:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216120#M1206362</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T14:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216121#M1206363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you please show me the select query how we have to write.&lt;/P&gt;&lt;P&gt;here iam using matnr,plant, storagelocation and batch.&lt;/P&gt;&lt;P&gt;using these parametes how we will get the material doc number from MKPF.&lt;/P&gt;&lt;P&gt;Please suggest me prashanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 14:13:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216121#M1206363</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T14:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216122#M1206364</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;I had gone through the transaction MSC2N which is to change the batch and you have written BDC to update the material Batch details. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the BDC session, you can use BAPI_BATCH_GET_DETAIL to get the status of BDC run (run successfully or not), return table should have zero records for the successful update and PROD_DATE in BATCHATTRIBUTES export table should show the current date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(another suggestion is use BAPI_BATCH_CHANGE instead of BDC)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. &lt;/P&gt;&lt;P&gt;Nagarajan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 14:14:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216122#M1206364</guid>
      <dc:creator>nagarajan_ramudu</dc:creator>
      <dc:date>2009-02-12T14:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216123#M1206365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check in MSEG you have Material, Plant, Storage Location and Batch and along with this you use Sy-uname and Date and also time since there could be many Doc available for Material, plant storage Loc and Batch combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason why you don't get those details captured could be because Material Document gets created in Background and you don't receive the message for that. This is my guess and could be one of the reasons.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Prashanth.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 14:20:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216123#M1206365</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T14:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216124#M1206366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nagarajan thakyou for your reply.&lt;/P&gt;&lt;P&gt;But here i have to change the material old status to new status.&lt;/P&gt;&lt;P&gt;I have to change the old status from restricted to Unrestricted and vice versa.&lt;/P&gt;&lt;P&gt;I think this can be possible through BDC.&lt;/P&gt;&lt;P&gt;But when iam changing the status the material status is changing successfully.&lt;/P&gt;&lt;P&gt;But it is not capturing in  any messages.&lt;/P&gt;&lt;P&gt;but here when ever the material is updated successfully i need to capture that material documnet number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vinay raj on Feb 12, 2009 3:21 PM&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: vinay raj on Feb 13, 2009 9:26 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Feb 2009 14:20:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216124#M1206366</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-12T14:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216125#M1206367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;did u see a FM, some thing like material_save_data?&lt;/P&gt;&lt;P&gt;thanq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Feb 2009 23:48:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216125#M1206367</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-13T23:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216126#M1206368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for all your replies.&lt;/P&gt;&lt;P&gt;I got an idea now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Feb 2009 06:08:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216126#M1206368</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-02-16T06:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Material Doc number from BDC</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216127#M1206369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vinay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im having exactly the same requirement as what you did last time, not sure whether would you mind to share how did you solve the problem, please?&lt;/P&gt;&lt;P&gt;Many thanks in adv.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Sep 2010 08:04:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/getting-material-doc-number-from-bdc/m-p/5216127#M1206369</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-09-02T08:04:55Z</dc:date>
    </item>
  </channel>
</rss>

