Skip to Content
avatar image
Former Member

Result recording

Hi,

I need to record the results in QM module (Tcode QA32 ) through BAPI.(BAPI_INSPOPER_RECORDRESULTS) Can anyone help me in this

Thanks&Regards.

Arun.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Sep 05, 2008 at 12:45 PM

    hi,

    this is the sample code, kindly modify it accordingly:

    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. 
    
    DATA: BEGIN OF i_inspointdata . 
    INCLUDE STRUCTURE BAPI2045L4. 
    DATA: END OF i_inspointdata. 
    
    DATA: BEGIN OF i_RETURNTABLE occurs 0. 
    INCLUDE structure BAPIRET2. 
    DATA: END of i_RETURNTABLE. 
    
    
    
    i_inspointdata-USERC1 = '5'. 
    i_inspointdata-USERD1 = SY-DATUM. 
    i_inspointdata-USERT1 = SY-UZEIT. 
    
    
    ichar_results-insplot = '890000000669'. 
    ichar_results-inspoper = '0010'. 
    ichar_results-inspchar = '0010'. 
    ichar_results-closed = 'X'. 
    ichar_results-evaluated = 'X'. 
    ichar_results-evaluation = 'A'. 
    ichar_results-MEAN_VALUE = '300'. 
    APPEND ichar_results. 
    
    CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS' 
    EXPORTING 
    INSPLOT = '890000000669' 
    INSPOPER = '0010' 
    INSPPOINTDATA = i_inspointdata 
    IMPORTING 
    RETURN = bapireturn2 
    TABLES 
    CHAR_RESULTS = ichar_results 
    RETURNTABLE = i_RETURNTABLE. 
    *SINGLE_RESULTS = isingle_results. 
    
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' 
    EXPORTING 
    WAIT = 'X' 
    IMPORTING 
    RETURN = bapireturn2.

    Add comment
    10|10000 characters needed characters exceeded