cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Dump while extracting data

0 Kudos

Dear Experts,

I have written a following coding in infopackge . I am extracting data via UD Connect from SQL Data Base.

When I am scheduling my Info Package it is giving me dump DBIF_RSQL_INVALID_RSQL.but if I am going back it is scheduling my infopackge. Can you pls. advise.


*$*$ begin of routine - insert your code only below this line        *-*
data: l_idx like sy-tabix.
read table l_t_range with key
     fieldname = 'DATE_TIME'. 
l_idx = sy-tabix.

*DATA : zchar(1) TYPE c,
data:     zday(2) TYPE n,
          zmonth(2) TYPE n,
          zyear(4) TYPE n,
          zstr1 TYPE string,
          zstr2 TYPE string,
          zstr3 TYPE string,
          zstr4 TYPE string,
          zstr5 TYPE string,
          zstr6 TYPE string,
          zdate TYPE sy-datum,
          zdate3 TYPE sy-datum,
          zdate2 TYPE sy-datum,
          zday1(2) TYPE n,
          zmonth1(2) TYPE n,
          zyear1(4) TYPE n.
   CLEAR : zday(2),zmonth(2),zyear(4),zstr1,zstr2,zdate ,
    zdate2,zdate3,zday1(2)
            ,zmonth1(2),zyear1(4),zstr1,zstr2,zstr3,zstr4,zstr5,zstr6.


    zdate = sy-datum - 1.


    IF zdate+4(2) EQ '01' AND zdate+6(2) EQ '01'.
      zday = zdate+6(2).
      zmonth = '12'.
      zyear = zdate(4) - 1.
    ELSE.
*   zdate+6(2) EQ '01'.
      zday = zdate+6(2).
      zmonth = zdate+4(2) - 1.
      zyear = zdate(4).

    ENDIF.
CONCATENATE  zyear zmonth zday INTO zdate2.

    CALL FUNCTION 'SLS_MISC_GET_LAST_DAY_OF_MONTH'
      EXPORTING
        day_in            = zdate2
      IMPORTING
        last_day_of_month = zdate3
      EXCEPTIONS
        day_in_not_valid  = 1
        OTHERS            = 2.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.


zstr1 = '00:00:00:01 AM'.
    zstr2 = '23:59:59:00 PM'.
*    zstr3 = '/'.
    zday1 = zdate3+6(2).
    zmonth1 = zdate3+4(2).
    zyear1 = zdate3(4).
CONCATENATE zyear1 '/' zmonth1  '/' zday1  INTO zstr4.
    CONCATENATE zstr4 zstr1 INTO zstr5 SEPARATED BY space.
    CONCATENATE zstr4 zstr2 INTO zstr6 SEPARATED BY space

    l_t_range-low = zstr5.
    l_t_range-high = zstr6.
    l_t_range-sign = 'I'.
    l_t_range-option = 'BT'.
*....
modify l_t_range index l_idx.

p_subrc = 0.

*$*$ end of routine - insert your code only before this line         *-*
endform

.

Pls. help.

Regards,

Ashwini

Accepted Solutions (0)

Answers (1)

Answers (1)

Pravender
Active Contributor
0 Kudos

At which line of the code it is showing the error?

You can check it in the dump screen.

0 Kudos

Hi,

It is showing an error in the first line of INSERT . i.e. while inserting into PSA Table.

INSERT      /BIC/B0001456000
     FROM TABLE  l_t_data
  ACCEPTING DUPLICATE KEYS.

In the data source I have ticked for Duplicate records allowed.

Pls.help.

Regards,

Ashwini

Former Member
0 Kudos

Hi,

can you try with modify statement?

Regards,

Ravi