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: 

CUSTOM FUNCTION MODULE

Former Member
0 Kudos

hi all,

i am sorry to repeat my question again. i had a scenario where i had to create custom idoc for catsdb database table which includes four fields as

1. pernr

2. workdate

3. LSTAR

4. COUNTER

i created it and had send to another application server successfully. now my requirement is update the data of idoc in database tables of receiver application server. for this i created FM, process code..........................

i dont know what to code in FM of receiver application server. the functionality of this FM is what details it gets from idoc it should take it and update to its tables [receiver side]. for this i created a custom FM. please give code for updating.

if suggestions are highly appreciated.

with regards,

Suresh Aluri.

2 REPLIES 2

Former Member
0 Kudos

any way you would be getting the data as import paramenters with this

1. pernr
2. workdate 
3. LSTAR 
4. COUNTER

.

so create above fields as import parameters.


itab1     like   your   sending internal table.

then  ,

data :  itab1  like   line  of  table  pa0001   occurs  0.

select  * from  pa0305    into  table   itab1 .

loop at itab1 .
if  itab1-pernr  ne  pernr  .

itab1-pernr  = pernr  .
itab1-LSTAR  =  LSTAR  .

Append  itab1 .
endloop.

update   pa0305  from   itab1.

similarly for the workdate &COUNTER

reward points if it is usefull....

Girish

Former Member
0 Kudos

not answered