You want to run a BDC programme to update your material master for selected views. Now every master depending on its creation has got different views maintained, and you want to select only two views i.e. PURCHASING and MRP 1 every time for each material code. If you go statically by giving the index for the views selection screen, then the selection of the views go wrong every time there is a change in the total maintained views for a material.

For example:
Check field MARA-VPSTA. Updated with a character for a specific view.
Think it is like this: 
           'A'.                  " Work scheduling
           'B'.                  " Accounting
           'C'.                  " Classification
           'D'.                  " MRP 1 / 2 / 3 / 4
           'E'.                  " Purchasing/Foreign trade import
           'F'.                  " Production resources / tools
           'G'.                  " Costing
           'K'.                  " Basic Data
           'L'.                  " Plant data - Storage 1 / 2
           'P'.                  " Forecasting
           'Q'.                  " Quality Management
           'S'.                  " Warehouse Management
           'V'.                  " Sales
           'X'.                  " Plant stocks
           'Z'.                  " Storage location stocks


Serkan AKKAVAK
Computer Engineer
ABAP Developer & SAP MM SD Consultant
Contact : serkurumsal@yandex.com