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: 

Uploading without recording

Former Member
0 Kudos
95

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos
76

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.

8 REPLIES 8

Former Member
0 Kudos
76

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

Former Member
0 Kudos
77

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.

0 Kudos
76

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

0 Kudos
76

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.

0 Kudos
76

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

0 Kudos
76

Thank u guys,

My issue has been solved.

Regards,

Karthik

0 Kudos
76

Hi Karthik,

How did u do it ? can u send me yur code on <b>shehryardahar@hotmail.com</b>

Thanks..

Shehryar

0 Kudos
76

Hi,

Can you give the solution on this portal. So that it will be helpful to all

Thanks,

Manjula