SAP for Retail Discussions
Join conversations about personalization, omnichannel strategies, and operational excellence in retail using SAP for Retail software.
cancel
Showing results for 
Search instead for 
Did you mean: 

Dump when extracting data 0RT_PA_TRAN_CONTROL

Loed
Active Contributor
0 Kudos

Hi guys,

Just want to ask if you guys already encountered this problem?

I am using the standard datasource 0RT_PA_TRAN_CONTROL. I appended some fields on it (I used BADI to provide data for the additional fields) and extracting is fine since October 6, 2015. However, Last January 5, 2016 the extractor encountered the error below every time the number of rows extracted reached 1,263,116. I read some threads about this error (but not related with this datasource) but any solution mentioned did not solve the problem. Please refer for error details below.

Some threads:

SAP Search

Before the error happened, we can extract more than 1,263,116 records so I think this is not related with number of records being extracted. Do you think one the fields exceeded the number of length of the infoobject? But if that's the case, data should be truncated right? Or is it related with the internal table? Can I still optimize my code below?

Where do you guys think is the problem? Any idea how to solve this?

Here is the BADI code:

method IF_EX_RSU5_SAPI_BADI~DATA_TRANSFORM.

  CHECK i_datasource = '0RT_PA_TRAN_CONTROL'.

DATA: lt_data TYPE TABLE OF /POSDW/BW_RETAIL_CONTROL.

  FIELD-SYMBOLS: <ls_data> TYPE /POSDW/BW_RETAIL_CONTROL.

*----------------------------------------------------------------*

* Internal table for /POSDW/TLOGF

*----------------------------------------------------------------*

  TYPES:

  BEGIN OF ty_tran_control,

FIELDGROUP TYPE /POSDW/BW_RETAIL_CONTROL-FIELDGROUP,

FIELDNAME TYPE /POSDW/BW_RETAIL_CONTROL-FIELDNAME,

    FIELDVALUE TYPE /POSDW/BW_RETAIL_CONTROL-FIELDVALUE,

    RETAILSTOREID TYPE /POSDW/BW_RETAIL_CONTROL-RETAILSTOREID,

BUSINESSDAYDATE TYPE /POSDW/BW_RETAIL_CONTROL-BUSINESSDAYDATE,

TRANSINDEX TYPE /POSDW/BW_RETAIL_CONTROL-TRANSINDEX,

    ROWKEY type /POSDW/TLOGF-ROWKEY,

  LOYNUMBER type /POSDW/TLOGF-LOYNUMBER,

CUSTCARDNUMBER type /POSDW/TLOGF-CUSTCARDNUMBER,

LOYPROGRAMID type /POSDW/TLOGF-LOYPROGRAMID,

LOYPNTSAWARDED type /POSDW/TLOGF-LOYPNTSAWARDED,

LOYPNTSREDEEMED type /POSDW/TLOGF-LOYPNTSREDEEMED,

ORIGSTOREID type /POSDW/TLOGF-ORIGSTOREID,

ORIGBUSINESSDATE type /POSDW/TLOGF-ORIGBUSINESSDATE,

ORIGWRKSTID type /POSDW/TLOGF-ORIGWRKSTID,

ORIGTRANSNUMBER type /POSDW/TLOGF-ORIGTRANSNUMBER,

VOIDEDLINE type /POSDW/TLOGF-VOIDEDLINE,

  END OF ty_tran_control.

  DATA:

  lt_tran_control type standard table of ty_tran_control,

  ls_tran_control type ty_tran_control.

  lt_data[] = c_t_data[].

*----------------------------------------------------------------*

* Read data into internal memory

*----------------------------------------------------------------*

  select

  FIELDGROUP

FIELDNAME

FIELDVALUE

    RETAILSTOREID

    BUSINESSDAYDATE

    TRANSINDEX

    ROWKEY

    LOYNUMBER

CUSTCARDNUMBER

LOYPROGRAMID

LOYPNTSAWARDED

LOYPNTSREDEEMED

ORIGSTOREID

ORIGBUSINESSDATE

ORIGWRKSTID

ORIGTRANSNUMBER

VOIDEDLINE

  from /POSDW/TLOGF

  into table lt_tran_control

  for all entries in lt_data

  where

    RETAILSTOREID = lt_data-RETAILSTOREID and

