09-20-2007 4:39 PM
hi people...
i must modify results for a lot inspection... i dont know how do it.
i use BAPI_INSPCHAR_SETRESULT for insert new result......but i dont know how modify a result that have been insert before.
please, i need an example about how to use that BAPI to modify, or other BAPI or FM.
thxz bye..
09-20-2007 5:01 PM
This BAPI should work to modify the data however this is obsolete. Please check these threads. This will help you to use BAPI_INSOPER_RECORDRESULTS which is a replacement of BAPI_INSPCHAR_SETRESULT.
09-20-2007 5:01 PM
This BAPI should work to modify the data however this is obsolete. Please check these threads. This will help you to use BAPI_INSOPER_RECORDRESULTS which is a replacement of BAPI_INSPCHAR_SETRESULT.
09-20-2007 5:04 PM
sorry this is the bapi that i use BAPI_INSPOPER_RECORDRESULTS
but i dont know how modify result for a lot inspection
09-20-2007 5:24 PM
Here is the sample code, let me know if this helps -
DATA: BEGIN OF ichar_results OCCURS 0.
INCLUDE STRUCTURE BAPI2045D2.
DATA: END OF ichar_results.
DATA: BEGIN OF isingle_results OCCURS 0.
INCLUDE STRUCTURE BAPI2045D4.
DATA: END OF isingle_results.
DATA: BEGIN OF bapireturn2 OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF bapireturn2.
isingle_results-insplot = '70000009550'.
isingle_results-inspoper = '0010'.
isingle_results-inspchar = '0010'.
isingle_results-res_value = '1.65'.
isingle_results-res_no = '0001'.
APPEND isingle_results.
ichar_results-insplot = '70000009550'.
ichar_results-inspoper = '0010'.
ichar_results-inspchar = '0010'.
ichar_results-closed = 'X'.
ichar_results-evaluated = 'X'.
ichar_results-evaluation = 'A'.
APPEND ichar_results.
CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
EXPORTING
INSPLOT = '70000009550'
INSPOPER = '0010'
IMPORTING
RETURN = bapireturn2
TABLES
CHAR_RESULTS = ichar_results
SINGLE_RESULTS = isingle_results.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = bapireturn2.