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

Control table error, need a numeric value

Former Member
0 Likes
849

Hi guys,

im using an internal table that is displayed via control table.

im displaying employee number (pa0001-pernr)

loans, save plan etc,

my problem is that when i add pa0001 table to my SeLect, an error is displayed in the control table that reads "You need to enter a numeric number"

I add that table (pa0001) for getting the sname field (employee full name)

  • ti_news

data: BEGIN OF ti_new occurs 0.

DATA: status like zthrca001-status,

sname like pa0001-sname,

marca(2),

END of ti_new.

SELECT *

INTO CORRESPONDING FIELDS OF TABLE ti_news

FROM zthrca002 inner join zthrca001

ON ( zthrca002idmov = zthrca001idmov )

<b>inner join Pa0001

ON ( zthrca002PERNR = Pa0001PERNR )</b> WHERE zthrca001~status = 'P'.

if i remove the inner join with pa0001 the error disapear, but i need the sname field

=( any help?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
731

hi

i had a seem mistake you must check the control table atributes sometimes when you use control table wizard it puts the char atributes as numeric and you need to change it manually.

Regards.

5 REPLIES 5
Read only

Former Member
0 Likes
731

hi Javier,

Check whether the datatype of PERNR is same in zthrca002 and Pa0001.

Small observation donot give * in the select statement take the required fields.

Regards,

Santosh

Read only

0 Likes
731

the datatype is the same PERSNO

i remove the * from the SELECT and only write the fields that i need and the error is still displayed

=(

Read only

Former Member
0 Likes
731

hi Javier,

Refer this Link you may get an idea where you have made the mistake ..

http://www.sap-img.com/abap/inner-joins.htm

<b>Paste your latest code </b>

Regards,

Santosh

Read only

0 Likes
731
  • TI news

data: BEGIN OF ti_news occurs 0.

include structure zthrca002.

DATA: status like zthrca001-status,

sname like pa0001-sname,

marca(2),

END of ti_news.

SELECT status sname zthrca001idmov zthrca002pernr fecha pahorro

INTO CORRESPONDING FIELDS OF TABLE ti_news

FROM zthrca002 inner join zthrca001

ON ( zthrca002idmov = zthrca001idmov )

inner join Pa0001

ON ( zthrca002PERNR = Pa0001PERNR )

WHERE zthrca001~status = 'P'.

the error do not happen on runtime, (i can conpile and run)

the error appears when im trying to do something after the ti_news is displayed on the control table

( u need to enter a numeric value)

Read only

Former Member
0 Likes
732

hi

i had a seem mistake you must check the control table atributes sometimes when you use control table wizard it puts the char atributes as numeric and you need to change it manually.

Regards.