cancel
Showing results for 
Search instead for 
Did you mean: 

BDC in MM & SD

Former Member
0 Kudos

Hello,

Could you please give some BDC programs for the above Transactions.

Apart from a)XD01(customer)

b)XK01(Vendor)

c)MM01(Material)

,in real time what are other transactions you will use for BDC mostly in MM,SD

With Best Regards,

Satya

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

check this is the bdc for mm sales view,

include bdcrecx1.

DATA : BEGIN OF ITAB OCCURS 0,

MATNR LIKE MARA-MATNR," Mterial No.

MAKTX LIKE MAKT-MAKTX," Material Description

VKORG LIKE MVKE-VKORG,"Sales Organ.

SPART LIKE MARA-SPART,"Division

VTWEG LIKE MVKE-VTWEG,"Distribution Ch

MTART LIKE MARA-MTART,"material type

WERKS(250),"Plant

MTVFP(460),"Checking Group for Availability Check

LADGR(460),"Loading grp

VBAMG(460),"Base qty

SERNP(460),"Serial Number Profile

VRVEZ(160),"Set up time

VBEAZ(160),"Proc. Time

MFRGR(160),"Material freight group

XCHPF(160),"Batch management requirement indicator

XMCNG(160),"Negative stocks allowed in plant

LOGGR(160),"Logistics handling group for workload calcn

FPRFM(160),"Distribution profile of material in plant

PRCTR(160),"Profit Center

EPRIO(160),"Stock determination group

STAWN(160),"Commodity Cd/Import Cd No for Foreign Trade

MTVER(160),"Export/import material group

CASNR(160),"CAS No for pharma. prod in foreign trade

GPNUM(160),"Prodocom No

HERKL(160),"Country of Origin

HERKR(160),"Religion of origin

PRENC(160),"Exemption certificate

PRENO(160),"Exemption certificate No

PREND(160),"Issue date of exemption certificate

ITARK(160),"Military goods

MOWNR(160)," CAP product list no

MOGRU(160)," CAP products group - Foreign trade

MEINS LIKE MARA-MEINS,"Base Unit of Meas.

MATKL LIKE MARA-MATKL,"Material group

VRKME LIKE MVKE-VRKME,"Sales Unit

VAVME LIKE MVKE-VAVME,"Variable Sales Unit Not Allowed

MEGRU LIKE MVKE-MEGRU,"Unit of Measure Group

MSTAV LIKE MARA-MSTAV,"Cross-distribution-chain material status

MSTDV(10) TYPE C,"Date from X-distr-chain mat. status is valid

VMSTA LIKE MVKE-VMSTA ,"Distribution-chain-specific material status

VMSTD(10) TYPE C,"Date from distr-chain-spec mat status is valid

DWERK LIKE MVKE-DWERK,"Delivering Plant (Own or External)

SKTOF LIKE MVKE-SKTOF,"Cash discount indicator

VERSG LIKE MVKE-VERSG,"Material statistics group

BONUS LIKE MVKE-BONUS,"Volume rebate group

PROVG LIKE MVKE-PROVG,"Commission group

PMATN LIKE MVKE-PMATN,"Pricing Reference Material

KONDM LIKE MVKE-KONDM,"Material Pricing Group

PRODH LIKE MVKE-PRODH,"Product hierarchy

KTGRM LIKE MVKE-KTGRM,"Account assignment group for this material

MTPOS LIKE MVKE-MTPOS,"Item category group from material master

MTPOS_MARA LIKE MARA-MTPOS_MARA,"General item category group

************************************************************

TATYP(25), "Tax catgry (sales tax, federal sales tax,)

TAXKM(15), "Tax classification

*************************************************************

AUMNG LIKE MVKE-AUMNG,"Minimum order quantity in base unit of measure

LFMNG LIKE MVKE-LFMNG,"Min delivery qty in delivery note processing

SCMNG LIKE MVKE-SCMNG,"Delivery unit

