2013 Mar 05 7:28 PM
Hello Experts
i am new in this field when i create my program i need to check my steps in the debugger mode i faced the following problem
Error
ShrtText
Error in RSQL module of database interface.
What happened?
Error in ABAP application program.
The current ABAP program "!VS3" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not
caught, which
led to a runtime error. The reason for this exception is:
The data read during a SELECT access could not be inserted into the
target field.
Either conversion is not supported for the target field's type or the
target field is too short to accept the value or the data are not in a
form that the target field can accept
75 BREAK-POINT .
>>>>> SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK
77 WHERE LIFNR IN P_lifnr and BUDAT in P_budat.
78 SORT T_BSIK ASCENDING BY BELNR .
79 DELETE ADJACENT DUPLICATES FROM T_BSIK COMPARING BELNR .
80
81 loop at : t_bsik into wbsik.
82 count = count + 1 .
code
REPORT ZVS3.
TYPE-POOLS: SLIS .
TABLES : BSIK , LFA1 , BKPF , SKA1 .
*Defination Referances
TYPES : BEGIN OF S_BSIK ,
BUKRS type BUKRS ,
LIFNR type LIFNR ,
GJAHR type GJAHR ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
WAERS TYPE WAERS ,
SHKZG TYPE SHKZG ,
DMBTR TYPE DMBTR ,
END OF S_BSIK .
TYPES : BEGIN OF S_LFA1 ,
LIFNR TYPE LIFNR ,
NAME1 TYPE NAME1 ,
END OF S_LFA1 .
TYPES : BEGIN OF S_BKPF ,
BUKRS type BUKRS ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
DMBTR TYPE DMBTR ,
XREVERSAL TYPE XREVERSAL ,
END OF S_BKPF .
TYPES : BEGIN OF S_FINAL ,
BUKRS type BUKRS ,
LIFNR type LIFNR ,
GJAHR type GJAHR ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
WAERS TYPE WAERS ,
DMBTR TYPE DMBTR ,
SHKZG TYPE SHKZG ,
SAKNR TYPE SAKNR ,
NAME1 TYPE NAME1 ,
XREVERSAL TYPE XREVERSAL ,
TXT50 TYPE TXT50 ,
END OF S_FINAL .
* INTERNAL TABLE AND WORK AREAA
DATA :
T_BSIK type STANDARD TABLE OF S_BSIK ,
T_LFA1 type STANDARD TABLE of S_LFA1 ,
T_BKPF type STANDARD TABLE of S_BKPF ,
WBSIK TYPE S_BSIK ,
WLFA1 TYPE S_LFA1 ,
WBKPF TYPE S_BKPF .
DATA : count type i value is INITIAL .
* SELECTION SCREEN
SELECTION-SCREEN begin OF BLOCK Vendor WITH FRAME TITLE text-000 .
PARAMETERS : p_bukrs TYPE bukrs .
SELECT-OPTIONS : P_lifnr for Bsik-lifnr,
P_budat for bsik-budat.
SELECTION-SCREEN END OF BLOCK VENDOR .
BREAK-POINT .
SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK
WHERE LIFNR IN P_lifnr and BUDAT in P_budat.
SORT T_BSIK ASCENDING BY BELNR .
DELETE ADJACENT DUPLICATES FROM T_BSIK COMPARING BELNR .
loop at : t_bsik into wbsik.
count = count + 1 .
if wbsik-SHKZG = 'H' .
WBSIK-DMBTR = -1 * WBSIK-DMBTR .
modify T_bsik from wbsik index count .
ENDIF .
endloop .
SELECT LIFNR NAME1 FROM LFA1 INTO TABLE T_LFA1 WHERE LIFNR IN P_lifnr .
Hello Experts
i am new in this field when i create my program i need to check my steps in the debugger mode i faced the following problem
Error
ShrtText
Error in RSQL module of database interface.
What happened?
Error in ABAP application program.
The current ABAP program "!VS3" had to be terminated because one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
Error analysis
An exception occurred. This exception will be dealt with in more detail
below. The exception, assigned to the class 'CX_SY_OPEN_SQL_DB', was not
caught, which
led to a runtime error. The reason for this exception is:
The data read during a SELECT access could not be inserted into the
target field.
Either conversion is not supported for the target field's type or the
target field is too short to accept the value or the data are not in a
form that the target field can accept
75 BREAK-POINT .
>>>>> SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK
77 WHERE LIFNR IN P_lifnr and BUDAT in P_budat.
78 SORT T_BSIK ASCENDING BY BELNR .
79 DELETE ADJACENT DUPLICATES FROM T_BSIK COMPARING BELNR .
80
81 loop at : t_bsik into wbsik.
82 count = count + 1 .
code
REPORT ZVS3.
TYPE-POOLS: SLIS .
TABLES : BSIK , LFA1 , BKPF , SKA1 .
*Defination Referances
TYPES : BEGIN OF S_BSIK ,
BUKRS type BUKRS ,
LIFNR type LIFNR ,
GJAHR type GJAHR ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
WAERS TYPE WAERS ,
SHKZG TYPE SHKZG ,
DMBTR TYPE DMBTR ,
END OF S_BSIK .
TYPES : BEGIN OF S_LFA1 ,
LIFNR TYPE LIFNR ,
NAME1 TYPE NAME1 ,
END OF S_LFA1 .
TYPES : BEGIN OF S_BKPF ,
BUKRS type BUKRS ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
DMBTR TYPE DMBTR ,
XREVERSAL TYPE XREVERSAL ,
END OF S_BKPF .
TYPES : BEGIN OF S_FINAL ,
BUKRS type BUKRS ,
LIFNR type LIFNR ,
GJAHR type GJAHR ,
BELNR TYPE BELNR ,
BUDAT TYPE BUDAT ,
WAERS TYPE WAERS ,
DMBTR TYPE DMBTR ,
SHKZG TYPE SHKZG ,
SAKNR TYPE SAKNR ,
NAME1 TYPE NAME1 ,
XREVERSAL TYPE XREVERSAL ,
TXT50 TYPE TXT50 ,
END OF S_FINAL .
* INTERNAL TABLE AND WORK AREAA
DATA :
T_BSIK type STANDARD TABLE OF S_BSIK ,
T_LFA1 type STANDARD TABLE of S_LFA1 ,
T_BKPF type STANDARD TABLE of S_BKPF ,
WBSIK TYPE S_BSIK ,
WLFA1 TYPE S_LFA1 ,
WBKPF TYPE S_BKPF .
DATA : count type i value is INITIAL .
* SELECTION SCREEN
SELECTION-SCREEN begin OF BLOCK Vendor WITH FRAME TITLE text-000 .
PARAMETERS : p_bukrs TYPE bukrs .
SELECT-OPTIONS : P_lifnr for Bsik-lifnr,
P_budat for bsik-budat.
SELECTION-SCREEN END OF BLOCK VENDOR .
BREAK-POINT .
SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK
WHERE LIFNR IN P_lifnr and BUDAT in P_budat.
SORT T_BSIK ASCENDING BY BELNR .
DELETE ADJACENT DUPLICATES FROM T_BSIK COMPARING BELNR .
loop at : t_bsik into wbsik.
count = count + 1 .
if wbsik-SHKZG = 'H' .
WBSIK-DMBTR = -1 * WBSIK-DMBTR .
modify T_bsik from wbsik index count .
ENDIF .
endloop .
SELECT LIFNR NAME1 FROM LFA1 INTO TABLE T_LFA1 WHERE LIFNR IN P_lifnr .
2013 Mar 21 12:37 PM
2013 Mar 21 3:09 PM
hi
dont ask for points.........before asking points,
Read the Rules of Engagement
Obey this rules of SCN.....
Thanks
Sabyasachi
2013 Mar 21 3:11 PM
write:
This is is the correct solution i think.
Expecting points if needfull.
Thanks & regards
Kranthi Kumar Reddy.
Thanks
Sabyasachi
2013 Mar 21 2:18 PM
Hello Sam,
To resolve this error change your definition of BELNR in S_BSIK to "BELNR TYPE BELNR_D".
The type definition of BELNR is actually a structure made up of two data elements: ZEILE and
EBELP.
The system is saying that BSIK-BELNR does not match the data type BELNR.
Use type BELNR_D instead.
Regards,
Kim
2013 Mar 21 2:55 PM
Hello Sam,
i understand and you have to done some correction in your code.....
TYPES : BEGIN OF S_BSIK ,
BUKRS type BUKRS ,
LIFNR type LIFNR ,
GJAHR type GJAHR ,
BELNR TYPE BELNR_d ,
BUDAT TYPE BUDAT ,
WAERS TYPE WAERS ,
SHKZG TYPE SHKZG ,
DMBTR TYPE DMBTR ,
END OF S_BSIK .
go to bsik table and check data element of belnr field.......for this reason it causes dump...target field is not matched to database......
Thanks
Sabyasachi
2013 Mar 21 3:15 PM
Hello SAm,
when you create a structure in se38, then always maintain a sequence with database field.....
E.G:
types: begin of ty_mara, field dataelement
f1 type matnr, in database table-> f1 matnr
f2 type mtart, f2 mtart
end of ty_mara.
hope you understand what i am telling.......it gives better performance.......
Thanks
Sabyasachi
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |