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

Storing/retrieving binary data in/from a database table

matt
Active Contributor
0 Likes
1,615

I've defined my table as:

MANDT	        MANDT	                        CLNT	3
/BIC/GLPLANT	/BIC/OIGLPLANT	                CHAR	4
/BIC/GLMATPLNT	/BIC/OIGLMATPLNT	        CHAR	18
HEXVALUE	SXIVERI_BINARY	RAWSTRING	0

I've defined my structure in my program, and read from my table

DATA: BEGIN OF ls_in_data,
        /bic/glplant   TYPE /bic/oiglplant,
        /bic/glmatplnt TYPE	/bic/oiglmatplnt,
        hexvalue       TYPE xstring,
      END OF ls_in_data.
...
* Populating ls_in_data
...
SELECT SINGLE * INTO ls_in_data FROM z_mytable...

and I get the messages:

The types for the database table and work area (or internal table) "LS_IN_DATA" are not compatible.

As far as my program goes, the hexvalue MUST be xstring. What type should I use in my database table?

thanks

matt

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
1,489

Are you sure it's not because MANDT is missing in LS_IN_DATA? RAWSTRING (DDIC) corresponds to XSTRING (ABAP), as far as I know.

Thomas

9 REPLIES 9
Read only

ThomasZloch
Active Contributor
0 Likes
1,490

Are you sure it's not because MANDT is missing in LS_IN_DATA? RAWSTRING (DDIC) corresponds to XSTRING (ABAP), as far as I know.

Thomas

Read only

JozsefSzikszai
Active Contributor
0 Likes
1,489

The client is missing from the definition in the program... Are you sure it is not necessary?

Read only

matt
Active Contributor
0 Likes
1,489

>

> The client is missing from the definition in the program... Are you sure it is not necessary?

Of course I'm sure! I should use client specified otherwise... I'm 100% sure. Wouldn't I? ... oh dear. It does make sense. Oh well, I'm allowed one dumb question a year.

cheers

matt

Edited by: Matt on Dec 3, 2008 7:50 PM

Read only

0 Likes
1,489

> I'm allowed one dumb question a year.

Even two or three...as long as I keep beating ec by ten seconds...

Read only

0 Likes
1,489

>

> > I'm allowed one dumb question a year.

>

> Even two or three...as long as I keep beating ec by ten seconds...

I was waiting and waiting and waiting sending my reply, because I did not believe that Matt overlooked it...

Read only

0 Likes
1,489

Yes, I was also contemplating a bit before replying...now let's stop before somebody locks this thread...

Read only

matt
Active Contributor
0 Likes
1,489

It was one of those occasions where I'd started with one logic, then switched to another. And then just couldn't spot the error. It was the end of a long day...

Read only

0 Likes
1,489

>

> It was one of those occasions where I'd started with one logic, then switched to another. And then just couldn't spot the error. It was the end of a long day...

Join the club

pk

Read only

Former Member
0 Likes
1,489

try into corresponding fields of; if Client is the issue in the definition, it shoul dtake care of that

SELECT SINGLE * INTO corresponding fields of ls_in_data FROM z_mytable...