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

ORA-01722: invalid number

Former Member
0 Likes
3,593

Hi,

In this particular program, I have a subroutine and Native SQL statement to connect to the external database.

It always works FINE for me in the Prod. R/3 4.7 system but when I try it in the R/3 4.7 Ides, I'm getting dumped everytime with error above ORA-01722: Invalid Number.

I am puzzle, WHY? I tested in the QA system and it also works. But not in Ides system, why???

Any helps greatly appreciate it.

Tim

Here is the subroutine FORM, It stops right at line "insert into TASK".

-


FORM frmwritesapactivities.

DATA : ctablekey(30) TYPE c.

cstatusmessage = 'Updating the Activities'.

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'

EXPORTING

text = cstatusmessage.

MOVE 'task_task_id' TO ctablekey.

LOOP AT tops WHERE

opaction = 'I' OR

opaction = 'U' OR

opaction = 'R' OR

opaction = 'A'.

ENDLOOP.

IF sy-subrc = 4.

EXIT.

ENDIF.

LOOP AT torders.

LOOP AT tops WHERE aufpl = torders-aufpl AND

( opaction = 'I' OR opaction = 'A' OR opaction = 'U').

WRITE tops-p3eact TO tops-task_code.

WRITE : tblprojdata-proj_id TO tops-proj_id,

'N' TO tops-rev_fdbk_flag,

'N' TO tops-lock_plan_flag,

'N' TO tops-auto_compute_act_flag,

'CP_Drtn' TO tops-complete_pct_type,

'TT_Task' TO tops-task_type,

'DT_FixedDrtn' TO tops-duration_type,

'RV_OK' TO tops-review_type,

'TK_NotStart' TO tops-status_code,

tops-ltxa1 TO tops-task_name,

tops-arbei TO tops-target_work_qty,

tops-arbei TO tops-remain_work_qty,

tops-dauno TO tops-target_drtn_hr_cnt,

tops-dauno TO tops-remain_drtn_hr_cnt,

tops-ismnw TO tops-act_work_qty,

'N' TO tops-DRIVING_PATH_FLAG.

MOVE : tproject-clndr_id TO tops-clndr_id,

0 TO tops-phys_complete_pct,

1 TO tops-est_wt.

IF tops-timerecorded = 'X'.

WRITE : 'TK_Active' TO tops-status_code.

ENDIF.

MODIFY tops.

ENDLOOP.

ENDLOOP.

LOOP AT tops WHERE subop <> 'X' AND

( opaction = 'I' OR opaction = 'A' ).

EXEC SQL.

insert into TASK

( TASK_ID,

PROJ_ID,

WBS_ID,

CLNDR_ID,

EST_WT,

PHYS_COMPLETE_PCT,

RSRC_ID,

REV_FDBK_FLAG,

LOCK_PLAN_FLAG,

AUTO_COMPUTE_ACT_FLAG,

COMPLETE_PCT_TYPE,

TASK_TYPE,

DURATION_TYPE,

REVIEW_TYPE,

STATUS_CODE,

TASK_CODE,

TASK_NAME,

TARGET_WORK_QTY,

TARGET_DRTN_HR_CNT,

REMAIN_WORK_QTY,

REMAIN_DRTN_HR_CNT,

ACT_WORK_QTY )

VALUES (

:tOps-TASK_ID,

:tOps-PROJ_ID,

:tOps-WBS_ID,

:tOps-CLNDR_ID,

:tOps-EST_WT,

:tOps-PHYS_COMPLETE_PCT,

:tOps-RSRC_ID,

:tOps-REV_FDBK_FLAG,

:tOps-LOCK_PLAN_FLAG,

:tOps-AUTO_COMPUTE_ACT_FLAG,

:tOps-COMPLETE_PCT_TYPE,

:tOps-TASK_TYPE,

:tOps-DURATION_TYPE,

:tOps-REVIEW_TYPE,

:tOps-STATUS_CODE,

:tOps-TASK_CODE,

:tOps-TASK_NAME,

:tOps-TARGET_WORK_QTY,

:tOps-TARGET_DRTN_HR_CNT,

:tOps-REMAIN_WORK_QTY,

:tOps-REMAIN_DRTN_HR_CNT,

:tOps-ACT_WORK_QTY )

ENDEXEC.

ENDLOOP.

-


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,763

HI,

It a Oracle database error.

Check the datatypes of all the fields that you are trying to insert in to table TASK.

Maybe you are passing a char into a number field. Pls check if you are mapping all the fields correctly.

Regards

Subramanian

5 REPLIES 5
Read only

Former Member
0 Likes
1,764

HI,

It a Oracle database error.

Check the datatypes of all the fields that you are trying to insert in to table TASK.

Maybe you are passing a char into a number field. Pls check if you are mapping all the fields correctly.

Regards

Subramanian

Read only

0 Likes
1,763

Thanks for respond.

And yes I know what the error meant but the problem here is it always works in Prod or QA but NOT in this Idess system.

Same database that I was using for in QA so I know it is mapping fine.

Tim

Read only

0 Likes
1,763

Anyone, please help.

Read only

0 Likes
1,763

Hi Tim,

Just for a chance, check the number format in both the systems... one may be passing 100,000.00 and other may be 100.000,00 or something like this. Coz, i had the same problem some months back... Check thru' SU01 in SAP and in DB of legacy..

regards,

Audy.

Read only

0 Likes
1,763

Thanks Audum,

that was it. I was assume all set.

caused me 4 hrs.