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: 

Text File

Former Member
0 Kudos
276

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

former_member223537
Active Contributor
0 Kudos
252

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

Former Member
0 Kudos
252

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.

0 Kudos
252

Vikas:

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

0 Kudos
252

Look for...


OPEN DATASET

Greetings,

Blag.

0 Kudos
252

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....

former_member223537
Active Contributor
0 Kudos
252

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

0 Kudos
252

Prashant:

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

former_member223537
Active Contributor
0 Kudos
252

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

0 Kudos
252

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?

former_member223537
Active Contributor
0 Kudos
253

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

0 Kudos
252

Thanks Prashant! That helps for now!