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

Uploading without recording

Former Member
0 Likes
1,026

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
Read only

Former Member
0 Likes
1,007

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

8 REPLIES 8
Read only

Former Member
0 Likes
1,007

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

Read only

Former Member
0 Likes
1,008

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.

Read only

0 Likes
1,007

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

Read only

0 Likes
1,007

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.

Read only

0 Likes
1,007

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

Read only

0 Likes
1,007

Thank u guys,

My issue has been solved.

Regards,

Karthik

Read only

0 Likes
1,007

Hi Karthik,

How did u do it ? can u send me yur code on <b>[email protected]</b>

Thanks..

Shehryar

Read only

0 Likes
1,007

Hi,

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

Thanks,

Manjula