Quantcast
Channel: SCN : Popular Discussions - ABAP和Java开发 (ABAP & Java Development)
Viewing all articles
Browse latest Browse all 4604

Results are not saved in QA32 tcode using BAPI_INSPOPER_RECORDRESULTS

$
0
0

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


Viewing all articles
Browse latest Browse all 4604

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>