cancel
Showing results for 
Search instead for 
Did you mean: 

bdc mm01

Former Member
0 Kudos

hi every body

in mm01 for creating material before going on to the 2nd screen we r getting a list of selection views like basic data 1 basic data 2 classification etc . i wanted to know that whatr these selection views that we have to select and why r we selecting one of of these . like i have seleted basic data 1 for creating my material .

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Rohit,

Any material is made up of multiple data/information. This is categories into different views like accounting view which hold information related to finance for that material (price), purchaseing view which stores information required for creating PO so and so forth. In MM01 dpending upon the material type which u select u can get different sets of views and in different order. So if u are doing a BDC u need to know in which order the views would appear and then accordning select the correct view. Alternatively u could just select Basic view and then use Goto fucntionality to move to differnt views.

Private_Member_17805
Participant
0 Kudos

Hi,

Every material created need not be furnished with all the units and data.For example there might be a case where materials with very basic information is sufficient for creation of material.so in such cases we opt for basic data view,furnish the detials req for that view and create the material.but in a different business scenario it might be req that the costing details be provided for.So in such cases u go for alternative views to suit the business req.So the selection of views is business req based i.e what data u want and what u dont want.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hai Rohit

check with this code

include bdcrecx1.

tables : mara.

data : begin of it_mara occurs 0,

matnr like mara-matnr,

mbrsh like mara-mbrsh,

mtart like mara-mtart,

maktx like makt-maktx,

meins like mara-meins,

end of it_mara.

start-of-selection.

perform upload_data.

perform open_group.

loop at it_mara.

perform bdc_dynpro using 'SAPLMGMM' '0060'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MATNR'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RMMG1-MATNR'

it_mara-matnr.

perform bdc_field using 'RMMG1-MBRSH'

it_mara-mbrsh.

perform bdc_field using 'RMMG1-MTART'

it_mara-mtart.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

perform bdc_field using 'BDC_CURSOR'

'MSICHTAUSW-DYTXT(02)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(01)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(02)'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '4004'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'MAKT-MAKTX'

it_mara-maktx.

perform bdc_field using 'BDC_CURSOR'

'MARA-MEINS'.

perform bdc_field using 'MARA-MEINS'

it_mara-meins.

perform bdc_field using 'MARA-MTPOS_MARA'

'NORM'.

perform bdc_transaction using 'MM01'.

endloop.

perform close_group.

&----


*& Form upload_data

&----


  • text

----


  • --> p1 text

  • <-- p2 text

----


FORM upload_data .

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = 'c:\mat_bdc.txt'

FILETYPE = 'ASC'

TABLES

DATA_TAB = it_mara.

IF SY-SUBRC = 0.

SORT IT_MARA BY MATNR.

ENDIF.

ENDFORM. " upload_data

flat file structure is

PRANIT_011 CCOUP This is Testing material kg

PRANIT_012 CCOUP This is Testing material kg

PRANIT_013 CCOUP This is Testing material kg

PRANIT_014 CCOUP This is Testing material kg

PRANIT_015 CCOUP This is Testing material kg

when your selecting views

this particular material will belongs to Po/Sales or some other areas .

when you select basic 1 --it gives description

select basic 2 -- it gives tax ,amount, base unit of measurement

Thanks & Regards

Sreenivasulu P

Former Member
0 Kudos

Hi Rohit,

If you explore, you would find that the different basic data are for different properties of the materials..

For recording purposes,

You can go step by step starting form basic data 1.

This all depends on the business process and only the functional consultant would be in a better position to tell u what has to be filled and what not ..

I guess only fields in Basic data 1 are mandatory for creating Material..

Regards,

Tanveer.

Please mark helpful answers.

Former Member
0 Kudos

Hi Rohit,

Those are the different areas of the material maintenace. e.g. if you want to maintain plant data (table MARC), you have to go to view 'Plant/storage view 1/2' (don't remember exactly)..

So if you are doing a BDC on MM01, the views you need to choose depends on the data you have coming from file. Your functional consultant should be able to tell you which views you need to select.

If you are doing this in a project, I would suggest don't do a BDC on MM01, try to use a BAPI. e.g. BAPI_STANDARDMATERIAL_CREATE

Former Member
0 Kudos

These view represent the different areas. Like if you want to create PLANT related data select only those view.

IF you want to create only account related data then only create ACCounting view 1 2.Costing views related with Costing data.

Basic1 and basic 2 as name specified are basic views.

Regards

Aman

As in the subject you have mentioned BDC. to select the views in BDCD you need to take care of sequences of views. for that you can use the following code.

TABLES : t130m,

t134.

DATA: kstatus LIKE t130m-pstat,

hstatus LIKE t130m-pstat,

tkstatus LIKE t130m-pstat,

bildsequenz LIKE t133k-bilds,

berecht_akt(2) TYPE c.

DATA: BEGIN OF ztab_new OCCURS 30.

INCLUDE STRUCTURE mbildtab.

DATA: END OF ztab_new.

CLEAR t134.

SELECT SINGLE * FROM t134 WHERE mtart = <Material TYpe>.

CALL FUNCTION 'MATERIAL_INIT'

EXPORTING

tcode = 'MM01'

kz_berprf = 'X'

IMPORTING

it130m = t130m

tkstatus = tkstatus

EXCEPTIONS

no_authority = 1

wrong_call = 2

kstatus_empty = 3

tkstatus_empty = 4

aktyp_tcode_mismatch = 5

tcode_not_found = 6

material_article_mismatch = 7

OTHERS = 8.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CALL FUNCTION 'BILDSEQUENZ_IDENTIFY'

EXPORTING

materialart = <Material Type>

tcode_ref = t130m-trref

IMPORTING

bildsequenz = bildsequenz.

CLEAR gt_bild.

CALL FUNCTION 'SELECTION_VIEWS_FIND'

EXPORTING

bildsequenz = bildsequenz

pflegestatus = t134-pstat "tkstatus

TABLES

bildtab = gt_bild

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.

Message was edited by: Amandeep Singh

former_member181966
Active Contributor
0 Kudos

The views in MM01 , has different kind of information related to material master Basic data 1 and 2 , also related to sales order and also PO as well as with costing . These all views are important based on your company business processes you have to ask your functional person OR power user.

Hope this’ll give you good idea !

P.S award points

Thanks

Saquib Khan