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

help with Bapi

Former Member
0 Likes
895

Hi,

can anyone help me with me with BAPI_MATERIAL_SAVEDATA

for changing the values in MRP1 view I.E IN tcode MM02

Thanks

1 ACCEPTED SOLUTION
Read only

ferry_lianto
Active Contributor
0 Likes
866

Hi,

To update maximum stock level, you need to populate field MAX_STOCK in parameter PLANTDATA and PLANTDATAX.


DATA: BAPI_MARC1  LIKE BAPI_MARC,    
      BAPI_MARCX  LIKE BAPI_MARCX.

...

BAPI_MARC1-MAX_STOCK  = <your value>.
BAPI_MARCX-MAX_STOCK  = 'X'.

...

Regards,

Ferry Lianto

9 REPLIES 9
Read only

Former Member
0 Likes
866

Hi,

Go through the following link:

http://www.sapbrain.com

Regards,

Bhaskar

Read only

0 Likes
866

Hi all,

I have looked a quite a few examples , but i couldn't find onw to change MRP1 view.

for the header data i have selected headdata-MRP_VIEW = 'X'. -- but iam not sure whether this is for MRP1 or MRP2 VIEW.

CAN ANYONE TELL ME THE STRUCTURE FOR PASSING NEW MRP1 VIEW VALUES LIKE MAX STOCK LEVEL ETC

Thanks

Read only

ferry_lianto
Active Contributor
0 Likes
866

Hi,

Please check this link perhaps it may help.

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

Regards,

Ferry Lianto

Read only

ferry_lianto
Active Contributor
0 Likes
867

Hi,

To update maximum stock level, you need to populate field MAX_STOCK in parameter PLANTDATA and PLANTDATAX.


DATA: BAPI_MARC1  LIKE BAPI_MARC,    
      BAPI_MARCX  LIKE BAPI_MARCX.

...

BAPI_MARC1-MAX_STOCK  = <your value>.
BAPI_MARCX-MAX_STOCK  = 'X'.

...

Regards,

Ferry Lianto

Read only

0 Likes
866

Hi Ferry ,

I want to do it for only one plant .

Then where should i pass the plant.

I don't want to do it for all the plants

Thanks

Read only

ferry_lianto
Active Contributor
0 Likes
866

Hi,

Please try this.


DATA: BAPI_MARC1  LIKE BAPI_MARC,    
      BAPI_MARCX  LIKE BAPI_MARCX.
 
...

BAPI_MARC1-PLANT = <your plant> 
BAPI_MARC1-MAX_STOCK  = <your value>.
BAPI_MARCX-PLANT = 'X'.
BAPI_MARCX-MAX_STOCK  = 'X'.
 
...

Regards,

Ferry Lianto

Read only

0 Likes
866

Hi Ferry,

DATA: BAPI_MARC1 LIKE BAPI_MARC,

BAPI_MARCX LIKE BAPI_MARCX.

...

BAPI_MARC1-PLANT = <your plant>

BAPI_MARC1-MAX_STOCK = <your value>.

BAPI_MARCX-PLANT = <your plant> .----


This is how it should be right.

BAPI_MARCX-MAX_STOCK = 'X'.

I got it working.

I have one more question

CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'

EXPORTING

headdata = headdata

  • CLIENTDATA =

  • CLIENTDATAX =

PLANTDATA = BAPI_MARC1

PLANTDATAX = BAPI_MARCX

  • FORECASTPARAMETERS =

  • FORECASTPARAMETERSX =

  • PLANNINGDATA =

  • PLANNINGDATAX =

  • STORAGELOCATIONDATA =

  • STORAGELOCATIONDATAX =

  • VALUATIONDATA =

  • VALUATIONDATAX =

  • WAREHOUSENUMBERDATA =

  • WAREHOUSENUMBERDATAX =

  • SALESDATA =

  • SALESDATAX =

  • STORAGETYPEDATA =

  • STORAGETYPEDATAX =

IMPORTING

RETURN = return -


WHAT DOES THIS REURn

TABLES

  • MATERIALDESCRIPTION =

  • UNITSOFMEASURE =

  • UNITSOFMEASUREX =

  • INTERNATIONALARTNOS =

  • MATERIALLONGTEXT =

  • TAXCLASSIFICATIONS =

RETURNMESSAGES = returnm-- what does this return

  • PRTDATA =

  • PRTDATAX =

  • EXTENSIONIN =

  • EXTENSIONINX =

.

CAN YOU TELL ME WHAT DOES THE ABOVE MENTIONED THING RETURN

THANKS

Read only

ferry_lianto
Active Contributor
0 Likes
866

Hi,

You really make me hard to earn points

IMPORTING

RETURN = return -


WHAT DOES THIS RETURN

This parameter is used to store the last message processed.

TABLES

RETURNMESSAGES = returnm -- WHAT DOES THIS RETURNM

This table is used to store all messages processed including the last one.

Again, hope this will help.

Regards,

Ferry Lianto

Read only

0 Likes
866

Hi Ferry,

I wish i could assign u you more points.

Anyhow thanks . I have assigned you the max points anyone could

Thanks again