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

create table,,,,

Former Member
0 Likes
812

how to create tables and to upload into the database?

kindly enlist the steps require with the syntax!!

thax in advance....

regards,b.s

8 REPLIES 8
Read only

Former Member
0 Likes
755

Hi,

I am not sure what exactly is the quesiton.

You create a table in SE11 transaction.

Then you can upload the data using a custom program, using INSERT statements.

Regards,

Ravi

Read only

Former Member
0 Likes
755

hi swaminathan,

check this link and go through all chapters related to data dictionary .. a very clear explanation is given in this <a href="http://cma.zdnet.com/book/abap/index.htm">BOOK</a>

regards

satesh

Read only

Former Member
0 Likes
755

Hi,

You can create table by using the transaction SE11.

For uploading data into the tables use the funtion module UPLOAD.

Thanks & Regards,

Irfan Hussain

Read only

Former Member
0 Likes
755

Hi Swaminathan,

Can you make the question little clearer?

If you want to know how to create custom database tables, use the transaction SE11.

You can refer to these document for learning more about data dictionary.

http://www.esnips.com/doc/1dce86bf-4b80-4e9c-888b-c28784b11f8f/ABAP_DICTIONARY.pdf

http://www.esnips.com/doc/999736bf-57c6-4104-af9b-3bb292933a50/abapdictionary.pdf

You can also modify the database tables using keywords INSERT,DELETE,UPDATE command.

Please refer these links...

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a6d358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3a94358411d1829f0000e829fbfe/content.htm

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm

Regards,

SP.

Read only

Former Member
0 Likes
755

Hi !

Creating tables usually is done by the SAP transaction SE11.

Create new customer tables (name beginnung with a Z ) and

give it all the fields and field types you need in the new table.

Mark the "key fields" as "Key".

Ther's no "generic" SAP-Tool to upload Data in DB-Tables !

What you should do is creating a report that opens a (i.e. text-) file and INSERTs them into your new table.

Regards

Rainer

Some points would be nice if that helped.

Read only

0 Likes
755

if u r talking abt creating table

use se11 and enter table name and say create maintain fields and technical settings !!

activate and done!!

Read only

Former Member
0 Likes
755

i have to link this custom table to custom screen. after user enter data in thos screen it should go to custom table. Do i need to use insert statement here or is there any other way to do.

thanks and reagrds,

megha

Read only

Former Member
0 Likes
755

You need to create the table in SE11 Transction.

I understand that you want to update the database for the table that you have created.

You need to use GUI_upload and also insert statement.

Check this program.

&----


*& Report ZASHPHY_UPLOAD *

*& *

&----


*& *

*& *

&----


REPORT zashphy_upload NO STANDARD PAGE HEADING

MESSAGE-ID zmsg99

LINE-SIZE 255.

TABLES zphy_details.

  • Internal table for file

DATA : BEGIN OF i_file OCCURS 0,

text(1024) TYPE c,

END OF i_file.

DATA : BEGIN OF i_phy OCCURS 0,

zphy_id LIKE zphy_details-zphy_id,

zlast_name LIKE zphy_details-zlast_name,

zfirst_name LIKE zphy_details-zfirst_name,

END OF i_phy.

DATA : v_repid LIKE sy-repid,

v_file TYPE string.

  • Selection-screen

SELECTION-SCREEN: BEGIN OF BLOCK blk WITH FRAME TITLE text-001.

SELECTION-SCREEN : SKIP 1.

PARAMETERS : p_file LIKE rlgrap-filename.

SELECTION-SCREEN : SKIP 1.

SELECTION-SCREEN : END OF BLOCK blk.

INITIALIZATION.

v_repid = sy-repid.

  • F4 Value for File

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.

CALL FUNCTION 'F4_FILENAME'

EXPORTING

program_name = v_repid

  • DYNPRO_NUMBER = SYST-DYNNR

  • FIELD_NAME = ' '

IMPORTING

file_name = p_file

.

START-OF-SELECTION.

v_file = p_file.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = v_file

filetype = 'ASC'

  • HAS_FIELD_SEPARATOR = ' '

  • HEADER_LENGTH = 0

  • READ_BY_LINE = 'X'

  • IMPORTING

  • FILELENGTH =

  • HEADER =

TABLES

data_tab = i_file

EXCEPTIONS

file_open_error = 1

file_read_error = 2

no_batch = 3

gui_refuse_filetransfer = 4

invalid_type = 5

no_authority = 6

unknown_error = 7

bad_data_format = 8

header_not_allowed = 9

separator_not_allowed = 10

header_too_long = 11

unknown_dp_error = 12

access_denied = 13

dp_out_of_memory = 14

disk_full = 15

dp_timeout = 16

OTHERS = 17

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

IF sy-subrc EQ 0.

WRITE:/ 'physician id', 21 'physician last name', 41 'physician first name'.

ULINE.

LOOP AT i_file.

SPLIT i_file-text AT ',' INTO i_phy-zphy_id

i_phy-zlast_name

i_phy-zfirst_name.

INSERT INTO zphy_details VALUES i_phy.

WRITE:/ i_phy.

ENDLOOP.

ELSE.

MESSAGE e000.

ENDIF.

shejal.