04-26-2006 3:21 AM
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
04-26-2006 3:28 AM
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
04-26-2006 3:33 AM
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?
04-26-2006 4:07 AM
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.
04-26-2006 3:43 AM
Hi,
No I need to use MM01..only...i will get my basic data
from external system..Other views we have upload.
04-26-2006 3:54 AM
Did you try using BAPI_MATERIAL_SAVE_DATA, probably that message won't popup there.
Regards,
Ravi
Note : Please mark the helpful answers
04-26-2006 6:33 AM
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.
04-26-2006 6:39 AM
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.
04-26-2006 9:00 AM
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
04-26-2006 6:44 AM
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...
04-26-2006 10:55 AM
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
04-26-2006 11:41 AM
Hi Reema,
I tried it in 'e' mode and 'n' mode also still it's not working..
04-26-2006 12:46 PM
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...
04-26-2006 1:08 PM
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