0% found this document useful (0 votes)
59 views

MM01

The document contains instructions for generating and formatting a data section for a report. It specifies the structure of the data section, including that each field definition consists of two lines, with the first line containing a comment with the data element name and the second line containing the field name, data type, and length. It then generates a sample data section with 21 fields following this structure and formatting. The document further includes steps to perform actions on the generated data using BDC functionality in SAP.

Uploaded by

sandeep_48
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

MM01

The document contains instructions for generating and formatting a data section for a report. It specifies the structure of the data section, including that each field definition consists of two lines, with the first line containing a comment with the data element name and the second line containing the field name, data type, and length. It then generates a sample data section with 21 fields following this structure and formatting. The document further includes steps to perform actions on the generated data using BDC functionality in SAP.

Uploaded by

sandeep_48
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

report ZREC_MM1_PRG 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: MBRSH MBRSH_002(001), * data element: MTART MTART_003(004), * data element: XFELD KZSEL_01_004(001), * data element: XFELD KZSEL_02_005(001), * data element: MATNR MATNR_006(018), * data element: MBRSH MBRSH_007(001), * data element: MTART MTART_008(004), * data element: XFELD KZSEL_01_009(001), * data element: XFELD KZSEL_02_010(001), * data element: MATNR MATNR_011(018), * data element: MBRSH MBRSH_012(001), * data element: MTART MTART_013(004), * data element: XFELD KZSEL_01_014(001), * data element: XFELD KZSEL_02_015(001), * data element: MAKTX MAKTX_016(040), * data element: MEINS MEINS_017(003), * data element: BRGEW BRGEW_018(017), * data element: GEWEI

GEWEI_019(003), * data element: NTGEW NTGEW_020(017), * data element: MAKTX MAKTX_021(040), 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 perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro perform bdc_field perform bdc_field perform bdc_field perform bdc_field perform bdc_dynpro using 'SAPLMGMM' '0060'. using 'BDC_CURSOR' 'RMMG1-MTART'. using 'BDC_OKCODE' '/00'. using 'RMMG1-MATNR' record-MATNR_001. using 'RMMG1-MBRSH' record-MBRSH_002. using 'RMMG1-MTART' record-MTART_003. using 'SAPLMGMM' '0070'. using 'BDC_CURSOR' 'MSICHTAUSW-DYTXT(02)'. using 'BDC_OKCODE' '=ENTR'. using 'MSICHTAUSW-KZSEL(01)' record-KZSEL_01_004. using 'MSICHTAUSW-KZSEL(02)' record-KZSEL_02_005. using 'SAPLMGMM' '0060'. using 'BDC_CURSOR' 'RMMG1-MATNR'. using 'BDC_OKCODE' '/00'. using 'RMMG1-MATNR' record-MATNR_006. using 'RMMG1-MBRSH' record-MBRSH_007. using 'RMMG1-MTART' record-MTART_008. using 'SAPLMGMM' '0070'. using 'BDC_CURSOR' 'MSICHTAUSW-DYTXT(02)'. using 'BDC_OKCODE' '=ENTR'. using 'MSICHTAUSW-KZSEL(01)' record-KZSEL_01_009. using 'MSICHTAUSW-KZSEL(02)' record-KZSEL_02_010. using 'SAPLMGMM' '0060'.

perform bdc_field perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform perform enddo.

using 'BDC_CURSOR' 'RMMG1-MATNR'. bdc_field using 'BDC_OKCODE' '/00'. bdc_field using 'RMMG1-MATNR' record-MATNR_011. bdc_field using 'RMMG1-MBRSH' record-MBRSH_012. bdc_field using 'RMMG1-MTART' record-MTART_013. bdc_dynpro using 'SAPLMGMM' '0070'. bdc_field using 'BDC_CURSOR' 'MSICHTAUSW-DYTXT(02)'. bdc_field using 'BDC_OKCODE' '=ENTR'. bdc_field using 'MSICHTAUSW-KZSEL(01)' record-KZSEL_01_014. bdc_field using 'MSICHTAUSW-KZSEL(02)' record-KZSEL_02_015. bdc_dynpro using 'SAPLMGMM' '4004'. bdc_field using 'BDC_OKCODE' '/00'. bdc_field using 'MAKT-MAKTX' record-MAKTX_016. bdc_field using 'MARA-MEINS' record-MEINS_017. bdc_field using 'BDC_CURSOR' 'MARA-GEWEI'. bdc_field using 'MARA-BRGEW' record-BRGEW_018. bdc_field using 'MARA-GEWEI' record-GEWEI_019. bdc_field using 'MARA-NTGEW' record-NTGEW_020. bdc_dynpro using 'SAPLMGMM' '4004'. bdc_field using 'BDC_OKCODE' '/00'. bdc_field using 'BDC_CURSOR' 'MAKT-MAKTX'. bdc_field using 'MAKT-MAKTX' record-MAKTX_021. bdc_dynpro using 'SAPLSPO1' '0300'. bdc_field using 'BDC_OKCODE' '=YES'. bdc_transaction using 'MM01'.

perform close_group. perform close_dataset using dataset.

You might also like