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

Internal Table?

Former Member
0 Likes
651

Hi Guys,

I have created 2 internal tables one of type and structre BSEG the other as only structure BSEG and type character.in secondinternal table i defined all the fileds as charatcer,but in 1st BSEG internal table some are of floating point or currency types.so how to declare those floating point and currency types in second internal table?But I am not getting any syntax error's.The data getting successfully downloaded to file from 2nd Internal table.can any body tell me how to declare those floating types or Currencies or date?

Thanks,

Gopi.

6 REPLIES 6
Read only

Former Member
0 Likes
600

Hi Gopi,

Are you pulling data from DB table or flat file, if you are downloading from flat file then normally we will use char type fields only. After that we need to move it to the seconda internal table of type DB table. When you convert / move the data, make sure about the data types,

Regards,

  • DJ

reward, if its useful

Read only

Former Member
0 Likes
600

declare as like BSEG types and when ever you want to download move the values to char and download

Reward Points if it is helpful

Thanks

Seshu

Read only

0 Likes
600

Hi Seshu,

What my program does it download the data from SAP and dumps the data into a text file.That tex file is stored in Application server.

For Example consider BSEG table i created an Internal table for this by selecting all the records in BSEG table and storing it in IT_Bseg1.Now i have to trasnfer this data into a final Internal Table which looks like this.

DATA : BEGIN OF wa_bseg_temp,

lineno(7) TYPE n,

prog_space TYPE c VALUE ' ',

data_rec(3045) TYPE c,

END OF wa_bseg_temp.

but whats the problem here is i can't just move the data from Internal table to wa_bseg_temp-data_rec.if i do like that mean's i am getting Syntax error

" It_bseg and wa_bseg_temp-data_rec are not Mutually Convertible in Unicode Programming" So i took another internal Table of structure BSEG and datatypes as Character.

So now the Q'n is does i need to change the dataypes for some of the fields in BSEG to floating point or currency ?or no need of doing like hat its just fine what i am doing like declaring all the variables as Charatcer type.

Thanks,

Gopi.

Read only

0 Likes
600

Yes ,you are doing correct way ...

Read only

0 Likes
600

Hi seshu,

Is ther any other Alternative I got an idea like by using Concatenate ABAP Keyword.

Concatenate IT_bseg fields to wa_bseg_temp-data_rec seperated by Space. Does this works?

the first method is Tedious becoz u have to create a structure of type cfor every field in BSEG.

So can u suggest me any alternative method based on this?

Thanks,

Gopi.

Read only

0 Likes
600

Concatenate command works for only charcters field ,if bseg has currency field then syntax error will come.

better to create all type c in internal table and download it.