<?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: BDC for MM02 view selection problem in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682456#M1291584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 30 May 2009 19:35:13 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-05-30T19:35:13Z</dc:date>
    <item>
      <title>BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682451#M1291579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do BDC for transaction MM02 for 1 particular view.&lt;/P&gt;&lt;P&gt;I 1st put the material no. &amp;amp;  click on enter and then a window comes for selecting views.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But all materials dont have same no. of views.&lt;/P&gt;&lt;P&gt;some materials have 8 views of which the view that I want is on 5th place.&lt;/P&gt;&lt;P&gt;some have 21 views and the view I want suddenly goes on 19th place and also in the window for view, I can only select upto 17 views through bdc, any other view after 17th place I cannot access through bdc. It says that field value does not exist in that screen.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I run the bdc by putting&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro      using 'SAPLMGMM' '0070'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_CURSOR'&lt;/P&gt;&lt;P&gt;                                  'MSICHTAUSW-DYTXT(05)'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'BDC_OKCODE'&lt;/P&gt;&lt;P&gt;                                  '=ENTR'.&lt;/P&gt;&lt;P&gt;perform bdc_field       using 'MSICHTAUSW-KZSEL(05)'&lt;/P&gt;&lt;P&gt;                                  'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then if the view for another material is not on 5th place, it tries to insert the values on the view whichever is present on 5th place and gives error.&lt;/P&gt;&lt;P&gt;How can I select the same view for any material, irrespective of the position of the view that I want in the list.&lt;/P&gt;&lt;P&gt;In simple words irrespective of no. of views present for any material, I always want the BDC to select the same view in which I want to insert data through BDC.&lt;/P&gt;&lt;P&gt;Please help I'm not able to start my bdc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kash.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 15:14:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682451#M1291579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-30T15:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682452#M1291580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kash,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a simple way.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;You know the material name, right.
Now your query for getting the View Name should be:

Select PSTAT from mara into V_VIEW 
          Where matnr = p_matnr.
Note: PSTAT --&amp;gt; is Maintenance Status
Now, you can use the above V_VIEW, and assign it throu the BDC. This will work.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;All the best,&lt;/P&gt;&lt;P&gt;Rgds,&lt;/P&gt;&lt;P&gt;Ramani N.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 18:09:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682452#M1291580</guid>
      <dc:creator>former_member229729</dc:creator>
      <dc:date>2009-05-30T18:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682453#M1291581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi DalviKashyap,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hey I have worked on this, I had come across exactly same issue, i'll paste the code which I had written. And my BDC is working perfectly fine.&lt;/P&gt;&lt;P&gt;you can have the description of the fields from the respective tables from SE11.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Declare few variables&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : lv_mtart like mara-mtart,&lt;/P&gt;&lt;P&gt;       lv_cnt(2) type c,               " its a count&lt;/P&gt;&lt;P&gt;       lv_dytxt(30) type c,&lt;/P&gt;&lt;P&gt;       lv_kzsel(30) type c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Declare an internal table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data : lt_btci type STANDARD TABLE OF bdcdata with HEADER LINE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE :&lt;/STRONG&gt; Add the following code inside your LOOP statement before the BDC recording&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fire a select query on the table MARA where Material no. is equal to the material No. u require&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;here wa_material_details-matnr is the field in my workarea which has the material no, that I read from&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the flat file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select single mtart into lv_mtart from mara where matnr eq wa_material_details-matnr.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;following function module will select the number on which your required view is&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;in my case i have written Q, as i wanted Quality Management view&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;material   = wa_material_details-matnr&lt;/P&gt;&lt;P&gt;MATERIALART  = lv_mtart&lt;/P&gt;&lt;P&gt;selection  = 'Q'&lt;/P&gt;&lt;P&gt;tcode    = 'MM02'&lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;btci_d0070   = lt_btci.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;following code takes in the number on which your required view is in the list&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;the 2 digits after 1st 17 in the field FNAM indicate the number on which ur view is for that particular&lt;/STRONG&gt; &lt;STRONG&gt;material no. (it can be 5 or 19 as u mentioned)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE lt_btci WITH KEY FVAL  = 'X'.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;lv_cnt = lt_btci-FNAM+17(2).&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 19:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682453#M1291581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-30T19:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682454#M1291582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;Now for the BDC recording, make the following changes&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;this code in ur recording will chk the position of the view, if the view is after 17 position&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;BDC_OKCODE = P+ will scroll the window down i.e out of total views will subtract 1st 17, so that u&lt;/STRONG&gt; &lt;STRONG&gt;can see the rest ones&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if it is after 17 it will select the view u want, if no then it will do normal processing&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear : lv_cnt.&lt;/P&gt;&lt;P&gt;clear   : lt_bdcdata.&lt;/P&gt;&lt;P&gt;refresh : lt_bdcdata.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM'  '0070'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if lv_cnt &amp;gt; '17'.&lt;/P&gt;&lt;P&gt;lv_cnt = lv_cnt - 17.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'    '=P+'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;perform bdc_dynpro using 'SAPLMGMM'  '0070'.&lt;/P&gt;&lt;P&gt;concatenate 'MSICHTAUSW-DYTXT(' lv_cnt ')'  into lv_dytxt.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'  lv_dytxt.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'    '=ENTR'.&lt;/P&gt;&lt;P&gt;concatenate 'MSICHTAUSW-KZSEL(' lv_cnt ')'  into lv_kzsel.&lt;/P&gt;&lt;P&gt;perform bdc_field using lv_kzsel  'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;concatenate 'MSICHTAUSW-DYTXT(' lv_cnt ')'  into lv_dytxt.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_CURSOR'  lv_dytxt.&lt;/P&gt;&lt;P&gt;perform bdc_field using 'BDC_OKCODE'    '=ENTR'.&lt;/P&gt;&lt;P&gt;concatenate 'MSICHTAUSW-KZSEL(' lv_cnt ')'  into lv_kzsel.&lt;/P&gt;&lt;P&gt;perform bdc_field using lv_kzsel  'X'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u...infact i'm sure it will work smoothly &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&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;RadhikaS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 19:19:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682454#M1291582</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-30T19:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682455#M1291583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank u all&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 19:33:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682455#M1291583</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-30T19:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682456#M1291584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 May 2009 19:35:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682456#M1291584</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-05-30T19:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682457#M1291585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;THANKS RADHIKA ITS REALLY HELP FULL THE CODE YOU HAVE POSTED&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;Mahesh Dasari.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 09:05:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682457#M1291585</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-01-07T09:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: BDC for MM02 view selection problem</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682458#M1291586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG&gt;Former Member&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;That was excellent.&lt;/P&gt;&lt;P&gt;Thank you for sharing and your kindness.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Feb 2013 16:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bdc-for-mm02-view-selection-problem/m-p/5682458#M1291586</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-02-03T16:06:29Z</dc:date>
    </item>
  </channel>
</rss>

