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: 

BAPI Modify result lot inspection

Former Member
0 Kudos

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..

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

http://abap.wikiprog.com/wiki/BAPI_INSPCHAR_SETRESULT

3 REPLIES 3

Former Member
0 Kudos

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.

http://abap.wikiprog.com/wiki/BAPI_INSPCHAR_SETRESULT

Former Member
0 Kudos

sorry this is the bapi that i use BAPI_INSPOPER_RECORDRESULTS

but i dont know how modify result for a lot inspection

0 Kudos

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.