‎2013 Oct 08 8:21 AM
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.
‎2013 Oct 08 8:39 AM
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
‎2013 Oct 08 9:25 AM
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.
‎2013 Oct 08 9:38 AM
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
‎2013 Oct 08 9:08 AM
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
‎2013 Oct 08 9:48 AM
Why didn't you use a cluster INDX table type, managed with EXPORT TO/IMPORT FROM DATABASE ?
Regards,
Raymond
‎2013 Oct 11 7:52 AM
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