cancel
Showing results for 
Search instead for 
Did you mean: 

getting error during mass creation of return order using BAPI

0 Kudos

Hi Guru's

i am getting below error during mass creation of return order. we are using BAPI_CUSTOMERRETURN_CREATE for that

S V4 233 SALES_HEADER_IN has been processed successfully

E V1 382 Material xxxxxxxx is not defined for sales org.xxxx distr.chan.xx language EN

E V4 248 Error in SALES_ITEM_IN xxxxx

E V4 219 Sales document was not changed

Please help to resolve this. i shall be very thankful to you.

Thanks in advance

Accepted Solutions (0)

Answers (6)

Answers (6)

VeselinaPeykova
Active Contributor

1. I assume that when you create manually the return order via VA01 you used exactly the same billing document as reference. If not - the VA01 test should mimic as close as possible what your custom program is supposed to do.

2. It will be easier for you to find out what is the problem if you perform order creation one document at a time. In your example this is the result of performing creation for multiple orders.

3. Why don't you or another developer from your team debug this custom program?

4. There is still no information about the master data - are these materials extended for the sales area, are there correctly maintained descriptions for the language specified in the error message?

5. There is no information about how exactly your create the orders with reference. I hope that you are aware that it is the responsibility of the developer to ensure that the same rules for copying documents via VA01 are used in the custom program that uses BAPI_CUSTOMERRETURN_CREATE or similar. If this is a new concept to you - read 370988 - BAPIs in SD: Creation with reference.

6. It is also possible that you have custom logic in some exit that is executed for certain transaction code or that uses screen logic. You still have not eliminated this, right? Use SNIF or PRCAT, or just debug.

7. With the risk of disappointing you - these kind of problems are best handled locally - by troubleshooting yourself or by asking your colleagues for assistance. Help in SAP Community is feasible after you have done extensive troubleshooting, with sufficient information like master data and transactional data information, related customizing, related custom code, etc. I would recommend that you perform more troubleshooting on your end. If you still cannot identify the root cause - update the information as a comment to your initial question and use @mention to notify the participants about the update.

Please, do not use answer instead of comment when you only wish to add more information. When you use the incorrect response type, the participants in the thread are not notified about the update, which decreases your chances of getting help. And this increases the workload for our moderators who have to correct such incorrectly posted responses.

0 Kudos

Hi Deepak,

Can you check if the material is defined for the Sales Organization and Distribution channel specified in the error?

Regards,

Mücahit

Lakshmipathi
Active Contributor

While assisting the members, please respond to a latest discussion

0 Kudos

I am able to create some return order for particular material but getting above error in case of certain materials as shown below

S V4 233 SALES_HEADER_IN has been processed successfully

E V1 382 Material xxxxxxxxx is not defined for sales org.xxxx, distr.chan.xx, language EN

E V4 248 Error in SALES_ITEM_IN 000010

E V4 219 Sales document was not changed

S V4 233 SALES_HEADER_IN has been processed successfully

E V1 382 Material xxxxxxx is not defined for sales org.xxxx, distr.chan.xx, language EN

E V4 248 Error in SALES_ITEM_IN 000020

E V4 219 Sales document was not changed

S V4 233 SALES_HEADER_IN has been processed successfully

S V4 233 SALES_ITEM_IN has been processed successfully

S V1 311 Special Return- 00xxxxxxxx has been saved

000 Sales Order No. 00xxxxxxxx has Created

S V4 233 SALES_HEADER_IN has been processed successfully

S V4 233 SALES_ITEM_IN has been processed successfully

S V1 311 Special Return- 00xxxxxxxx has been saved

000 Sales Order No. 00xxxxxxxx has Created

S V4 233 SALES_HEADER_IN has been processed successfully

E V1 382 Material xxxxxxx defined for sales org.xxxx, distr.chan.xx, language EN

E V4 248 Error in SALES_ITEM_IN 000010

E V4 219 Sales document was not changed

also when I am creating return order manually, i am able to create return order with these materials its not giving me any error but i am only getting error while doing mass creation( i am creating this special return order with reference to invoice). kindly provide me your valuable knowledge

venkateswaran_k
Active Contributor
0 Kudos

Hi Deepak,

Please make sure the Material code is having leading zeros.

  • use function CONVERSION_EXIT_ALPHA_INPUT for the material code to have leading zeros and then pass that material code to BAPI

Secondly, make sure that - your material is extended to the respective SalesOrg and Distribution channel. You can confirm this in the table MVKE -

  1. Make sure that a record for that material + Sales Org + Dist Channel - exists.

This will solve your problem

Regards,

Venkat

VeselinaPeykova
Active Contributor
0 Kudos

1. Did you talk to your functional consultant? Are you really sure that the data for creating the documents which was provided to you via file (or other means) is correctly maintained? Did the business users or your functional consultant validate the data before you tried to use it for document creation? If the data was not validated yet - ask your functional consultant to verify that the material and customer master data are correctly maintained for the organizational units where you have to create a return order.

2. You can perform some initial troubleshooting even without the assistance of a consultant. Try creating via VA01 a return order with the same order type, for the same sales area, customer and material. Can you create the order? If no and the error is the same - this has nothing to do with your code, tell the business users or the functional consultant to correct the master data problem. If yes - check whether you are passing correctly he parameters to the BAPI (compare with VA01 execution); if still no luck - debug.

3. Did you try SE37 for the same data and see if you encounter an error? This would be another troubleshooting step that I would perform if I were you.

venkateswaran_k
Active Contributor
0 Kudos

Hi Deepak,

Please make sure the Material code is having leading zeros.

use function CONVERSION_EXIT_ALPHA_INPUT for the material code to have leading zeros and then pass that material code to BAPI

This will solve your problem

Regards,

Venkat