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: 

Error while generating Object using SWO1!

former_member210158
Active Participant
0 Kudos
717

Hi all,

guys, i have issues while Generating Object in SWO1.

1. i released my bapi as api method.

2. i released the object.

3. i am ttrying to generate the object.

im getting errors: 

The data object "OBJECT" has no structure and therefore no component called

"KEY". .

but i odnt have problem with my bapi its working fine. could any one help me on this.

thanks & regards

chinta

1 ACCEPTED SOLUTION

paul_bakker2
Active Contributor
0 Kudos
248

Hi,

Have you changed an existing BOR object, or is this a brand new one?

The implementation of your BOR object should start with the following (generated) lines:

INCLUDE <OBJECT>.

BEGIN_DATA OBJECT. " Do not change.. DATA is generated

(.....)

END_DATA OBJECT. " Do not change.. DATA is generated

You are getting that syntax error because the OBJECT has not been properly declared. Do a syntax check on your method code to see exactly where the problem is.

cheers

Paul Bakker

4 REPLIES 4

paul_bakker2
Active Contributor
0 Kudos
249

Hi,

Have you changed an existing BOR object, or is this a brand new one?

The implementation of your BOR object should start with the following (generated) lines:

INCLUDE <OBJECT>.

BEGIN_DATA OBJECT. " Do not change.. DATA is generated

(.....)

END_DATA OBJECT. " Do not change.. DATA is generated

You are getting that syntax error because the OBJECT has not been properly declared. Do a syntax check on your method code to see exactly where the problem is.

cheers

Paul Bakker

0 Kudos
248

thanks for the reply Paul,

yes its the already existed one i changed it completely including name. not only this, i did change few bapis earlier also which exist in the same BOR i dont have any problem with them.

regarding generated lines...

it starts with

BEGIN_METHOD MATOBJCLASSCHANGE CHANGING CONTAINER.

DATA:

      OBJECT TYPE /HIPLVREG/BAPI_IP_OBCL_KYFLDS-ZOBJECT,

      OBJECTTABLE TYPE /HIPLVREG/BAPI_IP_OBCL_KYFLDS-ZOBJECTTABLE,

x

x

x

and ends like this.


END_METHOD.

so what you suggest me now.

regards

chinta

0 Kudos
248

Paul

are you saying about this..

  INCLUDE <OBJECT>.

  BEGIN_DATA OBJECT. " Do not change.. DATA is generated

  * only private members may be inserted into structure private

  DATA:

  " begin of private,

  "   to declare private attributes remove comments and

  "   insert private attributes here ...

  " end of private,

        KEY LIKE SWOTOBJID-OBJKEY.

  END_DATA OBJECT. " Do not change.. DATA is generated

ok now what...?

al together i have 41 methods init..

i have problem with 42 method....bro...

regards

chinta

0 Kudos
248

Thanks for the Support Guys.

there's a input parameter called 'OBJECT' i chanmged it to 'ZOBJECT' in my code where ever it necessary.

thats it without any errors, successfully generated.

i don;t know what exactly the reason might be for the error, but my idea worked.

thanks & regards

chinta