How Can I create an IMAGE object from another BO
Phillips, Tim
Tim.Phillips at ser.com
Fri Oct 25 09:44:12 EDT 2002
Hi Arpad,
Great to hear things are working now.
It sounds like a type-mismatch, or similar error that was causing it. =20
I vaguely recollect seeing something similar in the past on a program I =
was
working on, and I was pretty sure that it was changing the include that
fixed it.
Now I've got access to our SAP system, in one of my programs I've got:
include <cntain>.
data: begin of obj.
include structure swotobjid.
data: end of obj.
swc_create_object obj 'MYCUSTOMOBJECT' mycustomkey.
Which works fine!
Regards,
Tim
-----Original Message-----
From: Vincze =C1rp=E1d [mailto:Arpad.Vincze at itelligence.hu]
Sent: 25 October 2002 14:09
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: How Can I create an IMAGE object from another BO
Hello Tim,
Seems to be working !!!!
The modifications:
INCLUDE <object>.
* data: obj TYPE swc_object.
data: obj like swotobjid
DATA:
BEGIN OF KEY,
IMAGELINKARCHIVEID LIKE TOAV0-ARCHIV_ID,
ARCHIVEDOCID LIKE TOAV0-ARC_DOC_ID,
END OF KEY.
*
KEY-ARCHIVEDOCID =3D ...
KEY-IMAGELINKARCHIVEID =3D ...
=20
* swc_create_object obj 'IMAGE' key.
* new creation mothod:
CALL FUNCTION 'SWC_OBJECT_CREATE'
EXPORTING
OBJTYPE =3D 'IMAGE'
OBJKEY =3D KEY
IMPORTING
OBJECT =3D obj
EXCEPTIONS
OBJTYPE_NOT_FOUND =3D 1
LOGSYS_NOT_FOUND =3D 2
OBJTYPE_NOT_RELEASED =3D 3
OTHERS =3D 4.
swc_set_element container 'IMAGE' obj.
Thanks for quick reaction
regards:
Arpad
-----Original Message-----
From: Phillips, Tim [mailto:Tim.Phillips at ser.com]
Sent: Friday, October 25, 2002 1:23 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Re: How Can I create an IMAGE object from another BO
Hi Vince,
Your code looks OK at first glance.
I'd probably change 'INCLUDE <object>' to 'INCLUDE <CNTN01>' - see if =
that
helps.
Is there a long text for error 1001? - you don't say what message class =
that
is.
If you're still having problems, try doing a debug of the macro if your
level of SAP permits it (later levels don't), in which case you could =
try
running FM 'SWC_OBJECT_CREATE' in test mode through SE37 using your =
values -
you can debug here too.
You might also check that BO 'IMAGE', and any subtypes, are fully
implemented/generated and match up with your code.
Let me know how you get on.
Regards,
Tim
-----Original Message-----
From: Vincze =C1rp=E1d [mailto:Arpad.Vincze at itelligence.hu]
Sent: 25 October 2002 11:56
To: SAP-WUG at MITVMA.MIT.EDU
Subject: How Can I create an IMAGE object from another BO
Hello,
The following program part doesnt work :
INCLUDE <object>.
data: obj TYPE swc_object.
DATA:
BEGIN OF KEY,
IMAGELINKARCHIVEID LIKE TOAV0-ARCHIV_ID,
ARCHIVEDOCID LIKE TOAV0-ARC_DOC_ID,
END OF KEY.
*
KEY-ARCHIVEDOCID =3D ...
KEY-IMAGELINKARCHIVEID =3D ...
=20
swc_create_object obj 'IMAGE' key.
* create object doesnt work !!!!!=20
* why !? it sends error 1001
swc_set_element container 'IMAGE' obj.
Any hints?!
regards:
Arpad
=20
Vincze =C1rp=E1d
itelligence Hungary Kft.
H-1138 Budapest, V=E1ci =FAt 141
Tel.: (+36 1) 452 3822
Fax: (+36 1) 452 3839
Mobil: (+36 20) 9 533 578
arpad.vincze at itelligence.hu
More information about the SAP-WUG
mailing list