2005 Jun 09 12:35 PM
I have been trying to figure out how to use this BAPI to record Test Results against an Inspection Lot. The BAPI appears to work - sort of. There are no errors in the Return Table. The Inspection Lot though does not get updated with the result for inspection characteristic 0030. It does however evaluate and close it. I am absolutely stumped. I have attached a simplified version of my code. I cannot figure out how come the test result itself is not getting updated (mean_value of 2.17) Can anyone help me out? thx in advance.
DATA: BEGIN OF ichar_results OCCURS 0.
INCLUDE STRUCTURE BAPI2045D2.
DATA: END OF ichar_results.
DATA: BEGIN OF bapireturn2 OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF bapireturn2.
ichar_results-insplot = '70000009065'.
ichar_results-inspoper = '0010'. ichar_results-inspchar = '0030'.
ichar_results-mean_value = '2.17'.
ichar_results-closed = 'X'.
ichar_results-evaluated = 'X'.
ichar_results-evaluation = 'A'.
APPEND ichar_results.
CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
EXPORTING
INSPLOT = '70000009065'
INSPOPER = '0010'
IMPORTING
RETURN = bapireturn2
TABLES
CHAR_RESULTS = ichar_results.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = bapireturn2.
I have been trying to figure out how to use this BAPI to record Test Results against an Inspection Lot. The BAPI appears to work - sort of. There are no errors in the Return Table. The Inspection Lot though does not get updated with the result for inspection characteristic 0030. It does however evaluate and close it. I am absolutely stumped. I have attached a simplified version of my code. I cannot figure out how come the test result itself is not getting updated (mean_value of 2.17) Can anyone help me out? thx in advance.
DATA: BEGIN OF ichar_results OCCURS 0.
INCLUDE STRUCTURE BAPI2045D2.
DATA: END OF ichar_results.
DATA: BEGIN OF bapireturn2 OCCURS 0.
INCLUDE STRUCTURE bapiret2.
DATA: END OF bapireturn2.
ichar_results-insplot = '70000009065'.
ichar_results-inspoper = '0010'. ichar_results-inspchar = '0030'.
ichar_results-mean_value = '2.17'.
ichar_results-closed = 'X'.
ichar_results-evaluated = 'X'.
ichar_results-evaluation = 'A'.
APPEND ichar_results.
CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
EXPORTING
INSPLOT = '70000009065'
INSPOPER = '0010'
IMPORTING
RETURN = bapireturn2
TABLES
CHAR_RESULTS = ichar_results.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = bapireturn2.
2005 Jun 09 2:03 PM
Hello Ian,
the field MEAN_VALUE in structure BAPI2045D2 is defined to the domain QIFLTP. The text to this domain says 'Floating Point Value for QM' - but it's defined CHAR 22.
Could imagine that the BAPI expects the value like '2.17E01' or '2,17E01'.
Regards Wolfgang
2005 Jun 09 6:43 PM
Thx for your reply. I did try your suggestion. Still no success.
2005 Jun 21 4:15 PM
I think you may have to use the single results along with char results. I too was trying this out and it works for me. However, eventually I would like it to generate a defect record if the valuation is rejected and I have not been able to accomplish that. If I go thru the transaction and perform similar steps it does result in creation of the defect record.
In debugging to a certain extent I came across the setup of MERKMAL structure that I think dictates the creation of the defect, but I am unable to determine what, if any, I need to do differently in the BAPI to populate this properly.
Anyone with experience on this?
Thanks
Bhaskar
2007 Mar 21 5:37 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |