Hi Abapers,
My requirement is that I need to save the results in the Tcode 'QA32' (there are many enhancements already). Problem is that I cant save the data using the BAPI 'BAPI_INSPOPER_RECORDRESULTS'.
Below is my code.
DATA: BEGIN OF ICHAR_RESULTS OCCURS 0.
INCLUDE STRUCTURE BAPI2045D2.
DATA: END OF ICHAR_RESULTS.
DATA: BEGIN OF ISAMPLE_RESULTS OCCURS 0.
INCLUDE STRUCTURE BAPI2045D3.
DATA: END OF ISAMPLE_RESULTS.
DATA: BEGIN OF BAPIRETURN2 OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA: END OF BAPIRETURN2.
DATA: BEGIN OF INSPPOINTDATA OCCURS 0.
INCLUDE STRUCTURE BAPI2045L4.
DATA: END OF INSPPOINTDATA.
ICHAR_RESULTS-INSPLOT = '890000000402'.
ICHAR_RESULTS-INSPOPER = '0010'.
ICHAR_RESULTS-INSPCHAR = '0010'.
ICHAR_RESULTS-MEAN_VALUE = '2.17'.
ICHAR_RESULTS-CLOSED = 'X'.
ICHAR_RESULTS-EVALUATED = 'X'.
ICHAR_RESULTS-EVALUATION = 'A'.
APPEND ICHAR_RESULTS.
*SH0400000484
INSPPOINTDATA-INSPLOT = '890000000402'.
INSPPOINTDATA-INSPOPER = '0010'.
INSPPOINTDATA-USERC1 = 'SH0400000484'.
APPEND INSPPOINTDATA.
ISAMPLE_RESULTS-INSPLOT = '890000000402'.
ISAMPLE_RESULTS-INSPOPER = '0010'.
ISAMPLE_RESULTS-INSPCHAR = '0010'.
APPEND isample_results.
CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
EXPORTING
INSPLOT = '890000000402'
INSPOPER = '0010'
INSPPOINTDATA = INSPPOINTDATA
IMPORTING
RETURN = BAPIRETURN2
TABLES
CHAR_RESULTS = ICHAR_RESULTS
SAMPLE_RESULTS = ISAMPLE_RESULTS.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = BAPIRETURN2.
Points will be awarded.
Thanks,
Mounika