cancel
Showing results for 
Search instead for 
Did you mean: 

Update only first record from Lookup

former_member200211
Active Participant
0 Kudos
93

hi,

I have Source DSO A and Target DSO B and both DSOs have Delivery number, Delivery Item and Schedule Line.

There is a lookup DSO C and has deliver number , delivery item and quantity.

My requirement is to get the quantity from Lookup DSO C into Target DSO B based on delivery number and Item but the only the first record should be populated, I mean there will be multiple schedule lines for delivery number and same item, so I need to populate against only first schedule line.

Writing the routine in field level routine will populate all the quantity against all schedule lines for same delivery number and item.

Could anyone please suggest ?

Thanks.

View Entire Topic
Former Member
0 Kudos

Hi Lavanya,

As per my suggestion u should write a end routine.....as  below

Data: it_tab type table of structure of Result_package,

           wa like line of of Result_package.

sort Result_Package by order_no item_no schedule_line .

it_tab [] = Result_package [].

delete adjacent duplicate records comparing order_no item_no.

**now in it_tab u will have only records for first schedule line.


Loop it_tab into wa.

**now do lookup using order_no item_no between it-tab and DSO C. assuming u can write the lookup code.use key  order_no and item_no

modify  it_tab by wa.


end loop.

loop at it_tab into wa.

**read result package with key order_no and  item_no

modify result package by wa.

end loop.

using this only record for first line item will be updated form DSO C in result package.

Regards,

Saurabh Singh


former_member200211
Active Participant
0 Kudos

Hi Saurabh,

Its 3.5 flow.

Former Member
0 Kudos

Hi Lavanya ,

Sorry I don't have idea about coding in  3.5 flow...but the logic should be same .....

Regards,

Saurabh Singh