- internal code TWAN20090414 -
We have a strange problem with datatransfer between 2 DSO's. A -> B
In DSO A we have records with amount and quantity. DSO B is set to add the records per order number. Strangely for one single order (out of thousands) the unit remains empty while all source records have a unit ST (which is Dutch for PC or pieces). Any suggestions how to solve this problem?
Now I created a transformation over the second DSO to its self (B -> B) to find all records with empty units. For each record that I find the unit is filled with the unit found in the source DSO. Now something even stranger happens. When we look in the DSO the unit is now PC and not ST. So it uses the english name instead of the Dutch. And I copy the value of the unit-field from the source record so I don't understand why its displayed differently. Any suggestions on the cause of this problem are highly appreciated. The code of my transformation is shown below...
*----------------------------------------------------------------------- *== * Filter records with filled unit and currency. DATA: qty LIKE DATA_PACKAGE-quantity, unt LIKE DATA_PACKAGE-unit, val LIKE DATA_PACKAGE-deb_cre_lc, cur LIKE DATA_PACKAGE-loc_currcy. LOOP AT DATA_PACKAGE. qty = DATA_PACKAGE-quantity. unt = DATA_PACKAGE-unit. val = DATA_PACKAGE-deb_cre_lc. cur = DATA_PACKAGE-loc_currcy. IF qty IS NOT INITIAL AND unt IS NOT INITIAL AND val IS NOT INITIAL AND cur IS NOT INITIAL. DELETE DATA_PACKAGE. CONTINUE. ENDIF. IF qty IS INITIAL AND unt IS INITIAL AND val IS NOT INITIAL AND cur IS NOT INITIAL. DELETE DATA_PACKAGE. CONTINUE. ENDIF. IF qty IS NOT INITIAL AND unt IS NOT INITIAL AND val IS INITIAL AND cur IS INITIAL. DELETE DATA_PACKAGE. CONTINUE. ENDIF. IF qty IS INITIAL AND unt IS INITIAL AND val IS INITIAL AND cur IS INITIAL. DELETE DATA_PACKAGE. CONTINUE. ENDIF. IF unt IS NOT INITIAL AND cur IS NOT INITIAL. DELETE DATA_PACKAGE. CONTINUE. ENDIF. ENDLOOP. *== * Records that remain have an empty UNIT or CURR DATA: my_fiscper TYPE /bi0/oifiscper, my_fiscper3 TYPE /bi0/oifiscper3, my_fiscyr TYPE /bi0/oifiscyear, my_unit TYPE /bi0/oiunit, my_curr TYPE /bi0/oicurrency. FIELD-SYMBOLS: <ds> LIKE DATA_PACKAGE. LOOP AT DATA_PACKAGE ASSIGNING <ds>. CONCATENATE <ds>-fiscyear <ds>-fiscper3 INTO my_fiscper. SELECT SINGLE unit loc_currcy FROM /bic/at031002000 INTO (my_unit,my_curr) WHERE comp_code = <ds>-comp_code AND fiscper = my_fiscper AND fiscvarnt = <ds>-fiscvarnt AND gl_account = <ds>-gl_account AND chrt_accts = <ds>-chrt_accts AND ac_doc_typ = <ds>-ac_doc_typ. <ds>-unit = my_unit. <ds>-loc_currcy = my_curr. ENDLOOP. *-----------------------------------------------------------------------