Skip to Content
-1

issue with type cast in sap when fetching data

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Aug 14, 2017 at 04:15 PM

    nope.

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 14, 2017 at 05:55 PM

    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)).

    Add comment
    10|10000 characters needed characters exceeded