‎2006 Feb 10 6:35 PM
HI ,
Where can i get this bapi. Can any one provide me path.
Thanx
‎2006 Feb 10 6:38 PM
goto SE37. enter the BAPI name. For its application, u can see the Function Module Documentation at the top reight end.
Hope this is what u wanted to know.
Regards,
Bikash
‎2006 Feb 10 6:38 PM
goto SE37. enter the BAPI name. For its application, u can see the Function Module Documentation at the top reight end.
Hope this is what u wanted to know.
Regards,
Bikash
‎2006 Feb 10 6:40 PM
Here is a sample program which uses the BAPI.
report zrich_0003 .
data: headdata type bapimathead.
data: clientdata type bapi_mara.
data: clientdatax type bapi_marax.
data: return type bapiret2 .
data: returnm type table of bapi_matreturn2 with header line.
data: xmara type mara.
parameters: p_matnr type mara-matnr.
select single * from mara into xmara
where matnr = p_matnr.
headdata-material = xmara-matnr.
headdata-ind_sector = xmara-mbrsh.
headdata-matl_type = xmara-mtart.
headdata-basic_view = 'X'.
clientdata-old_mat_no = 'THE TEXT'.
clientdatax-old_mat_no = 'X'.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
* PLANTDATA =
* PLANTDATAX =
* FORECASTPARAMETERS =
* FORECASTPARAMETERSX =
* PLANNINGDATA =
* PLANNINGDATAX =
* STORAGELOCATIONDATA =
* STORAGELOCATIONDATAX =
* VALUATIONDATA =
* VALUATIONDATAX =
* WAREHOUSENUMBERDATA =
* WAREHOUSENUMBERDATAX =
* SALESDATA =
* SALESDATAX =
* STORAGETYPEDATA =
* STORAGETYPEDATAX =
importing
return = return
tables
* MATERIALDESCRIPTION =
* UNITSOFMEASURE =
* UNITSOFMEASUREX =
* INTERNATIONALARTNOS =
* MATERIALLONGTEXT =
* TAXCLASSIFICATIONS =
returnmessages = returnm
* PRTDATA =
* PRTDATAX =
* EXTENSIONIN =
* EXTENSIONINX =
.
check sy-subrc = 0.
Regards,
Rich Heilman
‎2006 Feb 10 7:00 PM
Hi Rich Heilman ,
can you give me some explanation regarding this example.Thanx
‎2006 Feb 10 7:06 PM
Sure......
This program accepts a material number from the user, and updates the "Old Material Number" field in basis data 1 view of the material master.
Here we are getting the material number from the user and hitting MARA to pick up data which will be needed in the next step.
parameters: p_matnr type mara-matnr.
select single * from mara into xmara
where matnr = p_matnr.
Here will are filling the Header structure. The BAPI needs this in order to access the material. Notice that we have mark the headdata-basic_view field. This means that we want to update something on the basic_view.
headdata-material = xmara-matnr.
headdata-ind_sector = xmara-mbrsh.
headdata-matl_type = xmara-mtart.
headdata-basic_view = 'X'.This next part is where we are actually updating the field on the view. Notice here that we give the value to the "clientdata" structure, we must also mark that field in the "clientddatax" structure with an "X". This tells the BAPI to update that field.
clientdata-old_mat_no = 'THE TEXT'.
clientdatax-old_mat_no = 'X'.Now just call the BAPI.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
headdata = headdata
clientdata = clientdata
clientdatax = clientdatax
* PLANTDATA =
* PLANTDATAX =
* FORECASTPARAMETERS =
* FORECASTPARAMETERSX =
* PLANNINGDATA =
* PLANNINGDATAX =
* STORAGELOCATIONDATA =
* STORAGELOCATIONDATAX =
* VALUATIONDATA =
* VALUATIONDATAX =
* WAREHOUSENUMBERDATA =
* WAREHOUSENUMBERDATAX =
* SALESDATA =
* SALESDATAX =
* STORAGETYPEDATA =
* STORAGETYPEDATAX =
importing
return = return
tables
* MATERIALDESCRIPTION =
* UNITSOFMEASURE =
* UNITSOFMEASUREX =
* INTERNATIONALARTNOS =
* MATERIALLONGTEXT =
* TAXCLASSIFICATIONS =
returnmessages = returnm
* PRTDATA =
* PRTDATAX =
* EXTENSIONIN =
* EXTENSIONINX =
.Regards,
Rich Heilman
‎2006 Feb 10 7:57 PM
‎2006 Feb 10 7:58 PM
‎2006 Feb 10 6:42 PM
Hi Priya,
Go to SE37 and enter the name or
Go to BAPI (TCODE) and browse by hierarchical or alphabetical order.
Regards,
Ferry Lianto