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

convert into flat file !!

Former Member
0 Likes
638

Hi ,

I am basically an XI developer,I have little knowledge in ABAP.

we are in design phase of the XI integration ,so thinking of several options to do the interfaces.

basically I need to get data from different infotypes of HR application some are standard and some are customized infotypes(tables).so ,can we get a flat file getting data from those info types using some thing like opendata set(not sure pretty new to opendata set concept) and place on the application system and schedule the report (program)as per demand?

please suggest,

thank you,

regards,

Sathish

4 REPLIES 4
Read only

amit_khare
Active Contributor
0 Likes
608

Yes you can do that.

You can select all the data from the Desired infotypes and collect in an internal table then pass that table to OPEN DATA SET command.

Check this link for samples on OPEN DATASET -

Regards,

Amit

Reward all helpful replies.

Read only

0 Likes
608

Hi Amit,

thank you for your reply.can we do the data validations while getting the flat file onto application system?

thx

Babu

Read only

0 Likes
608

Yes.

You can do all the validations required within the ABAP program before file generation.

Revert back if further query.

Regards,

Atish

Read only

uwe_schieferstein
Active Contributor
0 Likes
608

Hello Babu

I have written a small sample program showing a simple way to collect any HR infotype data:

<a href="https://wiki.sdn.sap.com/wiki/display/Snippets/UnifiedAccesstoAllHR+Infotypes">Unified Access to All HR Infotypes</a>

I would recommend to collect the HR infotype data using this approach. Afterwards convert your data to XML (using statement CALL TRANSFORMATION [ABAP -> XML]) and store the XML file on the application server (-> OPEN DATASET ... FOR OUTPUT...).

Why converting to XML? The OPEN DATASET statement will allow only character-like data. Thus, if any of the HR infotype tables contains a field of type P (packed number) you need to convert this to a character-like data. In contrast, XML does not care about the type of a field.

For reading the XML files simply go the other way around:

- OPEN DATASET ... FOR INPUT ...

- CALL TRANSFORMATION [XML -> ABAP]

Regards

Uwe