SCHME LIKE MVKE-SCHME,"Unit of measure of delivery unit

RDPRF LIKE MVKE-RDPRF,"Rounding Profile

MVGR1 LIKE MVKE-MVGR1,"Material group 1

MVGR2 LIKE MVKE-MVGR2,"Material group 2

MVGR3 LIKE MVKE-MVGR3,"Material group 3

MVGR4 LIKE MVKE-MVGR4,"Material group 4

MVGR5 LIKE MVKE-MVGR5,"Material group 5

PRAT1 LIKE MVKE-PRAT1,"ID for product attribute 1

PRAT2 LIKE MVKE-PRAT2,"ID for product attribute 2

PRAT3 LIKE MVKE-PRAT3,"ID for product attribute 3

PRAT4 LIKE MVKE-PRAT4,"ID for product attribute 4

PRAT5 LIKE MVKE-PRAT5,"ID for product attribute 5

PRAT6 LIKE MVKE-PRAT6,"ID for product attribute 6

PRAT7 LIKE MVKE-PRAT7,"ID for product attribute 7

PRAT8 LIKE MVKE-PRAT8,"ID for product attribute 8

PRAT9 LIKE MVKE-PRAT9,"ID for product attribute 8

PRATA LIKE MVKE-PRATA,"ID for product attribute 10

BRGEW LIKE MARA-BRGEW,"Gross Weight

GEWEI LIKE MARA-GEWEI,"Weight Unit

NRFHG LIKE MARA-NRFHG,"Material qualifies for discount in kind

NTGEW LIKE MARA-NTGEW,"Net Weight

XGCHP LIKE MARA-XGCHP,"Indicator: Approved batch record required

TRAGR LIKE MARA-TRAGR,"Transportation Group

MAGRV LIKE MARA-MAGRV,"Material Group: Packaging Materials

SPRAS LIKE MAKT-SPRAS," Langs maintained

END OF ITAB.

DATA : PFNAME1 TYPE STRING.

SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. "selection screen

PARAMETERS : PFNAME LIKE RLGRAP-FILENAME OBLIGATORY.

SELECTION-SCREEN : END OF BLOCK B1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR PFNAME.

PERFORM SEARCH USING PFNAME.

START-OF-SELECTION.

PERFORM UPLOAD_PROCESS USING PFNAME.

perform open_group.

PERFORM PROCESS.

perform close_group.

FORM SEARCH USING PFNAME.

CALL FUNCTION 'KD_GET_FILENAME_ON_F4'

EXPORTING

STATIC = 'X'

CHANGING

FILE_NAME = PFNAME.

ENDFORM.

FORM UPLOAD_PROCESS USING PFNAME.

PFNAME1 = PFNAME.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

FILENAME = PFNAME1

FILETYPE = 'DAT'

HAS_FIELD_SEPARATOR = ' '

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • DAT_MODE = ' '

  • CODEPAGE = ' '

  • IGNORE_CERR = ABAP_TRUE

  • REPLACEMENT = '#'

  • CHECK_BOM = ' '

  • VIRUS_SCAN_PROFILE =

  • NO_AUTH_CHECK = ' '

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

DATA_TAB = ITAB

  • EXCEPTIONS

  • FILE_OPEN_ERROR = 1

  • FILE_READ_ERROR = 2

  • NO_BATCH = 3

  • GUI_REFUSE_FILETRANSFER = 4

  • INVALID_TYPE = 5

  • NO_AUTHORITY = 6

  • UNKNOWN_ERROR = 7

  • BAD_DATA_FORMAT = 8

  • HEADER_NOT_ALLOWED = 9

  • SEPARATOR_NOT_ALLOWED = 10

  • HEADER_TOO_LONG = 11

  • UNKNOWN_DP_ERROR = 12

  • ACCESS_DENIED = 13

  • DP_OUT_OF_MEMORY = 14

  • DISK_FULL = 15

  • DP_TIMEOUT = 16

  • OTHERS = 17

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDFORM.