BUSINESSDAYDATE = lt_data-BUSINESSDAYDATE and

TRANSINDEX = lt_data-TRANSINDEX and

    FIELDNAME = 'MIN'.

    sort lt_tran_control by  RETAILSTOREID DESCENDING BUSINESSDAYDATE DESCENDING TRANSINDEx DESCENDING

    fieldgroup DESCENDING fieldname DESCENDING fieldvalue DESCENDING

       LOYNUMBER DESCENDING

CUSTCARDNUMBER DESCENDING

LOYPROGRAMID DESCENDING

LOYPNTSAWARDED DESCENDING

LOYPNTSREDEEMED DESCENDING

ORIGSTOREID DESCENDING

ORIGBUSINESSDATE DESCENDING

ORIGWRKSTID DESCENDING

ORIGTRANSNUMBER DESCENDING

VOIDEDLINE DESCENDING.

    delete ADJACENT DUPLICATES FROM lt_tran_control COMPARING RETAILSTOREID BUSINESSDAYDATE TRANSINDEX.

  LOOP AT lt_data ASSIGNING <ls_data>.

  read table lt_tran_control into ls_tran_control

  with key

     RETAILSTOREID = <ls_data>-RETAILSTOREID

BUSINESSDAYDATE = <ls_data>-BUSINESSDAYDATE

TRANSINDEX = <ls_data>-TRANSINDEX.

  if sy-subrc eq 0.

  <ls_data>-FIELDGROUP = ls_tran_control-FIELDGROUP.

  <ls_data>-FIELDNAME = ls_tran_control-FIELDNAME.

  <ls_data>-FIELDVALUE = ls_tran_control-FIELDVALUE.

  <ls_data>-LOYNUMBER = ls_tran_control-LOYNUMBER.

<ls_data>-CUSTCARDNUMBER = ls_tran_control-CUSTCARDNUMBER.

<ls_data>-LOYPROGRAMID = ls_tran_control-LOYPROGRAMID.

<ls_data>-LOYPNTSAWARDED = ls_tran_control-LOYPNTSAWARDED.

<ls_data>-LOYPNTSREDEEMED = ls_tran_control-LOYPNTSREDEEMED.

<ls_data>-ORIGSTOREID = ls_tran_control-ORIGSTOREID.

<ls_data>-ORIGBUSINESSDATE = ls_tran_control-ORIGBUSINESSDATE.

<ls_data>-ORIGWRKSTID = ls_tran_control-ORIGWRKSTID.

<ls_data>-ORIGTRANSNUMBER = ls_tran_control-ORIGTRANSNUMBER.

<ls_data>-VOIDEDLINE = ls_tran_control-VOIDEDLINE.

  endif.

  ENDLOOP.

  REFRESH c_t_data.

  c_t_data[] = lt_data[].

   endmethod.

Thank you.

Loed

1 ACCEPTED SOLUTION

Loed
Active Contributor

Hi guys,

Thanks Raf for your time to answer my queries..

Solution can be found in this thread..

Regards,

Loed

View solution in original post

4 REPLIES 4

RafkeMagic
Active Contributor

My 5 cents: the variable rfcbyte_wa is not cleared in time... don't see why this would have anything to do with your BADI

Regarding your BADI code: you should be very careful with the for all entries statement... there are a couple of posts around that (I'm sure you can find the one you need - you may have to look in the ABAP forum). You only use 3 fields of lt_data (which, I assume, contains a lot more then these 3 fields) and your table is not sorted (and probably contains duplicates on that level).

Loed
Active Contributor
0 Kudos

Hi Raf,

What do you mean by rfcbyte_wa is not cleared in time? If so, how can I solve it so it will be cleared in time?

Thanks for the tip about FOR ALL ENTRIES, found this wiki..

Learn For All Entries - Things to consider before use - Code Gallery - SCN Wiki

Thank you..

Loed

0 Kudos

obviously that's the one getting "too big" and it's only cleared via an "at end of" statement... nothing you can do about it, it's a SAP standard program

(unless you figure out why it's getting that big - if you feel like debugging, the loop there is the part I would be debugging)

Loed
Active Contributor

Hi guys,

Thanks Raf for your time to answer my queries..

Solution can be found in this thread..

Regards,

Loed