How select different type views in MM01

Hi abapers,
plz tell me how to handle diffrent different type views in MM01.
thanks in addvance

hi,
After the recording, you might see, that the selection of the views is
monething like that: SELECTION(3) = 'X'
SELECTION(4) = 'X'
SELECTION(5) = 'X'
you have to address the selected
views by their index in the table.
in Tcode SHDB, record MM01 transaction only for the MRP1 MRP2 MRP3 and use the same code in ur BDC prog.
Look at the below code for MM01
http://www.sap-img.com/abap/example-how-views-are-dealt-in-bdc.htm
You have + button in the MK01 trasaction code, if you press that you
can enter new record in the table control, so every time, enter a New
record and press that + button, then enter the record then press + , like this we need to handle the table control
Check the links -
bdc -- mm01
MM01 BDC
mm01
example:
Example how Views are dealt in BDC
Can any body tell me some views of MM  that we can use in BDC?
***This is a BDC for Semi finished Materials*******
report ZBDC_SEMIFIN
       no standard page heading line-size 255.
include bdcrecx1.
Tables: Mara,"General Material Data
        mard,"Storage Location Data for Material
        mvke,"Sales Data for Material
        Makt,"Material Descriptions
        marc,"Plant Data for Material
        mbew,"Material Valuation
        rlgrap."Program Fields/Screen Fields for SAPLGRAP
Data: begin of ITAB occurs 0,"Internal table for Semi-Finished Material
Initial data
      matnr like mara-matnr,  "Material Code
      mbrsh like mara-mbrsh,  "Industry Data
      mtart like mara-mtart,  "Material Type
Org Data
      Werks like marc-werks,  "Plant
      lgort like mard-lgort,  "Storage Location
      vkorg like mvke-vkorg,  "Sales Orgnization
      vtweg like mvke-vtweg,  "Distribution Chanel
Basic 1
      Maktx Like makt-maktx,  "Description
      meins like mara-meins,  "Uom
      matkl like mara-matkl,  "Material Group
      BISMT LIKE MARA-BISMT, " Old Material Number
      spart like mara-spart,  "Division
      brgew(7),"like mara-brgew,  "Gross Weight
      gewei like MARA-GEWEI,  "Weight Unit
      ntgew(7)," like mara-ntgew,  "Net Weight
Purchasing
       MAKTL LIKE MARA-MATKL, "Material Group
       ekwsl like MARA-EKWSL, " Purchasing Value Key
       ekgrp like MARC-EKGRP, " Purchasing Group
Mrp 1
      disgr like MARC-DISGR,  "Mrp Group
    ekgrp like MARC-EKGRP,  "Purchasing group
      dismm like MARC-DISMM,  "Mrp Type
      dispo like MARC-DISPO,  "Mrp Controller
      disls like MARC-DISLS,  "Lot Size
      BSTMI like MARC-BSTMI,
      BSTMA like MARC-BSTMA,
      BSTRF like MARC-BSTRF,
      BSTFE like MARC-BSTFE,
Mrp 2
      beskz like MARC-BESKZ,  "Procurement type
      lgpro like MARC-LGPRO,  "Production Storage Location
      dzeit(3),"like MARC-DZEIT,  "In house Production time
      plifz(3),"like MARC-PLIFZ,  "Planned delivery time
      fhori(3),"like MARC-FHORI,  "Sched margin key
      eisbe like MARC-EISBE,  "Safety stock
Mrp 3
      PERKZ LIKE MARC-PERKZ,
      vrmod like MARC-VRMOD,  "Consumption mode
      vint1(3)," like MARC-VINT1,  "Backward Consumption period
      vint2(3),"like MARC-VINT2,  "Forward Consumption period
      mtvfp like MARC-MTVFP,  "Availability Check
Mrp 4
      sbdkz like MARC-SBDKZ,  "Individual/ Collective
      SAUFT like MARC-SAUFT,  "Repetitive Manufacturing
      SFEPR like MARC-SFEPR,  "REM Profile
Work Scheduling View
      ausme like MARC-AUSME,  "Unit of issue
      FEVOR LIKE MARC-FEVOR, "Production Scheduler
      SFCPF like MARC-SFCPF, "Production Scheduler Profile
      umren(5)," like RMMZU-UMREN,  "Val for base uom
      umrez(5) ,"like RMMZU-UMREz,  "Value for uo issue
Accounting 1
      bklas like MBEW-BKLAS,  "Valuation Class
      vprsv like MBEW-VPRSV,  "Price Control Indicator
      verpr(7)," like MBEW-VERPR,  "Value/Price
      STPRS like MBEW-STPRS,
*COSTING
     EKALR LIKE MBEW-EKALR," With qty str
     LOSGR like MARC-LOSGR, " Costing Lot size
    end of ITAB.
Data: W_record type  I,  "Record Allready exists.
      w_trecord type I. "Total record processed
start-of-selection.
perform upload.        "Upload Data from Text File
Perform Open_group.    "Create a session
clear : w_record,w_trecord.
perform semi. "Create Semi Finish Materials
if w_trecord gt 0 or w_record gt 0.
  perform batch_job.
endif.
perform close_group.   "Close session
FORM SEMI.
loop at ITAB.
  Check for material in master        select single * from mara where matnr eq ITAB-matnr.
         if sy-subrc ne 0.
          w_trecord = w_trecord + 1.
*Initial Screen
perform bdc_dynpro      using 'SAPLMGMM' '0060'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-MTART'.
perform bdc_field       using 'BDC_OKCODE'
                              '=AUSW'.
perform bdc_field       using 'RMMG1-MATNR'
                              ITAB-MATNR.
perform bdc_field       using 'RMMG1-MBRSH'
                              'M'.
perform bdc_field       using 'RMMG1-MTART'
                              'HALB'.
