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

Online program to create a flat file on Unix

Former Member
0 Likes
461

Hi All,

Good day.

I got one requirement, where I need to write a Online program that will create a flat file on Unix. The probable Unix file will be send from the selection screen, where the user selects that with a fixed length & format.

Do I need to do it with the Datasets? or is it possible to go with Upload function modules?

Please, send one example program of such kind.

Thanks,

Kal Chand

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
395

Hi,

You are going to create a flat file in the Unix Operating system which is nothing but the application server.

There are no standard function modules to write the file in the application server, so you need to use the DATA SET concept only.

1. Open Data Set file name

2. Transfer Data Set file name

3. close Data set file name

I believe this will help you to finish your requirement.

Thanks,

Mahesh.

2 REPLIES 2
Read only

Former Member
0 Likes
396

Hi,

You are going to create a flat file in the Unix Operating system which is nothing but the application server.

There are no standard function modules to write the file in the application server, so you need to use the DATA SET concept only.

1. Open Data Set file name

2. Transfer Data Set file name

3. close Data set file name

I believe this will help you to finish your requirement.

Thanks,

Mahesh.

Read only

Former Member
0 Likes
395

Hi All,

I got the answer...

IF NOT V_FLNAME IS INITIAL.

OPEN DATASET V_FLNAME FOR OUTPUT IN TEXT MODE.

TRANSFER IT_INFILE TO V_FLNAME.

IF SY-SUBRC NE 0.

MESSAGE I002(ZZ) WITH

'Unable to download report record:' SY-SUBRC.

ENDIF.

CLOSE DATASET V_FLNAME.

ENDIF.

Thanks,

Kal Chand