‎2009 Jan 10 10:52 AM
Hi Abapers,
In developement program is running successfully.
Same program giving dump in Quality and error is as follows.
An exception occurred that is explained in detail below.
The exception, which is assigned to class 'CX_SY_OPEN_SQL_DB', was not caught
in
procedure "MAIN_SELECTION" "(FORM)", nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the
exception would occur, the current program is terminated.
The reason for the exception is:
In a SELECT access, the read file could not be placed in the target
field provided.
Either the conversion is not supported for the type of the target field,
the target field is too small to include the value, or the data does not
have the format required for the target field.
Please let me know the solution.
Regards,
Simha.
Use Meaningful subject
Edited by: Vijay Babu Dudla on Jan 14, 2009 7:47 AM
‎2009 Jan 10 11:02 AM
Hello Shakya,
Is it possible to put your select query here so that we can check the exact issue.
Regards,
Pavan
‎2009 Jan 10 11:02 AM
Check if the fields you are selecting are in the same sequence as in the database table.
Also check all the fields being selected are there in the internal table or work area into which you are selecting data.
regards,
Jinson
‎2009 Jan 10 11:02 AM
Hello Shakya,
Is it possible to put your select query here so that we can check the exact issue.
Regards,
Pavan
‎2009 Jan 10 11:32 AM
TYPES:BEGIN OF EKPO_TY,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
LOEKZ LIKE EKPO-LOEKZ,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
MATKL LIKE EKPO-MATKL,
NETWR LIKE EKPO-NETPR,
WKURS LIKE EKKO-WKURS,
NETWR1 TYPE P DECIMALS 2,
END OF EKPO_TY.
data EKPO_IT1 TYPE STANDARD TABLE OF EKPO_TY,
SELECT EBELN
EBELP
LOEKZ
MATNR
WERKS
MATKL
NETWR
FROM EKPO INTO CORRESPONDING
FIELDS OF TABLE EKPO_IT1
FOR ALL ENTRIES IN EKKO_IT
WHERE EBELN = EKKO_IT-EBELN
AND LOEKZ NE 'L'.
this is my select query.
Regards,
Simha.
‎2009 Jan 10 11:50 AM
The problem is in the declaration of the field NETWR, you are refering it to the field NETPR which has a length of 11 but the field NETWR has a length of 13.
Do the following :
TYPES:BEGIN OF EKPO_TY,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
LOEKZ LIKE EKPO-LOEKZ,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
MATKL LIKE EKPO-MATKL,
NETWR LIKE EKPO-NETPR, " change this to NETWR LIKE EKPO-NETWR
WKURS LIKE EKKO-WKURS,
NETWR1 TYPE P DECIMALS 2,
END OF EKPO_TY.regards,
Advait
‎2009 Jan 14 11:10 AM
Hello Shakya,
When you use "INTO CORRESPONDING FIELDS", then, the fields declaration in your internal table should be the same that of fields you are selecting in the query.
As other mates have suggested, change the "NETWR" declaration to EKPO-NETWR and this should work.
Please let us know if you more problems with this query.
Regards,
pavan
‎2009 Jan 10 8:54 PM
hi,
TYPES: BEGIN OF EKPO_TY,
EBELN LIKE EKPO-EBELN,
EBELP LIKE EKPO-EBELP,
LOEKZ LIKE EKPO-LOEKZ,
MATNR LIKE EKPO-MATNR,
WERKS LIKE EKPO-WERKS,
MATKL LIKE EKPO-MATKL,
NETWR LIKE EKPO-NETWR, " make it netwr and not netpr
WKURS LIKE EKKO-WKURS,
NETWR1 TYPE P DECIMALS 2,
END OF EKPO_TY.
data EKPO_IT1 TYPE STANDARD TABLE OF EKPO_TY,
SELECT EBELN
EBELP
LOEKZ
MATNR
WERKS
MATKL
NETWR
FROM EKPO into (field names here)EKPO_IT1
FOR ALL ENTRIES IN EKKO_IT
WHERE EBELN = EKKO_IT-EBELN
AND LOEKZ NE 'L'.
Also in your code avoid using "corresponding fields of table"
thanks
‎2014 Mar 16 1:18 PM