**********************Views*********************************
*Select Views
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(17'.
perform bdc_field       using 'BDC_OKCODE'
                              '/00'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                               'X'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(09)'
                              'X'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(12)'
                              'X'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'
                              'X'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(14)'
                              'X'.
perform bdc_field       using 'MSICHTAUSW-KZSEL(15)'
                              'X'..
perform bdc_field       using 'MSICHTAUSW-KZSEL(17)'
                              'X'.
**********************Views*****************************
*perform bdc_dynpro      using 'SAPLMGMM' '0070'.
*perform bdc_field       using 'BDC_CURSOR'
                             'MSICHTAUSW-DYTXT(01)'.
*perform bdc_field       using 'BDC_OKCODE'
                             '/00'.
*perform bdc_dynpro      using 'SAPLMGMM' '0070'.
*perform bdc_field       using 'BDC_CURSOR'
                             'MSICHTAUSW-DYTXT(17)'.
*perform bdc_field       using 'BDC_OKCODE'
                             '/00'.
*perform bdc_field       using 'MSICHTAUSW-KZSEL(17)'
                             ITAB-KZSEL_17_011.
*perform bdc_dynpro      using 'SAPLMGMM' '0070'.
*perform bdc_field       using 'BDC_CURSOR'
                             'MSICHTAUSW-DYTXT(01)'.
*perform bdc_field       using 'BDC_OKCODE'
                             '/00'.
*perform bdc_dynpro      using 'SAPLMGMM' '0070'.
*perform bdc_field       using 'BDC_CURSOR'
                             'MSICHTAUSW-DYTXT(13)'.
*perform bdc_field       using 'BDC_OKCODE'
                             '=ENTR'.
*perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'
                             ITAB-KZSEL_13_012.
*Org Data
perform bdc_dynpro      using 'SAPLMGMM' '0080'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-LGORT'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'RMMG1-WERKS'
                              ITAB-WERKS.
perform bdc_field       using 'RMMG1-LGORT'
                              ITAB-LGORT.
*Basic 1
perform bdc_dynpro      using 'SAPLMGMM' '4004'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP09'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MARA-MATKL'
                              ITAB-MATKL.
perform bdc_field       using 'MARA-BISMT'
                              ITAB-BISMT.
perform bdc_field       using 'MARA-SPART'
                              ITAB-SPART.
perform bdc_field       using 'MARA-MTPOS_MARA'
                              'NORM'.
perform bdc_field       using 'BDC_CURSOR'
                              'MARA-NTGEW'.
perform bdc_field       using 'MARA-BRGEW'
                              ITAB-BRGEW.
perform bdc_field       using 'MARA-GEWEI'
                              ITAB-GEWEI.
perform bdc_field       using 'MARA-NTGEW'
                              ITAB-NTGEW.
*Purchasing
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP12'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MARC-EKGRP'
                              ITAB-EKGRP.
perform bdc_field       using 'MARA-MATKL'
                              ITAB-MATKL.
perform bdc_field       using 'BDC_CURSOR'
                              'MARA-EKWSL'.
perform bdc_field       using 'MARA-EKWSL'
                              ITAB-EKWSL.
*MRP 1
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP13'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MARC-EKGRP'
                              ITAB-EKGRP.
perform bdc_field       using 'MARC-DISMM'
                              ITAB-DISMM.
perform bdc_field       using 'MARC-DISPO'
                              ITAB-DISPO.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-DISLS'.
perform bdc_field       using 'MARC-DISLS'
                              ITAB-DISLS.
IF ITAB-DISLS EQ 'EX'   .
perform bdc_field       using 'MARC-BSTMI'
                              ITAB-BSTMI."MIN LOT SIZE
perform bdc_field       using 'MARC-BSTMA'
                              ITAB-BSTMA."MAX LOT SIZE
perform bdc_field       using 'MARC-BSTRF'
                              ITAB-BSTRF."RNDING
ELSEIF ITAB-DISLS EQ 'FX'.
perform bdc_field       using 'MARC-BSTFE'
                              ITAB-BSTFE.
ENDIF.
*MRP 2
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP14'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARC-BESKZ'
                              ITAB-BESKZ.
perform bdc_field       using 'MARC-LGPRO'
                              ITAB-LGPRO.
perform bdc_field       using 'MARC-DZEIT'
                              ITAB-DZEIT.
perform bdc_field       using 'MARC-PLIFZ'
                              ITAB-PLIFZ.
perform bdc_field       using 'MARC-FHORI'
                              ITAB-FHORI.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-EISBE'.
perform bdc_field       using 'MARC-EISBE'
                              ITAB-EISBE.
*MRP 3
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP15'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARC-PERKZ'
                              ITAB-PERKZ.
perform bdc_field       using 'MARC-VRMOD'
                              ITAB-VRMOD.
perform bdc_field       using 'MARC-VINT1'
                              ITAB-VINT1.
perform bdc_field       using 'MARC-VINT2'
                              ITAB-VINT2.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-MTVFP'.
perform bdc_field       using 'MARC-MTVFP'
                              ITAB-MTVFP.
*MRP 4
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP17'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARC-SBDKZ'
                              ITAB-SBDKZ.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-SFEPR'.
perform bdc_field       using 'MARC-SAUFT'
                              ITAB-SAUFT.
perform bdc_field       using 'MARC-SFEPR'
                              ITAB-SFEPR.
*Work Scheduling
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP24'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-SFCPF'.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MARC-FEVOR'
                              ITAB-FEVOR.
perform bdc_field       using 'MARC-LGPRO'
                              ITAB-LGPRO.
perform bdc_field       using 'MARC-SFCPF'
                              ITAB-SFCPF.
perform bdc_field       using 'MARC-DZEIT'
                              ITAB-DZEIT.
*Check for Conversation Factor
          if ITAB-MEINS ne iTAB-ausme and iTAB-umren gt  0
                                      and iTAB-umrez gt  0.
          perform bdc_dynpro      using 'SAPLMGMM' '0510'.
          perform bdc_field       using:
                                  'BDC_OKCODE'    '=ENTR',
                                  'RMMZU-UMREN'   ITAB-UMREN,
                                  'RMMZU-UMREZ'   ITAB-UMREZ.
        endif.
perform bdc_field       using 'MARC-LGPRO'
                              itab-LGPRO.
perform bdc_field       using 'MARC-DZEIT'
                              itab-DZEIT.
*Accounting
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=SP26'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MARA-SPART'
                              ITAB-SPART.
perform bdc_field       using 'BDC_CURSOR'
                              'MBEW-STPRS'.
perform bdc_field       using 'MBEW-BKLAS'
                              ITAB-BKLAS.
perform bdc_field       using 'MBEW-VPRSV'
                              ITAB-VPRSV.
perform bdc_field       using 'MBEW-STPRS'
                              ITAB-STPRS.
IF ITAB-VPRSV = 'S'.
perform bdc_field       using 'MBEW-STPRS' "FILLS STD PRICE
                              ITAB-VERPR.
ELSEIF ITAB-VPRSV ='V'.
perform bdc_field       using 'MBEW-VERPR' "FILLS VALUE
                              ITAB-VERPR.
ENDIF.
*Cost Estimate
perform bdc_dynpro      using 'SAPLMGMM' '4000'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_field       using 'MAKT-MAKTX'
                              ITAB-MAKTX.
perform bdc_field       using 'BDC_CURSOR'
                              'MARC-PRCTR'.
perform bdc_field       using 'MARA-MEINS'
                              ITAB-MEINS.
perform bdc_field       using 'MBEW-EKALR'
                              ITAB-EKALR.
perform bdc_field       using 'MARC-LOSGR'
                              ITAB-LOSGR.
perform bdc_transaction using 'MM01'.
REFRESH BDCDATA.
    else.
         w_record = w_record + 1.
    endif.
ENDLOOP.
ENDFORM.
form Upload.
CALL FUNCTION 'UPLOAD'
EXPORTING
   CODEPAGE                      = ' '
   FILENAME                      = ' '
   FILETYPE                      = ' '
  TABLES
    DATA_TAB                      = ITAB
EXCEPTIONS
   CONVERSION_ERROR              = 1
   INVALID_TABLE_WIDTH           = 2
   INVALID_TYPE                  = 3
   NO_BATCH                      = 4
   UNKNOWN_ERROR                 = 5
   GUI_REFUSE_FILETRANSFER       = 6
   OTHERS                        = 7.
ENDFORM.
form batch_job.
    uline.
      format color col_heading.
        if w_trecord gt 0.
        Write:/ 'Background Job has been Created for ',
              w_trecord right-justified, 'Semi-Fin', 80 ''.
        write:/ 'Please follow the following steps to run this job',
                                                           80 ''.
        write:/ 'as listed below.', 80 ''.
        format color col_normal.
        skip.
        write:/05 '1.Goto Transaction SM35', 80 ''.
        write:/05 '2.Select your Session Name', 80 ''.
        write:/05 '3.Click On Execute Button', 80 ''.
       endif.
       if w_record gt 0.
         format color col_negative.
         write:/ w_record ,'records already existed', 80 ''.
         format color off.
       endif.
    uline.
endform.

Similar Messages

  • How to Handle dynamic views in mm01 transaction

    Hi ,
           Can any body say me how to handle Dynamic views in MM01 tcode. Since every time new view has to be selected, how can we manage this through our program.
    Regards,

    Hi Nilesh,
    Views will be vary based on the Material Type what u are selectiing , so u have to focus on this settings.
    Regards
    Peram

  • How to add three views in MM01

    How to add three custom views in MM01 based on material type.
    Regards,
    Malla

    hi,
    This will solve your problem.
    [https://forums.sdn.sap.com/click.jspa?searchID=19403068&messageID=5708251]

  • How load different types of file in SSIS

    could you please suggest how can we load different types of file in SSIS. The file metadata is not defined . So the SSIS
    package will read the files palced in a defined shared location or folder where based on the column value will determine the datatype on runtime and load the data.

    Hi SubhadipRoy,
    SSIS doesn’t support dynamic data access provider or metadata. That means that we need to use different source adapters for flat files (.csv and .txt) and Excel files. So, in the Control Flow, you can use three Foreach Loop Container: one to loop through
    .txt files, one to loop through .csv files, and the last one to loop through Excel files. In each Foreach Loop Container, you use a Data Flow Task to extract data from the corresponding source files. 
    If the source files have different structures, you need to use Script Component in the Data Flow Task to parse the first row of the source files and create destination table dynamically. Here are two script examples for your reference:
    http://www.citagus.com/citagus/blog/importing-from-flat-file-with-dynamic-columns/ 
    http://stackoverflow.com/questions/21672064/ssis-dynamic-column-mapping-in-excel-source-and-destination-sql-server-table 
    Regards,
    Mike Yin
    TechNet Community Support

  • Character Panel isn't updated when selecting different type objects - Illustrator CC 2014.1.0 (october release)

    If I have a Type Object selected that is, for example,
    set to Helvetica, Bold 32pt size and 40pt leading,
    when I select a different Type Object with entirely
    different settings, the Character Panel does not refresh
    to reflect the currently selected object.
    This seems to happen more often than not - maybe 80% of the time.
    My current work around is to change a value in the panel, then quickly change it back.
    Current setup is a mac pro
    OS X 10.9.5
    Illustrator CC 2014.1.0 (october release)

    Hi Marshal,
    Try to reset the preferences to default:
    Press and hold Alt+Control+Shift (Windows) or Option+Command+Shift (Mac OS) as you start Illustrator. Your current settings are deleted.
    Remove or rename the AIPrefs file (Windows) or Adobe Illustrator Prefs file (Mac OS). New preferences files are created the next time you start Illustrator.note: It is safe to remove the entire Adobe Illustrator Settings folder. This folder contains various preferences that can be regenerated.
    Hope this helps.
    Regards,
    Sumit Singh

  • How distinguish different type of objects?

    I want to send different types of object form server to client and vice versa.
    How I differentiate which object come
    I am successfully working with ObjetcOutputStream .

    Thank you for reply

  • I am having trouble selecting different types of paper to print on with Elements 8.

    Also, do I need to download new profiles for this to work. I was using Elements 4 previous to this and when I upgraded, I lost my paper choices.

    Hi bigwallchuck, I have the same problem. I do not have the capacity of choosing which type of paper I want to print on....The panel does not show up.
    It jumps right away to printing.
    When I print a document from Office 2008 (Mac) I have no problem ; the panel shows up (choice of paper).
    I'm using an Epson Stylus C88+ on an iMac 3.06 GHz Intel Core 2 Duo, OS 10.6.2.
    Also my scanner  (Epson Perfection 1660 Photo) does not give me anymore the capacity to scan at 50%, 200% or 300% or whatever size I wish to scan the image.
    Before I had a iMac 1 GHz Power Pc G4, OS 10.4.11.
    Since I changed machine a month ago I have these problems.
    I see Barbara B is seeing if she can help.
    Thanks Barbara B.
    Merci Barbara de tenter de nous aider. Peut-être que c'est en changeant d'un Power PC à un Intel et que mon imprimante et scanner datent de 6 ans?

  • What are the different type of projects

    i mean how many different type of projects are there in sap implementation..
    what do you mean by,
    enhancement project
    rollout project
    development project
    support project
    is there any thing else other than this?
    please clear my doubt.
    points would be rewarded.
    thank you.

    Check the link:
    http://help.sap.com/saphelp_sm40/helpdata/en/ba/38c93a37c59122e10000000a114084/content.htm
    Implementation Project
    Project to implement business processes in an SAP landscape.
    Create a project structure from the business processes. You can either create a new project structure, or base it on one of the following:
    One or more user or partner templates
    An existing project
    Scenarios and configuration structures delivered by SAP 
    An existing production solution landscape
    Template Project
    A project to create a template.
    A template makes your project structure, or parts of it, with its assigned objects (documentation, test cases, IMG activities), available to other projects.
    You can lock templates, completely or partially, against changes when they are used in other projects. To use templates in other systems, transport them.
    Template projects are especially suited to SAP partner solutions or global rollout.
    Upgrade Project
    A project to upgrade existing systems.
    In an upgrade project you can:
    Upgrade customizing: Upgrade existing functions
    and/or
    Delta customizing: Copy additional functions
    Optimization project
    A project to optimize the flow of business processes, or the use of a software solution.
    You can use optimization projects, for example, in SAP Services.
    Safeguarding project
    A project to resolve a critical situation in the implementation or use of an SAP solution.
    Safeguarding projects show the reasons for a critical situation and coordinate the steps required to resolve the problems.
    Maintenance project
    A project to maintain a solution
    in Change Request Management. The project contains all maintenance activities and urgent corrections of a solution.
    in Check-In/Check-Out Business Processes from the Solution Directory
    Regards
    Edited by: Sravan Prakash.V on Dec 28, 2007 12:25 PM

  • What is the process for mm01 datatransfer by selecting different views

    what will be the basic thing to be done for selecting different views?

    hi ..if want to upload master data for different views then first create material using MM01 and then update material for different views one by one in MM02..for mass data transfer u can use BDCs for MM01 and MM02
    regards

  • Select a specific view in MM02/MM01

    Hi Abappers,
    I am doing a BDC on MM01 transaction and want to just select the accounting view and extend materials for different valuation types. But the position of accounting view is coming different on different material and my BDC recording is failing to select the accounting view. Does anyone has any idea how we can pinpoint and select the accounting view?
    Thanks,
    David.

    SELECTION_VIEWS_FIND  - This FM Will work depends on material type..
    in your case this FM Is not required and you need to have Accounting view.
    Any way See below program and you will get some idea and uploaded data into Material master change mode and it is applicable to user defined view
    REPORT zjpmuim306 NO STANDARD PAGE HEADING LINE-SIZE 250 MESSAGE-ID
    zjpm001.
    *&   I N B O U N D  V I A   A B A P : Batch input Session method     *
    *&   Development ID: IM_DD_306_LJP                                   *
    *&   Report        : ZJPMUIM306                                      *
    *&   The Purpose of the Object is to interface Create Input Record   *
    *&   for SAP Migration from the Material master of BPCS All the      *
    *&   information received at BPCS is collected into a single record. *
    *&   By using session method upload data from file ,one item is
    *&   created for one record                                          *
    *&   Change Log:                                                     *
    *&   Init       Who              Date         Text                   *
    *&  MALIKDH1   Seshu Reddy    26-07-2003   Initial Version           *
                             Constants                                   *
    CONSTANTS:c_vkorg(4) type c value 'JP20',        " Sales Organization
              c_vtweg(2) type c value 'TR' ,         " Distribution Channel
              c_werks(4) Type c value 'JP01' ,       " Plant
              c_viewlist(15) VALUE 'KDEALBSZXVPCFQG'," View list
              c_scm_view TYPE msichtausw-dytxt VALUE 'SCM View',
              c_sd_view TYPE msichtausw-dytxt VALUE 'SD View',
              c_seq_code(2) VALUE 'Z1',              " Sequential Code
              c_keep(1) TYPE c VALUE  'X',           " Keep
              c_group LIKE apqi-groupid VALUE 'IM306', " Session Name
              c_tcode  LIKE tstc-tcode VALUE 'MM02',  " Transaction Code
              c_blank(1) VALUE ' ',                   " Blank
              c_intls(1) VALUE 'N'.                  " Logistic Status
                  Variables                                      *
    DATA: g_flag1(1),  " Variable to hold
          g_flag(1),   " Variable to hold
          g_file LIKE rlgrap-filename VALUE
         'C:\Documents and Settings\seshur\Desktop\HCLT123.CSV'. " File name
           Internal tables/ Work area                           *
    Internal Table for Delimter
    DATA : BEGIN OF t_delim OCCURS 0,
           text(1000),
           END OF t_delim.
    Internal table for BDC processing
    DATA : t_bdcdata LIKE bdcdata OCCURS 0 WITH HEADER LINE.
    Internal table for holding the data which has to be uploaded.
    DATA: BEGIN OF t_bpcs OCCURS 0,
          matnr(15) TYPE c,  " material no
          dosage(40) TYPE c, " Dosage form(Local)
          appearance(40) TYPE c, " Appearance
          idcode(6) TYPE c,     " Identification Code
          prostformno(10) TYPE c, "SOP
          weitab(7) TYPE c,    " Weight/tablet
          uom1(2) TYPE c,     " UOM of Carton
          uom2(2) TYPE c,     " UOM of Case
          carsize(14) TYPE c, " Carton size
          cassize(14) TYPE c, " Case size
          rupqty(11) TYPE c,  " Round up
          abvname(3) TYPE c,  " Product short name
          END OF t_bpcs.
    *Internal table for t_bpcs
    DATA: BEGIN OF t_mdata OCCURS 0,
          matnr  LIKE marc-matnr, " Material number
          zzjp_dos_frm LIKE marc-zzjp_dos_frm, " Dosage form(Local)
          zzjp_aprn LIKE marc-zzjp_aprn, " Appearance
          zzjp_con_id LIKE marc-zzjp_con_id," Identification Code
          zzjp_nyu_sop LIKE marc-zzjp_nyu_sop,"SOP
          zzjp_wei_tab(10) type c , " Weight/tablet
          zzjp_bio  LIKE marc-zzjp_bio,"Biologics Indicator
          zzjp_itf LIKE marc-zzjp_itf, " ITF code
          zzjp_car(2) type c, " UOM of Carton
          zzjp_cas(2) type c, " UOM of Case
          zzjp_car_size(11) type c," Carton size
          zzjp_cas_size(11) type c, " Case size
          zzjp_rupqty(11) type c,  " Round up
          zzjp_init_ls LIKE marc-zzjp_init_ls, " Logistic Status
          zzjp_re1 LIKE marc-zzjp_re1, "Document type(Local)
          zzjp_re2 LIKE marc-zzjp_re2, "Report type
          zzjp_re3 LIKE marc-zzjp_re3, "Shipping report type
          zzjp_pro_id LIKE mvke-zzjp_pro_id," Product output sequence
          zzjp_bu_id LIKE mvke-zzjp_bu_id, " Business unit indicator
          zzjp_abv_name LIKE mvke-zzjp_abv_name," Product short name
          zzjp_abv_id1 LIKE mvke-zzjp_abv_id1," Product short name output
          zzjp_abv_id2 LIKE mvke-zzjp_abv_id2," Product short name internal
          zzjp_spl_id LIKE mvke-zzjp_spl_id,  " Sample internal order
          END OF t_mdata.
    Internal table for Mara Table
    DATA: BEGIN OF t_mara OCCURS 0,
          matnr LIKE mara-matnr,  " material Number
          vpsta LIKE mara-vpsta,  " Maintenance status of complete material
          pstat like mara-pstat,  " Maintenance status
          END OF t_mara.
    Internal table for Material Master View Selection Screens
    DATA: BEGIN OF t_bildtab OCCURS 0.
            INCLUDE STRUCTURE mbildtab.
    DATA: END OF t_bildtab.
    internal table for T_bildtab
    DATA: t_bildtab_dup LIKE t_bildtab OCCURS 0 WITH HEADER LINE.
    *Work area for T_bildtab internal table(Views Selection)
    DATA: BEGIN OF w_data,
          flag1 type c,
          anzd70 TYPE i,
          field1(20) type c,
          field2(20) type c,
          field3(20) type c,
          field4(20) type c,
          count(2) TYPE c,
          END OF w_data.
                Main Processing                           *
    START-OF-SELECTION.
    Store data from file into internal table
      PERFORM f_uplaod_data.
    Transfer the uploaded data into t_mdata internal Table
      PERFORM f_process_data.
    Selecting The views based on Material number
      PERFORM f_view_list.
    Open a BDC Session
      PERFORM f_bdc_open.
    *Selecting the fields from mara table
      SELECT matnr
             vpsta
             pstat
        FROM mara
      INTO TABLE t_mara
      FOR ALL ENTRIES IN t_mdata
      WHERE matnr = t_mdata-matnr.
      SORT t_mara BY matnr.
      SORT t_mdata BY matnr.
    Transfer the uploaded data into BDCDATA structure
      PERFORM f_process_bdc.
    Close The BDC Session
      PERFORM f_close_group.
    *&      Form  F_VIEW_LIST                                             *
             Routine to used for Calling the function module            *
              Selection_views_find                                      *
    FORM f_view_list.
      CALL FUNCTION 'SELECTION_VIEWS_FIND'
           EXPORTING
                bildsequenz     = c_seq_code
                pflegestatus    = c_viewlist
           TABLES
                bildtab         = t_bildtab
           EXCEPTIONS
                call_wrong      = 1
                empty_selection = 2
                OTHERS          = 3.
      IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " F_VIEW_LIST
    *&      Form  f612_view_sort                                          *
      Routine to used for Selecting The views based on Material Number  *
    FORM f612_view_sort.
      t_bildtab_dup[] = t_bildtab[].
    Reading the Internal table t_mara
      READ TABLE t_mara WITH KEY matnr = t_mdata-matnr.
      TRANSLATE t_mara-pstat USING ' $'.
      CLEAR: w_data-flag1, w_data-anzd70.
      LOOP AT t_bildtab_dup.
        IF t_bildtab_dup-pstat CA t_mara-pstat.
          w_data-anzd70 = w_data-anzd70 + 1.
          IF t_bildtab_dup-kzanz IS INITIAL.
            t_bildtab_dup-kzanz = 'X'.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ELSE.
          IF NOT t_bildtab_dup-kzanz IS INITIAL.
            CLEAR t_bildtab_dup-kzanz.
            w_data-flag1 = 'X'.
            MODIFY t_bildtab_dup.
          ENDIF.
        ENDIF.
      ENDLOOP.
      TRANSLATE t_mara-pstat USING '$ '.
      IF NOT w_data-flag1 IS INITIAL.
        SORT t_bildtab_dup BY kzanz DESCENDING idxbd ASCENDING.
      ENDIF.
    *Reading The internal table for T_bildtab_dup
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        w_data-count = w_data-count + 2.
        IF w_data-anzd70 > 18.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field1.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field2.
      ENDIF.
      READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
      IF t_bildtab_dup-kzanz = 'X'.
        WRITE sy-tabix TO w_data-count.
        IF w_data-anzd70 > 18.
              w_data-count = w_data-count + 2.
          w_data-count = w_data-count - 18.
        ENDIF.
        CONCATENATE 'MSICHTAUSW-DYTXT(' w_data-count ')' INTO w_data-field3.
        CONCATENATE 'MSICHTAUSW-KZSEL(' w_data-count ')' INTO w_data-field4.
      ENDIF.
    ENDFORM.                    " f612_view_sort
    *&      Form  f_uplaod_data                                           *
    Routine to used for Uploading the data from file to Internal table *
    FORM f_uplaod_data.
      CALL FUNCTION 'WS_UPLOAD'
           EXPORTING
                filename                = g_file
                filetype                = 'DAT'
           TABLES
                data_tab                = t_delim
           EXCEPTIONS
                conversion_error        = 1
                file_open_error         = 2
                file_read_error         = 3
                invalid_type            = 4
                no_batch                = 5
                unknown_error           = 6
                invalid_table_width     = 7
                gui_refuse_filetransfer = 8
                customer_error          = 9
                OTHERS                  = 10.
      IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF t_bpcs IS INITIAL.
        LOOP AT t_delim.
          SPLIT t_delim-text AT ',' INTO t_bpcs-matnr
                                         t_bpcs-dosage
                                         t_bpcs-appearance
                                         t_bpcs-idcode
                                         t_bpcs-prostformno
                                         t_bpcs-weitab
                                         t_bpcs-uom1
                                         t_bpcs-uom2
                                         t_bpcs-carsize
                                         t_bpcs-cassize
                                         t_bpcs-rupqty
                                         t_bpcs-abvname.
          APPEND t_bpcs.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " f_uplaod_data
    *&      Form  F_BDC_OPEN
          Routine  to create BDC Session to be processed
    FORM f_bdc_open.
      CALL FUNCTION 'BDC_OPEN_GROUP'
           EXPORTING
                client              = sy-mandt
                group               = c_group
                keep                = c_keep
                user                = sy-uname
           EXCEPTIONS
                client_invalid      = 1
                destination_invalid = 2
                group_invalid       = 3
                group_is_locked     = 4
                holddate_invalid    = 5
                internal_error      = 6
                queue_error         = 7
                running             = 8
                system_lock_error   = 9
                user_invalid        = 10
                OTHERS              = 11.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
      MESSAGE S000 WITH 'Batch input session is created successfully'(T02).
      ENDIF.
    ENDFORM.                    " F_BDC_OPEN
    *&      Form  F_PROCESS_BDC
          Processing of BDCDATA Structure
    FORM f_process_bdc.
      LOOP AT t_mdata.
        PERFORM f612_view_sort.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0060'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                      'RMMG1-MATNR'.
        PERFORM f_bdc_field USING 'BDC_OKCODE'
                                      '=AUSW'.
        PERFORM f_bdc_field USING 'RMMG1-MATNR'
                                      t_mdata-matnr.
        PERFORM f_bdc_dynpro USING 'SAPLMGMM' '0070'.
        PERFORM f_bdc_field USING 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(01)'.
        IF w_data-anzd70 > 18.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=P+'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0070'.
          PERFORM f_bdc_field  USING 'BDC_OKCODE' '/00'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_scm_view.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field1.
          PERFORM f_bdc_field       USING w_data-field2 'X'.
          g_flag = 'X'.
        ENDIF.
    reading the t_bildtab internal table
        READ TABLE t_bildtab_dup WITH KEY dytxt = c_sd_view.
        IF sy-subrc EQ 0.
          g_flag = 'X'.
        ENDIF.
        IF t_bildtab_dup-kzanz = 'X'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        w_data-field3.
          PERFORM f_bdc_field       USING w_data-field4 'X'.
          g_flag1 = 'X'.
        ENDIF.
        IF g_flag = 'X' AND g_flag1 = 'X'.
          PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
          PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                        'RMMG1-VTWEG'.
          PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                        '=ENTR'.
          PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
          PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                        c_vkorg.
          PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                        c_vtweg.
          CLEAR g_flag.
          CLEAR g_flag1.
        ELSE.
          IF g_flag = 'X'.
            PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
            PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                        c_werks.
            PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
          ELSE.
            IF g_flag1 = 'X'.
              PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '0080'.
              PERFORM f_bdc_field       USING 'BDC_CURSOR'
                                            'RMMG1-VTWEG'.
              PERFORM f_bdc_field       USING 'RMMG1-WERKS'
                                          c_werks.
              PERFORM f_bdc_field       USING 'RMMG1-VKORG'
                                            c_vkorg.
              PERFORM f_bdc_field       USING 'RMMG1-VTWEG'
                                            c_vtweg.
              PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                             '=ENTR'.
            ENDIF.
          ENDIF.
        ENDIF.
    *Processing of SCM View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MARC-ZZJP_DOS_FRM'.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_DOS_FRM'
                                      t_mdata-zzjp_dos_frm.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_APRN'
                                      t_mdata-zzjp_aprn.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CON_ID'
                                      t_mdata-zzjp_con_id.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_NYU_SOP'
                                      t_mdata-zzjp_nyu_sop.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_WEI_TAB'
                                      t_mdata-zzjp_wei_tab.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR'
                                      t_mdata-zzjp_car.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS'
                                      t_mdata-zzjp_cas.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAR_SIZE'
                                      t_mdata-ZZJP_CAR_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_CAS_SIZE'
                                      t_mdata-ZZJP_CAS_SIZE.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RUPQTY'
                                       t_mdata-ZZJP_RUPQTY.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_BIO'
                                      t_mdata-zzjp_bio.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_ITF'
                                      t_mdata-zzjp_itf.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_INIT_LS'
                                      t_mdata-zzjp_init_ls.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE1'
                                      t_mdata-zzjp_re1.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE2'
                                      t_mdata-zzjp_re2.
        PERFORM f_bdc_field       USING 'MARC-ZZJP_RE3'
                                      t_mdata-zzjp_re3.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
    *Processing of SD View
        PERFORM f_bdc_dynpro      USING 'SAPLMGMM' '4000'.
        PERFORM f_bdc_field       USING 'BDC_CURSOR' 'MVKE-ZZJP_PRO_ID'.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_PRO_ID'
                                      t_mdata-zzjp_pro_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_BU_ID'
                                      t_mdata-zzjp_bu_id.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_NAME'
                                      t_mdata-zzjp_abv_name.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID1'
                                      t_mdata-zzjp_abv_id1.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_ABV_ID2'
                                      t_mdata-zzjp_abv_id2.
        PERFORM f_bdc_field       USING 'MVKE-ZZJP_SPL_ID'
                                      t_mdata-zzjp_spl_id.
        PERFORM f_bdc_field      USING 'BDC_OKCODE' '/00'.
        PERFORM f_bdc_dynpro      USING 'SAPLSPO1' '0300'.
        PERFORM f_bdc_field       USING 'BDC_OKCODE'
                                      '=YES'.
    perform f_bdc_insert.
    REFRESH T_BDCDATA.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_BDC
    *&      Form  f_bdc_dynpro
      p_prog is the program name to which data is passed                *
      p_dyno is the screen number to which the data is passed
        Routine for populating the BDCDATA structure with the
        Screen related information
    FORM f_bdc_dynpro USING    p_prog
                               p_dyno.
      t_bdcdata-program  = p_prog.
      t_bdcdata-dynpro   = p_dyno.
      t_bdcdata-dynbegin = 'X'.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_dynpro
    *&      Form  F_BDC_FIELD
          p_fnam is the field name to which value is passed
          p_fval is the field value which is passed
       p_fnam is the field name to which value is passed
       p_fval is the field value which is passed
    FORM f_bdc_field USING    p_fnam
                              p_fval.
      t_bdcdata-fnam = p_fnam.
      t_bdcdata-fval = p_fval.
      APPEND t_bdcdata.
      CLEAR t_bdcdata.
    ENDFORM.                    " F_bdc_field
    *&      Form  F_PROCESS_DATA                                          *
         Routine to used for moving data from T_bpcs internal table to  *
         t_mdata Internal Table                                         *
    FORM f_process_data.
      LOOP AT t_bpcs.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
             EXPORTING
                  input  = t_bpcs-matnr
             IMPORTING
                  output = t_mdata-matnr.
        MOVE t_bpcs-dosage TO t_mdata-zzjp_dos_frm.
        MOVE t_bpcs-appearance TO t_mdata-zzjp_aprn.
        MOVE t_bpcs-idcode  TO t_mdata-zzjp_con_id.
        MOVE t_bpcs-prostformno TO t_mdata-zzjp_nyu_sop.
        MOVE t_bpcs-weitab TO t_mdata-zzjp_wei_tab.
        MOVE c_blank TO t_mdata-zzjp_bio.
        MOVE c_blank TO t_mdata-zzjp_itf.
        MOVE t_bpcs-uom1 TO t_mdata-zzjp_car.
        MOVE t_bpcs-uom2 TO t_mdata-zzjp_cas.
        MOVE t_bpcs-carsize TO t_mdata-zzjp_car_size.
        MOVE t_bpcs-cassize TO t_mdata-zzjp_cas_size.
        MOVE t_bpcs-rupqty TO t_mdata-zzjp_rupqty.
        MOVE c_intls TO t_mdata-zzjp_init_ls.
        MOVE c_blank TO t_mdata-zzjp_re1.
        MOVE c_blank TO t_mdata-zzjp_re2.
        MOVE c_blank TO t_mdata-zzjp_re3.
        MOVE c_blank TO t_mdata-zzjp_pro_id.
        MOVE c_blank TO t_mdata-zzjp_bu_id.
        MOVE t_bpcs-abvname TO t_mdata-zzjp_abv_name.
        MOVE c_blank TO t_mdata-zzjp_abv_id1.
        MOVE c_blank TO t_mdata-zzjp_abv_id2.
        MOVE c_blank TO t_mdata-zzjp_spl_id.
        APPEND t_mdata.
      ENDLOOP.
    ENDFORM.                    " F_PROCESS_DATA
    *&      Form  f_bdc_close
          Routine to close the BDC Session
    FORM f_close_group.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
           EXCEPTIONS
                not_open    = 1
                queue_error = 2
                OTHERS      = 3.
      IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " f_close_group
    *&      Form  f_bdc_insert
         routine to input batch data into the Transaction MM02 from the
         session created
    FORM f_bdc_insert.
    CALL FUNCTION 'BDC_INSERT'
             EXPORTING
                  tcode            = c_tcode
             TABLES
                  dynprotab        = t_bdcdata
             EXCEPTIONS
                  internal_error   = 1
                  not_open         = 2
                  queue_error      = 3
                  tcode_invalid    = 4
                  printing_invalid = 5
                  posting_invalid  = 6
                  OTHERS           = 7.
        IF sy-subrc <> 0.
             MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    ENDFORM.                    " f_bdc_insert
    Reward Points if it is helpful
    Thanks
    Seshu

  • Dynamic select views for MM01 Transaction

    Hii  Friends,
    I have an issue like i need to dynamically select the views in MM01 transaction from the BDC program
    without selecting that views manually.
    Using SHDB recording i can select the views before recording  and then call those views again
    If i want to select the views from the program how do i do it..
    If there is any way to do this in call transaction let me know plz
    Thanks in advance
    kishore

    BDC is not good for MM01 , go for bapi
    other wise go for  LSMW bapi method...
    Business Object      BUS1001006   Standard material
    Method               SAVEDATA                    Create and change materia
    Message Type         MATMAS_BAPI                 Create and change materia
    Basic Type           MATMAS_BAPI02               Create and Change Materia

  • Problem related to Auto select of Views in MM01?

    Hi All,
    I want that when ever any person creates material for any material type then the Quality view will remain selected . How Can I achieve the required?

    As it is a personal setting, you cant.
    You can preselect it for a user and maintain it for a different users, but the user can always change it to his needs.
    You may need to develope a small programm that updates the user settings every night, then see who has the longer breath.
    I personally do not understand that requirement. If I am not intrested in QM data, because I am working in Accounting, then why should I have this view preselected?
    And even more worse, if somebody creates materials where this view is optional, and does not want that view, then SAP will create this view anytime.
    I saw several threads here where people asked how to remove unwanted views.
    Better rethink your requirement.
    MAterial master has a userexit that is processed while saving, there you can send an error message if the user has not done what you want from him.

  • How hide views in MM01

    Hello Experts,
    i am new to SPRO settings
    I have a requirement to hide the views in MM01 transaction.
    i want to hide MRP views and and some other views.
    Could anybody tell me how to acheive this.
    Thanks
    Note : Subject is FAQ,please search forum before posting.
    Edited by: Jeyakanthan A on Dec 25, 2011 12:13 AM

    > I have a requirement to hide the views in MM01 transaction.
    >
    > i want to hide MRP views and and some other views.
    Hi, From T-code OMS2 select the material type for which you do not want the MRP view, double click on the material type & deselect the MRP (all 4 MRP views are connected to these tab only) tab for that material type & save. Test & check.

  • How to select a custom view in BAPI_MATERIAL_SAVEDATA

    In our company we have defined some CUSTOM views for different materials. I want to select a custom view in the header data but don't see an option. The only options I see are as follows:
    MATERIAL
    IND_SECTOR
    MATL_TYPE
    BASIC_VIEW
    SALES_VIEW
    PURCHASE_VIEW
    MRP_VIEW
    FORECAST_VIEW
    WORK_SCHED_VIEW
    PRT_VIEW
    STORAGE_VIEW
    WAREHOUSE_VIEW
    QUALITY_VIEW
    ACCOUNT_VIEW
    COST_VIEW
    INP_FLD_CHECK
    MATERIAL_EXTERNAL
    MATERIAL_GUID
    MATERIAL_VERSION
    How can I select a view (in BAPI_MATERIAL_SAVEDATA) that's not a standard SAP view?
    Please help!
    Thanks.

    Hi,
    which views do you select in the structure HEADDATA? Do you select STORAGE_VIEW?
    Cheers

  • Hide views in MM01 for all material type in one time

    Hi,
    I have a requirement to hide the views for all material type at at time.
    i tried with OMS2 , it is allowing me to do for one matrial type.
    could any one tell me how to hide the views for all material type in one short.
    Thanks in adv..

    Hi Rakesh,
    Up to my knowledge it is not possible to do view setting for all material type in one shot simply because it is material type dependent.
    If trying to change fields in material master then use OMS9. This also material type linked to field reference group. And we can change the setting of field selection group in one shot. This will affect the material types linked to it.
    Hope it helps
    sBk

Maybe you are looking for

  • Interactive PDF not working. Please help.

    Hi, Can anyone help me please? I've created a website prototype with just two pages (home and lower page). For the relevant navigation I have created two links and and rollover states to demonstrate interactivity. I've set this up using slices and sw

  • Paragraphs Spanning Pages Not Converting

    Hi all - Looking for some help please! Using Acrobat Standard 9.1.1 to convert an MS Word 2002 (SP3) document running on Windows XP Pro SP2 Number/bullet lists items which break across two pages will not convert the second portion of the list-item wh

  • HT2305 applesyncnotifier.exe - entry point not found

    the procedure entry point sqlite3_wal_checkpoint could not be located in the dynamic link library SQLite3.dll

  • Buying a factory unlocked iphone from US(Apple Store) to use in india.

    Hi one of my friend is bringing me an iphone 5s to India.. yayy it would be factory unlocked and will be purchased from apple store. my primary concerns are do i need to activate iphone via itunes(or is it ready to use). And do i need to have a backu

  • TCS Configuration in MIRO

    Hi All We have to configure TCS for buying scrape, vendor is giving scrape by adding TCS e.g 500 material Plus 50 TCS = 550 pl give me configuration steps Thanks in advance Vishvas B