Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code for using BAPI: BAPI_INSPOPER_RECORDRESULTS

Former Member
0 Kudos
706

I need to upload inspection results from external system to SAP. Can anybody post the sample code for using the BAPI BAPI_INSPOPER_RECORDRESULTS. Also I want to know whether the following things are possible or not with this BAPI.

1. Overwrite (add / modify) Characteristics for an inspection lot from an external system.

2. Overwriting Sample Size in SAP through external system.

Really appreciate any info on using this BAPI.

Thanks,

KC.

2 REPLIES 2

Former Member
0 Kudos
192

Hi Kalyan,

CALL FUNCTION 'BAPI_INSPOPER_RECORDRESULTS'

EXPORTING

INSPLOT = wa_upload-prueflos

INSPOPER = wa_upload-vornr

INSPPOINTDATA = wa_insppointdata

TABLES

SINGLE_RESULTS = it_single_results

SAMPLE_RESULTS = it_sample_results

RETURNTABLE = it_returntable.

Then call:

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'.

wa_char_results is not necessary and updates the results at operation level, not physical sample level. your results for a specific physical sample go into wa_sample_results.

<b>Reward Points if Useful!</b>

Regards

Gokul

Former Member
0 Kudos
192

Hi Gokul,

Thanks for the reply. What I need to know is, what are the mandatory fields that will go in the Importing parameters, like the values in the internal table "wa_insppointdata" in your code. If anybody used this FM before, I need to see, what values are hard coded and what FLAG's were used in importing and tables parameters.

Kalyan.