2008 Nov 08 9:25 AM
Hello Experts,
i m using BAPI_MATERIALSAVEDATA for MM02 T.code.
After execution of BAPI,it displays the default message that the material 30006578 has been created or extended.
I want to change this default message produced by BAPI_MATERIAL_SAVEDATA.
Can anybody help regarding this.
Ravi
2008 Nov 10 5:42 AM
hi,
do like this but was not sure whether we can change it.
LOOP AT it_return INTO wa_return WHERE type EQ 'E'.
v_error_desc = wa_return-message.
over lay v_error_desc with u r own message and
now display u r message.
ENDLOOP.
Hello Experts,
i m using BAPI_MATERIALSAVEDATA for MM02 T.code.
After execution of BAPI,it displays the default message that the material 30006578 has been created or extended.
I want to change this default message produced by BAPI_MATERIAL_SAVEDATA.
Can anybody help regarding this.
Ravi
2008 Nov 10 4:29 AM
Hello,
It means you want to dispaly that message in the output ie In the Report.
We cannot change the standard message but 1 thing is that we can BAPI_MATERIAL_SAVEDATA is copied to Z or YBAPI_MATERIAL_SAVEDATA and check message from where it is generating then in that place comment the standard message write your own message.
2008 Nov 10 4:53 AM
2008 Nov 10 5:06 AM
Hi
If you want to customise the standard BAPI you need to copy it to ZBapi and change the message accordingly.
2008 Nov 10 5:42 AM
hi,
do like this but was not sure whether we can change it.
LOOP AT it_return INTO wa_return WHERE type EQ 'E'.
v_error_desc = wa_return-message.
over lay v_error_desc with u r own message and
now display u r message.
ENDLOOP.
2008 Nov 10 10:05 AM
what is the problem exactly, you can put anything in the write statement you want. your are not forced to use tha bapi message ??
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = h_headdata
clientdata = h_bapi_mara
clientdatax = h_bapi_marax
plantdata = h_bapi_marc
plantdatax = h_bapi_marcx
* FORECASTPARAMETERS =
* FORECASTPARAMETERSX =
* PLANNINGDATA =
* PLANNINGDATAX =
storagelocationdata = h_bapi_mard
storagelocationdatax = h_bapi_mardx
valuationdata = h_bapi_mbew
valuationdatax = h_bapi_mbewx
* WAREHOUSENUMBERDATA =
* WAREHOUSENUMBERDATAX =
salesdata = h_bapi_mvke
salesdatax = h_bapi_mvkx
* STORAGETYPEDATA =
* STORAGETYPEDATAX =
* FLAG_ONLINE = ' '
* FLAG_CAD_CALL = ' '
* NO_DEQUEUE = ' '
IMPORTING
return = wa_return
TABLES
materialdescription = ta_bapi_makt
* UNITSOFMEASURE =
* UNITSOFMEASUREX =
* INTERNATIONALARTNOS =
* MATERIALLONGTEXT =
taxclassifications = ta_bapi_mlan
* RETURNMESSAGES =
* PRTDATA =
* PRTDATAX =
* EXTENSIONIN =
* EXTENSIONINX =
.
WRITE wa_return-message.
this is my code, here I use the bapi message but you can also write
concatenate 'hello this material' h_headdata-material 'is now created with my own message' into youremessage seperated by space.
write youremessage.
kind regards
arthur de smidt
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |