‎2012 Aug 24 3:17 AM
Please give me an example code about BAPI BAPI_INSPOPER_RECORDRESULTS
Dai Nguyen Quang.
‎2012 Aug 24 3:46 AM
I tried to use BDC for tcode qe11 but unsuccessful so I am trying to use BAPI and I meet some error.
May be my code is incorrect.
Please give me an example code.
‎2012 Aug 24 4:28 AM
‎2012 Aug 24 4:47 AM
My code as below:
*&---------------------------------------------------------------------*
*& Report ZDAINQ_TEST5
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDAINQ_TEST5.
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.
isingle_results-insplot = '30000000066'.
isingle_results-inspoper = '0110'.
isingle_results-inspchar = '0010'.
isingle_results-res_value = '1.65'.
isingle_results-res_no = '0001'.
APPEND isingle_results.
ichar_results-insplot = '30000000066'.
ichar_results-inspoper = '0110'.
ichar_results-inspchar = '0010'.
ichar_results-closed = 'X'.
ichar_results-evaluated = 'X'.
ichar_results-evaluation = 'A'.
APPEND ichar_results.
CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'
EXPORTING
INSPLOT = '30000000066'
INSPOPER = '0110'
IMPORTING
RETURN = bapireturn2
TABLES
CHAR_RESULTS = ichar_results
SINGLE_RESULTS = isingle_results.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = bapireturn2.
The file content is:
2 2 1 1 8
2 2 1 1 8
2 2 1 1 8
The error is:
‎2012 Aug 24 4:54 AM
Hi ,
Did you check the available wiki on this.
http://wiki.sdn.sap.com/wiki/display/Snippets/Sample+Code+BAPI_INSPOPER_RECORDRESULTS.
Just check the documentation of this bapi,check the leading zeros
‎2012 Aug 24 4:58 AM
I have checked many examples, this is one, but can not solve my problem
‎2012 Aug 24 5:01 AM
Hi,
Are you able to create manually with the same data.
Regards,
Madhu.
‎2012 Aug 24 6:41 AM