06-17-2009 12:44 PM
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.
06-17-2009 12:55 PM
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
06-17-2009 1:02 PM
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
06-17-2009 1:14 PM
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.
06-17-2009 1:15 PM
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
06-17-2009 1:17 PM
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);