Issue with fields of a database table
Hi All,
While browsing through database table T2515, i have observed that in 'fields' tab, there are only 2 fields visible ie MANDT and WWSSN.
When we see the contents of table, there will be one more additional field called BEZTEK.
Now my requirement is to retrieve data from both WWSSN and BEZTEK fields.
How to define internal table and how to write select statement in such cases?
Moreover, from where this BEZTEK will get populate, when we see the contents of table in se11?
Regards
Pavan
Hi,
BEZTEK may be coming from the Text table related to T2515. See the text table of T2515 (SE11 -> Menu option Goto -> Text Table).
Regards
Vinod
Similar Messages
-
Want to develop form with field not in Database table.
Hi.
I am developing one form for leave request.
Now i have created two tables..
1. Employee detail
2.Leave detail
Now i am creating form based on leave detail right now.
This table is taking reference of Employee Detail table as reference table.(employee no is foreign key in Leave detail table).
Now in form based on Leave detail table,i have taken employee name as combo field,now when i select any employee name,based on employee name other realated detail from employee detail table also i can populate in form based on Leave detail table.
Is it possible.?As i am not able to add any field or button other than which is already there in table(Leave Detail table)
I hope i have clearly mentioned my requirement,
Need help.
Thank you.You can in fact add another field which is not connected to any column to in the Leave table. Give it any name. Make sure that the checkboxes "updatable" and "insertable" are NOT checked, otherwise the form will try and include it in its SQL statements to update/insert data.
You then have to use the "Additional PL/SQL" tab - "before form is displayed" section on the form to fill in the value of the field. Use code like
p_session.set_value(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_<your field name>',
p_value => <your value>);
p_session.save_session;
where
- p_session is available in most custom PL/SQL blocks - It refers to a portal stored session that is used to store all the internal variables.
- block_name is either DEFAULT for simple forms or MASTER or DETAIL for master/detail forms
- p_attribute_name is the name of the field you want to set BUT (very important) prefixed with A_
- p_value is the actual value - here you will use your pl/sql variable. -
Extracting Values of a Field from a Database Table in SAP ECC System
Hi,
I downloaded Extracting Values of a Field from a Database Table in SAP ECC System Using MII 12.0
senario from sdn. I'm trying to do that senario in MII 12.05. But I have problem with section 6 in page 7 (you can supply senario from sdn)
"6- Under the loop of Repeater, use action u2018Rowu2019 to append just the string part of the WA which will display only values for field u2018Batchu2019"
I did not find WA elemen in Output element of Repeater_0
How can I create WA element?
Thanks.Cemil,
Set up a SAP JCo Interface action block. Use the RFC name RFC_READ_TABLE.
In the link editor map the table to "MARA", set RowCount to something small (20 is good sample size) and create an xml transaction property named FIELDS and copy the following into it:
<?xml version="1.0" encoding="UTF-8"?><FIELDS>
<item>
<FIELDNAME>MATNR</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>MTART</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>BSTME</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>XCHPF</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>DATAB</FIELDNAME>
<OFFSET/>
<LENGTH/>
<TYPE/>
<FIELDTEXT/>
</item>
</FIELDS>
Then link the Transaction.FIELDS to SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/TABLES/FIELDS}. You may run into problems with two other fields and optionally they can be removed (set link type to remove xml). I usually remove them initially for testing. The two fields are:
SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/NO_DATA}
SAP_JCo_Interface_0.Request{/RFC_READ_TABLE/INPUT/DELIMITER} (or you can set this to something like a semicolon,";" or tilda,"~". I find it easier to caclulate position by length, but that is my own idiosyncrasy.)
Once you get this one working, we can explore how to do filtering on the dataset. Your output should be something like this:
<?xml version="1.0" encoding="utf-8"?>
<RFC_READ_TABLE>
<INPUT>
<DELIMITER />
<NO_DATA />
<QUERY_TABLE>MARA</QUERY_TABLE>
<ROWCOUNT>20</ROWCOUNT>
<ROWSKIPS>0</ROWSKIPS>
</INPUT>
<TABLES>
<DATA>
<item>
<WA>000000000000000023ROH 00000000</WA>
</item>
<item>
<WA>000000000000000038HALB 00000000</WA>
</item>
<item>
<WA>000000000000000043HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000058HIBE 00000000</WA>
</item>
<item>
<WA>000000000000000059HIBE 00000000</WA>
</item>
<item>
<WA>000000000000000068FHMI 00000000</WA>
</item>
<item>
<WA>000000000000000078DIEN 00000000</WA>
</item>
<item>
<WA>000000000000000088FERT 00000000</WA>
</item>
<item>
<WA>000000000000000089FERT 00000000</WA>
</item>
<item>
<WA>000000000000000098HALB 00000000</WA>
</item>
<item>
<WA>000000000000000170NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000178NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000188NLAG 00000000</WA>
</item>
<item>
<WA>000000000000000288HALB 00000000</WA>
</item>
<item>
<WA>000000000000000358HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000359HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000521HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000578FERT 00000000</WA>
</item>
<item>
<WA>000000000000000597HAWA 00000000</WA>
</item>
<item>
<WA>000000000000000598VERP 00000000</WA>
</item>
</DATA>
<FIELDS>
<item>
<FIELDNAME>MATNR</FIELDNAME>
<OFFSET>000000</OFFSET>
<LENGTH>000018</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Material Number</FIELDTEXT>
</item>
<item>
<FIELDNAME>MTART</FIELDNAME>
<OFFSET>000018</OFFSET>
<LENGTH>000004</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Material Type</FIELDTEXT>
</item>
<item>
<FIELDNAME>BSTME</FIELDNAME>
<OFFSET>000022</OFFSET>
<LENGTH>000003</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Purchase Order Unit of Measure</FIELDTEXT>
</item>
<item>
<FIELDNAME>XCHPF</FIELDNAME>
<OFFSET>000025</OFFSET>
<LENGTH>000001</LENGTH>
<TYPE>C</TYPE>
<FIELDTEXT>Batch management requirement indicator</FIELDTEXT>
</item>
<item>
<FIELDNAME>DATAB</FIELDNAME>
<OFFSET>000026</OFFSET>
<LENGTH>000008</LENGTH>
<TYPE>D</TYPE>
<FIELDTEXT>Valid-From Date</FIELDTEXT>
</item>
</FIELDS>
<OPTIONS />
</TABLES>
</RFC_READ_TABLE>
Add a repeater sourced on:
SAP_JCo_Interface_0.Response{/RFC_READ_TABLE/TABLES/DATA/item}
Link your repeater output to a tracer with this:
Repeater_0.Output{/item/WA}
What you will see in each tracer message is a single line of data with all the fields contents concatenated together. You can look up what each field in the string represents by the length of the field as returned in the Response segment of the RFC_READ_TABLE rfc. Then you can parse out the data you are interested in.
Give this a try and let me know how you succeeded.
By the way, I could not find the scenario you referred to. Can you post a link?
Regards,
Mike
Edited by: Michael Appleby on Jan 12, 2009 5:16 PM -
To replace values of one of the field in the database table
How to replace values of one of the field in the database table with a new values? Pls help to solve
Hi
You can use the UPDATE command to update one of the field value in a table
see the UPDATE syntax and use it
but in real time you should not do like this
Regards
Anji -
To modify a field in a database table based record identification by primar
hi
i want to to modify a field in a database table based record identification by primary key filed and two more fields
ie customer (primary key
i want to modify record from intenal table the record existing with primary key field customer
the status field needs to be mofied as " value rolled"
the below code is happening
loop at it_record into wa_Record
wa_inv-customer (primary key) = wa_Record=custome
wa_inv-date = wa_Record-date
...so one
append wa_inv to it_invest
clear wa_inv
endloop.
if not it_invest is initial
modify TABle1 ( this table is data base table which needs to be mofified) based on the primary key field
and also date field and status field which is not primary key.
regards
aroraHi there.
Your requirement is to update a Z Database table from your internal table, right? You have several options:
LOOP AT it_invest INTO wa_inv.
UPDATE dbtable
SET date = wa_inv-date
WHERE prim_key = wa_inv-prim_key
AND any_field = wa_inv-any_field.
ENDLOOP.
or
LOOP AT it_invest INTO wa_inv.
UPDATE dbtable FROM wa_inv. "if wa_inv of same type of dbtable
ENDLOOP.
In the first example, I wrote any field because you can update dbase table, filtering for fields that don't belong to the primary key. However, remember that you will change all records that respect the key you used (so, in your case, use the primary key).
Regards.
Valter Oliveira. -
How to modify or put entry in a particular field of a database table
i want to to modify a field in a database table record identification by primary key fileds
the situatio is like this
there are two primay key in database table
customer number PK
status PK
date
and third field which i want to modify is customer part number.
based on condition that
database table1-cuspip = wa_record-cuspip.
database table1-status <> wa_record-status
and database table-date = wa_record-date
if above is true a particular field the database table for that record
ie customer_part_number = 'FAiled'.
loop at it_record into wa_Record
endloop.
please suggest how to modify the database table record if the avove condition is tru and please give me full working code
regards
AroraDear Nishant,
Use UPDATE function for updating the customer part number.
But please do mention the database table and the keys used for update.
if en entry already exists with the key then the Entry will fail so use MODIFY statement to modify the Consumber Part Number with the specificed keys and transport the modified customer part number and then do COMMIT the changed entry to database.
Hope this helps you in some way.
Encourage others to answer you queries by suitably rewarding them.
Thanks
Venugopal -
How to delete data from single field in a database table?
Hi guys,
Plz suggest me How to delete data from single field in a database table?
thnks,
pavanhi
in addition to abv details..chk this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
regards,
madhu -
How to Find the Data Type of the Field In a Database Table
Hi Experts,
I'm currently working on a program which needs to find out the data type of the given field in a database table. In addition to accessing DD03L directly, is there any other workaround such as function module to help me achieve this? It would be helpful if a demo example could be provided.
Thanks a lot.Hi,
Use this..
DESCRIBE FIELD dobj TYPE typ.
write typ.
type will contain the data type of the object.
and check this thread also....
Re: How to get datatype of fields in dynamic structures
Cheers,
Simha.
Reward all the helpful answers.. -
How to find the structure fields data in database tables?
how to find the structure fields data in database tables?
Your question doesn't appear to be Web Dynpro ABAP related. Please only post questions in this forum if they are directly Web Dynpro ABAP related. There are several other more general ABAP related forums.
-
Do you know of a standard tool to compare the fields of 2 database tables?
do you know of a standard tool to compare the fields of 2 database tables? please note i dont want to compare data just the fields.
~SureshHi,
I am not aware any standard tool but you can write custom report to use FM DDIF_FIELDINFO_GET to get fields information of SAP database table.
Call the above FM twice in order to get field names for two different database tables. Then compare the results (table parameter DFIES_TAB) to find out the differences of field names.
Hope this will help ...
Regards,
Ferry Lianto -
How can i update the REMARK field in ADRT database table
Hi all,
How can i update the REMARK field in ADRT database table
By using Function modules or BAPIs
Please reply me fastHi,
you can try this code:
SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
IF sy-subrc = 0.
CLEAR adrct.
SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
IF sy-subrc = 0.
adrct-remark = wa_remark.
MODIFY adrct.
ENDIF.
ENDIF
best regards,
Thangesh -
Hello
When I try to publis my asp.net application in azure, i have the next error:
>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : A project which specifies SQL Server 2012 as the target platform may experience compatibility issues with Microsoft Azure SQL Database.
>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : The project and target databases have different collation settings. Deployment errors might occur.Hello
When I try to publis my asp.net application in azure, i have the next error:
>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : A project which specifies SQL Server 2012 as the target platform may experience compatibility issues with Microsoft Azure SQL Database.
>C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4253,5): Warning : The project and target databases have different collation settings. Deployment errors might occur.
Hello,
This forum is to discuss vb.net issues, your issue is mainly regarding Azure SQL Database, I found that you have posted another thread in that forum
https://social.msdn.microsoft.com/Forums/azure/en-US/f435921a-14d1-4441-8b2b-32ba3d937aea/a-project-which-specifies-sql-server-2012-as-the-target-platform-may-experience-compatibility-issues?forum=ssdsgetstarted#f435921a-14d1-4441-8b2b-32ba3d937aea.
I would recommend you focus on that thread to get help.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I Insert a Text field in a DATABASE TABLE???
Hello at all,
i have a database Table ZTEST with 2 columns.
MANDT TYPE CLNT
TEXT TYPE char (255)
In my internal table tab, i have a text content. I want insert this content in my database table ZTEST.
DATA: tab TYPE TABLE OF ZTEST,
lin TYPE ZTEST.
lin-text = 'HELLO WORLD'
APPEND lin TO tab.
INSERT INTO ZTEST VALUES tab.
Commit Work.
Is this correct???? BECAUSE it doesnt work.
Edited by: ETN_58 on Mar 31, 2010 10:27 AMHi All,
Here table ZTEST has two fields kunnr and text where kunnr is the key field.
REPORT ZATEST .
tables ztest.
DATA: itab TYPE TABLE OF ZTEST with header line.
itab-kunnr = '67890'.
itab-text = 'HELLO WORLD'.
APPEND itab.
if sy-subrc eq 0.
INSERT ZTEST from table itab.
Commit Work.
endif.
Check with this, its working fine.
Regards,
Md Ziauddin. -
Where can we validate the MANDT field in a database table.
Hi All,
In any database table we will be having MANDT field. In the program while populating the table we never populate the field MANDT. But still in the database table, it automatically takes the current clinet number.
Could any body tell me where can we validate this. I have a requirement in my program, in which I need to populate one of the field with one constant value.
Thanks,
srinivas.hi table T000 is for the Clients master table ....
the client is the special field for all the master tables...
for validating the field you need to do like this..
data: v_mandt type sy-mandt .
tables:t000.
select-options:s_mandt for t000-mandt.
select mandt
from t000
into v_mandt
where mandt in s_mandt. -
Issue with field separator in GUI_UPLOAD
Hello Gurus
I am facing issue with gui_upload. I have a text file in which the fields are eparated by single Pipe i.e |. Now when I try to read the data from file in internal table even with using field separator it does not insert data in proper fields.
DATA: BEGIN OF IT_TAB OCCURS 0,
OBJECT_ID type string,
VERSION_SERIES_ID TYPE string,
VERSION_NUMBER TYPE string,
REVISION TYPE string,
DOC_NUMBER TYPE string,
DOCTITLE TYPE string,
FILESIZE TYPE string,
MIME_TYPE TYPE string,
PLANTUNIT TYPE string,
END OF IT_TAB.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = w_mpath
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '|'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
CHECK_BOM = ' '
VIRUS_SCAN_PROFILE =
NO_AUTH_CHECK = ' '
IMPORTING
FILELENGTH =
HEADER =
TABLES
DATA_TAB = it_tab[]
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.
I want the data to get appended in internal table based on | separator.
Please help.
Regards,
Rajesh.Hi,
I believe the field separator parameter will work for Excel files..You have to get the internal table in a string format..and then use split statement..
check this example..
DATA: BEGIN OF it_tab OCCURS 0,
object_id TYPE string,
version_series_id TYPE string,
version_number TYPE string,
revision TYPE string,
doc_number TYPE string,
doctitle TYPE string,
filesize TYPE string,
mime_type TYPE string,
plantunit TYPE string,
END OF it_tab.
DATA: t_tab TYPE TABLE OF string,
v_string TYPE string.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = 'C:\TEST.TXT'
* has_field_separator = '|' "Actually not required.
TABLES
data_tab = t_tab
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.
ENDIF.
LOOP AT t_tab INTO v_string.
SPLIT v_string AT ','
INTO
it_tab-object_id
it_tab-version_series_id
it_tab-version_number
it_tab-revision
it_tab-doc_number
it_tab-doctitle
it_tab-filesize
it_tab-mime_type
it_tab-plantunit.
APPEND it_tab.
CLEAR: it_tab.
ENDLOOP.
Thanks
Naren
Edited by: Narendran Muthukumaran on Oct 15, 2008 4:58 PM
Maybe you are looking for
-
My Mac is a lemon, but I want it to be an Apple.
Hello All: A few months ago, I purchased a Mac Powerbook G4 12". It is my first Mac purchase, and I love it! However, I have been having very weird issues with it. When I first got the comptuer, I turned it on a few days after the purchase and it wou
-
Need Suggestion for falshing my Z3 Compact(SO-02)
Hi All, I am from India, My brother bouht me a Z3 Compact from Japan, I want to flash the mobile with Indian version of sony software or any other version, can some one guide me with the procedure. The mobile is unlocked.
-
Fstream on a text file and exel data connection breaking
Hello, I am writing to a text file using C++ code below (VS 2008). Then I do a "Data Connection" from excel2013 to this text file: the purpose of this is to have a "live" display of some graphs based on this log file. Parameters of the data connectio
-
I did not back up the iPod and then i restored it thinking my pictures should stay in the icloud but after the restore was done i realized that those pictures had been deleted but many other pictures had been kept. Also those pictures were not taken
-
So i see that TM makes 3 copies, are these seperate files ? if so what size disk do i need? I guess 3 times the size off my HD in my Macbook Pro? thx for responding.