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: 

Creating Inspection Point using BAPI_INSPOPER_RECORDRESULTS

Former Member
0 Kudos

Hi Gurus,

How can I create Inspection point using BAPI_INSPOPER_RECORDRESULTS , what are the fields which are nedd to be passed and by which filed i will know that inspection point is created or not.

Send me sample code if anybody has done before.

7 REPLIES 7

Former Member
0 Kudos

See this code:


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. 

0 Kudos

Hi,

Refer the below links

https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/sampleCodeBAPI_INSPOPER_RECORDRESULTS

0 Kudos

Hi

Thanks for ur reply,

my query is , like in FM:BAPI_INSPPOINT_CREATEFROMDATA there is a import vairable

INSPPOINT LIKE BAPI2045L4-INSPPOINT Inspection point

like that i want to use FM BAPI_INSPOPER_RECORDRESULTS how can i know what is the inspection point created as there is no importing parameter like in previous.

So plz tell me how can i know the value of the inspection point by using FM BAPI_INSPOPER_RECORDRESULTS.

0 Kudos

Hi,

The parameter INSPPOINTDATA contains data for the inspection point.

INSPPOINTDATA LIKE BAPI2045L4

Edited by: Neenu Jose on Jun 17, 2009 11:03 AM

0 Kudos

No Neenu, this is importing parameter for FM , I want some Exporting FM other wise how i get to know what was the inspection point created.

Correct me if i am wrong.

0 Kudos

Hi ,

While Creating Sample Point thro BAPI_INSPOPER_RECORDRESULTS.

I am getting an error 'There are no originals' , M-ID -Q0 MSG-No 102.PARAMETER -INSPPOINTDATA.

Can any one please explain why this is coming ?

Thanks in advance.

Harsharandeep

Former Member
0 Kudos

thanks