Application Development 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: 

Data conversion issue!

Former Member
0 Kudos
224

Hello all,

I am working on an IDOC interface where in middleware process reocrds in a flat file and publish idocs. Then we have to process those idocs and post/update an application document.

Where do we generally do data conversion in the above case? On the legacy side, in the middleware or on the SAP side (I think we can not do data conversion once the idocs are created in SAP, modify idocs tables and then process them)

Any ideas?

Thanks,

1 ACCEPTED SOLUTION

ferry_lianto
Active Contributor
0 Kudos
107

Hi Somen,

Generally you will have a middleware system such as SAP XI, Gentran and etc to perform data transformation into an IDoc file.

But if you do not have one, you can create an ABAP program to convert an input data (flat file) and generate IDoc(s).

You need to populate the EDIDC (Data Control) and EDIDD (Data Record) segments for a given IDoc type and message type. Then next step is to create IDoc(s) by calling function module IDOC_INBOUND_WRITE_TO_DB.

If you setup the partner profile to trigger by background job then you need to execute program RBDAPP01 to post the IDoc(s) to application. Otherwise, the IDoc(s) will be posted to application when calling above function module (assuming no error).

Hope this will help.

Regards,

Ferry Lianto

5 REPLIES 5

Former Member
0 Kudos
107

Hi,

The data onversion should be done in middleware integration technology like XI...

Sreedhar

Former Member
0 Kudos
107

Data Conversion of what ? THe flat file to SAP IDOC ? Not sure I understand your question but I will offer this...

If you want to modify the data in the idoc before getting it to SAP there are a few options:

1. Have the data resident on the flat file and map it straight to the idoc

2. Use an exit for inbound idoc to massage input data before creating the idoc. so populate other fields etc

3. Dont know aht middleware your using. Is there a mapping / conversion tool. If so you can use this

J

Message was edited by: J.J

Former Member
0 Kudos
107

Hey Somen,

The best place to perform conversions is middleware. In my current project we are using Webmethods to send IDocs to SAP and all the data conversion logic is placed in Webmethods.

It could very well be handled in SAP by creating Z-tables. But the disadvantage of this method is the data in the IDoc will differ from the data you post in the document. For e.g. a value X in the IDoc was converted to X1 and the document posted reflects X1 and not X which came in the IDoc. This might confuse things a bit.

The data maintenance is easy to handle in Webmethods instead of creating Z-tables in SAP. Such conversion business rules are not subject to frequent change and its better to handle them out of SAP.

-Kiran

Please mark useful answers

Former Member
0 Kudos
107

Hi Somen

Ya I also suggest that do the data conversion in the middleware.

Regards

Inder

ferry_lianto
Active Contributor
0 Kudos
108

Hi Somen,

Generally you will have a middleware system such as SAP XI, Gentran and etc to perform data transformation into an IDoc file.

But if you do not have one, you can create an ABAP program to convert an input data (flat file) and generate IDoc(s).

You need to populate the EDIDC (Data Control) and EDIDD (Data Record) segments for a given IDoc type and message type. Then next step is to create IDoc(s) by calling function module IDOC_INBOUND_WRITE_TO_DB.

If you setup the partner profile to trigger by background job then you need to execute program RBDAPP01 to post the IDoc(s) to application. Otherwise, the IDoc(s) will be posted to application when calling above function module (assuming no error).

Hope this will help.

Regards,

Ferry Lianto