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

Text File

Former Member
0 Kudos
318

Hi,

I have a certain transaction ME2M and my requirement is like when i execute it in background, the output should be in a file ( like List->Export->Local File)

Does anyone know how to do this?

1 ACCEPTED SOLUTION
Read only

former_member223537
Active Contributor
0 Kudos
294

Hi Vamsee,

That is correct. This is because, SAP Control will move in serial order.

If you want to run your piece of code before displaying ALV, then simple cut & paste the code before the ALV Funciton Module call.

Best regards,

Prashant

10 REPLIES 10
Read only

Former Member
0 Kudos
294

Hi,

You can not download a local file in a background session.. However you can download the file in the application server in the Unix directories..

Thanks and Best Regards,

Vikas Bittera.

Read only

0 Kudos
294

Vikas:

How can I save it in the application server in the background?

Read only

0 Kudos
294

Look for...


OPEN DATASET

Greetings,

Blag.

Read only

0 Kudos
294

I know open data set.

my question is, if i run the SAP program background, i can get a spool, but i want the output in a file format....

Read only

former_member223537
Active Contributor
0 Kudos
294

Hi,

You are correct. The output would be in spool format. What you need to do is, the output internal table which as all the output data should be used to create file on application server.

Leave the spool aside, the output internal table will be holding the data, so loop over it & pass that content using OPEN dataset to application server.

Let me know, if you have any doubts.

Best regards,

Prashant

Read only

0 Kudos
294

Prashant:

In FBL5N transaction, do you have any idea about the output internal table ?

Read only

former_member223537
Active Contributor
0 Kudos
294

The output table is it_pos. This is passed to ALV using FM "FI_ITEMS_DISPLAY". inside this FM, ALV is called.

Read only

0 Kudos
294

Thanks Prashant. One more trick over here, when i write my code after the FM, it is not reading my statements for the output file......

its like, when i click on execute button i get the alv output and when i click on back icon, then it reads my abap statements.....any idea?

Read only

former_member223537
Active Contributor
0 Kudos
295

Hi Vamsee,

That is correct. This is because, SAP Control will move in serial order.

If you want to run your piece of code before displaying ALV, then simple cut & paste the code before the ALV Funciton Module call.

Best regards,

Prashant

Read only

0 Kudos
294

Thanks Prashant! That helps for now!