cancel
Showing results for 
Search instead for 
Did you mean: 

Results are not saved in QA32 tcode using BAPI_INSPOPER_RECORDRESULTS

Former Member
0 Kudos
442

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

Accepted Solutions (0)

Answers (2)

Answers (2)

sanjeeb_sahoo
Participant
0 Kudos

Hi Mounika,

In CALL FUNCTION 'BAPI_TRANSACTION_COMMIT', maintain the exporting parameter WAIT = '  ' .

I think it will work.




Regards,

Sanjeeb


Former Member
0 Kudos
tom_wan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Miriyala

I am afraid to solve the problem application knowledge is necessary. I would suggest get help from SAP Support : create incident under QM-IM-RR

Chef_Bear_777
Discoverer
0 Kudos
Hi, did you solved the problem ?