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

Upload Program

Former Member
0 Likes
490

Hai Friends,

I have to upload a .txt file. This file updates the Z table. End users have the data in excel and save it to a .txt file and upload the data. The user has to enter the date only in YYYYMMDD format without any separator. How can i check this before uploading?. i want to give a message also if it was maintained in the wrong format.

My Z table has the following fields,

MANDT

POSNR

MATERIAL

DATE

How can i upload a consecutive number for POSNR. it should start from 1,2,3........... and the MANDT field should be 900.?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
453

Hi,

Please find answers to your queries.

1. In your program use FM GUI_UPLOAD to upload the txt file from presentation server (your pc) to an internal table within the

program.

2. The internal table should have the same structure as the columns of the txt file.

3. To find out if the date contains any separator you can use the FIND command.

4. Identifying whether the date is strictly in YYYYMMDD format would be a lilttle difficult as there is no direct FM for it.

You will have to bulid some logic for it.

I could not understand your other queries. Please elaborate.

Regards,

Ankur Parab

4 REPLIES 4
Read only

Former Member
0 Likes
453

What exactly is your question?

Rob

Read only

0 Likes
453

i want to validate the date format before uploading.

i want a consecutive number to be maintained in the POSNR field.

Read only

0 Likes
453

Search the forum for date validation examples.

You can create a number range for your posnr (also search the forum).

Rob

Read only

Former Member
0 Likes
454

Hi,

Please find answers to your queries.

1. In your program use FM GUI_UPLOAD to upload the txt file from presentation server (your pc) to an internal table within the

program.

2. The internal table should have the same structure as the columns of the txt file.

3. To find out if the date contains any separator you can use the FIND command.

4. Identifying whether the date is strictly in YYYYMMDD format would be a lilttle difficult as there is no direct FM for it.

You will have to bulid some logic for it.

I could not understand your other queries. Please elaborate.

Regards,

Ankur Parab