Application Development and Automation 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: 
Read only

Query on Data Conversion

Former Member
0 Likes
378

Hello All,

We are trying to build a generic tool which could help the conversion process in data migration.

For eg, If the material name in legacy starts with AB (AB6790), the same has to be referred in SAP as SQ6790.

So its replacing initial few characters during the conversion process.

Like this, I am expected to collect possible scenarios and

develop a generic tool, which can cover some possible conversion conditions.

Can you please help me with such scenarios, which you may have come across in project needs.

Thank you.

Meenakshi

2 REPLIES 2
Read only

Former Member
0 Likes
346

The easiest would be to create a mapping table which holds the legacy value and the SAP value

e.g. Legacy AB => SAP SQ

Then you write a function module which accepts the legacy string AB6790 (changing parameter) and based on the mapping table converts it into SQ6790.

You can extend your mapping table with field lengths (e.g. first 4 char or first 5 char) or other conditions which you would need to read and evaluate in your FM. You can get as complex as the requirements ask for.

You also need to think about error handling, what happens if no mapping value can be found, how would it be reported back to the user, etc.

In terms of performance you might want to think about buffering the mapping table .

Hope that helps,

Michael

Read only

Former Member
0 Likes
346

You can maintain Ztable for this purpose that will contain your old material number and new material number .

write conversion program that will read this material number conversion table .