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: 

Incompatible type between two tables - JOIN these tables is need

Former Member
0 Kudos

Hi everybody

I have a big problem, I hope that anybody help me.

I'm working on SAP CMS, I have 5 table which contain the general information about Collateral Objects:

cms_re_obj

cms_movables

cms_ins

cms_rig

cms_sec_acc

and cms_ast, which contain the asset values of Collateral Objects

The five tables are Join with cms_ast on level information.

I checked the tables on level of database and these table have not joins, but I check the information about this tables and with this information and then it are join between tables.

Example Join:

Join between cms_movables and cms_ast

cms_movables-mov_guid = cms_ast-object_ref_id

But it has a problem the field mov_guid is raw type and the field object_ref_id is char type.

This problem is the same with the other general information of Collateral Objets tables.

On Abap program, no problem to join this tables, because I can get the field of one table and set and convert this field on variable with the same type of the other table an then i can Join this tables.

BO has the ability to create universes of information, the creation of this is to consult the database of SAP, but I think BO can not convert the type of the fields.

Therefore this problem can be solved by building a program and a job to fill a table z, which would be identical to cms_ast.

The problem is that BO get information of this tables online, but my job need to run minute per minute, I think that it is no the correct solution, because this table cms_ast is so scalable

Can anybody have a other idea to solve this problem?

I don't know if ABAP can use triggers

2 REPLIES 2

ravi_lanjewar
Contributor
0 Kudos

Hi,

If you are writting z or y program namespace then only following gaide line will help you.


But it has a problem the field mov_guid is raw type and the 
field object_ref_id is char type.

You can not put join opration with different data type.

You can do this by reading data from one table table into internal table. Assign data to other table which having the same data type and used for all entries to read from other table .

Former Member
0 Kudos

Hi

Thanks for reply,

I know that you said, because I did some ABAP programs and some ABAP reports of the bussiness process of Collateral Objects, with information of these tables and when I tried get information, I did something like you said, or I assigned cms_ast-object_ref_id to a variable, and this varible I converted to the same type of the other field and find the match or join between the tables(cms_movables, cms_ast).

The problem is not when I do an ABAP program. The problem is:

(BO)Business Objects needs to get some information about these tables to do some reports, but BO has not the tools or the capacity to convert fields, as well as ABAP. BO gets information directly of the tables of database.

The posible solution to this problem is that I can create a job and a program, which function is replicate the information of cms_ast and insert on a "z" table or get the relation between to tables (cms_movables and cms_ast) and insert on a "z" table. These can help BO to get information, because BO instead of get information of this tables (cms_movables, cms_ast) , now get information of the table z and then get and join with other tables.

The principal problem is that BO get information online, with these the job which run the program need to be run minute per minute. and I think that it is not the best practice, because all the tables are some scalables.

I think that my program could be better, how can I catch a INSERT event on table cms_ast, to convert the fields, and insert on a "z" tables

Or anybody have an idea, how can i solve these problems?