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: 

Different result when call BAPI Create MO (IW31)

edyependi
Discoverer
0 Kudos
826

Hello Experts,

I have problem when call BAPI from Web API Net programming. The problem is BAPI return different result when call Production Environment and Development & QA Environment.

Same Message, become WARNING in Development & QA Environment, and become ERROR in Production Environment, so the transaction not Created.

Please advice about this problem...

Thanks a lot

 

 

4 REPLIES 4

raymond_giuseppi
Active Contributor
0 Kudos
785

Did you already compare Message and Orders Customizing in the systems (Missing transport?)

0 Kudos
762

Thank you so much Raymond,

I'm sure that the program is the same, because Dev Environment just copied from Production a couple month ago.

See picture below, the Message on circle in Production Environment appear on ERRORS and WARNING, thats why the transaction NOT Created. But in Development Environment the Message appear only on WARNING, so the transaction Created.

Please help...

Best Regards,

edyependi_0-1709777669800.png

 

0 Kudos
663

(I didn't mention program difference, but missing Customizing)

So, did you check for missing/inconsistent Customizing, for example

Transaction SPRO > IMG > Plant Maintenance and Customer Service > Maintenance and Service Processing > Configuration Control > Define Attributes for System Messages

NTeunckens
Active Contributor
0 Kudos
727

I assume we are talking about BAPI "BAPI_ALM_ORDER_MAINTAIN" ...?
You should check a few things first :

  • First off, the "ERRORS"-Section in your Image shows a variety of ErrorMessages ('IW 431', 'IW 437', ...), the "WARNINGS"-Section shows only one Specific type 'IW 437' => Is this correct, meaning you only get the Error when Messages other than the 'IW 437' are generated? If so, you should focus on the "Start date is in the past"-Message ...
  • These Date-related Messages are related to the Order Scheduling Configuration for the OrderType ... Can you confirm that the Customizing such as Trx. "OPU7" is the same in the environments for the OrderTypes across Systems? You are using the same OrderType in the BAPI across Systems, right?
  • Also, the Factory-Calender in the Systems has an influence. Are they the same in Dev, QA & Prod? Please check this, possibly put a BREAK on the FunctionMode "DATE_CONVERT_TO_FACTORYDATE" when executing your Web Call and check any Messages generated in the next lines of code ...
  • In general, you should do a WHERE-USED via Trx."SE91" on Messages like 'IW 437' and 'IW 431' and identify where they are generated. Put a BREAKPOINT there and you can find out what is going wrong and why ...

With limited info, I would focus on the 'IW 431 - Start date is in the past'-Message, because in some cases it does lead to an Error, while the Workday-calculation would generate a Warning ...
Chances are some minor difference in Customizing / FactoryCalendar / ... ór in your Web-Call generates one or more Messages, of which the 'IW 431' will show up as an Error ...

Hope this helps

Nic T.