‎2014 Apr 07 8:07 AM
Is it possible to get warning message in the FM BAPI_MATERIAL_SAVEDATA. If so please explain it.
M trying to upload some materials but except warning am getting suceess messages. what shud b done to get warning message????
‎2014 Apr 07 8:20 AM
Hi Souparnika,
Check in this table where the BAPI returns all messages: RETURNMESSAGES[]
The table is there in "TABLES" Parameter of BAPI.
br
Maju
‎2014 Apr 07 9:36 AM
Hi Maju,
In that table i.e RETURNMESSAGES[] i am getting only the below showed messages.
MK 102 Trying to create: 6694 ____ ____ ____ __________ ____ __ ___ ___
MG 160 The material cannot be maintained since no maintainable data transferred
MK 103 Trying to change: 6694 ____ ____ ____ __________ ____ __ ___ ___
M3 810 No changes made
This is of type 'H' and 'E'. But my warning message is not showing in that.
Regards,
Souparnika
‎2014 Apr 07 9:44 AM
Hi,
Few questions to understand your requirement.
Did u try creating the material in foreground mode? Was that warning message appearing?
Are you passing the relevant information to BAPI so that warning message is triggered?
If above questions didn't help, Let us know in detail like what you are trying to achieve.
Br,
Maju
‎2014 Apr 07 9:51 AM
Hi,
Ya have created a material in foreground and in excel am giving same values while uploading. What i should pass to BAPI now to get a warning message??
Regards,
Souparnika
‎2014 Apr 07 10:31 AM
Hi,
which warning message are you expecting from BAPI?..
Regards,
Maju
‎2014 Apr 07 10:47 AM
while uploading material if the Planned Delivery time is 'NULL' or the purchasing value key is '3' it ll through u a warning message. I want this message to be captured.
Regards,
souparnika
‎2014 Apr 07 11:13 AM
If its a standard warning message, it should be captured in BAPI return table(RETURNMESSAGES[]). That's what my understanding is.
Are u passing purchasing value key to BAPI ?:
for example:-
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
BAPI_MARA-BAPI_MARA = '03'.
‎2014 Apr 07 11:20 AM
ya am passing it. Below is the code how FM is actually called.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = WA_BAPI-BAPIMATHEAD
CLIENTDATA = WA_BAPI-BAPI_MARA
CLIENTDATAX = WA_BAPI-BAPI_MARAX
PLANTDATA = WA_BAPI-BAPI_MARC
PLANTDATAX = WA_BAPI-BAPI_MARCX
* FORECASTPARAMETERS = WA_BAPI-BAPI_MPOP
* FORECASTPARAMETERSX = WA_BAPI-BAPI_MPOPX
* PLANNINGDATA = WA_BAPI-BAPI_MPGD
* PLANNINGDATAX = WA_BAPI-BAPI_MPGDX
* STORAGELOCATIONDATA = WA_BAPI-BAPI_MARD
* STORAGELOCATIONDATAX = WA_BAPI-BAPI_MARDX
VALUATIONDATA = WA_BAPI-BAPI_MBEW
VALUATIONDATAX = WA_BAPI-BAPI_MBEWX
* WAREHOUSENUMBERDATA = WA_BAPI-BAPI_MLGN
* WAREHOUSENUMBERDATAX = WA_BAPI-BAPI_MLGNX
* SALESDATA = WA_BAPI-BAPI_MVKE
* SALESDATAX = WA_BAPI-BAPI_MVKEX
* STORAGETYPEDATA = WA_BAPI-BAPI_MLGT
* STORAGETYPEDATAX = WA_BAPI-BAPI_MLGTX
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
NO_DEQUEUE = ' '
NO_ROLLBACK_WORK = ' '
IMPORTING
RETURN = T_RETURN
TABLES
MATERIALDESCRIPTION = T_MATERIALDESC
UNITSOFMEASURE = T_UOM
UNITSOFMEASUREX = T_UOMX
INTERNATIONALARTNOS = T_MEAN
MATERIALLONGTEXT = T_MLTX
TAXCLASSIFICATIONS = T_MLAN
RETURNMESSAGES = returnmessages.
.
here in BAPI_MARA i have this purchasing value key value and in the structure BAPI_MARC i have Planned Delivery time value. Is this correct??