Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

BDC

hi all.

i done a recording in shdb on transaction mm02.. the code of bdc recording is as follows

report YASEC_BDC

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: MATNR

MATNR_001(018),

  • data element: XFELD

KZSEL_01_002(001),

  • data element: MAKTX

MAKTX_003(040),

  • data element: MEINS

MEINS_004(003),

  • data element: MATKL

MATKL_005(009),

  • data element: BISMT

BISMT_006(018),

  • data element: SPART

SPART_007(002),

  • data element: PRODH_D

PRDHA_008(018),

  • data element: MTPOS_MARA

MTPOS_MARA_009(004),

  • data element: BRGEW

BRGEW_010(017),

  • data element: GEWEI

GEWEI_011(003),

  • data element: NTGEW

NTGEW_012(017),

  • data element: MAGRV

MAGRV_013(004),

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'

'/00'.

perform bdc_field using 'RMMG1-MATNR'

record-MATNR_001.

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)'

record-KZSEL_01_002.

perform bdc_dynpro using 'SAPLMGMM' '4004'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'MAKT-MAKTX'

record-MAKTX_003.

perform bdc_field using 'BDC_CURSOR'

'MARA-BISMT'.

perform bdc_field using 'MARA-MEINS'

record-MEINS_004.

perform bdc_field using 'MARA-MATKL'

record-MATKL_005.

perform bdc_field using 'MARA-BISMT'

record-BISMT_006.

perform bdc_field using 'MARA-SPART'

record-SPART_007.

perform bdc_field using 'MARA-PRDHA'

record-PRDHA_008.

perform bdc_field using 'MARA-MTPOS_MARA'

record-MTPOS_MARA_009.

perform bdc_field using 'MARA-BRGEW'

record-BRGEW_010.

perform bdc_field using 'MARA-GEWEI'

record-GEWEI_011.

perform bdc_field using 'MARA-NTGEW'

record-NTGEW_012.

perform bdc_field using 'MARA-MAGRV'

record-MAGRV_013.

perform bdc_dynpro using 'SAPLSPO1' '0300'.

perform bdc_field using 'BDC_OKCODE'

'=YES'.

perform bdc_transaction using 'MM02'.

enddo.

perform close_group.

perform close_dataset using dataset.

now how to write a program in se38 and include this recording in my program..

please help me

regards

nikesh kumar

Tags:
Not what you were looking for? View more on this topic or Ask a question