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

Table with RAW Data type and Store the data

ipravir
Active Contributor
0 Likes
5,393

Hi,

I have created a table using RAW DATA type or RAW STRING.

Table field would be

Client ID,

One Primary Key with 4 NUMC, and

one RAW Data type columns with 250 Size

.

Requirement:

I Want to Store the data into this table and Retrieve Back.

Kindly suggest any good documentation to bunch of code regarding RAW or RAWSTRING data process, that could be helpful for me.

Thanks.

Praveer.

6 REPLIES 6
Read only

Former Member
0 Likes
2,860

Hi Praveer,

Hope you are selecting those fields from database and keeping in same internal table/structure in the program. Just declare those fields X(n) in your program,they will be selected.

Hope this helps.

Regards,

Supratik

Read only

0 Likes
2,860

Hi Supratik,

In my program I declared the MATNR MAKTX, MTART,MATKL inside a structure.

and I want these information store in RAW field of the Z* table.

Can you provide some code information to store and retrieve back the same data.

Regards.

Praveer.

Read only

0 Likes
2,860

Hi Praveer,

So you have created the Z table with some fields as type RAW?

If yes then just create a internal table(say itab1) of that type in your program. and populate that internal table from the values of MATNR MAKTX, MTART,MATKL(using MOVE statement). Then insert the values from your internal table(itab1) to DB table of yours which you have created.

Regards,

Supratik

Read only

Former Member
0 Likes
2,860

Hi,

Declare a internal table having the same structure as database table .

( data: i_tab type TABLE OF Zraw    )

Then i think we can fetch values from database table

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,860

Why didn't you use a cluster INDX table type, managed with EXPORT TO/IMPORT FROM DATABASE ?

Regards,

Raymond

Read only

0 Likes
2,860

Hi,

Kinldy find the below code and table and suggest how to insert the query information in DB table.

   REPORT ZPRV_RAW_TEST.
TABLES:   ZPRVRAW.


TYPES:    BEGIN OF  S_MARA,
            MATNR TYPE MATNR,
            MAKTS TYPE MAKTX,
            MTART TYPE MARA-MTART,
            MATKL TYPE MARA-MATKL,
          END OF    S_MARA.

DATA:     GIT_MARA  TYPE STANDARD TABLE OF S_MARA,
          GFL_MARA  LIKE LINE OF GIT_MARA.


START-OF-SELECTION.
SELECT M~MATNR X~MAKTX M~MTART M~MATKL FROM MARA AS M
                                       INNER JOIN MAKT AS X
                                       ON M~MATNR EQ X~MATNR
                                       INTO TABLE GIT_MARA
                                       WHERE X~SPRAS EQ SY-LANGU.


END-OF-SELECTION.
IF LINES( GIT_MARA ) EQ 0.
  EXIT.
ENDIF.

Regards.

Praveer