Application Development 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: 

FTP download text and create order

Former Member
0 Kudos

Dear all,

I 'm going to develop a program to download a text file from FTP. Then, it parses the file and create a sale order. I planned to download the file into an internal table and create the sale order with BAPI. Is it possible to do in this way??

Regards,

Kit

1 ACCEPTED SOLUTION

Former Member
0 Kudos

BAPI-step by step procedure

http://www.sapgenie.com/abap/bapi/example.htm

list of all BAPI's

http://www.planetsap.com/LIST_ALL_BAPIs.htm

Rewards if useful.........

Minal

7 REPLIES 7

Former Member
0 Kudos

Hi Kit,

Yes it is possible.

Regards,

Atish

Former Member
0 Kudos

BAPI-step by step procedure

http://www.sapgenie.com/abap/bapi/example.htm

list of all BAPI's

http://www.planetsap.com/LIST_ALL_BAPIs.htm

Rewards if useful.........

Minal

0 Kudos

Thank for your reply. Could you give me some example on reading the content from the FTP??

0 Kudos

Dear all,

Thank you for all of the reply. Is it possible to download the file into the server memory without writing into the disk?? I'm afraid there are security concern from my client.

Regards,

Kit

Former Member
0 Kudos

Hi Chan,

Ya, you can.

For that first you have to dowl load the data's from text file in to internal table using Fm <b>GUI_DOWNLOAD.</b>

<b>Check this Sample Code :</b>

call function 'GUI_DOWNLOAD'

exporting

filename = 'C:\TEMP\test.xls'

tables

data_tab = itab1

exceptions

others = 1.

Then using BAPI you can create a sales order.

BAPI_SALESORDER_CREATEFROMDAT1 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDAT2 Sales Order: Create Sales Order

BAPI_SALESORDER_CREATEFROMDATA Create sales

<b>Check this link for Creating Sales order using Bapi :</b>

https://forums.sdn.sap.com/click.jspa?searchID=5815719&messageID=3875439

Thanks.