2006 Jun 23 1:12 PM
hi all,
i have a flat file which has to be uploaded into a ztable. i have to upload without any recording as there is no transaction for it. Pls let me know the steps.
regards,
karthik
2006 Jun 23 1:17 PM
Hi karthik,
1. Simple.
2. first populate your internal table ITAB
using GUI_UPLOAD
3. THEN follow this logic.
LOOP AT ITAB.
modify ZTABLE from ITAB.
ENDLOOP
4. This will take care of INSERT / UPDATE
AUTOMATICALLY
BASED upon the primary key combination,
found or not found in database table.
regards,
amit m.
hi all,
i have a flat file which has to be uploaded into a ztable. i have to upload without any recording as there is no transaction for it. Pls let me know the steps.
regards,
karthik
2006 Jun 23 1:16 PM
To update the ZTables. You need to do four things
1.Define the internal table of type your Z table.
DATA: itab type standard table of Z table
2.1. Upload your text file into the internal table using
FM GUI_UPload
here the filetype is 'ASC' as it is a text file
3. Validate your data in the internal table with the validations in the Z table. This could be like primary key validations or some fields must be having some check table attached or even date validations.
Otherwise invalid data is going inside your table
loop at itab
Validations for all the fields
endloop.
4. After the validations Lock your table and then modify the table
call function ENQUEUE*TAble
MODIFY Z TABLE from itab
call function DEQUEUE TABLE
Hope this helps
Award Points for useful answers
2006 Jun 23 1:17 PM
Hi karthik,
1. Simple.
2. first populate your internal table ITAB
using GUI_UPLOAD
3. THEN follow this logic.
LOOP AT ITAB.
modify ZTABLE from ITAB.
ENDLOOP
4. This will take care of INSERT / UPDATE
AUTOMATICALLY
BASED upon the primary key combination,
found or not found in database table.
regards,
amit m.
2006 Jun 23 1:39 PM
Hi Amit,
Thank u very much. I was able to do it in ztable but now i want to upload in SAP table. There are about 39 records in my SAP table. I need to upload a flat file into that table without using any transaction code.
Can you explain me how this is possible.
Regards,
Karthik
2006 Jun 23 1:41 PM
Hi again,
1. Directly tampering with the standard sap table
is NOT RECOMMENDED.
2. It will allow to change the data in sap standard table,
using sql query.
3. But its not at all recommended.
regards,
amit m.
2006 Jun 23 1:43 PM
Hi Karthik.
If you dont mind me replying.
Please use some standard function module if you want to update a Standard SAP Table
The same logic given above can work for standard table but you should try to find some other function module before you update the Standard SAP table
2006 Jun 23 1:51 PM
2006 Jun 23 7:19 PM
2007 Oct 23 5:24 PM
Hi,
Can you give the solution on this portal. So that it will be helpful to all
Thanks,
Manjula
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |