Application Development and Automation 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: 
Read only

BAPI Error

selvakumar_mohan
Active Participant
0 Likes
1,502

Hi All,

We have a BAPI error. Please read below

Custom BAPI returns a result to the SAP adapter with structure BAPIRETURN1. However the adaptor generates an error message saying that the structure contains a field called PARAMETER, for which the schema does not have a mapping. Structure BAPIRETURN1 does not have this field. There is a similar BAPI return structure called BAPIRET2 that does have this field, so (perhaps incorrectly) it seems that somehow the BAPIRETURN1 structure is converted to the BAPIRET2 structure. How and where that happens is not clear. We have checked the contents of the structure in SAP just before it finishes, and no additional fields are present.

Log from SAP Adapter:

[Time: 2011/03/10 17:59:14.975] [System: ConnectorAgent] [SS: SAPBAPIConnector] [Thread: EAI.SAP_BAPIJmsThreadPool.thread1 (#1790591505)] [Type: Info] [MsgID: 27030] [Mesg: Initiating RFC call to SAP.]

[Time: 2011/03/10 18:00:21.825] [System: ConnectorAgent] [SS: SAPBAPIConnector] [Thread: EAI.SAP_BAPIJmsThreadPool.thread1 (#1790591505)] [Type: Error] [MsgID: 27007] [Mesg: Failed to set Attribute for Object: sap_return; AttrName: IPARAMETER:EPARAMETER; AttrValue: ; App Spec Info: .]

[Time: 2011/03/10 18:00:21.826] [System: ConnectorAgent] [SS: SAPBAPIConnector] [Thread: EAI.SAP_BAPIJmsThreadPool.thread1 (#1790591505)] [Type: Error] [MsgID: 28016] [Mesg: ERROR: Exception raised. Error message : Field PARAMETER not a member of BAPIRETURN1]

[Time: 2011/03/10 18:00:21.851] [System: ConnectorAgent] [SS: SAPBAPIConnector] [Thread: EAI.SAP_BAPIJmsThreadPool.thread1 (#1790591505)] [Type: Error] [MsgID: 9066] [Mesg: A failure has happened in the processing of the message. The response will be sent to the ReplyToQueue if it is set. Otherwise, the message will be sent to the fault queue. Returns status: -1 and Message ID: ID:414d51204154574d42303120202020204d3f5bb02183550a]

Please help us out to find what is causing the error.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,419

Hi

change the return parameter to tables, not export. That is going to be ur first try

Secondly. Also, u could use the return as table like this RETURN STRUCTURE BAPIRET2

Regards

8 REPLIES 8
Read only

Former Member
0 Likes
1,419

Hi Selva,

Could you please post the interface(Import/Export/Changing/Tables parameters) of this custom BAPI?

Regards,

Chen

Read only

0 Likes
1,419

Hi Chen

They are

Import

ORDER_HEADER_IN LIKE ZBAPISDHEAD

WITHOUT_COMMIT LIKE BAPI_STAND-NO_COMMIT

Export

SALESDOCUMENT LIKE BAPIVBELN-VBELN

SOLD_TO_PARTY LIKE BAPISOLDTO

SHIP_TO_PARTY LIKE BAPISHIPTO

BILLING_PARTY LIKE BAPIPAYER

RETURN LIKE BAPIRETURN1

Please revert for more info.

Thanks,

Selva

Read only

Former Member
0 Likes
1,420

Hi

change the return parameter to tables, not export. That is going to be ur first try

Secondly. Also, u could use the return as table like this RETURN STRUCTURE BAPIRET2

Regards

Read only

0 Likes
1,419

We arent ready to do any mapping change, we require to retain the old. So we are unable to change the return to type BAPIRET2. So second option is not possible for us.

Read only

0 Likes
1,419

Thanks Miguel Alvear. Your suggestion to change Return structure to BAPIRET2 worked. Thanks alot.

Read only

0 Likes
1,419

ok

Regards

Read only

Former Member
0 Likes
1,419

Hello Selva ,

 Please help us out to find what is causing the error  --> 

Someone changed your Custom BAPI return table types ,
so you need to amend changes at receiving side as well or 
change your custom BAPI return params .

regards

Prabhu

Read only

0 Likes
1,419

Prabu,

U are true. But we are unable to change the structure to the new form in the other end as it needs a great deal of time to make it work. So any patching solution at the point where we are now would be of great help.

Thanks,

Selva