Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to record diffrent views in BDC for MM01

Former Member
0 Kudos

hi friends,

can u pls give slo to my problem .

how to record diffrent views in BDC for MM01

5 REPLIES 5

Former Member
0 Kudos

It is easier to use the direct input method via standard sap program RMDATIND.

Former Member
0 Kudos

Use the following FM for that purpose :

MATERIAL_BTCI_SELECTION_NEW

In this FM, you will pass the material No and material type in the exporting parameter and in the 'SELECTION' parameter you will pass which view or views to select ( Ex: K, E, D, B, L, A). So it will select the specifies view autometically. You do not need to code (Record) for selecting the views in BDC.

EX:

report Z_82235_MM01

no standard page heading line-size 255.

data: gt_btci type BDCDATA occurs 0.

include bdcrecx1.

start-of-selection.

perform open_group.

perform bdc_dynpro using 'SAPLMGMM' '0060'.

*perform bdc_field using 'BDC_CURSOR'

  • 'RMMG1-MATNR'.

perform bdc_field using 'BDC_OKCODE'

'=AUSW'.

perform bdc_field using 'RMMG1-MATNR'

'AB106'.

perform bdc_field using 'RMMG1-MBRSH'

'M'.

perform bdc_field using 'RMMG1-MTART'

'VKHM'.

  • 'B' is passed to select the basic view in BDC

CALL FUNCTION 'MATERIAL_BTCI_SELECTION_NEW'

EXPORTING

material = 'AB106'

  • MATERIALART = 'ROH'

selection = 'B'

tcode = 'MM01'

  • IMPORTING

  • SELSTATUS =

  • SELSTATUS_IN =

tables

btci_d0070 = gt_btci

  • EXCEPTIONS

  • MATERIAL_NOT_FOUND = 1

  • MATERIAL_NUMBER_MISSING = 2

  • MATERIAL_TYPE_MISSING = 3

  • MATERIAL_TYPE_NOT_FOUND = 4

  • NO_ACTIVE_DYNPRO_SELECTED = 5

  • NO_AUTHORITY = 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.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

*perform bdc_field using 'BDC_CURSOR'

  • 'MSICHTAUSW-DYTXT(01)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(01)'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '3005'.

perform bdc_field using 'BDC_OKCODE'

'BU'.

perform bdc_field using 'SKTEXT-MAKTX(01)'

'test'.

*perform bdc_field using 'BDC_CURSOR'

  • 'MARA-MEINS'.

perform bdc_field using 'MARA-MEINS'

'C3S'.

perform bdc_field using 'MARA-MTPOS_MARA'

'NORM'.

perform bdc_transaction using 'MM01'.

perform close_group.

Reward if useful.

0 Kudos

thanks for your solution.

problem was resolved.

Regards,

Sridhar.

Former Member
0 Kudos

Hi,

for recording differrnt views . goto SHDB transaction and give the recording name and click on create. Now give the transaction MM01 for which you want to record the views. This will direct you to the 1st screen of MM01 and give a material and perform the recording. Save the recording. The recorded transaction would be available in SHDB and click on 'Get transaction'.Now the recording is available for getting into your BDC program. click on the recording name and click on generate program, give a program name and the skeleton of the recording would get copied into your program. Now the values of the different fields which would be hard-coded can be changed into internal table fields in your program.

This is how the BDC program through recording is written.

Reward points if helpful.

Thanks,

Archana

Former Member
0 Kudos

HI,

Check

Regards,

Kiran