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 Messages

Former Member
0 Likes
1,154

Hi Friends,

I wrote a BDC program for tcode MM01.The BDC works well when i create a new material. But when I extend the material which is already present, it displays a message 'Material already exists and will be extended'

and the BDC stop proceeding.. Any one Pls Help me how to continue the BDC after that Message or how to skip the message... that displays...

With Regards

Feirthouse K.A

13 REPLIES 13
Read only

Former Member
0 Likes
1,076

Hi,

may be you can do a select statement and check if the part already exists in the system and then of it exists then you can record the flow which the system takes while extending the part.

Hope this helps

Cheers

VJ

Read only

former_member186741
Active Contributor
0 Likes
1,076

either you need to vary the flow slightly if the material exists or possibly you should be using another transaction to modify existing materials. MM02?

Read only

0 Likes
1,076

as VJ was suggesting, do a recording of MM01 for an existing material and then use the code it generates in your abap. Your code can have two slightly diferent appraoches depending on whether or not the material exists.

Read only

Former Member
0 Likes
1,076

Hi,

No I need to use MM01..only...i will get my basic data

from external system..Other views we have upload.

Read only

0 Likes
1,076

Did you try using BAPI_MATERIAL_SAVE_DATA, probably that message won't popup there.

Regards,

Ravi

Note : Please mark the helpful answers

Read only

0 Likes
1,076

Hi fierthouse,

1. No I need to use MM01..only

How can that be possible.

2. MM01 is ONLY FOR CREATING NEW Material Numbers.

3. MM02 is for editing material numbers.

4. If the data/material number u are uploading,

already exits,

then we cannot use MM01.

5. We have to use some other thing like MM02, for bdc.

regards,

amit m.

Read only

0 Likes
1,076

yes, it obviously gives that message if the material already exists.

so u need to use MM02 Tto check the xsisting material.

u can use many bdc inserts between bdc open and close group.

so first u call tcode mm02 with bdc_insert and check if material already exists,

if not then only call bdc_insert for mm01.

Read only

0 Likes
1,076

Hi,

i have created only basic view only.. so if i have to create other views i have to go by MM01 tcode only..

If I have change any thing i have entered in basic view only i have to use MM02..

My requirement is to use MM01 only

Read only

Former Member
0 Likes
1,076

Hi !

Possibly the BDC stops becaus of an COMMIT / ROLLBACK within the MM01.

You can try the following:

Use a

CALL TRANSACTION 'MM01' USING bdc_tab OPTIONS FROM bdc_opt.

where bdc_opt is defined as

DATA: bdc_opt TYPE ctu_params.

and the following settings:

bdc_opt-racommit = ' '. "No end on COMMIT

bdc_opt-dismode = 'N'.

bdc_opt-updmode = 'S'.

that may help.

Regards

Rainer

Some points would be fine in that helped you...

Read only

Former Member
0 Likes
1,076

Hi,

Are you using call transaction

CALL TRANSACTION MM01

USING lit_bdc_data

MODE A/E/N

UPDATE S/A/L

MESSAGES INTO lit_message

If yes, what is the mode you are using?

Make it E. and the BDC should work.

Give points if the solution works

Read only

0 Likes
1,076

Hi Reema,

I tried it in 'e' mode and 'n' mode also still it's not working..

Read only

0 Likes
1,076

Hi

Didi you try this:

Use a

CALL TRANSACTION 'MM01' USING bdc_tab OPTIONS FROM bdc_opt.

where bdc_opt is defined as

DATA: bdc_opt TYPE ctu_params.

and the following settings:

bdc_opt-racommit = ' '. "No end on COMMIT

bdc_opt-dismode = 'N'.

bdc_opt-updmode = 'S'.

that may help.

Regards

Rainer

Some points would be fine in that helped you...

Read only

Former Member
0 Likes
1,076

hi feirthouse

u will get that message if that material already exists in that plant so when u get that particular screen what all other material exists for that plant taking f4 help and take which material does not have 'X' and extend that material

regards

venkat