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 in RSQL module of database interface.

Former Member
0 Likes
871

Hello Experts

i am new in this field when i create my program and when  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 .



1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
838

Hi Sam,

BREAK-POINT .

SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK

               In the above select query the field BELNR it is defined as BELNR TYPE BELNR,but in the Data base table it is defined as BELNR   TYPE  BELNR_D.So in the report level also  you declare the same type .

Regards,

Anand raj.S

Hello Experts

i am new in this field when i create my program and when  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 .



5 REPLIES 5
Read only

Former Member
0 Likes
839

Hi Sam,

BREAK-POINT .

SELECT BUKRS LIFNR GJAHR BELNR BUDAT WAERS SHKZG DMBTR FROM BSIK INTO table T_BSIK

               In the above select query the field BELNR it is defined as BELNR TYPE BELNR,but in the Data base table it is defined as BELNR   TYPE  BELNR_D.So in the report level also  you declare the same type .

Regards,

Anand raj.S

Read only

0 Likes
838

Thanks for your Advice

the problem solved by follow your advice

thanks anad soooooooooo Much

Read only

0 Likes
838

Could you please give me the steps in order to make the ALV Report in the tree form

Read only

Former Member
0 Likes
838

Hi Sam,

                Kindly refer the standard program BCALV_TREE_DEMO,you will get an idea,close the thread once you  get the solution.

Regards,

  Anand raj.S

Read only

Former Member
0 Likes
838

Hi Sam,

                Kindly refer the standard program BCALV_TREE_DEMO,you will get an idea,close the thread once you  get the solution.

Regards,

  Anand raj.S