How Can I create an IMAGE object from another BO

Vincze Árpád Arpad.Vincze at itelligence.hu
Fri Oct 25 09:09:07 EDT 2002


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