Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

help with routines in transformation

$
0
0

I created a transformation between data sources and DSO. I created a transformation between the data source and the DSO. In the transformation I have the connection between the characteristic of CHAR and the characteristic of NUMC. Necessary, the value obtained from the data source on the characteristic of CHAR recoded into value for characteristic NUMC. The list of possible values ​​of variable CHAR I have.

 

 

In routines between the features I wrote a simple code:

 

data stst type c LENGTH 60.

 

stst = SOURCE_FIELDS-COST_ITEM.

 

CASE stst.

 

      WHEN 'ПИР'.

        RESULT = '10'.

      WHEN 'Оборудование'.

        RESULT = '20'.

      WHEN 'ОНВСС'.

        RESULT = '30'.

      WHEN 'СМР'.

        RESULT = '40'.

      WHEN 'МОНВСС'.

        RESULT = '50'.

      WHEN 'Прочие'.

        RESULT = '60'.

      WHEN 'ППИ'.

        RESULT = '70'.

      WHEN 'АН'.

        RESULT = '80'.

      WHEN 'КП'.

        RESULT = '90'.

      WHEN 'Услуги Заказчика'.

        RESULT = '100'.

      WHEN 'ПД_СМР'.

        RESULT = '110'.

      WHEN 'ПД_МОНВСС'.

        RESULT = '120'.

      WHEN 'ПД_ПИР'.

        RESULT = '130'.

      WHEN 'ПД_Оборудование'.

        RESULT = '140'.

      WHEN 'ПД_ОНВСС'.

        RESULT = '150'.

      WHEN 'ПД_ПРОЧ'.

        RESULT = '160'.

      WHEN 'ОС'.

        RESULT = '170'.

      WHEN 'НА'.

        RESULT = '180'.

      WHEN 'УК'.

        RESULT = '190'.

      WHEN 'ЗУ'.

        RESULT = '200'.

      WHEN 'ПРОЧКВ'.

        RESULT = '210'.

      WHEN 'НИОКР'.

        RESULT = '220'.

      WHEN 'ПО'.

        RESULT = '230'.

      WHEN 'ПрочиеБП'.

        RESULT = '240'.

      WHEN 'ДЗ'.

        RESULT = '250'.

      WHEN 'ЦБ'.

        RESULT = '260'.

      WHEN 'Вклад'.

        RESULT = '270'.

      WHEN 'ПрочФВ'.

        RESULT = '280'.

      WHEN 'ЦФ'.

        RESULT = '290'.

      WHEN 'ВО'.

        RESULT = '300'.

      WHEN 'КУ'.

        RESULT = '310'.

 

ENDCASE.

 

If the PSA is more than one entry comes to a key when the transformations in the target (DSO) is recorded, only one of them.

 

input PSA

CODE_PROJPERIODCOST_ITEMSUMM
12014ОС1
12013НА1
12012УК1

 

output DSO

CODE_PROJPERIODCOST_ITEMSUMM
12012УК1

 

 

Please help. What am I doing wrong?

 

 

Produced debug, and the transformation starts exactly as many times as records in a table, but only the last.


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>