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

BAPI_MATERIAL_SAVEDATA

pintoo_d
Participant
0 Likes
688

Hi Experts,

I am using BAPI_MATERIAL_SAVEDATA FM to upload materials,

My requirement is for eg. I have an input excel file which has all material related records,

If in same record, i provide say Blank matnr, incorrect material group, unit of measure etc..

Normally, BAPI will have error message in bapiret2. However, it will have error message, saying that "enter material number".

However, once i provide that, next time it will display message "Field MARA-MEINS is defined as mandatory field"

It keeps going till all records are in place.

Is there any way or any trick / logic where i can capture all error messages pertaining to single record and display it sumwhere ?

Like in above case, it show display all messages in single execution

Please advise.

Thank You,

Temesh

5 REPLIES 5
Read only

pintoo_d
Participant
0 Likes
639

GM Experts,

Any suggestions ?

HV pleasant day.

Thank you,

Temesh

Read only

pintoo_d
Participant
0 Likes
639

Hi.. I got this requirement now.

FM is same "BAPI_MATERIAL_SAVEDATA".

To make understand Experts better, My flat / Excel File will have a single entry (for example).

Single file will have Multiple VKORG and WERKS. Which means that for all possible combinations of WERKS and VKORG, that Material should be created / extended.

As of now, its not sure how many VKORG and WERKS would be maintained.

But they wud be separated by semil-colon ";".

For eg in Cell D1, VKORG Entries are 2010;2020;2030;2050;2060

Cell E1 , WERKS entries are 2010;2020

Bottom line, say if there are 5 VKORG and 2 WERKS entries separated by Semi-colon, Material should be updated 10 Times for different VKORG and WERKS combination.

But remember that number of VKORG and WERKS is not specific.

Please advise

Read only

Former Member
0 Likes
639

if i understood ur requirement correctly, pls. load ur itab with excel data, then, use key words like FIND for semi colon or use SPLIT at semi colon........then, create a ditto record and append it to the same 2nd itab, then, use this 2nd itab for BAPI.

thanq

Read only

pintoo_d
Participant
0 Likes
639

closing thread

Read only

former_member1292715
Participant
0 Likes
639

Hi Pintoo,

It is not possible. Normally BAPI's or whatever, once it catches the error, it exits from the program and it won't go further. So it is not possible to catch all the errors in single shot.

Regards

Yasin.