FORM PROCESS.

LOOP AT ITAB.

perform bdc_dynpro using 'SAPLMGMM' '0060'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MTART'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'RMMG1-MATNR'

ITAB-MATNR.

perform bdc_field using 'RMMG1-MBRSH'

'M'.

perform bdc_field using 'RMMG1-MTART'

ITAB-MTART.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

perform bdc_field using 'BDC_CURSOR'

'MSICHTAUSW-DYTXT(06)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(04)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(05)'

'X'.

perform bdc_field using 'MSICHTAUSW-KZSEL(06)'

'X'.

perform bdc_dynpro using 'SAPLMGMM' '0080'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-VTWEG'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'RMMG1-WERKS'

ITAB-WERKS.

perform bdc_field using 'RMMG1-VKORG'

ITAB-VKORG.

perform bdc_field using 'RMMG1-VTWEG'

ITAB-VTWEG.

perform bdc_dynpro using 'SAPLMGMM' '4000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'MAKT-MAKTX'

itab-maktx.

perform bdc_field using 'Mara-meins'

ITAB-meins.

perform bdc_field using 'Mara-spart'

ITAB-spart.

perform bdc_field using 'MVKE-VrkME'

ITAB-VrkME.

perform bdc_field using 'MVKE-megru'

ITAB-megru.

perform bdc_field using 'Mara-mstav'

ITAB-mstav.

*perform bdc_field using 'Mara-mstdv'

  • ITAB-mstdv.

*perform bdc_field using 'Mvke-vmstd'

  • ITAB-vmstd.

perform bdc_field using 'Mvke-vmsta'

ITAB-vmsta.

perform bdc_field using 'MVKE-VAVME'

ITAB-VAVME.

perform bdc_field using 'MVKE-dwerk'

ITAB-dwerk.

*****material group ****************

*perform bdc_field using 'MARA-MATKL'

  • itab-matkl.

*

perform bdc_field using 'MVKE-SKTOF'

ITAB-SKTOF.

perform bdc_field using 'BDC_CURSOR'

'MG03STEUER-TAXKM(01)'.

*perform bdc_dynpro using 'SAPLMGMM' '4000'.

*perform bdc_field using 'BDC_OKCODE'

  • '/00'.

**perform bdc_field using 'MAKT-MAKTX'

  • 'testing'.

*perform bdc_field using 'MVKE-SKTOF'

  • itab-sktof.

**********commented*********************

*perform bdc_field using 'BDC_CURSOR'

  • 'MG03STEUER-TAXKM(01)'.

perform bdc_field using 'MG03STEUER-TAXKM(01)'

itab-taxkm.

perform bdc_dynpro using 'SAPLMGMM' '4200'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

*perform bdc_field using 'MAKT-MAKTX'

  • 'testing'.

perform bdc_field using 'BDC_CURSOR'

'MG03STEUER-TAXKM(01)'.

perform bdc_dynpro using 'SAPLMGMM' '4000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

*perform bdc_field using 'MAKT-MAKTX'

  • 'testing'.

*perform bdc_field using 'MVKE-SKTOF'

  • 'X'.

*perform bdc_field using 'BDC_CURSOR'

  • 'MG03STEUER-TAXKM(01)'.

  • perform bdc_field using 'BDC_CURSOR'

  • 'MVKE-RDPRF'.

perform bdc_field using 'MVKE-AUMNG'

itab-aumng.

perform bdc_field using 'MVKE-LFMNG'

itab-lfmng.

perform bdc_field using 'MVKE-SCMNG'

itab-scmng.

perform bdc_field using 'MVKE-RDPRF'

itab-rdprf.

*if itab-mvgr1 ne ' '.

perform bdc_dynpro using 'SAPLMGMM' '4000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

