Creating custom fields for manual entry and fields that gather data from Active Directory
So I am no SQL developer but I am being asked to do this.. I've spent the last few days researching but cannot find anything related to my particular situation.
I have made a copy of the following report to add or modify a few columns:
Hardware 01A - Summary of computers in a specific collection
So I have 2 questions:
How do I create a field that will search the "Managed By" tab in the Computer Properties window in Active Directory.
How do I create a field that can be manually updated for example: "Date Deployed" or "Deployed By: Analyst"
I understand I need edit this in SQL report builder and think I know how to create the columns. I believe all I am really asking is.. What are the SQL statements I need to write in order to get this to work?
I'm sure it's not as cut and dry as I hope it to be so I will be standing by to try to answer any further information that you will want to know.
thanks!
Before you can accomplish this you need:
"Managed by" -attribute has to be added to your Active Directory System Discovery, more on this here: http://technet.microsoft.com/en-us/library/bb693618.aspx
For "Date Deployed", I'd use a custom Tattoo script in your task sequence to "Tattoo" the installation info in the registry, after that I'd configure the Hardware Inventory to pick that from the registry, more on this here: http://ccmexec.com/2012/08/script-to-tattoo-the-client-registry-during-osd/
and here: http://www.petervanderwoude.nl/post/reporting-about-the-all-the-different-os-deployment-versions-with-configmgr-2012/
After those prerequisites, you can start working with SQL reports. More info here: http://myitforum.com/myitforumwp/2012/10/29/sccm-2012-reporting-for-dummies-creating-your-own-ssrs-reports/
Similar Messages
-
How to create customer exit for characteristic variables and for text vars.
hi friends,
can anybody tell me how to create customer exit for characteristic variables and for text variables in bw ides system.
thanks,
sreeHi,
Please have a look at:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
Krzys -
Defining the Fields for Manual Entries in Conditions Type
Dear Team,
I want to define new fields in the Option Manual Entries in Condition Type eg PR00 . Can you tell me the Setting where do we define those settings and where are they control.
Thanks,
PrashantHi
The option provided for Manual Conditios are Hard Coded by the SAP, and you can not add any new option. If you want to check, pl. check the value range of Domain KMANU, where it is maintained.
What is your requirement? May be you can fulfill your requirement by some other mean, like USER EXIT.
Regards
AA -
Creating computer Names with small letters and they appear as capitals in Active Directory Domain
Hello,
When I try to create computer objects in Active Directory - namely when i change computer name with small letters, in active directory users and computers they appear as capital letters and in DNS console as well.
I know that it's not a problematic issue and technically all goes fine but, i want to know the reason.
Is it possible to change computer name with small letters while joining in the domain and than in AD it appear with small letters also ?
Thanks in advance,If you are asking about during the client join process, I believe the machines do all caps and you have to accept that as default. I'm guessing it is a legacy issue for older clients that has hung on such as possibly related to WINS.
Paul Bergson
MVP - Directory Services
MCITP: Enterprise Administrator
MCTS, MCT, MCSE, MCSA, Security, BS CSci
2012, 2008, Vista, 2003, 2000 (Early Achiever), NT4
Twitter @pbbergs http://blogs.dirteam.com/blogs/paulbergson
Please no e-mails, any questions should be posted in the NewsGroup.
This posting is provided AS IS with no warranties, and confers no rights. -
How do I get info from Active Directory and use it in my web-applications?
I borrowed a nice piece of code for JNDI hits against Active Directory from this website: http://www.sbfsbo.com/mike/JndiTutorial/
I have altered it and am trying to use it to retrieve info from our Active Directory Server.
I altered it to point to my domain, and I want to retrieve a person's full name(CN), e-mail address and their work location.
I've looked at lots of examples, I've tried lots of things, but I'm really missing something. I'm new to Java, new to JNDI, new to LDAP, new to AD and new to Tomcat. Any help would be so appreciated.
Thanks,
To show you the code, and the error message, I've changed the actual names I used for connection.
What am I not coding right? I get an error message like this:
javax.naming.NameNotFoundException[LDAP error code 32 - 0000208D: nameErr DSID:03101c9 problem 2001 (no Object), data 0,best match of DC=mycomp, DC=isd, remaining name dc=mycomp, dc=isd
[code]
import java.util.Hashtable;
import java.util.Enumeration;
import javax.naming.*;
import javax.naming.directory.*;
public class JNDISearch2 {
// initial context implementation
public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
public static String MY_HOST = "ldap://99.999.9.9:389/dc=mycomp,dc=isd";
public static String MGR_DN = "CN=connectionID,OU=CO,dc=mycomp,dc=isd";
public static String MGR_PW = "connectionPassword";
public static String MY_SEARCHBASE = "dc=mycomp,dc=isd";
public static String MY_FILTER =
"(&(objectClass=user)(sAMAccountName=usersignonname))";
// Specify which attributes we are looking for
public static String MY_ATTRS[] =
{ "cn", "telephoneNumber", "postalAddress", "mail" };
public static void main(String args[]) {
try { //----------------------------------------------------------
// Binding
// Hashtable for environmental information
Hashtable env = new Hashtable();
// Specify which class to use for our JNDI Provider
env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
// Specify the host and port to use for directory service
env.put(Context.PROVIDER_URL, MY_HOST);
// Security Information
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.SECURITY_PRINCIPAL, MGR_DN);
env.put(Context.SECURITY_CREDENTIALS, MGR_PW);
// Get a reference toa directory context
DirContext ctx = new InitialDirContext(env);
// Begin search
// Specify the scope of the search
SearchControls constraints = new SearchControls();
constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
// Perform the actual search
// We give it a searchbase, a filter and the constraints
// containing the scope of the search
NamingEnumeration results = ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
// Now step through the search results
while (results != null && results.hasMore()) {
SearchResult sr = (SearchResult) results.next();
String dn = sr.getName() + ", " + MY_SEARCHBASE;
System.out.println("Distinguished Name is " + dn);
// Code for displaying attribute list
Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
if (ar == null)
// Has no attributes
System.out.println("Entry " + dn);
System.out.println(" has none of the specified attributes\n");
else // Has some attributes
// Determine the attributes in this record.
for (int i = 0; i < MY_ATTRS.length; i++) {
Attribute attr = ar.get(MY_ATTRS);
if (attr != null) {
System.out.println(MY_ATTRS[i] + ":");
// Gather all values for the specified attribute.
for (Enumeration vals = attr.getAll(); vals.hasMoreElements();) {
System.out.println("\t" + vals.nextElement());
// System.out.println ("\n");
// End search
} // end try
catch (Exception e) {
e.printStackTrace();
System.exit(1);
My JNDIRealm in Tomcat which actually does the initial authentication looks like this:(again, for security purposes, I've changed the access names and passwords, etc.)
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldap://99.999.9.9:389"
connectionName="CN=connectionId,OU=CO,dc=mycomp,dc=isd"
connectionPassword="connectionPassword"
referrals="follow"
userBase="dc=mycomp,dc=isd"
userSearch="(&(sAMAccountName={0})(objectClass=user))"
userSubtree="true"
roleBase="dc=mycomp, dc=isd"
roleSearch="(uniqueMember={0})"
rolename="cn"
/>
I'd be so grateful for any help.
Any suggestions about using the data from Active directory in web-application.
Thanks.
R.VaughnBy this time you probably have already solved this, but I think the problem is that the Search Base is relative to the attachment point specified with the PROVIDER_URL. Since you already specified "DC=mycomp,DC=isd" in that location, you merely want to set the search base to "". The error message is trying to tell you that it could only find half of the "DC=mycomp, DC=isd, DC=mycomp, DC=isd" that you specified for the search base.
Hope that helps someone.
Ken Gartner
Quadrasis, Inc (We Unify Security, www -dot- quadrasis -dot- com) -
How to create custom infotype for training and event management
hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
PS No PA0000-> PERNR
Name - PA0001 -> ENAME
IS PS.No. PA0001-> PS no. of Immediate Superior
IS name PA0001 -> ENAME
thanx in advance
afzalHi,
Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
If you wish to create a PD infotype, use transaction PPCI to create the infotype.
But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
If you wish to create a PA infotype, use transaction PM01 to create the infotype.
But before that you may be required to create a strcuture PSnnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
Regards,
Srini -
SAP CRM Tables and Fields for Contract start and End dates
Hi Experts,
Please Provide me SAP CRM Tables and Field names for the below.
SAP CRM Contracts start date and End date
SAP CRM Conditions(PROO, K007 etc....) records start and End Date.
Thanks and Regards,
Tejacorrection
10 Replies Latest reply: 24 May, 2013 8:38 AM by nishant Vasudev
Tweet
SAP CRM Tables and Fields for Contract start and End dates
This question has been Answered.
Teja Dhar 12 Oct, 2009 8:03 PM
Currently Being Moderated
Hi Experts,
Please Provide me SAP CRM Tables and Field names for the below.
SAP CRM Contracts start date and End date
SAP CRM Conditions(PROO, K007 etc....) records start and End Date.
Thanks and Regards,
Teja
Correct Answer by Sreekantha Gorla on Oct 22, 2009 8:22 PM
Hi,
dates will be stores in the table 'SCAPPTSEG'.
I double checked it. This table stores all the date types of one order transactions...
The relationship is as follows..
CRMD_ORDERADM_H- guid = crmd_link-guid_hi
crmd_link-guid_set = SCAPPTSEG-APPL_GUID.
Thanks and regards,
Sreekanth
<:footer>See the answer in context
6281 Views
Topics: Customer Relationship Management
Reply
Average User Rating
0
(0 ratings)
My Rating:
Rating Saved!
Comment on your rating
Re: SAP CRM Tables and Fields for Contract start and End dates
Robert Jesionowski 14 Oct, 2009 2:23 PM (in response to Teja Dhar)
Currently Being Moderated
Hi,
you should try with FM: CRM_DATES_READ_SINGLE_OB or CRM_DATES_READ_DB.
There is something in table SCAPPT and SCGENAPPT.
Regards, R
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
Teja Dhar 22 Oct, 2009 5:30 PM (in response to Robert Jesionowski)
Currently Being Moderated
Hi Robert,
I am not able to find contract start date and End dates in the tables SCAPPT and SCGENAPPT.
Can you suggest some relevant tables.
Best Regards,
Teja
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
Sreekantha Gorla 22 Oct, 2009 2:35 PM (in response to Teja Dhar)
Currently Being Moderated
Hi,
Table SCAPPTSEG stores the contract start and end dates.
Thanks,
Sreekanth
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
Teja Dhar 22 Oct, 2009 5:32 PM (in response to Sreekantha Gorla)
Currently Being Moderated
Hi Sreekanth,
I am not able to find contract start date and End dates in the table SCAPPTSEG.This is for appointments.
Can you suggest some relevant tables.
Best Regards,
Teja
Report Abuse
Like (0)
Reply
Correct AnswerRe: SAP CRM Tables and Fields for Contract start and End dates
Sreekantha Gorla 22 Oct, 2009 8:22 PM (in response to Teja Dhar)
Currently Being Moderated
Hi,
dates will be stores in the table 'SCAPPTSEG'.
I double checked it. This table stores all the date types of one order transactions...
The relationship is as follows..
CRMD_ORDERADM_H- guid = crmd_link-guid_hi
crmd_link-guid_set = SCAPPTSEG-APPL_GUID.
Thanks and regards,
Sreekanth
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
Wim Olieman 23 Oct, 2009 9:12 AM (in response to Sreekantha Gorla)
Currently Being Moderated
Hi,
I can tell you where the pricing records are saved, replicated from ECC.
The data from ECC table Axxx (e.g. A304) is replicated to CRM table
CNCCRMPRSAPxxx (e.g. CNCCRMPRSAP304).
Here you can find fields TIMESTAMP_TO and TIMESTAMP_FROM.
About the dates: what Sreekantha Gorla stated, about table 'SCAPPTSEG' is correct.
What might help is to execute program "CRM_ORDER_READ". Here you can find
the relevant entries also.
regards,
Wim
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
Teja Dhar 23 Oct, 2009 4:59 PM (in response to Teja Dhar)
Currently Being Moderated
Hi Experts,
Thanks a lot for your support.My problem got resolved.
Best Regards,
Teja
Report Abuse
Like (0)
Reply
Re: SAP CRM Tables and Fields for Contract start and End dates
rajesh gadamsetty 27 Nov, 2009 12:29 PM (in response to Teja Dhar)
Currently Being Moderated
Hi Teja
Please let me know how you got the dates. i got the same requirement
Report Abuse
Like (0)
Reply
Correction on above mail.
Hi Sanjay,
Can you please help me to find the contract st art date and end date fetching from the table as below
ITEM DATES:
Select guid_set from table CRMD_LINK where guid_hi = CRMD_ORDER_I-GUID AND
OBJTYPE_HI = '06'
OBJTYPE_SET = '30'.
Select * from SCAPPTSEG where APPL_GUID = guid_set.
as from the table scapptseg has some unusal fields which fields to select to get the start date and end date and on what condition and isuppose we need to convert als the same
pls suggest further on same
regards
Arora -
Can we create serach help for a selection screen field
Can we create serach help for a selection screen field with out creating searchhelp object.
I mean is it possible to create serchelp in the program itself with some specific values i want to give.
E.g say we can define any internal table and fill it with values and using that into selection screen fields
Regards
MaveAT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
PERFORM PAYMENT_HELP.
FORM PAYMENT_HELP.
DATA: begin of DESCR_TAB occurs 0,
DESCR LIKE BKPF-BKTXT,
END OF DESCR_TAB.
DATA: gd_repid like sy-repid.
gd_repid = sy-repid.
DESCR_TAB-DESCR = 'aaaaa'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'bbbbb'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'ccccc'.
append DESCR_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DESCR'
DYNPPROG = gd_repid
DYNPNR = '1000'
DYNPROFIELD = 'paymeth'
VALUE_ORG = 'S'
DISPLAY = ' '
TABLES
value_tab = DESCR_TAB.
endform.
Svetlin -
Live meeting issue:
After click Join the Meeting, it prompted for MeetingID, Entry and Location are blank, need to key in information manually
1. It seems OK on Live meeting client settings.
2. Then uninstall and reinstall live meeting client and addons. live meeting version now is 8.0.6362.41
3.can schedule live meeting success.
but issue persists.Live meeting issue:
After click Join the Meeting, it prompted for MeetingID, Entry and Location are blank, need to key in information manually
1. It seems OK on Live meeting client settings.
2. Then uninstall and reinstall live meeting client and addons. live meeting version now is 8.0.6362.41
3.can schedule live meeting success.
but issue persists. -
How to Created custom report for Ship not Billed (SD/FI)?
Hi all,
I am anticipating to write some abap reports..Here is one of them..
Anyone can help me with writing a Report , how to do 'Custom Report for shipped not Billed(SD/FI)' ..But since I am new to Abap , if you wish to reply, please use a little more detail and simple explanation, step by step so I can understand what is the idea, how it can be acheived...what kind of report should be used , techniques, tables etc...:)
Appreciate your help!
Regards,
BobyHi Boby,
You need to create custom transaction to achive these results.
you will have selection-screen ,it would be :
Date : Here date would be mandatory - Ranges Option
Customer - Optional field - Ranges
Order # Sales Order (Optional) Ranges
Invoice # - Invoice # (Optional) Ranges
You will get the data based on ur selection-screen criteria ...
First you will have customer order details from diffrent table
VBAK,
VBAP,
LIKP
LIPS
VBRK,
VBRP
KNA1,
VBFA Tables ( See the my sample program )
Output would be :
Customer # Custome Name Order # Delivery # Invoice # Netpr, Netquantity ,
Check the condition whether invoice table has VBRK-RFBSK = ''.
See the my sample program : This is sales report by monthly..
REPORT ZFDSALES_REPORT no standard page heading
message-id zwave.
Data Declaration Part
TYPE-POOLS
type-pools : slis.
Tables
tables : VBAK,
VBAP.
Internal table for VBAK Table
data : begin of i_vbak occurs 0,
vbeln like vbak-vbeln,
bstnk like vbak-bstnk,
vdatu like vbak-vdatu,
end of i_vbak.
Internal table for VBAP and MATNR
data : begin of i_vbap occurs 0,
vbeln like vbap-vbeln,
matnr like vbap-matnr,
kdmat like vbap-kdmat,
kwmeng like vbap-kwmeng,
netpr like vbap-netpr,
maktx like makt-maktx,
end of i_vbap.
Internal tables
data : begin of i_sales occurs 0,
vdatu like vbak-vdatu,
bstnk like vbak-bstnk,
matnr like vbap-matnr,
maktx like makt-maktx,
kdmat like vbap-kdmat,
kwmeng like vbap-kwmeng,
netpr like vbap-netpr,
end of i_sales.
Variable for ALV
data : v_repid like sy-repid,
gt_fieldcat type slis_t_fieldcat_alv.
Selection-screen
selection-screen : begin of block blk with frame title text-001.
select-options : s_vbeln for vbak-vbeln,
s_erdat for vbak-erdat,
s_ernam for vbak-ernam,
s_vdatu for vbak-vdatu obligatory,
s_BSTNK for vbak-BSTNK,
s_KUNNR for vbak-kunnr,
s_matnr for vbap-matnr,
s_KDMAT for vbap-KDMAT.
selection-screen : end of block blk.
Initilization
initialization.
v_repid = sy-repid.
S T A R T - O F - S E L E C T I O N ****************
start-of-selection.
Get the data from VBAK and VBAP Tables
perform get_vbak_vbap.
E N D - O F - S E L E C T I O N *****************
end-of-selection.
Display the data
perform dispolay_data.
*& Form get_vbak_vbap
Get the data from VBAK and VBAP Table
FORM get_vbak_vbap.
Get the data from VBAK Table
select vbeln bstnk vdatu from vbak into table i_vbak
where vbeln in s_vbeln
and bstnk in s_bstnk
and vdatu in s_vdatu
and kunnr in s_kunnr
and erdat in s_erdat
and ernam in s_ernam.
if sy-subrc ne 0.
message e000(zwave) with 'No data found for given selection'.
endif.
Get the data from VBAP Table
select avbeln amatnr akdmat akwmeng a~netpr
b~maktx into table i_vbap
from vbap as a inner join makt as b on bmatnr = amatnr
for all entries in i_vbak
where a~vbeln in s_vbeln
and a~kdmat in s_kdmat
and a~abgru = space
and a~matnr in s_matnr
and a~matnr ne '000000000000009999'
and a~matnr ne '000000000000004444'
and a~matnr ne '000000000000008888'
and a~matnr ne '000000000000001111'
and a~werks = '1000'
and b~spras = 'E'
and a~vbeln = i_vbak-vbeln.
if sy-subrc ne 0.
message e000(zwave) with 'No data found for given selection'.
endif.
sort i_vbak by vbeln.
sort i_vbap by vbeln matnr.
loop at i_vbap.
read table i_vbak with key vbeln = i_vbap-vbeln
binary search.
if sy-subrc eq 0.
i_sales-bstnk = i_vbak-bstnk.
i_sales-vdatu = i_vbak-vdatu.
i_sales-matnr = i_vbap-matnr.
i_sales-kdmat = i_vbap-kdmat.
i_sales-maktx = i_vbap-maktx.
i_sales-netpr = i_vbap-netpr.
i_sales-kwmeng = i_vbap-kwmeng.
append i_sales.
else.
continue.
endif.
clear : i_sales,
i_vbap,
i_vbak.
endloop.
sort i_sales by vdatu bstnk matnr.
refresh : i_vbap,
i_vbak.
ENDFORM. " get_vbak_vbap
*& Form dispolay_data
Display the data
FORM dispolay_data.
Fill the Fiedlcat
PERFORM fieldcat_init using gt_fieldcat[].
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT =
IT_FIELDCAT = gt_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = i_sales
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ENDFORM. " dispolay_data
*& Form fieldcat_init
text
-->P_GT_FIELDCAT[] text
FORM fieldcat_init USING e01_lt_fieldcat type slis_t_fieldcat_alv.
DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
Delivery Date
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'VDATU'.
LS_FIELDCAT-OUTPUTLEN = 12.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Delivery Date'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Purchase Order #Material Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'BSTNK'.
LS_FIELDCAT-OUTPUTLEN = 25.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Purchase Order #'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material
CLEAR LS_FIELDCAT.
LS_FIELDCAT-REF_FIELDNAME = 'MATNR'.
LS_FIELDCAT-REF_TABNAME = 'MARA'.
LS_FIELDCAT-FIELDNAME = 'MATNR'.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Material #'.
ls_fieldcat-seltext_M = 'Material #'.
ls_fieldcat-seltext_S = 'Material #'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Material Description
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'MAKTX'.
LS_FIELDCAT-OUTPUTLEN = 40.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Material Description'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Customer Material #
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KDMAT'.
LS_FIELDCAT-OUTPUTLEN = 35.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Customer material no.'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Quantity
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'KWMENG'.
LS_FIELDCAT-OUTPUTLEN = 15.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Quantity'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
Net Price
CLEAR LS_FIELDCAT.
LS_FIELDCAT-FIELDNAME = 'NETPR'.
LS_FIELDCAT-OUTPUTLEN = 15.
LS_FIELDCAT-TABNAME = 'I_SALES'.
ls_fieldcat-seltext_L = 'Net Price'.
APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
ENDFORM. " fieldcat_init
Reward Points if it is helpful
Thanks
Seshu -
Automatic Payment terms without referrring Customer Master nor manual entry
Hi,
I have a credit memo with reference to one billing document. It is automatically coming with payment terms which is not maintained in customer master nor manual entry in the document. I had checked all the configuration related settings for the document and payment terms assignment. I had debugged and checked for any user exit or function module.
I have no clue in this regard and can anybody throw some light regarding to fix the problem.
Regards
SashikanthHi,
Check if the billing document has payment terms. If yes, even if customer master doesnt contain payment terms the payment terms will be copied to the credit memo through standard copying control maintained in IMG, when you create a document with reference to some document this copying control gets activated.
Also check user exit RV60AFZZ if there's any code written in it to default payment terms by billing doc type.
Regards,
Amit -
F-53 and F-28, Customized columns for cash discount and %
Hi Expert,
With reference to the subject of: Customized columns for cash discount and % ...
I faced the problem of not able to set / defined hidden column for cash discount and % by creating a new variant.
Steps:
Create a variant
Click <administrator> button ... mark the columns hidden, and click <activate> button
Then click <Save> button
Problem: Every time I using the F-53/F-28, the layout is not working, and when goto check the variant settings, the cash discount and % columns remained unchecked.
SAP version: 4.6
Kindly advise.
Thanks and regards,
sbmelHi JP,
It is not working using field status group, as I am using F-53 and F-28 and not FB50/60/70.
The purpose I want to create variant for screen after clicking <process open item> is to control column display (hide cash discount and %). if the variant is working, I can create a customized Tcode for the F-53 and F-28.
Now problem is that variant seem not working.
Thanks and regards,
sbmel -
Override the storage section check for manual entries
Hi All,
I am facing a issue on Storage section search.While creating To system is giving correct Storage section according t the settings but if I would like to change the storage section to different storage section system is not giving any error message.It is giving only warning message check your enteries.
So I would like know is there is config settings to avoid another storage section selcetion which are not assignned storage search indicator.
I have checked in help.sap.com .I following information .
To set up the strategy for storage sections, see the section on activating storage section searches under Strategies in the Warehouse Management IMG documentation.
If storage section checking is active for the storage type, then the system searches in the storage type only for those empty storage bins in storage sections that have been allowed for the material being put away. When you are creating a transfer order and manually enter a storage bin, then the system checks whether the bin is in a storage section that is allowed for the material.
*You can also make an entry in customizing that permits you to override the section check for manual entries.*_
Can please advice me inorder activate the config for override the section check for manual entries or any warning message.
Thanks & regards,
SrikanthHI,
Thanks for your reply.
I want Error message.
Regards,
Srikanth P -
Doubt regarding FOR ALL ENTRIES and INDEXES
Hi iam Aslam ..
and i have a doubt ..regrding .. .
1) what are the disadvs of using FOR ALL ENTRIES
2) what are the disadvs of using INDEXES
3) what is the disadvs of using Binary search ..
4) . how can u do performance tuning ...if u have more than one SELECT statements between ... Loop and Endloop .......
please answer to these questions or reply me to [email protected] ..
thanks in advance ..
byeHI
<b>1) what are the disadvs of using FOR ALL ENTRIES</b>
if there is no data available for you condition mentioned in the where condition then it will retrive all the data from the database table , which we don't want , but we can solve that easily
Ways of Performance Tuning
1. Selection Criteria
2. Select Statements
Select Queries
SQL Interface
Aggregate Functions
For all Entries
Select Over more than one Internal table
Selection Criteria
1. Restrict the data to the selection criteria itself, rather than filtering it out using the ABAP code using CHECK statement.
2. Select with selection list.
Points # 1/2
SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list
SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
Select Statements Select Queries
1. Avoid nested selects
2. Select all the records in a single shot using into table clause of select statement rather than to use Append statements.
3. When a base table has multiple indices, the where clause should be in the order of the index, either a primary or a secondary index.
4. For testing existence , use Select.. Up to 1 rows statement instead of a Select-Endselect-loop with an Exit.
5. Use Select Single if all primary key fields are supplied in the Where condition .
Point # 1
SELECT * FROM EKKO INTO EKKO_WA.
SELECT * FROM EKAN INTO EKAN_WA
WHERE EBELN = EKKO_WA-EBELN.
ENDSELECT.
ENDSELECT.
The above code can be much more optimized by the code written below.
SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
FROM EKKO AS P INNER JOIN EKAN AS F
ON PEBELN = FEBELN.
Note: A simple SELECT loop is a single database access whose result is passed to the ABAP program line by line. Nested SELECT loops mean that the number of accesses in the inner loop is multiplied by the number of accesses in the outer loop. One should therefore use nested SELECT loops only if the selection in the outer loop contains very few lines or the outer loop is a SELECT SINGLE statement.
Point # 2
SELECT * FROM SBOOK INTO SBOOK_WA.
CHECK: SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
ENDSELECT.
The above code can be much more optimized by the code written below which avoids CHECK, selects with selection list and puts the data in one shot using into table
SELECT CARRID CONNID FLDATE BOOKID FROM SBOOK INTO TABLE T_SBOOK
WHERE SBOOK_WA-CARRID = 'LH' AND
SBOOK_WA-CONNID = '0400'.
Point # 3
To choose an index, the optimizer checks the field names specified in the where clause and then uses an index that has the same order of the fields . In certain scenarios, it is advisable to check whether a new index can speed up the performance of a program. This will come handy in programs that access data from the finance tables.
Point # 4
SELECT * FROM SBOOK INTO SBOOK_WA
UP TO 1 ROWS
WHERE CARRID = 'LH'.
ENDSELECT.
The above code is more optimized as compared to the code mentioned below for testing existence of a record.
SELECT * FROM SBOOK INTO SBOOK_WA
WHERE CARRID = 'LH'.
EXIT.
ENDSELECT.
Point # 5
If all primary key fields are supplied in the Where condition you can even use Select Single.
Select Single requires one communication with the database system, whereas Select-Endselect needs two.
Select Statements contd.. SQL Interface
1. Use column updates instead of single-row updates
to update your database tables.
2. For all frequently used Select statements, try to use an index.
3. Using buffered tables improves the performance considerably.
Point # 1
SELECT * FROM SFLIGHT INTO SFLIGHT_WA.
SFLIGHT_WA-SEATSOCC =
SFLIGHT_WA-SEATSOCC - 1.
UPDATE SFLIGHT FROM SFLIGHT_WA.
ENDSELECT.
The above mentioned code can be more optimized by using the following code
UPDATE SFLIGHT
SET SEATSOCC = SEATSOCC - 1.
Point # 2
SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
WHERE CARRID = 'LH'
AND CONNID = '0400'.
ENDSELECT.
The above mentioned code can be more optimized by using the following code
SELECT * FROM SBOOK CLIENT SPECIFIED INTO SBOOK_WA
WHERE MANDT IN ( SELECT MANDT FROM T000 )
AND CARRID = 'LH'
AND CONNID = '0400'.
ENDSELECT.
Point # 3
Bypassing the buffer increases the network considerably
SELECT SINGLE * FROM T100 INTO T100_WA
BYPASSING BUFFER
WHERE SPRSL = 'D'
AND ARBGB = '00'
AND MSGNR = '999'.
The above mentioned code can be more optimized by using the following code
SELECT SINGLE * FROM T100 INTO T100_WA
WHERE SPRSL = 'D'
AND ARBGB = '00'
AND MSGNR = '999'.
Select Statements contd Aggregate Functions
If you want to find the maximum, minimum, sum and average value or the count of a database column, use a select list with aggregate functions instead of computing the aggregates yourself.
Some of the Aggregate functions allowed in SAP are MAX, MIN, AVG, SUM, COUNT, COUNT( * )
Consider the following extract.
Maxno = 0.
Select * from zflight where airln = LF and cntry = IN.
Check zflight-fligh > maxno.
Maxno = zflight-fligh.
Endselect.
The above mentioned code can be much more optimized by using the following code.
Select max( fligh ) from zflight into maxno where airln = LF and cntry = IN.
Select Statements contd For All Entries
The for all entries creates a where clause, where all the entries in the driver table are combined with OR. If the number of entries in the driver table is larger than rsdb/max_blocking_factor, several similar SQL statements are executed to limit the length of the WHERE clause.
The plus
Large amount of data
Mixing processing and reading of data
Fast internal reprocessing of data
Fast
The Minus
Difficult to program/understand
Memory could be critical (use FREE or PACKAGE size)
Points to be must considered FOR ALL ENTRIES
Check that data is present in the driver table
Sorting the driver table
Removing duplicates from the driver table
Consider the following piece of extract
Loop at int_cntry.
Select single * from zfligh into int_fligh
where cntry = int_cntry-cntry.
Append int_fligh.
Endloop.
The above mentioned can be more optimized by using the following code.
Sort int_cntry by cntry.
Delete adjacent duplicates from int_cntry.
If NOT int_cntry[] is INITIAL.
Select * from zfligh appending table int_fligh
For all entries in int_cntry
Where cntry = int_cntry-cntry.
Endif.
Select Statements contd Select Over more than one Internal table
1. Its better to use a views instead of nested Select statements.
2. To read data from several logically connected tables use a join instead of nested Select statements. Joins are preferred only if all the primary key are available in WHERE clause for the tables that are joined. If the primary keys are not provided in join the Joining of tables itself takes time.
3. Instead of using nested Select loops it is often better to use subqueries.
Point # 1
SELECT * FROM DD01L INTO DD01L_WA
WHERE DOMNAME LIKE 'CHAR%'
AND AS4LOCAL = 'A'.
SELECT SINGLE * FROM DD01T INTO DD01T_WA
WHERE DOMNAME = DD01L_WA-DOMNAME
AND AS4LOCAL = 'A'
AND AS4VERS = DD01L_WA-AS4VERS
AND DDLANGUAGE = SY-LANGU.
ENDSELECT.
The above code can be more optimized by extracting all the data from view DD01V_WA
SELECT * FROM DD01V INTO DD01V_WA
WHERE DOMNAME LIKE 'CHAR%'
AND DDLANGUAGE = SY-LANGU.
ENDSELECT
Point # 2
SELECT * FROM EKKO INTO EKKO_WA.
SELECT * FROM EKAN INTO EKAN_WA
WHERE EBELN = EKKO_WA-EBELN.
ENDSELECT.
ENDSELECT.
The above code can be much more optimized by the code written below.
SELECT PF1 PF2 FF3 FF4 INTO TABLE ITAB
FROM EKKO AS P INNER JOIN EKAN AS F
ON PEBELN = FEBELN.
Point # 3
SELECT * FROM SPFLI
INTO TABLE T_SPFLI
WHERE CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK'.
SELECT * FROM SFLIGHT AS F
INTO SFLIGHT_WA
FOR ALL ENTRIES IN T_SPFLI
WHERE SEATSOCC < F~SEATSMAX
AND CARRID = T_SPFLI-CARRID
AND CONNID = T_SPFLI-CONNID
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
The above mentioned code can be even more optimized by using subqueries instead of for all entries.
SELECT * FROM SFLIGHT AS F INTO SFLIGHT_WA
WHERE SEATSOCC < F~SEATSMAX
AND EXISTS ( SELECT * FROM SPFLI
WHERE CARRID = F~CARRID
AND CONNID = F~CONNID
AND CITYFROM = 'FRANKFURT'
AND CITYTO = 'NEW YORK' )
AND FLDATE BETWEEN '19990101' AND '19990331'.
ENDSELECT.
1. Table operations should be done using explicit work areas rather than via header lines.
2. Always try to use binary search instead of linear search. But dont forget to sort your internal table before that.
3. A dynamic key access is slower than a static one, since the key specification must be evaluated at runtime.
4. A binary search using secondary index takes considerably less time.
5. LOOP ... WHERE is faster than LOOP/CHECK because LOOP ... WHERE evaluates the specified condition internally.
6. Modifying selected components using MODIFY itab TRANSPORTING f1 f2.. accelerates the task of updating a line of an internal table.
Point # 2
READ TABLE ITAB INTO WA WITH KEY K = 'X BINARY SEARCH.
IS MUCH FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY K = 'X'.
If TAB has n entries, linear search runs in O( n ) time, whereas binary search takes only O( log2( n ) ).
Point # 3
READ TABLE ITAB INTO WA WITH KEY K = 'X'. IS FASTER THAN USING
READ TABLE ITAB INTO WA WITH KEY (NAME) = 'X'.
Point # 5
LOOP AT ITAB INTO WA WHERE K = 'X'.
ENDLOOP.
The above code is much faster than using
LOOP AT ITAB INTO WA.
CHECK WA-K = 'X'.
ENDLOOP.
Point # 6
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1 TRANSPORTING DATE.
The above code is more optimized as compared to
WA-DATE = SY-DATUM.
MODIFY ITAB FROM WA INDEX 1.
7. Accessing the table entries directly in a "LOOP ... ASSIGNING ..." accelerates the task of updating a set of lines of an internal table considerably
8. If collect semantics is required, it is always better to use to COLLECT rather than READ BINARY and then ADD.
9. "APPEND LINES OF itab1 TO itab2" accelerates the task of appending a table to another table considerably as compared to LOOP-APPEND-ENDLOOP.
10. DELETE ADJACENT DUPLICATES accelerates the task of deleting duplicate entries considerably as compared to READ-LOOP-DELETE-ENDLOOP.
11. "DELETE itab FROM ... TO ..." accelerates the task of deleting a sequence of lines considerably as compared to DO -DELETE-ENDDO.
Point # 7
Modifying selected components only makes the program faster as compared to Modifying all lines completely.
e.g,
LOOP AT ITAB ASSIGNING <WA>.
I = SY-TABIX MOD 2.
IF I = 0.
<WA>-FLAG = 'X'.
ENDIF.
ENDLOOP.
The above code works faster as compared to
LOOP AT ITAB INTO WA.
I = SY-TABIX MOD 2.
IF I = 0.
WA-FLAG = 'X'.
MODIFY ITAB FROM WA.
ENDIF.
ENDLOOP.
Point # 8
LOOP AT ITAB1 INTO WA1.
READ TABLE ITAB2 INTO WA2 WITH KEY K = WA1-K BINARY SEARCH.
IF SY-SUBRC = 0.
ADD: WA1-VAL1 TO WA2-VAL1,
WA1-VAL2 TO WA2-VAL2.
MODIFY ITAB2 FROM WA2 INDEX SY-TABIX TRANSPORTING VAL1 VAL2.
ELSE.
INSERT WA1 INTO ITAB2 INDEX SY-TABIX.
ENDIF.
ENDLOOP.
The above code uses BINARY SEARCH for collect semantics. READ BINARY runs in O( log2(n) ) time. The above piece of code can be more optimized by
LOOP AT ITAB1 INTO WA.
COLLECT WA INTO ITAB2.
ENDLOOP.
SORT ITAB2 BY K.
COLLECT, however, uses a hash algorithm and is therefore independent
of the number of entries (i.e. O(1)) .
Point # 9
APPEND LINES OF ITAB1 TO ITAB2.
This is more optimized as compared to
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 10
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING K.
This is much more optimized as compared to
READ TABLE ITAB INDEX 1 INTO PREV_LINE.
LOOP AT ITAB FROM 2 INTO WA.
IF WA = PREV_LINE.
DELETE ITAB.
ELSE.
PREV_LINE = WA.
ENDIF.
ENDLOOP.
Point # 11
DELETE ITAB FROM 450 TO 550.
This is much more optimized as compared to
DO 101 TIMES.
DELETE ITAB INDEX 450.
ENDDO.
12. Copying internal tables by using ITAB2[ ] = ITAB1[ ] as compared to LOOP-APPEND-ENDLOOP.
13. Specify the sort key as restrictively as possible to run the program faster.
Point # 12
ITAB2[] = ITAB1[].
This is much more optimized as compared to
REFRESH ITAB2.
LOOP AT ITAB1 INTO WA.
APPEND WA TO ITAB2.
ENDLOOP.
Point # 13
SORT ITAB BY K. makes the program runs faster as compared to SORT ITAB.
Internal Tables contd
Hashed and Sorted tables
1. For single read access hashed tables are more optimized as compared to sorted tables.
2. For partial sequential access sorted tables are more optimized as compared to hashed tables
Hashed And Sorted Tables
Point # 1
Consider the following example where HTAB is a hashed table and STAB is a sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE HTAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
This runs faster for single read access as compared to the following same code for sorted table
DO 250 TIMES.
N = 4 * SY-INDEX.
READ TABLE STAB INTO WA WITH TABLE KEY K = N.
IF SY-SUBRC = 0.
ENDIF.
ENDDO.
Point # 2
Similarly for Partial Sequential access the STAB runs faster as compared to HTAB
LOOP AT STAB INTO WA WHERE K = SUBKEY.
ENDLOOP.
This runs faster as compared to
LOOP AT HTAB INTO WA WHERE K = SUBKEY.
ENDLOOP. -
Custom workflow for manual merch projects
Hi,
Having issues in configuring custom workflow.
In ATG10.0.3 created a custom workflow(editCommerceAssets.wdl) & configured with catalog import job (importing thru spreadsheet & creating a Merch project).This works successfully.
I am trying to configure this custom workflow for manually created projects in BCC.
In the following files I tried replacing commonWorkflow.wdl to editCommerceAssets.wdl.
<localconfig>\atg\commerce\web\assetmanager\taskConfiguration.xml
<localconfig>\atg\commerce\web\workflowActivities.xml
But getting this error in pub console:
10:13:23,195 WARN [ActivityManager] The workflow activity with ID /Common/commonWorkflow.wdl has been registered multiple times for the same workflow. Please verify your workflow
configuration as this is not allowed.
10:14:40,453 ERROR [ApplicationManager] There is no application configured with ID '/Common/commonWorkflow.wdl'.
Any recommendations?
Thanks!
Mani
Edited by: user11263665 on Oct 17, 2012 9:38 AMIt is possible that the workflow has already been registered in db before you modified workflowActivities.xml.Did you try cleaning up workflow tables and restart the server??
epub_workflow_info, epub_coll_workflow, epub_ind_wf,epub_wf_server_id tables
Make sure there is only one entry for each workflow in epub_workflow_info. If there are multiple entries, then it may be coming from 2 different places and you need to disable one of them. Whenever you create custom work flow, copy the existing workflow and modify it and give it a different name. If you are importing programmatically, you really dont need to configure it in taskConfiguraiton.xml ( as it corresponds to settings related to which item-descriptors, tabs, security in BCC gui).
-karthik
Maybe you are looking for
-
Hi Gurus, I need to configure the Tax code as per below requirement for my client. Say I have created 2 tax codes V1 & V2 For V1 tax code in PO at invoice tab the system will display Base amount --100 USD Input tax -- 8%-- 8 USD Total - 108 USD But d
-
Hyperion 11.1.2.x Interactive Reporting Distributed Installation
Hi we are trying to perform distributed installation of hyperion interactive reporting v 11.1.2.1 or v 11.1.2.2. But we were unable to split the services. As i came to know that shared services and workspace webapplication can now be only on one serv
-
Cannot open folders by double-clicking
I have an iMac (running Tiger) at work which I have recently joined to the network. With my iMac at home I am able to do anything I like without restrictions. Not so at work. I have a separate user on my machine at work with administrator privileges.
-
Simple Round call results in Arithmetic overflow
Hi, I'm a bit dazzled why this statement won't work in T-SQL : Select Round(9.990000, 0) The error I get is : Arithmetic overflow error converting expression to data type numeric. The result should be : 10 I've tried this in SQL 2005,2008 and 2008 R2
-
Greetings APEX Users and Experts, I want to create a drill down on my report, but I don't want to create two tables and use a join to do it. I would like it to be from a single table. Is that possible? If so, how? Thanks! David Edited by: Bob Sacaman