ABAP-command to check wheather a field in existing in a spec.table/structur
Hello together,
we have a tool to do corrections to CO-PA-transaction data.
Because we have different structures for different operating concerns (and therefore different dynpros for those different operating concerns) we now want to dynamize this tool.
The idea is to have one dynpro with the maximum number of CO-PA-fields and to control via a functional-module which vields are existing for one operating concern and those are not existing for that operating concern to change the attributes to non-changeable.
Is there any command in ABAP to check if one field (e.g. one valuefield) is contained in one table-structure (e.g. table-structure CE1xxxx) ?
Kind regards
Udo
*--Verfy infoobject exit or not
call function 'DDIF_FIELDINFO_GET'
exporting
tabname = KNA1 <--here you pass structure
tables
DFIES_TAB = <itab> <--get list of fields in the table
exceptions
not_found = 1
internal_error = 2
others = 3.
if sy-subrc <> 0.
message text-005 type 'E' .
endif.
loop at <itab> assigning <field>.
*here you validate wether field is available in the structure or not
assign component 'SIGNCH' of structure <field> to <f_sign>.
if sy-subrc ne 0.
message 'SIGNCH field is not available in table KNA1' type 'E' .
endif.
endloop.
Regards,
Peranandam
Similar Messages
-
Checks if item field link exists into a custom list
Hi;
I have a custom list with 2 columns : Title and SITE (field link)
Title (text) :
SITE (link) : URL + DESCRIPTION
I would like to write in programmming a code which allows to checks before to add a new item if this item exists or not into the list in using only the DESCRIPTION or URL field.
Like this :
if(DESCRIPTION !exists)
{ add item }
else{ show message : the site exists }
RegardsHi,
We can use event receiver to achieve your requirement. The following code for your reference:
using System;
using System.Security.Permissions;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.Workflow;
namespace SharePointProject5.EventReceiver1
/// <summary>
/// List Item Events
/// </summary>
public class EventReceiver1 : SPItemEventReceiver
/// <summary>
/// An item is being added.
/// </summary>
public override void ItemAdding(SPItemEventProperties properties)
base.ItemAdding(properties);
if(properties.AfterProperties["SITE"]!=null)
string linkField=properties.AfterProperties["SITE"].ToString();
string urlValue = linkField.Split(',')[0];
if (CheckItemExists(properties.List, null, urlValue))
properties.Status = SPEventReceiverStatus.CancelWithError;
properties.ErrorMessage = "The site exists.";
private bool CheckItemExists(SPList list, SPFolder folder, string urlValue)
SPQuery query = new SPQuery();
if (folder != null)
query.Folder = folder;
query.Query = @"
<Where>
<Eq>
<FieldRef Name='SITE' />
<Value Type='Text'>" + urlValue + @"</Value>
</Eq>
</Where>";
SPListItemCollection found = list.GetItems(query);
return (found.Count > 0);
Best Regards
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Availability Check - Committed Date Field
We are building a Z report, where column committed date for missing
components {after availability check} needs to be added.Please advise
from which table/structure can this information be retrieved.Also, is
there a way to validate
Note: It is noticed that committed date field is emmedded in a structure
(ATPCS - DAT01), not sure how the mentioned could be validatedSystem dynamically calculates that date when you execute program. Here's the approach you need to follow in your zprogram.
Go to RESB for missing parts (RESB-XFEHL) = 'X' get all the missing components.
Then use function module BAPI_MATERIAL_AVAILABILITY
input the following (you gathered from resb table)
plant
material number
unit
check rule : PP (if you're using PP in order control for order type) (tcode OPJK)
storage location (if applicable)
the output field ENDLEADTME will give you committed date and field AV_QTY_PLT will give you the total committed qty. If date is blank it means 12/31/9999 -
SQL Command to Check ABAP Support Patches and JSPM Patch
Dear all,
We have setup an DiasterRecovery System of the BI Production System .
os: aix 6.1
Database: Oracle 11.2
BUT , Our DR System is in Physical Standby mode.
Generally, we see the ABAP Patch version in SAP GUI ( System -- System status).
Likewise, Is there any SQL Command available to check the version ABAP Patches (
SAP_BASIS, SAP_ABAP, PI_Cont add on, PI_BASIS AND BW Patch - SAP_BW)
Is there any sql command to check the version of JSPM or JAVA Patch
regards,
gayathri.KHi Gayathri,
BUT , Our DR System is in Physical Standby mode.
Generally, we see the ABAP Patch version in SAP GUI ( System -- System status).
Likewise, Is there any SQL Command available to check the version ABAP Patches (
SAP_BASIS, SAP_ABAP, PI_Cont add on, PI_BASIS AND BW Patch - SAP_BW)
You can perform sql query on CVERS table.
For eg: Select * from <schema>.CVERS ;
This will list all the entries with all the columns from CVERS table.
Hope this helps.
Regards,
Deepak Kori -
In ECC 6.0 I am getting Slin Error -ABAP command is obsolete
Hi All,
In Hr ABAP we will start basic coding with
TABLES pernr .
infotypes:0002.
By using this I am getting the following SLIN Error :
Program: ZHCP0026 Row: 32
he current ABAP command is obsolete
Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types, not "LIKE" or "STRUCTURE".
nternal Message Code: MESSAGE G/B
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
INFOTYPES : 0380,
The current ABAP command is obsolete
Tables with headers are no longer supported in the OO context.
Internal Message Code: MESSAGE G1D
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Can some one help me , how to rectify this slin error ?
Thanks,
Suresh.
Edited by: suresh kumar on Feb 25, 2009 2:22 PMHi Suresh,
Am too facing the same problem. if you could find a solution, pls let me know. -
New ABAP Program to check Direct UPDATE in Database Table
Hi all,
As per customer requirement , I have to develop ONE Program which find out that in which ABAP Program , Programmer has used Open Sql command like UPDATE , DELETE , INSERT , MODIFY to direct update in Database Table.
Have a look on all Z-ABAPs, find out if there are statements with "update", "delete", "insert" or "modify" in the coding, then find out if updates to sap-Tables are done
How can I achived that ?
Please , If anybody is having idea , than please let me know..
Thanks You ,Hi
Kindly refer to the below link. This has step by step how you can achieve the checks.
[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/12659a90-0201-0010-c18b-9d014f9bed0d]
But if you want to check if any program they have used 'UPDATE' then you can do like below.
Go to SE38
Utilities---> Find in Source Code-
Find --- UPDATE
In program - Z* or ZX* if you want to search only in Exits
Regards,
Vijay V . -
SSO using Kerberso receiving "Integrity check on decrypted field failed (31
I am trying to implement SSO for an application that is running on a WebLogic Server. I have flagged the AD Service user for DES encryption, added spn through setspn, created the keytab file, reset the password (to the same value), moved the keytab file, updated krb5.ini and krb5Login.conf accordingly, modified WebLogic startup command accordingly. When Users try to access the application, authentication fails, and I see Integrity check on decrypted field failed (31) error in the WebLogic logs. Any ideas ? I am attaching the related lines from the log below.
<Sep 29, 2008 9:46:50 AM MDT> <Debug> <SecurityDebug> <000000> <Found Negotiate with SPNEGO token>
Debug is true storeKey true useTicketCache false useKeyTab true doNotPrompt false ticketCache is null KeyTab is devmax01.http.keytab2 refreshKrb5Config is false principal is HTTP/[email protected] tryFirstPass is false useFirstPass is false storePass is false clearPass is false
KeyTab: load() entry length: 60
KeyTabInputStream, readName(): DEV.DENVERWATER.ORG
KeyTabInputStream, readName(): HTTP
KeyTabInputStream, readName(): devmax01principal's key obtained from the keytab
principal is HTTP/[email protected]
EType: sun.security.krb5.internal.crypto.DesCbcMd5EType
KrbAsReq calling createMessage
KrbAsReq in createMessage
KrbAsReq etypes are: 3 1
KrbKdcReq send: kdc=dwdev01 UDP:88, timeout=30000, number of retries =3, #bytes=249
KDCCommunication: kdc=dwdev01 UDP:88, timeout=30000,Attempt =1, #bytes=249
KrbKdcReq send: #bytes read=1312
KrbKdcReq send: #bytes read=1312
EType: sun.security.krb5.internal.crypto.DesCbcMd5EType
KrbAsRep cons in KrbAsReq.getReply HTTP/devmax01Added server's keyKerberos Principal HTTP/[email protected] Version 8key EncryptionKey: keyType=3 keyBytes (hex dump)=
0000: 2F 02 76 AB 7F 8C B0 6E
[Krb5LoginModule] added Krb5Principal HTTP/[email protected] to Subject
Commit Succeeded
Found key for HTTP/[email protected]
Entered Krb5Context.acceptSecContext with state=STATE_NEW
EType: sun.security.krb5.internal.crypto.DesCbcMd5EType<Sep 29, 2008 9:46:50 AM MDT> <Debug> <SecurityDebug> <000000> <GSS exception GSSException: Failure unspecified at GSS-API level (Mechanism level: Integrity check on decrypted field failed (31))
GSSException: Failure unspecified at GSS-API level (Mechanism level: Integrity check on decrypted field failed (31))FYI The fix for this was to chang the value for -Djava.security.krb5.realm to be all upper case
Once that change was made authentication passed
Edited by: IDL on Jan 2, 2008 9:25 AM -
Cannot connect to abap server, please check your abap server connection
Installed new NW BPC 7.5 system on windows 2008 server but get the error as follows
when logon to BPC server:
"Cannot connect to abap server, please check your abap server connection".
"define system user group tab" is inactive in server manager also.
Server Diagnostic errors for SAP Server Connection:
Database Connection
Status Connection Error
as per note 1385864 but this note has not helped get past this status with installation.
User Type value is either set to Communication Data for all three users (BPC_ADMIN, BPC_SYSADMIN, BPC_USER).
and these accounts are not locked.
Any ideas for these errors?
Regards,
AidanHi Aidan,
"Your logon id (domain\user) does not have SystemAdmin rights; some functionality
is disabled."
This is caused by the fact that the user you are logged in as isn't in the UJA_SVR_DEFAULT table, the SYSADMIN field needs to have a value that contains your user id (i.e. DOMAIN\USER) . You can set this up with the UJA3_WRITE_SYS_USERS program.
"When I try to install APPshell the following errors occur:
@8O@ UJA_DATA_CHECK E 006 Application PLANNING's multiprovider /CPMB/ATMKOOE not exist in BW
@8O@ UJS_EXCEPTION E 003 Errors occured during "after import" method call during activation"
Aidan, sounds like something went terribly wrong during your activation process. Do this, Clean the appset with the UJS_ACTIVATE_CONTENT program and make sure that everything is completely deleted. Make sure that there is a lot of memory available for the activation and try it again.
It should work.
Hopefully this helps you.
Cheers, Scott -
hi friends,
Is it poosible to find out what are the Obsolete ABAP commands and Statements by comparing two different versions? an old version and an advanced version??
Is it stored in any table?
Pls Help
Regards
DineshHi,
Just check this link
http://www.nikat.org/www.geocities.com/victorav15/sapr3/abapobs.html
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb33cc358411d1829f0000e829fbfe/content.htm
You may have an overview wirth Solution Browser tool (at the solution point of view) in order to compare functionality between your current system and the ERP 2005.
at:
http://solutionbrowser.erp.sap.fmpmedia.com/
You can get the detailed release information from the following link.
http://service.sap.com/releasenotes.
A release note is a brief explanation of new features or changes to the system since the last software release. A release note typically describes a new function or an existing function that has been enhanced or changed.
Regards,
Padmam. -
The current ABAP command is obsolete
Hi Experts,
please let me know how this error can be removed.
The current ABAP command is obsolete
The variant " WITH KEY k" is no longer supported in the OO context. Use an
explicit key specification instead . . . .
Internal Message Code: READ 022
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
Thanks and Regards,
JohnyHi Experts,
Iam having no key to compare with.
The scenario is as follows:
*If it is PaymentLot,retrieve Payment method,Gpart,Banknumber,Bank accountnumber,paymentcard number and amount
from DFKKZP and DFKKOP for the cleared document
CALL FUNCTION 'FKK_PAYMENT_BATCH_FIND_PAYMENT'
EXPORTING
i_opbel = wa_cleareditem-augbl
IMPORTING
e_dfkkzp = et_dfkkzp
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0. "#EC NEEDED
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
IF et_dfkkzp-bankl IS NOT INITIAL. "Check for Bank key and Card number
lv_bankl = et_dfkkzp-bankl.
ENDIF.
IF et_dfkkzp-ccnum IS NOT INITIAL.
lv_ccnum = et_dfkkzp-ccnum.
ENDIF.
IF et_dfkkzp-bankl IS INITIAL AND et_dfkkzp-ccnum IS INITIAL. "If both bank key and Card number are initial
e_pymet = c_pymet. "Populate payment method as 'K'
ENDIF.
*For the obtained Business partner,fetch Bankdetails id and Payment card id from
*exporting parameters of F.M 'FKK_BUPA_READ_SINGLE'
CALL FUNCTION 'FKK_BUPA_READ_SINGLE'
EXPORTING
i_partner = lv_partner
i_xbank = 'X'
i_xccard = 'X'
TABLES
t_bank = it_bank
t_ccard = it_ccard
EXCEPTIONS
partner_not_found = 1
partner_in_role_not_found = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0. "#EC NEEDED
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE it_bank INTO wa_bank WITH KEY bankl = lv_bankl BINARY SEARCH. "Pick the entry which has bankl value as from et_dfkkzp
IF sy-subrc = 0.
e_pymet = c_pymetb.
e_bkvid = wa_bank-bkvid.
ENDIF.
READ TABLE it_ccard INTO wa_ccard WITH KEY ccnum = lv_ccnum BINARY SEARCH. "Pick the entry which has ccnum value as from et_dfkkzp
IF sy-subrc = 0.
e_pymet = c_pymetd.
e_ccard_id = wa_ccard-ccard_id.
ENDIF.
ENDIF.
ENDFORM. " ORIGINKEY_V1 -
How to check if a field in the table is same in all rows??
Hi Folks,
Is there a feature in abap where we can check if a field in a table is same in all rows.
Thanks,
MattThis can be easily self-programmed
read itab index 1. "get first row
"now check if exeists any entry with different value
read itab with key field1 ne itab-field1 transporting no fields.
if sy-subrc = 0.
"not all rows have the same value
else.
"all rows have the same value
endif.
Regards
Marcin
Right now I noticed that using NE operator is not allowed in READ TABLE statement, but you can do simple loop instead
read itab index 1 into l_field1. "get first row
loop at itab where field1 ne l_field1.
flag = 'X'.
exit.
endloop.
if flag = 'X'.
write: 'some fields are not equal'.
endif.
Edited by: Marcin Pciak on Oct 6, 2009 5:35 PM -
Hi friends,
is there any ABAP command or Function module to run the another ABAP Program(not Transaction code or area menu).
Thanks & Good regards,
vallamuthu.MHi,
You can use SUBMIT statement with VIA SELECTION-SCREEN option. Please check this sample code.
SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
WITH paramet eq 'Selection 1'
WITH selecto IN seltab
WITH selecto ne 3
AND RETURN.
Regards,
Ferry Lianto -
ABAP command "import from database..."
Can someone in this forum explain to me the low level details behind the ABAP command "import from database"?
The select in tables like stxl, indx, moni just retrieves data in hex format for the fields of type raw or lraw.
But the command import from database works fine!
What's the magic? Compression? Hash algorithms? etc?
Thanks!When you import a field from a database, it should be the same name and format when it was exported. These databases are a cluster table where data is stored in raw. I assumed it will read the cluster portion of the record and convert it into the field structure byte by byte. These tables have field CLUSTR which store the byte size of the record. So if you are willing to program the read, where you find out the length of the field you want to IMPORT, then read that number of byte from the cluster data, move it to the field you are importing, you should be able to do your own read. However, if we can do it in 1 statement using IMPORT, we don't need to program it.
Cluster table is used to save space since you don't need to create a new database record for each line of internal table you stored into them. Hope this helps. -
Could not contact the agent. check wheather the url connected to the agent.
i am having the problem with the error message " could not contact the agent. check wheather the url connected to the agent is null". This error occurs while login with credentials, and because of this i cant open the em page, please help me to solve this problem
Hi,
Can you please confirm the following:
1. Are you trying to login to Grid Control, when you are getting this error?
2. If yes, what was the version of Grid Control?
3. Provide the output of commands:
./emctl status oms -details
./emctl status agent
Best Regards,
Venkat -
What are abap commands that link to a layout set
hi
what are abap commands that link to a layout setHi,
Script Commands:
ADDRESS : Formatting of Address
BOTTOM, ENDBOTTOM : Define Footer text in a window
BOX, POSITION, SIZE : Boxes, Lines and Shading
CASE, ENDCASE : Case Distinction
DEFINE : Value assignment to text symbols
HEX, ENDHEX : Hexadecimal values
IF, ENDIF : Conditional text output
INCLUDE : Include other texts
NEW-PAGE : Explicit forms feed
NEW-WINDOW : Next window main
PRINT-CONTROL : Insert print control character
PROTECT...ENDPROTECT : Protect from page break
RESET : Initialize outline paragraphs
SET COUNTRY : Country-specific formating
SET DATE MASK : Formating of date fields
SET SIGN : Position of +/- sign
SET TIME MASK : Formating of time fields
STYLE : Change style
SUMMING : Summing variables
TOP : Set header text in window MAIN
Regards,
Bhaskar
Maybe you are looking for
-
Hi, We need to implement multi-lingual functionality in SharePoint 2013 on premise server. We have implemented the functionality by referring the below URL. http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/12/sharepoint-2013-variatio
-
How to find Base columns(mandatory columns)
hi sir, Is it any easy way to find the Base columns.... with Regards..
-
How to improve the updating a sql server table with another table in Oracle
Hi there. I am trying to do the next updating in SSIS UPDATE S SET S.COLUMN_A = OT.COLUMN_A, S.COLUMN_B = OT.COLUMN_B FROM SQLT1 S INNER JOIN ORACLET1 OT ON S. COLUMN_C = OT.COLUMN_C This is what I am doing: I am taking the Oracle data with the ODB
-
Hi, what is the function module or BAPI for FCH5 and FCH6 Tcodes i need to update the Check Number based on that input parameter ( Payment Document NUmber,Company Code ,fiscal year ,House bank ID and Account ID) need to update check number..... Thank
-
Japanese charcters displaying as "?" on a JSP page
Hi My database is UTF-8. I am loading some japaneese data using sql*loader and using Java.IO mechanism(Reader classes). Both ways it is storing the data on database in proper(Japanese) format. If I print it on dos-prompt then same Japanese characters