Application Development 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: 

Problem when BAPI with this RETURN MESSAGE

Former Member
0 Kudos

Hi experts,

I want to use this BAPI "BAPI_MATPHYSINV_COUNT" to enter the count for a specific physical inventory document, after I assigned required data. The RETURN table shows following messgaes:

TYPE :A

ID :M7

Number:695

Message:Required function MB_PHYSICAL_INVENTORY not processed

And the count haven't entered the physical inventory document. Could anyone give some advises to solve this problem? Thanks a lot.

5 REPLIES 5

Former Member
0 Kudos

TYPE A means the program is being Aborted.

What input are you giving to PHYSINVENTORY in the IMPORT of BAPI?

Make it sure you provide some data to it....its a mandatory one...

Regards

Former Member
0 Kudos

Hi,

This may be because some of error condition is occuring. Try to give all relevant data to BAPI. Manually do the transaction and then give approate parameters / tables data.

Most of the time, from error message it is difficult to find out exact data problem in BAPI. Try to debug and find out what is missing.

Regards,

Anil

Former Member
0 Kudos

Hi, thanks for response.

I use an external java program with JCo to call this BAPI, following is the part of my program.


IFunctionTemplate functionTemplate =
		          mRepository.getFunctionTemplate("BAPI_MATPHYSINV_COUNT");
		      
		      JCO.Function function = new JCO.Function(functionTemplate);
		      JCO.ParameterList input = function.getImportParameterList(); // Fill in input parameters 
		      
			  input.setValue("01000011962",   "PHYSINVENTORY" );
			  input.setValue("2009"	  , "FISCALYEAR" );
			  
			 
System.out.println(input);			  
			  JCO.Table input_table = function.getTableParameterList().getTable("ITEMS");
		      input_table.appendRow();
			  input_table.setRow(0);
			  input_table.setValue("001", "ITEM");
			  input_table.setValue("100-200", "MATERIAL");
			  input_table.setValue(20, "ENTRY_QNT");
			  input_table.setValue("pc" "ENTRY_UOM");
mConnection.execute(function);
		
		      //initialize table object
			  JCO.Table return_table = function.getTableParameterList().getTable("RETURN");
System.out.println(return_table);	

Maybe there is some type can't be resolved? But I tried for a long time and can't find any problem.

I really need some advises, Thanks for any response.

Former Member
0 Kudos

Hi,

Type A means it is aborted.

See the import parameters your are passing are correct.

Also try to execute this bapi using some test data existsing so that you will get an idea what is to be passed under each parameter,

Regards,

Deepa Kulkarni

Former Member
0 Kudos

Sorry, there's a mistake, following is the correct version. I uses the real parameters to represnts what I hope to entered. Thanks for any help.


IFunctionTemplate functionTemplate =
		          mRepository.getFunctionTemplate("BAPI_MATPHYSINV_COUNT");
		      
		      JCO.Function function = new JCO.Function(functionTemplate);
		      JCO.ParameterList input = function.getImportParameterList(); // Fill in input parameters 
		      
			  input.setValue("01000011962",   "PHYSINVENTORY" );
			  input.setValue("2009"	  , "FISCALYEAR" );
			  
			 
System.out.println(input);			  
			  JCO.Table input_table = function.getTableParameterList().getTable("ITEMS");
		      input_table.appendRow();
			  input_table.setRow(0);
			  input_table.setValue("001", "ITEM");
			  input_table.setValue("100-200", "MATERIAL");
			  input_table.setValue("20", "ENTRY_QNT");
			  input_table.setValue("pc" "ENTRY_UOM");
mConnection.execute(function);
		
		      //initialize table object
			  JCO.Table return_table = function.getTableParameterList().getTable("RETURN");
System.out.println(return_table);