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

Regarding 'BAPI_MATERIAL_SAVEDATA'

Former Member
0 Likes
1,415

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????

8 REPLIES 8
Read only

Former Member
0 Likes
1,234

Hi Souparnika,

Check in this table where the BAPI returns all messages: RETURNMESSAGES[]

The table is there in "TABLES" Parameter of BAPI.

br

Maju

Read only

0 Likes
1,234

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

Read only

0 Likes
1,234

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

Read only

0 Likes
1,234

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

Read only

0 Likes
1,234

Hi,

which warning message are you expecting from BAPI?..

Regards,

Maju

Read only

0 Likes
1,234

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

Read only

0 Likes
1,234

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'.

Read only

0 Likes
1,234

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??