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 when activating the method.

Former Member
0 Kudos

Hello all,

The code is:

"DATA: newvariable type NUMERIC 12 swc_get_element container 'REQUISITION_NUM' newvariable."

The error am getting when activated is:

Class ZCL_HRMSS_RECRUITING_WF,Method CREATENBOBJECT

"NUMERIC" is a generic type. A type reference is possible only for

field symbols and formal parameters. -

What could be the problem.

Thanks

Srinivas

11 REPLIES 11

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You need to review the basic syntax of the DATA statement.

DATA: newvariable(12) type n.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi Srinivas,

Change your newvariable declaration of variable as follows.

<b>DATA: newvariable(12) type N.</b>

Thanks,

Vinay

0 Kudos

I get one more error after making changes what you said.

Class ZCL_HRMSS_RECRUITING_WF,Method CREATENBOBJECT

",", "VALUE ...", "LENGTH ...", "DECIMALS ...", or "VALUE IS INITIAL"

expected after "N".

Regards.

Srinivas

0 Kudos

Post the code as it is exactly in the editor.

Regards,

Rich Heilman

0 Kudos

Hi Rich,

Here it is:

METHOD CREATENBOBJECT .

DATA: newvariable(12) type N swc_get_element container 'REQUISITION_NUM' newvariable.

CALL FUNCTION 'HRWPC_EREC_CREATE_EREC_OBJECT'

PS: is being imported from the container which was bound to workflow container.

Regards.

Srinivas

0 Kudos

I think you may be running two statements together. Put a period after the N

  data: newvariable(12) type n.

  swc_get_element container 'REQUISITION_NUM' newvariable.   "I think this is a macro

Regards,

RIch Heilman

0 Kudos

Hi Rich,

I put the period, now I get a different error:

Class ZCL_HRMSS_RECRUITING_WF,Method CREATENBOBJECT

Statement "SWC_GET_ELEMENT" is not defined. Check your spelling.

spelling.

0 Kudos

RIght, what is this statement, is it a macro?

Regards,

Rich Heilman

0 Kudos

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.

Former Member
0 Kudos

Hi,

You have to add the following include to invoke the macros..

INCLUDE <cntain>. "Workflow data declarations and routines

Thanks,

Naren

0 Kudos

Hi Narendran,

What is <cntain>. ?

Could u tell the syntax of include.

Regards.

Srinivas