2005 Sep 19 7:02 AM
Hi All,
<b>text file contains</b>
<i>internal_audit_cd
txn_dt
posting_dt
txn_amt
currency_key
debit_credit
upload_dt</i>
<b>Same filelds are exisitng in z-table</b>
Upload program to upload data from .txt file to z-table
Upload records should not amend the existing data
It should always clear the existing recordsin the table
Before uploading to the table, check to make sure that the data are clean. Make sure that the format of each record is correct. (eg. Not blank space. If capital letter is required for upload, check the data in .txt file to make sure the records for the field are in Caps, Etc.)
Can anybody help me
Advanced Thanks to them
i look forward to ur reply
Regards
Raja Sekhar.T
2005 Sep 19 7:22 AM
Hi,
Please find the answers.
Upload program to upload data from .txt file to z-table
Use the function module GUI_UPLOAD to upload from the front end or 'OPEN DATASET, READ DATASET' to read from application server. The uploaded data will go to an internal table.
Upload records should not amend the existing data
You can check this using the key fields in the internal table against the database table.
It should always clear the existing recordsin the table
Not sure what you mean by clear.
Before uploading to the table, check to make sure that the data are clean. Make sure that the format of each record is correct. (eg. Not blank space. If capital letter is required for upload, check the data in .txt file to make sure the records for the field are in Caps, Etc.)
Loop through the internal table and check for each field.
LOOP AT ITAB.
IF ITAB-ID IS INITIAL.
MESSAGE Wxxx.
ENDIF.
....
...
ENDLOOP.
Thanks
Vinod
2005 Sep 19 7:31 AM
Hi Vinod,
Thank you for your reply
Please send any example programs or links
i look forward to your reply
Regards
Raja Sekhar.T
2005 Sep 19 8:05 AM
Hi Raja,
Please find a sample progam here.
http://www.sapdevelopment.co.uk/file/file_uptabpc.htm
Kindly assign points if your question is answered.
Thanks
Vinod
2005 Sep 19 10:14 AM
Thank you vinod,
upload all data from text to internal tab using WS_UPLOAD Function module
Please Reply these Quries
1 -> Upload record should not amend the existing data. It should always clear the existing records in the table
2 -> Before uploading to the table, check to make sure that the data are clean. Make sure that the format of each record is correct. (eg. Not blank space. If capital letter is required for upload, check the data in .txt file to make sure the records for the field are in Caps, Etc.)
Advanced thanks to your reply
i look forward to your reply
Regards
Raja Sekhar.T
2005 Sep 19 10:20 AM
Hi Raja,
Instead of WS_UPLOAD, use GUI_UPLOAD because the first one is obselete.
The first question is not clear. What you mean by CLEAR?
For the second one do as given below.
LOOP AT ITAB.
You need to do the checking here.
IF ITAB-NAME IS INITIAL.
MESSAGE Exxx.
ENDIF.
ENDLOOP.
Let me know if you need more clarification on this.
Thanks
Vinod
2005 Sep 19 10:23 AM
Hi Raja,
2. Check data
After you've uploaded your file with WS_UPLOAD you have an internal table in SAP which has the data from the file.
Now what you need to do is to loop it through and check wheter all the data meets your conditions. Can't help you further since I don't know what your requirements are.
Regards,
Ville
2005 Sep 19 9:21 AM