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: 

bdc -mm01

Former Member
0 Kudos

i recorded the transaction in SHDB while recording i have selected the views - basic data ,MRP1, MRP2,accounting.

when i process the recording the views which i have recorded are not selected if i select the views manually i data not appeared on the further screens.

can any one tell how to record these view?

6 REPLIES 6

Former Member
0 Kudos

On the Pop-up where you have selected the view's, you will see a push button "default Values". Before BDC recording, go to MM01 and select the views and save them as default values.

So next time onwards it will automatically select only those views.

Hope it helps,

amit

former_member189629
Active Contributor
0 Kudos

HI Praveen,

I think it is the case of authorizatins. Try recording using the MM Functional User Id. If thats not the case, since you will anyways have the fields that are to be populated, check in the recording screen if all those fields have been covered.

Also check the data file which you are uploading for data consistency and structure. Check for mandatory fields in the data file (ASCII/DAT/XLS).

If none of the above works, redo the recording, make sure you populate all required fields and note them down for your reference.

If you find this answer useful, please reward me for the same.

Good luck

Karthik Potharaju

Former Member
0 Kudos

Hi Praveen,

I think you should use BAPI_MATERIAL_SAVEDATA instead of using BDC to create material..

Regds,

Akshay Bhagwat

Former Member
0 Kudos

U should pass the

CheckBox(1) = 'X'

CheckBox(2) = 'X'

CheckBox(3) = 'X'

CheckBox(4) = 'X' and so on.

These values should be maintained in ur flat file.

Hope this will be useful for u.

Dön't forget to reward points.

Regards,

Vasanth

former_member188685
Active Contributor
0 Kudos

Hi,

It is Basically Table control.

when you record , you have to Record page down also.

say in first page you have choosen 1,2,10 th view.

MSICHTAUSW-KZSEL(01)

MSICHTAUSW-KZSEL(02)

MSICHTAUSW-KZSEL(10)

Now use page down okcode

now next page comes now table control records start with one,two,....

MSICHTAUSW-KZSEL(01)

MSICHTAUSW-KZSEL(05)

this way should record. But you should record Page DOWN

ok code for page down is <b>=P+</b>

Regards

vijay

former_member188685
Active Contributor
0 Kudos

Hi,

Check the sample recording program code.

report ZTEST_BDC_MAT
       no standard page heading line-size 255.

include bdcrecx1.

parameters: dataset(132) lower case.
***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
*
*   If it is nessesary to change the data section use the rules:
*   1.) Each definition of a field exists of two lines
*   2.) The first line shows exactly the comment
*       '* data element: ' followed with the data element
*       which describes the field.
*       If you don't have a data element use the
*       comment without a data element name
*   3.) The second line shows the fieldname of the
*       structure, the fieldname must consist of
*       a fieldname and optional the character '_' and
*       three numbers and the field length in brackets
*   4.) Each field must be type C.
*
*** Generated data section with specific formatting - DO NOT CHANGE  ***
data: begin of record,
* data element: MBRSH
        MBRSH_001(001),
* data element: MTART
        MTART_002(004),
* data element: XFELD
        KZSEL_01_003(001),
* data element: XFELD
        KZSEL_02_004(001),
* data element: XFELD
        KZSEL_01_005(001),
* data element: WERKS_D
        WERKS_006(004),
* data element: MAKTX
        MAKTX_007(040),
* data element: MEINS
        MEINS_008(003),
* data element: MATKL
        MATKL_009(009),
* data element: BISMT
        BISMT_010(018),
* data element: EXTWG
        EXTWG_011(018),
      end of record.

*** End generated data section ***

start-of-selection.

perform open_dataset using dataset.
perform open_group.

do.

read dataset dataset into record.
if sy-subrc <> 0. exit. endif.

perform bdc_dynpro      using 'SAPLMGMM' '0060'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-MATNR'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'RMMG1-MBRSH'
                              record-MBRSH_001.
perform bdc_field       using 'RMMG1-MTART'
                              record-MTART_002.
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(02)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=P+'.
<b>perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                              record-KZSEL_01_003.
perform bdc_field       using 'MSICHTAUSW-KZSEL(02)'</b>
                              record-KZSEL_02_004.
perform bdc_dynpro      using 'SAPLMGMM' '0070'.
perform bdc_field       using 'BDC_CURSOR'
                              'MSICHTAUSW-DYTXT(01)'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
<b>perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'</b>
                              record-KZSEL_01_005.
perform bdc_dynpro      using 'SAPLMGMM' '0080'.
perform bdc_field       using 'BDC_CURSOR'
                              'RMMG1-WERKS'.
perform bdc_field       using 'BDC_OKCODE'
                              '=ENTR'.
perform bdc_field       using 'RMMG1-WERKS'
                              record-WERKS_006.
perform bdc_dynpro      using 'SAPLMGMM' '4004'.
perform bdc_field       using 'BDC_OKCODE'
                              '=BU'.
perform bdc_field       using 'MAKT-MAKTX'
                              record-MAKTX_007.
perform bdc_field       using 'BDC_CURSOR'
                              'MARA-EXTWG'.
perform bdc_field       using 'MARA-MEINS'
                              record-MEINS_008.
perform bdc_field       using 'MARA-MATKL'
                              record-MATKL_009.
perform bdc_field       using 'MARA-BISMT'
                              record-BISMT_010.
perform bdc_field       using 'MARA-EXTWG'
                              record-EXTWG_011.
perform bdc_transaction using 'MM01'.

enddo.

perform close_group.
perform close_dataset using dataset.

Regards

vijay