Application Development 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: 

Fetching data from Table cluster e.g. RFBLG

sunit_s
Participant
0 Kudos

Hi Gurus

I want to write a ABAP program to:

1. read data from Table cluster RFBLG,

2. filter data concerning BSEG,

3. decompress data from column Vardata and

4. fill transparent z table.

How this can be done. How do decompress data from Vardata column?

Is there a better way to achieve the above i.e. select enteries from table cluster and populate uncompressed data to transperant table?

Rgds

Sunny

1 REPLY 1

Former Member
0 Kudos

Hi,

1. Fetch the data into a internal table for RFBLG.

2. Now for decompressing use a FM 'RRXWS_RAW_TO_CHAR'. Now here get the char data ( converted data ) into another field of itab.

3. finally ur internal table will be filled with the req value.

4. Filtering wrt BSEG can be done based on the converted value.

5. Upload the data in Transparent Ztable.

TYPES: BEGIN OF ty_itab.

INCLUDE type RFBLG.

types: conv_data type string.

Types: end OF ty_itab.

data: itab type TABLE OF ty_itab,

wa_itab type ty_itab,

rawitab type TABLE OF bapiconten,

wa_rawitab type bapiconten,

it_conv type TABLE OF w3html,

wa_conv type w3html.

select * from RFBLG into CORRESPONDING FIELDS OF TABLE itab UP TO 10 ROWS.

loop at itab INTO wa_itab.

wa_rawitab-line = wa_itab-vardata .

append wa_rawitab to rawitab.

CALL FUNCTION 'RRXWS_RAW_TO_CHAR'

EXPORTING

I_T_RAW_DATA = rawitab

IMPORTING

E_T_HTML = it_conv

.

loop at it_conv INTO wa_conv.

CONCATENATE wa_itab-conv_data wa_conv-line INTO wa_itab-conv_data.

endloop.

MODIFY itab from wa_itab TRANSPORTING conv_data.

ENDLOOP.

insert ztable from TABLE itab.

Note create ztable with same fields as in the internal table ITAB.

Hope this will surely help you !!

Thanks & Regards,

Punit.