cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Formula in transformation not overwriting values that have been loaded

former_member194898
Active Contributor
0 Kudos
187

Hi,

How to create a formula (or procedure) that can be used to load data from SGTXT to an attribute but: not overwriting any value that have already been loaded in that record and if value of HKONT is different from eg. 2*.

The sample data in data source is:

BELNRHKONTSGTXTACTION
001101text1load (nothing have been loaded to that field against BELNR number)
001202text2load (as this is HKONT 202 we don;'t check if anything has been loaded against that BELNR number)
001101text3do not load ! (because we already have a "text2" in this field)
001101text4load (because nothing has been loaded to that BELNR so far)
002203text5load (as this is HKONT 202 we don;'t check if anything has been loaded against that BELNR number)

The question is how to check if anything has been loaded before in given record and skip loading this is the case. 

Regards, Leszek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I assume you are loading to an infoobject that is a concatenated or compounded verson of BELNR & HKONT? If so:

  • if you want to check in older loads, you need to do a select on the corresponding target table (the P or Q table in case of infoobjects, the A-table in case of DSO)  to see if the entry already exists
  • If you want to check in the current load you first have to make sure you have semantic partitioning on BELNR is active in the DTP in order to assure you have all lines for a certain BELNR nr in 1 data package. Then in you coding apply a similar logic where you keep track of combinations already processed so you can verify every record against that check table and decide wether to keep it in your datapackage or ignore it
former_member194898
Active Contributor
0 Kudos

Thanks Tom,

I'm trying ...

former_member194898
Active Contributor
0 Kudos

What works in this case is (see attached file):

Regards Leszek

Answers (0)