Application Development and Automation 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: 
Read only

Error when activating the method.

Former Member
0 Likes
1,170

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
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,123

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

DATA: newvariable(12) type n.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,123

Hi Srinivas,

Change your newvariable declaration of variable as follows.

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

Thanks,

Vinay

Read only

0 Likes
1,123

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

Read only

0 Likes
1,123

Post the code as it is exactly in the editor.

Regards,

Rich Heilman

Read only

0 Likes
1,123

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

Read only

0 Likes
1,123

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

Read only

0 Likes
1,123

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.

Read only

0 Likes
1,123

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

Regards,

Rich Heilman

Read only

0 Likes
1,123

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.

Read only

Former Member
0 Likes
1,123

Hi,

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

INCLUDE <cntain>. "Workflow data declarations and routines

Thanks,

Naren

Read only

0 Likes
1,123

Hi Narendran,

What is <cntain>. ?

Could u tell the syntax of include.

Regards.

Srinivas