How to download Database Table Field names to local system..?
Hi
I want to download Feild names and their data types to local excel sheet...
How to do it..???
Pavan Sanganal
Hi,
Use this code.
REPORT ZTEST_TEST02 .
data: begin of itab occurs 0,
tabname type tabname,
fieldname type fieldname,
datatype type datatype_d,
leng type ddleng,
end of itab.
parameters: p_tbl like dd03l-tabname.
select tabname fieldname datatype leng into table itab
from dd03l where tabname = p_tbl.
loop at itab.
write:/ itab-tabname ,
itab-fieldname,
itab-datatype,
itab-leng.
endloop.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'c:table.txt'
FILETYPE = 'ASC'
* APPEND = ' '
* WRITE_FIELD_SEPARATOR = '9'
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = ' '
* WRITE_LF = 'X'
* COL_SELECT = ' '
* COL_SELECT_MASK = ' '
* DAT_MODE = ' '
* IMPORTING
* FILELENGTH =
tables
data_tab = ITAB
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* OTHERS = 22
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Raghav
Similar Messages
-
How to get the database table field names from program
Hi,
Can any one tell me,whether any function module is there which can get the table field name and its details ,when we pass database table name to it.
Thanks in Advance
<REMOVED BY MODERATOR>
Regards
Shibin
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 12:41 PMHi,
DD02L Table contains the SAP Tables.
DD02T Table contains the SAP Table Texts.
DD01L Table contains the Domains
DD01T Table contains the Domain Texts.
DD03L Table contains the Table Fields.
DD03T Table contains the Table Field Texts. (Language Dependent)
DD04L Table contains the Data Elements.
DD04T Table contains the Data Element Texts.
DD05s Table contains the Foreign Key Fields
last words with L and T only. L->Database Fetch T-> Text
For ur question use table DD03L or DD03T.
Regards,
Chandru -
How to Transfer Database Table Field to Data Type in XI
Dear All,
Dear All,
I am working on scenario to transfer data(Database Table) from Non SAP System to SAP system through XI.
While Defining "Data Type" in XI i want to create Data Type as of Database table in my(Oracle Database).There is any direct method to import Database Table field into "Data Type" in XI.
thanks,
RPHi;
Edit plus is a tool using which you can edit your file and make changes to it.
You can download it from net ,just search for it on google.
this will help you to get in the field names of the table by editing the file .
Mudit -
how to send database table one sever to another server in the form of tms request.
i want send a particular database table one server to another as a request.
give solution plz
Message was edited by:
maheshHi Mahesh,
Technically it is possible to transport entries of every table in SAP even if changes dont prompt for a transport request. Do the following. Create a customising/workbench request. It depends of the table whose entires you wish to transport. .If you wish you can just use workbench transport for all tables.
After you have created the transport click on the request and in menu bar choose Request/Task and then Display object list. Goto change mode.
Click on Inset line icon in application tool bar. A new line for input will come up.
In PGMID give the value R3TR
In Obj give value TABU
In Object Name give the name of the table.
After that double click on table name entry. You will come to the screen: Transport organizer:Change Key List.
Here again choose insert line. A new line with table name and key as the column headers will come up.
Double click on the empty input field for the key. In the next screen you will get options to fill in the key.
You can insert key as per your choice. However one thing needs to be remembered. If you put * in any field SAP wont allow you fill in value in later fields as only a final asterisk can be used as a generic entry.
Please try out this option. I use this option to transport RFC destinations as well profile parameters across systems.
Please award points if the answer was of help to you.
Regards.
Ruchit. -
Looking for a value in a list stored in a database table field
Hello,
I have a field in a database table that contains a comma
separated list on numbers. In my CFQUERY I am attempting to extract
records from the database table where a parsed number is present in
the comma separated list. I have tried the code below, but it is
throwing an error.
variables.publicationID is the number that I am looking for
in the database table field.
publicationList is the name of the database table field
containing the comma separated list of numbers.
where <cfqueryparam value="#variables.publicationID#"
cfsqltype="cf_sql_integer"> in publicationList
Can anybody help?
Many thanks,
smnbinThe only way to do it with the data model you currently have
is as follows:
WHERE publicationList LIKE '#variables.publicationID#' OR
publicationList LIKE '#variables.publicationID#,%' OR
publicationList LIKE '%,#variables.publicationID#,%' OR
publicationList LIKE '%,#variables.publicationID#'
You need to check for 4 cases:
it's the only ID in the list
it's the first ID in the list
it's in the middle of the list
it's the last ID in the list.
The better solution would be to replace this comma-delimited
list with a mapping table, where each row in this mapping table
contains a reference to the main table as well as a single
publicationID. -
Get Table fields name for an SAP table
hi,
i need to pass SAP table name as a parameter to the selection screen of a Report program.
This prog shud give me the table Fields name along with type and length.
Is there any standard SAP report program for the same or i have to write my own logic?
Please advise.
regards,
ags.Hi,
For your requirement you have to write own program in dynamic manner by using field symbol concept.
Use this FM DDIF_FIELDINFO_GET and get the field information of database table.
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = <master> u201C Table name
Tables
DFIES_TAB = <table_field> u201C here you will get field information of table
exceptions
not_found = 1
internal_error = 2
others = 3.
if sy-subrc <> 0.
message text-005 type 'E' .
endif.
Loop <table_field> assignigng <field>
*---here you have to collect the relevant information that you are going to display in your output.
Endloop.
Use any one of ALV or OOALV and display your records.
Regards,
Peranandam -
How to update database table !!!
hi all,
Please advice how to update database table with certain cndition needs to be checked.
Please consider below scenario.
have used enqueu and dequeue function to lock entries and also i have used BAPI so considering that return parameter . i want to update table
/tdk/st0027.
1. I want to update database table
2. there are certain condition needs to be checked like ,
loop at it_final into wa_final.
th_return-type = 'S'.
if th_final-vbeln = /tdk/st0027-vbeln and
th_final-posnr = /tdk/st0027-posnr and
th_final-etenr = /tdk/st0027-sdslno.
above condition which i need to check .and need to append below system fields need to be appended in table.
th_final-prstsind = '20'.
th_final-chgdate = g_date.
th_final-chgtime = g_uzeit.
th_final-chgprog = g_cprog.
th_final-chguser = g_uname.
append th_final to td_final.
update /tdk/st0027 FROM th_final.
endif.
endloop.
but i am getting error saying that "The type od database table and work area (TH_FINAL) are not unicode convertible"?
I am not able to understandwhat would be the solution for this ?
Thanks and regards,
Prasad K. NAralkarThe error occurs in the UPDATE statement included in the code. In this statement it is seen that there is a mismatch of structure defined for the DDIC table /tdk/st0027 and that of your work area th_final.
try to create a structure w.r.t the DDIC table.
Eg: DATA: wa_temp TYPE /tdk/st0027.
MOVE-CORRESPONDING th_final TO wa_temp.
Then try to UPDATE using the temporary work area i.e wa_temp which has structure similar to that of the database table. -
How to convert database table into xml file
Hi.
How to convert database table into XML file in Oracle HTML DB.
Please let me know.
Thanks.This not really a specific APEX question... but I search the database forum and found this thread which I think will help
Exporting Oracle table to XML
If it does not I suggest looking at the database forum or have a look at this document on using the XML toolkit
http://download-east.oracle.com/docs/html/B12146_01/c_xml.htm
Hope this helps
Chris -
What balance value in sales order and iwant to know table field name in
where the balance value come in sales order i want make sales order report in which i want to add this filed how we add it and tell me table field name of balance vlue and how we give it in FS please help me in this my report are left without it please give me solution
Hello
where the balance value come in sales order
Please note that when you raise your question at SDN forum, your question needs to be clear...
What do you mean by BALANCE VALUE ????
Regards,
Sarthak -
How to download internal table data into xml file?
Hi,
Experts,
I have downloaded internal table data into XLS format using GUI_DOWNLOAD Function module, But i didn't Know how to download internal table data into XML format please post some ideas/inputs on this issue.
Thank you,
Shabeer ahmed.check this
data : gd_repid type sy-repid.
GD_REPID = SY-REPID.
DATA : L_DOM TYPE REF TO IF_IXML_ELEMENT,
M_DOCUMENT TYPE REF TO IF_IXML_DOCUMENT,
G_IXML TYPE REF TO IF_IXML,
W_STRING TYPE XSTRING,
W_SIZE TYPE I,
W_RESULT TYPE I,
W_LINE TYPE STRING,
IT_XML TYPE DCXMLLINES,
S_XML LIKE LINE OF IT_XML,
W_RC LIKE SY-SUBRC.
DATA: XML TYPE DCXMLLINES.
DATA: RC TYPE SY-SUBRC,
BEGIN OF XML_TAB OCCURS 0,
D LIKE LINE OF XML,
END OF XML_TAB.
data : l_element type ref to if_ixml_element,
xml_ns_prefix_sf type string,
xml_ns_uri_sf type string.
CLASS CL_IXML DEFINITION LOAD.
G_IXML = CL_IXML=>CREATE( ).
CHECK NOT G_IXML IS INITIAL.
M_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).
CHECK NOT M_DOCUMENT IS INITIAL.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'REPAIRDATA'
DATAOBJECT = IT_FINAL_LAST1[]
IMPORTING
DATA_AS_DOM = L_DOM
CHANGING
DOCUMENT = M_DOCUMENT
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2.
CHECK NOT L_DOM IS INITIAL.
W_RC = M_DOCUMENT->APPEND_CHILD( NEW_CHILD = L_DOM ).
*Start of code for Header
* namespace
t_mnr = sy-datum+4(2).
CALL FUNCTION 'IDWT_READ_MONTH_TEXT'
EXPORTING
LANGU = 'E'
MONTH = t_mnr
IMPORTING
T247 = wa_t247
concatenate sy-datum+6(2)
wa_t247-ktx
sy-datum(4) into t_var1.
concatenate sy-uzeit(2)
sy-uzeit+2(2)
sy-uzeit+4(2) into t_var2.
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
l_element = m_document->get_root_element( ).
xml_ns_prefix_sf = 'TIMESTAMP'.
concatenate t_var1 t_var2 into xml_ns_uri_sf separated by space.
clear : t_var1,
t_var2,
t_mnr,
wa_t247.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'FILECREATOR'.
xml_ns_uri_sf = 'SAP'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'CLAIMGROUP'.
xml_ns_uri_sf = '1'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
clear : xml_ns_prefix_sf,
xml_ns_uri_sf.
xml_ns_prefix_sf = 'CLAIMTYPES'.
xml_ns_uri_sf = 'W'.
l_element->set_attribute( name = xml_ns_prefix_sf
namespace = ' '
value = xml_ns_uri_sf ).
*End of Code for Header
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = M_DOCUMENT
IMPORTING
XML_AS_STRING = W_STRING
SIZE = W_SIZE
TABLES
XML_AS_TABLE = IT_XML
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2.
LOOP AT IT_XML INTO XML_TAB-D.
APPEND XML_TAB.
ENDLOOP.
*Start of Code for File name
concatenate p_file
'\R'
'000_119481'
sy-datum+6(2) sy-datum+4(2) sy-datum+2(2)
sy-uzeit(2) sy-uzeit+2(2) sy-uzeit(2) '.xml' into p_file.
*End of Code for File name
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
BIN_FILESIZE = W_SIZE
FILENAME = p_file
FILETYPE = 'BIN'
TABLES
DATA_TAB = XML_TAB
EXCEPTIONS
OTHERS = 10.
IF SY-SUBRC = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to find internal table column names
Hi Friends,
I have declared one internal table with 45 fields.
Here is my situation.
I need to create dynamic table with all above 45 fields and some more fields (approx 10 fields).
I got the solution for creating dynamic table. Only thing is
I have to assign all the above 75 columns to other internal table.
is there any way we can read internal table field names in the program.
we can acheive this by hard coding the all 75 field names.
since it is 75 columns, i want to pass one by one field dynamically to the other table.
Pls give me a solution.
thanks in advance.HI,
Find the code for dynamical internal table., which helps to increase the fields in the internal table dynamically.
REPORT ZTEST_R3.
FIELD-SYMBOLS: <L_TABLE> TYPE TABLE,
<L_LINE> TYPE ANY,
<L_FIELD> TYPE ANY.
DATA: IS_LVC_CAT TYPE LVC_S_FCAT,
IT_LVC_CAT TYPE LVC_T_FCAT.
DATA: NEW_TABLE TYPE REF TO DATA,
NEW_LINE TYPE REF TO DATA.
START-OF-SELECTION.
IS_LVC_CAT-FIELDNAME = 'KUNNR'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
IS_LVC_CAT-FIELDNAME = 'NAME1'.
APPEND IS_LVC_CAT TO IT_LVC_CAT.
CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
EXPORTING
IT_FIELDCATALOG = IT_LVC_CAT
IMPORTING
EP_TABLE = NEW_TABLE.
*Create a new Line with the same structure of the table.
ASSIGN NEW_TABLE->* TO <L_TABLE>.
CREATE DATA NEW_LINE LIKE LINE OF <L_TABLE>.
ASSIGN NEW_LINE->* TO <L_LINE>.
DO 2 TIMES.
ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = SY-INDEX.
ASSIGN COMPONENT 'NAME1' OF STRUCTURE <L_LINE> TO <L_FIELD>.
<L_FIELD> = 'A'.
INSERT <L_LINE> INTO TABLE <L_TABLE>.
ENDDO.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP.
READ TABLE <L_TABLE> INTO <L_LINE> INDEX 2.
<L_LINE>+10(2) = 'B'.
MODIFY <L_TABLE> FROM <L_LINE> INDEX 2.
LOOP AT <L_TABLE> INTO <L_LINE>.
WRITE:/ <L_LINE>.
ENDLOOP. -
How to view database table in OAF run page.
Hi,
how to view database table in OAF run page,any manual setting .please help me.
thanks
saran.Hi;
1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
2. Please see:
http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
Regard
Helios -
How to view database table in oracle9i Jdeveloper
Hi,
how to view database table in oracle9i jdeveloper,any manual setting .please help me.
thanks
saran.In Jdeveloper go to View-->Connection Nevigator. there you will see all kind of connctions. Expand Database and check if your DB connection is present there. If not, you need to create using right clicking on Database and choose New Database Connecton. Here few screens will be there where you need to put the TNS entries of your database.
Once DB connection is created, you can expand the connection by clicking on + icon and you can see different available schema objects. Again you need to expand Tables and you can look for specific table in there.
Hope this clears your doubts.
Thanks,
Mukesh Uchaniya -
How to view database table in oracle9i developer
Hi,
how to view database table in oracle9i developer,any manual setting .please help me.
thanks
saran.Hi;
1. This site side related EBS for your issue there is sqldeveloer dedicated forum side
Forum Home » Application Development in PL/SQL » SQL Developer (Not for general SQL/PLSQL questions)
2. Please see:
http://docs.oracle.com/cd/B10501_01/java.920/a96655.pdf
Regard
Helios -
Finding source database table/column name for a column in a view
Hi i need to be able to identify the original database table/column name for a column in a view.
e.g. say i have a view like this
create v1 as select a.name fname, b.name bname, c.name cname,......
from u1.names a, u2.names b. u3.names c
where .....
Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.But i need to be able to do it for any view. Short of
parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt.
Maybe you are looking for
-
I have owned this iPod Shuffle for about seven months, and it worked perfectly fine until about a month or two ago when it would not let me change the songs on the iPod. I manually deleted all the songs off of the iPod in iTunes, and added a whole ne
-
Driver Pack No Longer Being Applied During Task Sequence
Hi all, So... this week a really strange issue manifested itself. I've been trawling through logs for the last day and I don't seem to be getting anywhere. A task sequence, which has been working for months and hasn't been changed, all of a sudden de
-
I purchased the iphone 4 16g version. After the operating system is installed on the phone, how much actual free space is left on the phone?
-
Tried to sync ipod but too full - now play counts have shot up?!?
I tried to sync my 60gb ipod classic but a message came up saying it was too full ect.. that was fine, but a day or 2 later i noticed that the play counts and ratings for about 1250 songs (out of 11670) are completely messed up - the play counts of 7
-
ICWC CL_CRM_IC_INTERACTIONRECO_IMPL
Hi all, i got a curious Problem regarding the IC WebClient CRM 5.0 SP02. After confirming a BP I get the message:"Severe error occured, please contact your system administrator" Details: "Error occurred in class CL_CRM_IC_INTERACTIONRECO_IMPL, event