cancel
Showing results for 
Search instead for 
Did you mean: 

using select query to insert into a field

Former Member
0 Kudos

Hi,

I am working with a jdbc-to-jdbc scenario, in which on source side iam geting data from 2 tables t1 & t2 and inserting this data into two tables tb1 & tb2 on target side.A field in tb2 has to be inserted with a value which is equal to the number of records inserted into the table tb1 i.e with the number equal to 'how many records from the table t1 has been retrieved inorder to insert into table tb1'.

Can anybody please suggest me.....

Thanks & Regards,

Radhika.

Accepted Solutions (0)

Answers (1)

Answers (1)

prabhu_s2
Active Contributor
0 Kudos

make use of bpm. a response step which will get the number of records updated in tb1 will be mapped to a field in the target and then updated

Former Member
0 Kudos

Hi Prabhu,

Can we know the number of records retrieved from t1 without using a BPM.

prabhu_s2
Active Contributor
0 Kudos

i'm not sure if any modules are avaiable to have this done without BPM. Anotehr way is to use <b>count</b> function. Since from the source that is mapped to tb1 u can get the number of records, map this to the target field in tb2. But this will not yield the exact result. Say out of 5 records only 4 have succefuly updated this method will updated 5 in tb2 and not 4 !!!

Message was edited by:

Prabhu S

Former Member
0 Kudos

Hi Prabhu,

where this count function is available.Is it statistic--->count.what does it means?

Former Member
0 Kudos

Hi,

count = Number of fields in a context.

<b>Cheers,

*RAJ*</b>

prabhu_s2
Active Contributor
0 Kudos

yes, count gives the number of records avaiable in the context

Former Member
0 Kudos

Hi,

what is meant by context in this case?

prabhu_s2
Active Contributor
0 Kudos

consider ur strucutre

<Data>
 <id> 1 </id> 0..1
 <id> 2 </id>
 <id> 3 </id>
 <id> 4 </id>
</Data>

here i meant context to <id>. Mapping id > count > target will give the nunmber of records in Data i.e. 4

note: here u have change the context of <id> to <data>

Message was edited by:

Prabhu S

Former Member
0 Kudos

Hi,

Juz to get more clarity about context go through this

http://help.sap.com/saphelp_erp2004/helpdata/en/43/c4cdfc334824478090739c04c4a249/frameset.htm

<b>Cheers,

*RAJ*</b>