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: 

issue with type cast in sap when fetching data

Former Member
0 Kudos

hello experts,

I have a question when fetching data from COBRB table where objnr ( char22) in COBRB table should be equal to PRPS -POSID ,( posid in prps table char24) . I know we can move the contents into temporary internal table where the temp table has char 22 and assign the contents to temp table and based on the temp table ftech data from cobrb table. Instead of doing this type cast is there any other alternative?

thanks,

rg

2 REPLIES 2

former_member156446
Active Contributor
0 Kudos

nope.

Sandra_Rossi
Active Contributor
0 Kudos

The limitation is only for the ON clause of the join -> the data type of the joined columns must be identical.

You may cheat the ABAP compiler by transferring the problematic join conditions to the WHERE clause, where you can specify LEFT or SUBSTRING functions for instance. If it's forbidden to have 0 condition in the ON clause, so if it happens, you may join the client (MANDT) columns by adding the ABAP words CLIENT SPECIFIED.

You may sometimes use the EXISTS function is you don't need to extract the columns from the EXISTS subquery.

Of course, there is also FOR ALL ENTRIES, where you can "join" on a substring of the field of the FAE internal table (column = fae_itab-column(10)).