Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Error in RSQL module of database interface.

$
0
0

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 : BEGINOF 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 ,

         ENDOF S_BSIK .

 

TYPES : BEGINOF S_LFA1 ,

         LIFNR TYPE LIFNR ,

         NAME1 TYPE NAME1 ,

         ENDOF S_LFA1 .

 

TYPES : BEGINOF S_BKPF ,

         BUKRS type BUKRS ,

         BELNR TYPE BELNR ,

         BUDAT TYPE BUDAT ,

         DMBTR TYPE DMBTR ,

         XREVERSAL TYPE XREVERSAL ,

         ENDOF S_BKPF .

 

TYPES : BEGINOF 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 ,

         ENDOF S_FINAL .

 

* INTERNAL TABLE AND WORK AREAA

 

DATA :

        T_BSIK typeSTANDARDTABLEOF S_BSIK ,

        T_LFA1 typeSTANDARDTABLEof S_LFA1 ,

        T_BKPF typeSTANDARDTABLEof S_BKPF ,

        WBSIK TYPE  S_BSIK ,

        WLFA1 TYPE  S_LFA1 ,

        WBKPF TYPE  S_BKPF .

DATA : counttypeivalueisINITIAL .

* SELECTION SCREEN

 

SELECTION-SCREENbeginOFBLOCK Vendor WITHFRAMETITLEtext-000 .

PARAMETERS : p_bukrs TYPE bukrs  .

SELECT-OPTIONS  : P_lifnr for Bsik-lifnr,

                   P_budat for bsik-budat.

SELECTION-SCREENENDOFBLOCK VENDOR .

 

BREAK-POINT .

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

WHERE  LIFNR IN P_lifnr and BUDAT in P_budat.

SORT T_BSIK ASCENDINGBY BELNR .

DELETEADJACENTDUPLICATESFROM T_BSIK COMPARING BELNR .

 

loopat : t_bsik into wbsik.

count = count + 1 .

if wbsik-SHKZG = 'H' .

   WBSIK-DMBTR = -1 * WBSIK-DMBTR .

   modify T_bsik from wbsik indexcount .

   ENDIF .

   endloop .

 

 

   SELECT LIFNR NAME1 FROM  LFA1 INTOTABLE T_LFA1 WHERE LIFNR IN P_lifnr .


 

 



Viewing all articles
Browse latest Browse all 8332

Trending Articles