08-02-2006 7:27 PM
Hi All,
I need to create a custom object type using SWO1.
The object type needs to be linked to a report program with selection screen(or its tcode).
The selection screen carries just 1field. The output is a new screen.
Would appreciate if any1 can tell me the step-by-step process to accomplish my objective.
-Ram.
08-03-2006 12:32 AM
Enter a name.
Hit create. Populate the manadatory pop ups don't populate super type.
Blow out the key field. Create a key field.
Blow out the methods - add a method. Add the code for the method - select the method and hit the program button add code as below:
BEGIN_METHOD RUNDUPREPORT CHANGING CONTAINER.
SET PARAMETER ID 'VPA' FIELD OBJECT-KEY-PARTNEREMPLOYEEID.
export object-key-partneremployeeid to memory id '99'.
CALL TRANSACTION 'ZEML' AND SKIP FIRST SCREEN.
*object-key-partneremployeeid.
END_METHOD.
Create your event.
My method calls an abap I wrote that is bound to a transaction.
You will need to set the release status for all of the elements of your object and the object itself.
The question I have is why. Are you calling the object in a workflow? If so you will need to use the fm as below:
DATA: OBJTYPE LIKE SWETYPECOU-OBJTYPE VALUE 'ZRM_WWCONT',
EVENT LIKE SWETYPECOU-EVENT VALUE 'DuplicateEmail',
OBJKEY LIKE SWEINSTCOU-OBJKEY,
EVENTID LIKE SWEDUMEVID-EVTID.
DATA: BEGIN OF EVENT_CONTAINER OCCURS 0.
INCLUDE STRUCTURE SWCONT.
DATA: END OF EVENT_CONTAINER.
OBJKEY = KNVK-PARNR.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
OBJTYPE = OBJTYPE
OBJKEY = OBJKEY
EVENT = EVENT
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
IMPORTING
EVENT_ID = EVENTID
TABLES
EVENT_CONTAINER = EVENT_CONTAINER
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2.
COMMIT WORK.
Good Luck.
08-03-2006 12:38 AM
Hi Ram,
Look at this...
http://help.sap.com/saphelp_erp2005/helpdata/en/78/2176ec51ce11d189570000e829fbbd/frameset.htm
cheers,
Prashanth
P.S Please mark helpful answers