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

Copy Material

Former Member
0 Likes
755

Hi all

Is there any 'Function Module' or 'Batch Input Program' to copy the material?

Like i want to Create new material by coping an existing material. How can i perform this task?

Thanks in advance.

Regards

Ravi

5 REPLIES 5
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
696

You can use BAPI_MATERIAL_SAVEDATA

Regards,

Rich Heilman

Read only

Former Member
0 Likes
696

Hi,

check the below link..

http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm

is this the one are you expecting or some thing else..

Regards

vijay

Read only

0 Likes
696

My Requirement is somthing else....

Say I have 999 material and they are starting from 200500001 to 200500999. Now i want 999 new materials with exect attributes that they are having in 2005.....the only change i.e. it should be 200600001 to 200600999.

e.g if there is an existing material code ie. 200500001 then i need 200600001 with the same attributes of 200500001.

Regards

Ravi

Read only

Former Member
0 Likes
696

How yor material numbers are generated ??

Manually or autoamticly ??

BR, Jacek

Read only

0 Likes
696

hi Ravi,

use <b>BAPI_MATERIAL_SAVEDATA</b>

i.e,

call function 'BAPI_MATERIAL_SAVEDATA'

exporting

HEADDATA = BAPI_HEAD

CLIENTDATA = BAPI_MARA1

CLIENTDATAX = BAPI_MARAX

PLANTDATA = BAPI_MARC1

PLANTDATAX = BAPI_MARCX

  • FORECASTPARAMETERS =

  • FORECASTPARAMETERSX =

  • PLANNINGDATA =

  • PLANNINGDATAX =

  • STORAGELOCATIONDATA =

  • STORAGELOCATIONDATAX =

VALUATIONDATA = BAPI_MBEW1

VALUATIONDATAX = BAPI_MBEWX

  • WAREHOUSENUMBERDATA =

  • WAREHOUSENUMBERDATAX =

  • SALESDATA = BAPI_MVKE1

  • SALESDATAX = BAPI_MVKEX

  • STORAGETYPEDATA =

  • STORAGETYPEDATAX =

IMPORTING

RETURN = BAPI_RETURN

TABLES

MATERIALDESCRIPTION = INT_MAKT

  • UNITSOFMEASURE =

  • UNITSOFMEASUREX =

  • INTERNATIONALARTNOS =

  • MATERIALLONGTEXT =

  • TAXCLASSIFICATIONS =

  • RETURNMESSAGES =

  • PRTDATA =

  • PRTDATAX =

  • EXTENSIONIN =

  • EXTENSIONINX =

.

IF BAPI_RETURN-TYPE = 'E'.

WRITE:/ 'Error Message ', BAPI_RETURN.

ENDIF.

Regards,

Santosh