03-13-2007 9:08 PM
Hello,
I am getting an error on the statement
swc_get_element container 'REQUISITION_NUM' newvariable.
And the error is:
Class ZCL_HRMSS_RECRUITING_WF,Method CREATENBOBJECT
Statement "SWC_GET_ELEMENT" is not defined. Check your spelling.
spelling.
Anybody has an idea whats goin on here.
Regards.
Srinivas.
03-13-2007 9:12 PM
Hi,
At the start of the code please include this
INCLUDE <CNTAIN>.
The macro that you are using SWC_GET_ELEMENT is available in this include and it has to be there at the start of the code.
Hope this helps,
Sudhi
03-13-2007 9:12 PM
Hi,
At the start of the code please include this
INCLUDE <CNTAIN>.
The macro that you are using SWC_GET_ELEMENT is available in this include and it has to be there at the start of the code.
Hope this helps,
Sudhi
03-13-2007 10:39 PM
Hi Sudhi,
Thanks for you reply. I still get some other error:
Include <CNTAIN>
You may only define methods between "CLASS ... IMPLEMENTATION" and
"ENDCLASS".
Here is the code:
INCLUDE <CNTAIN>.
METHOD CREATENBOBJECT.
DATA: newvariable(12) type n.
swc_get_element container 'REQUISITION_NUM' newvariable.
CALL FUNCTION 'ZHRWPC_EREC_CREATE_EREC_OBJECT'
EXPORTING
notif_objid = notificationid
notif_type = notificationtype
IMPORTING
return = return
EXCEPTIONS
no_isr_update = 1
database_error = 2
general_error = 3
req_object_found = 4
no_erec_approval = 5
erec_sys_error = 6
status_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
Messages already raised, exceptions should be handled here
due to workflow intricacy.
ENDIF.
What is wrong with the code.
Thanks and Regards.
Srinivas
03-13-2007 10:53 PM
03-13-2007 11:03 PM
Hello All,
I am getting error:
Include <CNTAIN>
Within classes and interfaces, you can only use "TYPE" to refer to ABAP
Dictionary types, not "LIKE" or "STRUCTURE".
Here is the code:
METHOD CREATENBOBJECT.
INCLUDE <CNTAIN>.
DATA: newvariable(12) type n.
swc_get_element container 'REQUISITION_NUM' newvariable.
CALL FUNCTION 'ZHRWPC_EREC_CREATE_EREC_OBJECT'
EXPORTING
notif_objid = notificationid
notif_type = notificationtype
IMPORTING
return = return
EXCEPTIONS
no_isr_update = 1
database_error = 2
general_error = 3
req_object_found = 4
no_erec_approval = 5
erec_sys_error = 6
status_error = 7
OTHERS = 8.
IF sy-subrc <> 0.
Messages already raised, exceptions should be handled here
due to workflow intricacy.
ENDIF.
ENDMETHOD.
Can anybody tell me whats wrong.
Thanks and Regards
Srinivas
03-13-2007 11:10 PM
03-13-2007 11:12 PM
Hello Srinivas,
In Class and Methods U need to declare the internal tables and structure with <b>TYPE</b> only.
U should not use the <b>Like</b>
Try like this
<b>DATA ITAB TYPE TABLE OF MARA</b>
<b>DATA WA_ITAB TYPE LINE OF MARA</b>
In ur error double click on the error message it will take u to the line where syntax is incorrect.
There make the change like this
Regards,
Vasanth