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

How to get URL text data into internal table in Background mode(Batch Job)

suhel_sheikh
Explorer
0 Kudos
1,302

How to get URL (.TXT) data into Internal table in Background mode is there any FM for this i have tried FM 'DP_GET_STREAM_FROM_URL' but its not working in background

9 REPLIES 9
Read only

0 Kudos
682

You can not achieve it by DP_GET_STREAM_FROM_URL, due to program run it in background.

But you can fetch the file from FTP.

Create one FTP and define it in SAP and fetch the file and then data from FTP folder.

Read only

0 Kudos
682

Hi Arulraj,

thanks for your quick reply.

can u please share some doc. /link for FTP definition n all if u have ,so that i can achieve the above requirement.

Thanks & Regards,

Suhel Sheikh

Read only

0 Kudos
682

There are TONS of threads and wiki about this!
You should be proactive and look for them before asking people to do it for you

Read only

0 Kudos
682

Hi Simone,

i am not asking any one to do the work for me,

i just asked if he can help me with some doc.(if available).i know that every one is busy in there own task.

and right there may be many threads about the issue but i haven't found the proper one so i asked here.

Regards,

Suhel Sheikh

Read only

Jelena_Perfiljeva
Active Contributor
682

FM HTTP_GET? Not sure though what exactly you mean by "URL text data". Please make sure to use the accurate terminology.

Read only

0 Kudos
682

Hi Jelena,

Thanks for the reply,

I mean URL Contains Text file which needs to be downloaded into SAP internal table ,by using FM : DP_GET_STREAM_FROM_URL ,m getting URL data into internal table in foreground mode but in background mode i m not getting URL data into internal table .

so is there any way for it ?

Read only

0 Kudos
682

To "download a file" we use FTP (which has been covered exhaustively on SCN). Using HTTP we can access the content, which is not the same as "download a file". URL is just an address that can be used for both protocols.

There seems to be a lot of confusion here. Only when you have a good understanding of what the task is exactly then you can find the best solution.

Read only

682

Jelena told you : HTTP_GET. Or class CL_HTTP_CLIENT, that's the same. Search the web for more information.

Read only

0 Kudos
682

Thank you Jelena and Sandra.

Sure will check.

Regards,

Suhel Sheikh