Application Development and Automation 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: 
Read only

bdc UPLOAD

Former Member
0 Likes
426

hello all

can any body give me an sample bdc program for upload to material masters

3 REPLIES 3
Read only

Former Member
0 Likes
400

Hi vamsi,

If u want to call a transaction and goto a particular screen as soon as u call the transaction, u can record the flow in BDC.

That is u have to goto SHDB transaction for recording and then specify the transaction code then pass the values and once u reach the screen, press save button and press back.

Code will get automatically generated.

Then u can copy and paste the part of the code that is needed.

A sample code for calling MM03 transaction from an ALV. When u click on the MATNR of the ALV grid this will call transaction. U can perform this

Declare a messtab

DATA: i_bdcdata TYPE STANDARD TABLE OF bdcdata,

  • Internal table to hold BDC messages

i_messtab TYPE STANDARD TABLE OF bdcmsgcoll

  • Work area to hold bdcdata value

DATA: w_bdcdata TYPE bdcdata,

  • Work area to hold BDC messages

w_messtab TYPE bdcmsgcoll.

CONSTANTS : c_e type bdcmsgcoll-msgtyp value 'E', "E

c_a type bdcmsgcoll-msgtyp value 'A', "A

nodata type c value '/'. "/

perform f1000_bdc_mm03 using lv_matnr lv_werks.

FORM f1000_bdc_mm03 USING P_LV_MATNR

P_LV_WERKS.

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'

p_lv_matnr.

perform bdc_dynpro using 'SAPLMGMM' '0070'.

perform bdc_field using 'BDC_CURSOR'

'MSICHTAUSW-DYTXT(15)'.

perform bdc_field using 'BDC_OKCODE'

'=ENTR'.

perform bdc_field using 'MSICHTAUSW-KZSEL(15)'

'X'.

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'

p_lv_werks.

perform bdc_dynpro using 'SAPLMGMM' '4000'.

perform bdc_field using 'BDC_OKCODE'

'=ZU01'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MATNR'.

perform bdc_dynpro using 'SAPLMGMM' '4300'.

perform bdc_field using 'BDC_OKCODE'

'=ZU08'.

perform bdc_field using 'BDC_CURSOR'

'RMMG1-MATNR'.

perform bdc_dynpro using 'SAPLMGMM' '4110'.

perform bdc_field using 'BDC_OKCODE'

'=GESV'.

*perform bdc_field using 'BDC_CURSOR'

  • 'RMMG1-MATNR'.

call transaction 'MM03' using i_bdcdata MODE 'N'MESSAGES INTO i_messtab.

Read only

Former Member
0 Likes
400

Dear Vamshi,

Please refer to the following link.

http://www.sap-img.com/abap/upload-material-master-finish-goods.htm

It's a good example to start with.

Regards,

Abir

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

  • Don't forget to award points *