*perform bdc_field using 'MAKT-MAKTX'

  • 'testing'.

perform bdc_field using 'MVKE-VERSG'

ITAB-VERSG.

perform bdc_field using 'MVKE-bonus'

ITAB-bonus.

perform bdc_field using 'MVKE-KTGRM'

ITAB-KTGRM.

perform bdc_field using 'MVKE-prodh'

ITAB-prodh.

perform bdc_field using 'MVKE-provg'

ITAB-provg.

****pricing ref material *******

perform bdc_field using 'MVKE-pmatn'

ITAB-pmatn.

perform bdc_field using 'MVKE-kondm'

ITAB-kondm.

perform bdc_field using 'Mara-mtpos_mara'

ITAB-mtpos_mara.

perform bdc_field using 'MVKE-MTPOS'

ITAB-MTPOS.

  • perform bdc_field using 'MVKE-Mvgr1'

  • '022'."ITAB-mvgr1.

perform bdc_field using 'MVKE-mvgr2'

ITAB-Mvgr2.

perform bdc_field using 'MVKE-Mvgr3'

ITAB-Mvgr3.

perform bdc_field using 'MVKE-Mvgr4'

ITAB-Mvgr4.

perform bdc_field using 'MVKE-Mvgr5'

ITAB-mvgr5.

perform bdc_field using 'BDC_CURSOR'

'MVKE-PRAT3'.

perform bdc_field using 'MVKE-PRAT1'

ITAB-PRAT1.

perform bdc_field using 'MVKE-PRAT2'

ITAB-PRAT2.

perform bdc_field using 'MVKE-PRAT3'

ITAB-PRAT3.

perform bdc_field using 'MVKE-PRAT4'

ITAB-PRAT4.

perform bdc_field using 'MVKE-PRAT5'

ITAB-PRAT5.

perform bdc_field using 'MVKE-PRAT6'

ITAB-PRAT6.

perform bdc_field using 'MVKE-PRAT7'

ITAB-PRAT7.

perform bdc_field using 'MVKE-PRAT8'

ITAB-PRAT8.

perform bdc_field using 'MVKE-PRAT9'

ITAB-PRAT9.

perform bdc_field using 'MVKE-PRATA'

ITAB-PRATA.

*endif.

perform bdc_dynpro using 'SAPLMGMM' '4000'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

*perform bdc_field using 'MAKT-MAKTX'

  • 'testing'.

perform bdc_field using 'MARA-GEWEI'

ITAB-GEWEI.

perform bdc_field using 'MARA-brgew'

ITAB-brgew.

perform bdc_field using 'MARA-ntgew'

ITAB-ntgew.

perform bdc_field using 'MARC-MTVFP'

ITAB-MTVFP.

perform bdc_field using 'MARA-XGCHP'

ITAB-XGCHP.

perform bdc_field using 'MARA-XCHPF'

ITAB-XCHPF.

perform bdc_field using 'MARA-TRAGR'

ITAB-TRAGR.

perform bdc_field using 'MARC-LADGR'

ITAB-LADGR.

perform bdc_field using 'MARC-vbamg'

ITAB-vbamg.

*perform bdc_field using 'MARA-KZGVH'

  • ITAB-KZGVH.

perform bdc_field using 'BDC_CURSOR'

'MARC-FPRFM'.

perform bdc_field using 'MARC-XMCNG'

ITAB-XMCNG.

perform bdc_field using 'MARC-PRCTR'

ITAB-PRCTR.

perform bdc_dynpro using 'SAPLSPO1' '0300'.

perform bdc_field using 'BDC_OKCODE'

'=YES'.

perform bdc_transaction using 'MM01'.

ENDLOOP.

regards

siva

former_member624107
Contributor
0 Kudos

hi u can use BAPI

1.mm01 -


> BAPI_RETAILMATERIAL_CREATE

2.xd01 -


> BAPI_CUSTOMER_CREATEFROMDATA1