<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2326308400364830388</id><updated>2011-09-20T17:31:26.806-07:00</updated><category term='PAI'/><category term='PBO'/><category term='SAP'/><category term='apostrophe'/><category term='popup'/><category term='select'/><category term='slashmysearch'/><category term='itab events'/><category term='ABAP'/><category term='events tab'/><category term='session'/><category term='dialog processor'/><category term='hide'/><category term='FORMS'/><category term='BDCDATA'/><category term='EXCEL BDC'/><category term='FUNCTION MODULE'/><category term='propertygrid'/><category term='make money'/><title type='text'>Techie</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-1973641451606712634</id><published>2008-04-23T12:14:00.000-07:00</published><updated>2008-04-23T12:53:35.016-07:00</updated><title type='text'>Running Both Asp.net 2.0 and 1.x on same domain</title><content type='html'>This is how it goes, a stable website using ASP.net 1.1 needed some new modules.&lt;br /&gt;&lt;br /&gt;We decided to go with 2.0 for the new modules as a first step towards upgrading ( 1.1 is almost legacy now )&lt;br /&gt;&lt;br /&gt;The mosule was written , and was ready to be deployed , when boom the domain went down..&lt;br /&gt;&lt;br /&gt;1) You cannot run both 1.1 and 2.0 on the same worker process.&lt;br /&gt;2) Each Application pool gets a separate process&lt;br /&gt;3) You can set an application ( virtual directory ) to use a particular application&lt;br /&gt;pool and ASP.net version..&lt;br /&gt;&lt;br /&gt;From the above , &lt;br /&gt;&lt;br /&gt;1) Create a new application pool.&lt;br /&gt;2) Create a new virtual directory to hold the 2.0 sources&lt;br /&gt;3) Set the application pool property to the newly created app pool&lt;br /&gt;4) Set the asp.net version to 2.0&lt;br /&gt;&lt;br /&gt;Bingo..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-1973641451606712634?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/1973641451606712634/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=1973641451606712634' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1973641451606712634'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1973641451606712634'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2008/04/running-both-aspnet-20-and-1x-on-same.html' title='Running Both Asp.net 2.0 and 1.x on same domain'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-4872179197741417728</id><published>2008-04-23T11:54:00.000-07:00</published><updated>2008-04-23T12:08:52.818-07:00</updated><title type='text'>VS extensibility and CodeDom</title><content type='html'>Do you want to create your own VS tool that shows up in the tools list??&lt;br /&gt;&lt;br /&gt;VS add-in is the answer.&lt;br /&gt;&lt;br /&gt;Create a new Add-in project.&lt;br /&gt;VS does the base work for the add-in.&lt;br /&gt;&lt;br /&gt;You have to concentrate on the execute method that is called when the tool is executed.&lt;br /&gt;&lt;br /&gt;My goal was to create a tool that when selected will list all the controls on a form,&lt;br /&gt;when a control is selected it lists all the events , when an event is selected&lt;br /&gt;it automatically generates event handling code.&lt;br /&gt;&lt;br /&gt;DOnt ask me why , its a long story.&lt;br /&gt;&lt;br /&gt;When the tool executes , i show a new form.&lt;br /&gt;I also pass in the applicationObject inorder to access the codedom.&lt;br /&gt;The code generation is handled by my new form.&lt;br /&gt;&lt;br /&gt;using System; &lt;br /&gt;using Microsoft.Office.Core; &lt;br /&gt;using Extensibility; &lt;br /&gt;using System.Runtime.InteropServices; &lt;br /&gt;using EnvDTE; &lt;br /&gt;using System.Windows.Forms; &lt;br /&gt;using System.Reflection; &lt;br /&gt;&lt;br /&gt;        public void Exec(string commandName, EnvDTE.vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled)&lt;br /&gt;                { &lt;br /&gt;                        handled = false; &lt;br /&gt;                        if(executeOption == EnvDTE.vsCommandExecOption.vsCommandExecOptionDoDefault) &lt;br /&gt;                        { &lt;br /&gt;                                if(commandName == "YourTool.Connect.YourTool") &lt;br /&gt;                                { &lt;br /&gt;                                        //write code to display the modeless dialog &lt;br /&gt;                                        YourForm _yform = new YourForm(applicationObject); &lt;br /&gt;                                                                        &lt;br /&gt;                                        &lt;br /&gt;                                        _yform.Show(); &lt;br /&gt;                                        handled = true; &lt;br /&gt;                                        return; &lt;br /&gt;                                } &lt;br /&gt;                        } &lt;br /&gt;                } &lt;br /&gt;                private _DTE applicationObject; &lt;br /&gt;..........&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Portions of code from the new form.&lt;br /&gt;Shows how to generate code&lt;br /&gt;&lt;br /&gt;The fundamental building blocks of the codedom is codeelemets.&lt;br /&gt;&lt;br /&gt;Inorder to get codeelemts , you need to access the codemodel , that can be retreived from the applicationobject ( that we passed to this form )&lt;br /&gt;&lt;br /&gt;Once you get a codeelement , you can get get a codeclass out of it for a class.&lt;br /&gt;&lt;br /&gt;You can then use addfunction method of the codeclass to add methods to the class.&lt;br /&gt;&lt;br /&gt;/******************************************************************** &lt;br /&gt;                 * &lt;br /&gt;                 * Gets the codeclass corresponding to className &lt;br /&gt;                 * &lt;br /&gt;                 * *******************************************************************/ &lt;br /&gt;                private CodeClass getCodeClass(string className) &lt;br /&gt;                { &lt;br /&gt;                        CodeClass ClassCodeElem = null; &lt;br /&gt;                        CodeModel myFCM = null; &lt;br /&gt;                        myFCM = DTE.ActiveDocument.ProjectItem.ContainingProject.CodeModel;//DTE.Solution.Projects.Item(1).CodeModel;&lt;br /&gt;                        //DTE.ActiveDocument.ProjectItem.ContainingProject.CodeModel; &lt;br /&gt;                        if ( null == myFCM ) &lt;br /&gt;                        { &lt;br /&gt;                                Log.LogError("FileCodeModel is Null"); &lt;br /&gt;                                return null; &lt;br /&gt;                        } &lt;br /&gt;                        &lt;br /&gt;                        // get the class element. &lt;br /&gt;                        // This is the preffered way as sugested in MSDN &lt;br /&gt;                        // Using name might not give the desired result &lt;br /&gt;                        CodeElements nameSpaceElems = myFCM.CodeElements; &lt;br /&gt;                        // this gives the namespace element. &lt;br /&gt;                        // get the class element from that &lt;br /&gt;                        foreach ( CodeElement nameSpace in nameSpaceElems ) &lt;br /&gt;                        { &lt;br /&gt;                                // look for the class we need &lt;br /&gt;                                if ( nameSpace.Kind == vsCMElement.vsCMElementNamespace ) &lt;br /&gt;                                { &lt;br /&gt;                                        listBox1.Items.Add(nameSpace.Name); &lt;br /&gt;                                        CodeElements classE = ((CodeNamespace)nameSpace).Members; &lt;br /&gt;                                        foreach( CodeElement classElem in classE ) &lt;br /&gt;                                        { &lt;br /&gt;                                                if ( classElem.Kind == vsCMElement.vsCMElementClass) &lt;br /&gt;                                                { &lt;br /&gt;                                                        // determine if this is the class we are looking for &lt;br /&gt;                                                        CodeClass classType = (CodeClass)classElem; &lt;br /&gt;                                                        &lt;br /&gt;                                                        if ( classType.Name == className ) &lt;br /&gt;                                                        { &lt;br /&gt;                                                                ClassCodeElem = classType; &lt;br /&gt;                                                                break; &lt;br /&gt;                                                        } &lt;br /&gt;                                                &lt;br /&gt;                                                } &lt;br /&gt;                                        } &lt;br /&gt;                                } &lt;br /&gt;                        } &lt;br /&gt;                        return ClassCodeElem; &lt;br /&gt;                } &lt;br /&gt;&lt;br /&gt;Example of adding a function&lt;br /&gt;&lt;br /&gt;brClass is a codeclass.&lt;br /&gt;&lt;br /&gt;fnCons = brClass.AddFunction("YourFunction",vsCMFunction.vsCMFunctionFunction,vsCMTypeRef.vsCMTypeRefVoid, -1, &lt;br /&gt;                                        vsCMAccess.vsCMAccessPrivate, null); &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Adding code into the function&lt;br /&gt;&lt;br /&gt;EditPoint consRef = fnCons.EndPoint.CreateEditPoint(); &lt;br /&gt;                                        // skip two lines &lt;br /&gt;                                        consRef.LineUp(1); &lt;br /&gt;                                        consRef.Insert("\n//Call Generated by tool\n;\n");&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-4872179197741417728?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/4872179197741417728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=4872179197741417728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/4872179197741417728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/4872179197741417728'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2008/04/vs-extensibility-and-codedom.html' title='VS extensibility and CodeDom'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-1990974439132929023</id><published>2008-04-23T11:27:00.000-07:00</published><updated>2008-04-23T11:53:42.807-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='events tab'/><category scheme='http://www.blogger.com/atom/ns#' term='propertygrid'/><title type='text'>Events tab in property grid</title><content type='html'>have you ever looked at the property grid in VS IDE and wondered how to get the&lt;br /&gt;events tab on?&lt;br /&gt;&lt;br /&gt;Well , the good news is that the framework provides an EventTab that can be added to the propertytabs collection of the propertygrid..&lt;br /&gt;&lt;br /&gt;Wait... thats not it ...&lt;br /&gt;&lt;br /&gt;To be able to see thevents tab , you need to assign the propertygrid's site to your custom site.&lt;br /&gt;&lt;br /&gt;Why??&lt;br /&gt;&lt;br /&gt;Because propertygrid internally uses the site's getservice to retrieve the eventsbindingservice.&lt;br /&gt;So you need to create your own custom site.&lt;br /&gt;&lt;br /&gt;I can hear you say , Alright , but it looks like something more is required...&lt;br /&gt;&lt;br /&gt;Yes, you need to provide the EventsBindingService by implementing IEventsBindingService.&lt;br /&gt;&lt;br /&gt;Now, how do you connect the eventsbindingservice class to your site?&lt;br /&gt;&lt;br /&gt;You have to add the service to the service container.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below is the code to implement the propertygrid&lt;br /&gt;For further study , u might be interested in propertygridinternal.viewevent code&lt;br /&gt;( i use reflector ).&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.ComponentModel.Design;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;using System.Windows.Forms.Design;&lt;br /&gt;using System.Xml;&lt;br /&gt;using System.IO;&lt;br /&gt; using System.Drawing;&lt;br /&gt; using System.Reflection;&lt;br /&gt; using System.Runtime.InteropServices;&lt;br /&gt;&lt;br /&gt; namespace NewPanel {    &lt;br /&gt;&lt;br /&gt;public partial class PropertyForm : Form   &lt;br /&gt; {        &lt;br /&gt;&lt;br /&gt;MyDesignSurface designSurface;        &lt;br /&gt;&lt;br /&gt;public PropertyForm()        &lt;br /&gt;&lt;br /&gt;{            &lt;br /&gt;&lt;br /&gt;InitializeComponent();            &lt;br /&gt;designSurface = new MyDesignSurface();            &lt;br /&gt;IServiceContainer serviceContainer = (IServiceContainer)designSurface.GetService(typeof(IServiceContainer));           &lt;br /&gt;serviceContainer.AddService(typeof(IEventBindingService), new MyEventBindingService(designSurface));                      &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; //  a new object has been selected        &lt;br /&gt;&lt;br /&gt;public void SetNewObject(Object obj)        &lt;br /&gt;{            &lt;br /&gt;&lt;br /&gt;IDesignerHost designerHost = (IDesignerHost)designSurface.GetService(typeof(IDesignerHost));            &lt;br /&gt;&lt;br /&gt;this.extPropertyGrid.SelectedObject = obj;            &lt;br /&gt;&lt;br /&gt;if (designerHost != null)            &lt;br /&gt;{                &lt;br /&gt;extPropertyGrid.Site = (new IDEContainer(designerHost)).CreateSite(extPropertyGrid);               &lt;br /&gt;&lt;br /&gt;extPropertyGrid.PropertyTabs.AddTabType(typeof(System.Windows.Forms.Design.EventsTab), PropertyTabScope.Document);                extPropertyGrid.ShowEvents(true);            &lt;br /&gt;&lt;br /&gt;}            &lt;br /&gt;&lt;br /&gt;else            &lt;br /&gt;{                &lt;br /&gt;&lt;br /&gt;extPropertyGrid.Site = null;            &lt;br /&gt;}                   &lt;br /&gt;&lt;br /&gt;}        &lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; #region MyDesignerSurface   &lt;br /&gt;&lt;br /&gt;class MyDesignSurface : DesignSurface, IServiceProvider   &lt;br /&gt;{      &lt;br /&gt;&lt;br /&gt;#region IServiceProvider Members      &lt;br /&gt;&lt;br /&gt;object IServiceProvider.GetService(Type serviceType)      &lt;br /&gt;{          return this.GetService(serviceType);       }      &lt;br /&gt;#endregion   &lt;br /&gt;&lt;br /&gt;}   &lt;br /&gt;#endregion    &lt;br /&gt;&lt;br /&gt;#region Site     &lt;br /&gt;&lt;br /&gt;class IDEContainer : Container   &lt;br /&gt;{      &lt;br /&gt;&lt;br /&gt;class IDESite : ISite      &lt;br /&gt;{         &lt;br /&gt;private string name = "";         &lt;br /&gt;private IComponent component;         &lt;br /&gt;private IDEContainer container;         &lt;br /&gt;&lt;br /&gt;public IDESite(IComponent sitedComponent, IDEContainer site, string aName)          {             component = sitedComponent;            &lt;br /&gt;container = site;            &lt;br /&gt;name = aName;         &lt;br /&gt;&lt;br /&gt;}         &lt;br /&gt;&lt;br /&gt;public IComponent Component          {             get { return component; }          }         &lt;br /&gt;public IContainer Container          {             get { return container; }          }         &lt;br /&gt;public bool DesignMode          {             get { return false; }          }         &lt;br /&gt;public string Name          {             get { return name; }             set { name = value; }          }          public object GetService(Type serviceType)          {             return container.GetService(serviceType);          }      &lt;br /&gt;&lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;public IDEContainer(IServiceProvider sp)       {          serviceProvider = sp;       }      &lt;br /&gt;&lt;br /&gt;protected override object GetService(Type serviceType)      &lt;br /&gt;{         &lt;br /&gt;object service = base.GetService(serviceType);         &lt;br /&gt;if (service == null)         &lt;br /&gt;{            &lt;br /&gt;service = serviceProvider.GetService(serviceType);        &lt;br /&gt; }         &lt;br /&gt;return service;      &lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;public ISite CreateSite(IComponent component)     &lt;br /&gt; {         &lt;br /&gt;return CreateSite(component, "UNKNOWN_SITE");      &lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;protected override ISite CreateSite(IComponent component, string name)      &lt;br /&gt;{         &lt;br /&gt;  return new IDESite(component, this, name);      &lt;br /&gt;&lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;private IServiceProvider serviceProvider;   &lt;br /&gt;&lt;br /&gt;}   &lt;br /&gt;&lt;br /&gt;#endregion   &lt;br /&gt;&lt;br /&gt;#region EventBindingService    public class MyEventBindingService : System.ComponentModel.Design.EventBindingService   &lt;br /&gt;&lt;br /&gt;{      &lt;br /&gt;&lt;br /&gt;public MyEventBindingService(IServiceProvider myhost)          : base(myhost)       {       }      &lt;br /&gt;&lt;br /&gt;#region IEventBindingService Members      &lt;br /&gt;&lt;br /&gt;protected override string CreateUniqueMethodName(IComponent component, EventDescriptor e)      &lt;br /&gt;{         &lt;br /&gt;throw new Exception("The method or operation is not implemented.");      &lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;protected override System.Collections.ICollection GetCompatibleMethods(System.ComponentModel.EventDescriptor e)      &lt;br /&gt;{  &lt;br /&gt;throw new Exception("The method or operation is not implemented.");                   &lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;protected override bool ShowCode(System.ComponentModel.IComponent component, System.ComponentModel.EventDescriptor e, string methodName)     &lt;br /&gt;{         &lt;br /&gt;throw new Exception("The method or operation is not implemented.");      &lt;br /&gt;&lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;protected override bool ShowCode(int lineNumber)      &lt;br /&gt;{         &lt;br /&gt;throw new Exception("The method or operation is not implemented.");      &lt;br /&gt;}      &lt;br /&gt;&lt;br /&gt;protected override bool ShowCode()      &lt;br /&gt;{         &lt;br /&gt;throw new Exception("The method or operation is not implemented.");      &lt;br /&gt;}      &lt;br /&gt;#endregion   &lt;br /&gt;}    #endregion&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-1990974439132929023?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/1990974439132929023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=1990974439132929023' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1990974439132929023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1990974439132929023'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2008/04/events-tab-in-property-grid.html' title='Events tab in property grid'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-3535363088304467423</id><published>2007-07-31T15:28:00.000-07:00</published><updated>2007-07-31T15:53:04.012-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='slashmysearch'/><category scheme='http://www.blogger.com/atom/ns#' term='make money'/><title type='text'>Making Money Online</title><content type='html'>Wouldnt it be nice if you were paid to do something you do as part of&lt;br /&gt;your everyday routine ?? Like searching the web&lt;br /&gt;&lt;br /&gt;Sounds too good to be true .. doesnt it ..&lt;br /&gt;&lt;br /&gt;At first i was skeptical about it , but after seeing the results , thought i will share the information.&lt;br /&gt;You should try it to believe it ...&lt;br /&gt;&lt;br /&gt;SlashMySearch pays you to use their search engine...&lt;br /&gt;&lt;br /&gt;Use SlashMySearch as your primary search engine and earn ....&lt;br /&gt;&lt;br /&gt;The best part is joining is absolutely free...&lt;br /&gt;You do not have to install any software or go through long guides.&lt;br /&gt;All you need to spend is 2 minutes to get started.&lt;br /&gt;There is also a referral program. You get pais for your referrals' activity ...&lt;br /&gt;&lt;br /&gt;What are you waiting for&lt;br /&gt;Join Now ... Hurry Up..&lt;br /&gt;Please use the below link. In this way both u and i will be benefitted.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.slashmysearch.com/earn/signup.html?id=57034"&gt;http://www.slashmysearch.com/earn/signup.html?id=57034&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In case you have any doubts , feel free to ask questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-3535363088304467423?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/3535363088304467423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=3535363088304467423' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3535363088304467423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3535363088304467423'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/07/making-money-online.html' title='Making Money Online'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-6294315114752411286</id><published>2007-06-29T07:35:00.000-07:00</published><updated>2007-06-29T07:42:23.623-07:00</updated><title type='text'>How to debug a background job</title><content type='html'>At times you might find yourself in a situation to debug background jobs.&lt;br /&gt;Is it possible in SAP?? Yes it is ...&lt;br /&gt;&lt;br /&gt;There are two ways to achieve the same.&lt;br /&gt;&lt;br /&gt;1)  Goto sm37 (Job overview ). Select the job you want to debug , enter JDBG in the OKCODE.&lt;br /&gt;This can be used to debug any process.&lt;br /&gt;&lt;br /&gt;2)  Code an infinite loop in your program at the point where you want to debug.&lt;br /&gt;&lt;br /&gt;ex&lt;br /&gt;&lt;br /&gt;do&lt;br /&gt;if i=1&lt;br /&gt;exit&lt;br /&gt;endif&lt;br /&gt;enddo.&lt;br /&gt;&lt;br /&gt;Start the program.&lt;br /&gt;Goto sm50 ( Process overview ). The process appears in the running state and then goes to hanging state.&lt;br /&gt;click on the process.&lt;br /&gt;Goto Program/mode -&gt; program -&gt; debugging.&lt;br /&gt;&lt;br /&gt;Change the value of i at runtime in the debugger.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-6294315114752411286?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/6294315114752411286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=6294315114752411286' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/6294315114752411286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/6294315114752411286'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/how-to-debug-background-job.html' title='How to debug a background job'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-2808566716395384590</id><published>2007-06-29T07:26:00.000-07:00</published><updated>2007-06-29T07:30:21.358-07:00</updated><title type='text'>How to run sap sessions</title><content type='html'>After all the hustle bustle , u created a session ...  Good Job ...&lt;br /&gt;&lt;br /&gt;To process it you need to go to transaction sm35 , and then start the session.&lt;br /&gt;Isnt this too much of work in real time ...&lt;br /&gt;&lt;br /&gt;There is an easier way to handle sessions.&lt;br /&gt;&lt;br /&gt;The program &lt;em&gt;RSBDCSUB&lt;/em&gt; executes sessions that have not yet been processed.&lt;br /&gt;This program can be scheduled periodically in the Background Jobs ( sm36).&lt;br /&gt;&lt;br /&gt;There we go ..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-2808566716395384590?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/2808566716395384590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=2808566716395384590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2808566716395384590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2808566716395384590'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/how-to-run-sap-sessions.html' title='How to run sap sessions'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-5156230854200974851</id><published>2007-06-29T07:04:00.000-07:00</published><updated>2007-06-29T07:09:55.716-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='session'/><title type='text'>Restarting Interrupted Sessions in SAP</title><content type='html'>&lt;strong&gt;sm35&lt;/strong&gt; is the transaction code for batch input sessions.&lt;br /&gt;A session that was interrupted while it was running will be in the &lt;strong&gt;Active&lt;/strong&gt; state.&lt;br /&gt;To retsart the session it must first be &lt;strong&gt;released&lt;/strong&gt;.&lt;br /&gt;Click on the session and select relese from the toolbar.&lt;br /&gt;&lt;br /&gt;You can then start the session.&lt;br /&gt;All transactions that were completed sucessfully during the previous run will be&lt;br /&gt;skipped.&lt;br /&gt;The transaction that was getting executed while the problem ocurred will be&lt;br /&gt;repeated.&lt;br /&gt;&lt;br /&gt;If the generation of the session itself was interrupted , it will be in&lt;br /&gt;&lt;strong&gt;Being generated&lt;/strong&gt; state.&lt;br /&gt;&lt;br /&gt;You can run such a session.&lt;br /&gt;But there is no gurantee that it has all the transaction information.&lt;br /&gt;So in this case it is best to recreate the session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-5156230854200974851?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/5156230854200974851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=5156230854200974851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/5156230854200974851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/5156230854200974851'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/restarting-interrupted-sessions-in-sap.html' title='Restarting Interrupted Sessions in SAP'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-7916542948410981967</id><published>2007-06-27T02:27:00.000-07:00</published><updated>2007-06-27T02:58:54.061-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BDCDATA'/><title type='text'>Understanding BDC call transaction</title><content type='html'>Lets derive the BDC process...&lt;br /&gt;&lt;br /&gt;The aim of BDC is to transfer data from flat file ( or xls ) to the appropriate database tables in SAP.&lt;br /&gt;&lt;br /&gt;To transfer data into the DB tables , an internal table should be  used in the program.&lt;br /&gt;&lt;br /&gt;Here we go to our first step&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;1) Declare an internal table with relevant fields.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;How do u transfer data into your internal table from the flat file.&lt;br /&gt;We have a function module gui_upload for this purpose.&lt;br /&gt;This is our next step&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2) Upload data from flat file into the internal table.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;Now we have data in our internal table , we need to transfer it to the DB tables.&lt;br /&gt;SQL is an option but is not advisable because a single transaction affects more than one table.&lt;br /&gt;Hence SQL is not a safe way of transferring data.&lt;br /&gt;&lt;br /&gt;So whats the other way to accomplish the same.&lt;br /&gt;We are all aware that transaction codes exist for the creation of data.&lt;br /&gt;Ex xk01 is the code for creating a vendor master data.&lt;br /&gt;&lt;br /&gt;Transactions can be called from the program using &lt;em&gt;CALL TRANSACTION 'TCODE'&lt;/em&gt;.&lt;br /&gt;&lt;br /&gt;Now, the above statement causes opens a new transaction and one has to manually&lt;br /&gt;enter data. This defeats the whole purpose of BDC. There should be a way to automate the process of enterring data.&lt;br /&gt;&lt;br /&gt;Well, there is a way to automate the process.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;CALL TRANSACTION USING &lt;bdcdata&gt; &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;  MODE &lt;a/n/e&gt; UPDATE &lt;a/s&gt; MESSAGES INTO &lt;bdcmsgcolltab&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;is used for the same.&lt;br /&gt;&lt;br /&gt;Dont panic ..  you will understand the syntax once u understand the logic.&lt;br /&gt;&lt;br /&gt;Since we want to automate the data entry process in the transaction, there should be some&lt;br /&gt;means by which the transaction receives data t be entered.&lt;br /&gt;BDCDATA holds the data and actions to be performed to complete the transaction.&lt;br /&gt;For example , to comple a transaction , one might have to go through a sequence of screens , entering values in the fields.&lt;br /&gt;This sequence and data is stored in BDCDATA structure.&lt;br /&gt;&lt;br /&gt;To explain in very simple terms , BDCDATA tells the system what it should do in that transaction.&lt;br /&gt;For ex. the contents of a typical BDCDATA structure for xd01 translates to&lt;br /&gt;&lt;br /&gt;"Fill value for customer,sales organization, distribution channel ,&lt;br /&gt;then move on to screen 1020.&lt;br /&gt;In screen 1020 fill values for name , search term ...&lt;br /&gt;Then move on to screen 1030"&lt;br /&gt;&lt;br /&gt;Phew...&lt;br /&gt;&lt;br /&gt;Ok now u r happy that this BDCDATA does some magic and gets the system to fill values in the transaction.&lt;br /&gt;Remember in programming there is no magic , what u ask the sytem to do is what u get ...&lt;br /&gt;Someone has to fill the BDCDATA structure.&lt;br /&gt;In my previous blog i have explained BDCDATA in detail.&lt;br /&gt;&lt;br /&gt;Filling the structure manually is a big pain ...&lt;br /&gt;There is an easier method to do it ...&lt;br /&gt;&lt;br /&gt;IN  SAP there is a concept called "Record transaction" ..&lt;br /&gt;Goto shdb , start new recording , enter the transaction code that u want to record ,&lt;br /&gt;keep filling values , save the recording...&lt;br /&gt;All actions that u performed throughout the entire transaction is stored.&lt;br /&gt;&lt;br /&gt;Now goto edit , create program. This creates a program with information about the recording.&lt;br /&gt;Copy the list of performs used to fill the bdc data.&lt;br /&gt;This list populates the structure BDCDATA.&lt;br /&gt;You dont have the headache of populating it urself ..&lt;br /&gt;&lt;br /&gt;I guess the remaining steps will fall into place now..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3) Process itab&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;4) For each entry of itab create a bdcdata structure with field values from the itab.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;5) CALL TRANSACTION USING &lt;bdcdata&gt;&lt;br /&gt;  MODE &lt;a/n/e&gt; UPDATE &lt;a/s&gt; MESSAGES INTO &lt;bdcmsgcolltab&gt;&lt;br /&gt;6) check sy-subrc and process errors. &lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-7916542948410981967?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/7916542948410981967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=7916542948410981967' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7916542948410981967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7916542948410981967'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/understanding-bdc-call-transaction.html' title='Understanding BDC call transaction'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-5617205646773127781</id><published>2007-06-26T04:26:00.000-07:00</published><updated>2007-06-26T08:25:51.119-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='EXCEL BDC'/><title type='text'>UPLOAD data from Excel to Itab</title><content type='html'>The function module&lt;br /&gt;ALSM_EXCEL_TO_INTERNAL_TABLE is used to migrate data from an excel file&lt;br /&gt;into an internal table.&lt;br /&gt;&lt;br /&gt;The internal table should be declared of type ALSMEX_TABLINE.&lt;br /&gt;&lt;br /&gt;This structure has the following fields&lt;br /&gt;&lt;br /&gt;ROW COL VALUE.&lt;br /&gt;&lt;br /&gt;Each cell of the excel data is stored as a record in the table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-5617205646773127781?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/5617205646773127781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=5617205646773127781' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/5617205646773127781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/5617205646773127781'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/upload-data-from-excel-to-itab.html' title='UPLOAD data from Excel to Itab'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-2332479995974787803</id><published>2007-06-26T04:09:00.000-07:00</published><updated>2007-06-26T04:26:26.921-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BDCDATA'/><title type='text'>BDCDATA structure in depth</title><content type='html'>BDCDATA structure stores the data that needs to be transferred to the SAP system.&lt;br /&gt;&lt;br /&gt;The structure has the following fields.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;PROGRAM&lt;/strong&gt;&lt;br /&gt;Name of the program.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DYNPRO&lt;/strong&gt;&lt;br /&gt;Screen Number&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;DYNBEGIN&lt;/strong&gt;&lt;br /&gt;Marks the beginning of a screen in a transaction&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FNAM&lt;/strong&gt;&lt;br /&gt;Field NAme&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;FVAL&lt;/strong&gt;&lt;br /&gt;Field value.&lt;br /&gt;&lt;br /&gt;The records can be divided into screen records and field records.&lt;br /&gt;&lt;br /&gt;Each screen of the transaction is assigned a row in the BDCDATA structure.&lt;br /&gt;This row contains Program,Dynpro and Dynbegin fields.&lt;br /&gt;Dynbegin is set to 'X' to mark the beginning of the screen.&lt;br /&gt;&lt;br /&gt;A record is assigned for each of the values entered.&lt;br /&gt;These field records have only FNAM and FVAL.&lt;br /&gt;&lt;br /&gt;The function codes of commands entered during the transaction are&lt;br /&gt;entered in the structure too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-2332479995974787803?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/2332479995974787803/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=2332479995974787803' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2332479995974787803'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2332479995974787803'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/bdcdata-structure-in-depth.html' title='BDCDATA structure in depth'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-9048346941087375866</id><published>2007-06-25T10:03:00.000-07:00</published><updated>2007-06-25T10:07:49.830-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hide'/><title type='text'>HIDE Technique</title><content type='html'>ex.&lt;br /&gt;&lt;br /&gt;loop at itab&lt;br /&gt;write ...&lt;br /&gt;hide itab.&lt;br /&gt;endloop.&lt;br /&gt;&lt;br /&gt;HIDE keyword creates a table of the form&lt;br /&gt;&lt;br /&gt;linenumber      fields.&lt;br /&gt;&lt;br /&gt;When at line selection event is triggered, the linne number is referred in the HIDE table,&lt;br /&gt;The corresponding fields are copied onto the itab header.&lt;br /&gt;This can be used later in the program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-9048346941087375866?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/9048346941087375866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=9048346941087375866' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/9048346941087375866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/9048346941087375866'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/hide-technique.html' title='HIDE Technique'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-4650686186727654075</id><published>2007-06-21T04:40:00.000-07:00</published><updated>2007-06-21T06:40:45.846-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='dialog processor'/><title type='text'>Dialog Processor and List processor</title><content type='html'>A screen sequence is handled by dialog processor.&lt;br /&gt;Within a screen, list sequence is handled by list processor.&lt;br /&gt;&lt;br /&gt;The dialog processor handles flow logic screen after screen , triggering the appropriate&lt;br /&gt;ABAP modules in the module pool pgm.&lt;br /&gt;One can switch between dialog processor and list processor using&lt;br /&gt;leave to listprocessing , call screen commands.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The o/p of report pgm is called list.&lt;br /&gt;Conceptually , the o/p comprises of a list screen.&lt;br /&gt;The list screen in turn comprises of basic list+details lists.&lt;br /&gt;Each of these lists is assigned a list index starting from 0 for the basic list.&lt;br /&gt;The index of a particular list can be retrieved from sy-lsind system field.&lt;br /&gt;The list processor handles 'at line selection' and 'at user command events'.&lt;br /&gt;&lt;br /&gt;At the end of displaying the list , the list processor checks if the sy-lsind value is lesser than the&lt;br /&gt;current list index. If so , the lists in between are deleted , the current list is set to the&lt;br /&gt;number in sy-lsind.&lt;br /&gt;&lt;br /&gt;Suppose you want to move from 3rd list to 1st list using back button ,&lt;br /&gt;just decrement the sy-lsind value programatically and then press back button.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-4650686186727654075?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/4650686186727654075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=4650686186727654075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/4650686186727654075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/4650686186727654075'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/dialog-processor-and-list-processor.html' title='Dialog Processor and List processor'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-7436472010550754915</id><published>2007-06-21T04:27:00.000-07:00</published><updated>2007-06-21T04:40:51.367-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='popup'/><title type='text'>Popup box function module</title><content type='html'>POPUP_WITH_TABLE_DISPLAY is the function module to display contents&lt;br /&gt;of an itab in a popup window.&lt;br /&gt;&lt;br /&gt;It takes the name of the itab as i/p.&lt;br /&gt;Displays the contents in a popup window.&lt;br /&gt;&lt;br /&gt;On the window you can select any line.&lt;br /&gt;The index of the itab corresponding to the line selected is stored in 'choice'.&lt;br /&gt;&lt;br /&gt;In your program declare a variable say , indx like sy-tabix.&lt;br /&gt;Pass this in the import parameter 'choice' during function call.&lt;br /&gt;&lt;br /&gt;Later , use the variable in a read statement as follows&lt;br /&gt;to retrieve the contents of the clicked line.&lt;br /&gt;&lt;br /&gt;read table itab index indx.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-7436472010550754915?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/7436472010550754915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=7436472010550754915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7436472010550754915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7436472010550754915'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/popup-box-function-module.html' title='Popup box function module'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-7726817883496069195</id><published>2007-06-14T07:09:00.000-07:00</published><updated>2007-06-14T07:19:41.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FORMS'/><title type='text'>Passing itabs to subroutines</title><content type='html'>The aim of the program is to take select-option from the main program and pass the same to a subroutine.&lt;br /&gt;&lt;br /&gt;I was able to achieve the same with FORM &lt;&gt; TABLES &lt;&gt;&lt;br /&gt;&lt;br /&gt;In order to pass itabs to your subroutine use tables instead of USING in both the&lt;br /&gt;FORM and PERFORM statement.&lt;br /&gt;&lt;br /&gt;My pgm was of the form.&lt;br /&gt;&lt;br /&gt;FORM sub1 TABLES itab&lt;br /&gt;.&lt;br /&gt;select * from mara into &lt;&gt; where matnr in itab.&lt;br /&gt;END FORM&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;declare an itab itab1&lt;br /&gt;         &lt;br /&gt;PERFORM sub1 TABLES itab1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In my program i obtained select options in my main program and passed it using PERFORM TABLES.&lt;br /&gt;The documention of FORM specifies that TABLES is obsolete , the same functionality can be obtained with USING. When i tried the same the&lt;br /&gt;select * from mara into &lt;&gt; where matnr in itab.&lt;br /&gt;&lt;br /&gt;in my program failed in syntax check.&lt;br /&gt;Quiet obvious as SAP does not understand what type i am passing.&lt;br /&gt;&lt;br /&gt;I also tried adding like statement in FORM.&lt;br /&gt;It failed too.&lt;br /&gt;&lt;br /&gt;Right now TABLES is the working way i know of to pass itabs to subs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-7726817883496069195?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/7726817883496069195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=7726817883496069195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7726817883496069195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/7726817883496069195'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/passing-itabs-to-subroutines.html' title='Passing itabs to subroutines'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-3559126324163945713</id><published>2007-06-14T06:48:00.000-07:00</published><updated>2007-06-14T07:07:34.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PAI'/><category scheme='http://www.blogger.com/atom/ns#' term='PBO'/><title type='text'>Modify Screen</title><content type='html'>What is PBO event.&lt;br /&gt;&lt;br /&gt;Process B4 Output.&lt;br /&gt;This event is triggered before sending the slecetion screen elements to the presentation layer.&lt;br /&gt;In lay man terms before displaying the slecetion screen.&lt;br /&gt;&lt;br /&gt;AT SELECTION-SCREEN OUTPUT event is triggered during PBO.&lt;br /&gt;&lt;br /&gt;What is PAI.&lt;br /&gt;&lt;br /&gt;Process After Input.&lt;br /&gt;This event is triggered after giving inputs to the selection screen.&lt;br /&gt;&lt;br /&gt;AT SELECTION-SCREEN , AT SELECTION-SCREEN ON events are triggered during PAI.&lt;br /&gt;&lt;br /&gt;Modify screen makes sence only at PBO.&lt;br /&gt;Changes made to screen during PAI have no effect.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-3559126324163945713?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/3559126324163945713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=3559126324163945713' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3559126324163945713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3559126324163945713'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/modify-screen.html' title='Modify Screen'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-6775787675876537392</id><published>2007-06-14T06:44:00.000-07:00</published><updated>2007-06-14T06:48:24.276-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='itab events'/><title type='text'>Itab Events.</title><content type='html'>I had a problem getting the events to work when i use any fiels other than the first of an itab&lt;br /&gt;as the working fields.&lt;br /&gt;&lt;br /&gt;To be clear,&lt;br /&gt;&lt;br /&gt;Suppose itab is an internal table with fields f1 , f2 and f3 in this order.&lt;br /&gt;&lt;br /&gt;Everything works fine when the records are sorted by f1 , f1 is used in AT statements as&lt;br /&gt;&lt;br /&gt;AT new f1.&lt;br /&gt;&lt;br /&gt;However if i sort the records by f2 and use AT NEW f2 , the behavior is not as expected.&lt;br /&gt;&lt;br /&gt;If someone gets through with this do let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-6775787675876537392?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/6775787675876537392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=6775787675876537392' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/6775787675876537392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/6775787675876537392'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/itab-events.html' title='Itab Events.'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-3608083384818176503</id><published>2007-06-12T04:41:00.000-07:00</published><updated>2007-06-12T04:50:29.910-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='FUNCTION MODULE'/><category scheme='http://www.blogger.com/atom/ns#' term='SAP'/><title type='text'>SAP Function Modules</title><content type='html'>Function modules in SAP are similar to subroutines except that they are global.&lt;br /&gt;They can be accessed by any program.&lt;br /&gt;They can handle exceptions and can return values unlike subroutines.&lt;br /&gt;&lt;br /&gt;Every function should be defined in a function group.&lt;br /&gt;You can either use existing groups or create your own function groups.&lt;br /&gt;&lt;br /&gt;Lets assume that you create a func grp called FGRP.&lt;br /&gt;SAP creates program called SAPLZ_FGRP .&lt;br /&gt;This program includes a program called LZ_FGRPTOP.&lt;br /&gt;These have to activated before using the function in this group.&lt;br /&gt;Not activating this gives ativation errors.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For example if u create a function Z_FUNCTTEST in group Z_FGRP,&lt;br /&gt;You have to activate Z_FUNCTTEST,LZ_FGRTOP,SAPLZ_FGRP.&lt;br /&gt;&lt;br /&gt;To call functions in a program use the pattern option and click the function you want to insert.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-3608083384818176503?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/3608083384818176503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=3608083384818176503' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3608083384818176503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/3608083384818176503'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/sap-function-modules.html' title='SAP Function Modules'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-1967604445408197661</id><published>2007-06-11T09:02:00.000-07:00</published><updated>2007-06-14T06:44:35.792-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='select'/><category scheme='http://www.blogger.com/atom/ns#' term='ABAP'/><title type='text'>SAP ABAP implicit inner join</title><content type='html'>select &lt;fields&gt; &lt;fields&gt;from tab1 into table itab for all entries in itab2 where f1 = itab2-f1&lt;br /&gt;&lt;br /&gt;The statement gets clear when one understands the concept of inner join.&lt;br /&gt;inner join creates a cross product of all entries from the tables specified.&lt;br /&gt;It then checks the where condition and holds only those records for which the condition is satisfied.&lt;br /&gt;&lt;br /&gt;Lets first take an example for cross product using sets.&lt;br /&gt;We'll then move on to tables.&lt;br /&gt;&lt;br /&gt;Consider two sets S1 and S2.&lt;br /&gt;&lt;br /&gt;S1 = { 1, 2 , 3 }.&lt;br /&gt;S2 = { 4 , 5 }&lt;br /&gt;&lt;br /&gt;S1 Cross S2 = { 1, 4 } { 1,5} {2,4} {2,5} {3,4} {3,5}.&lt;br /&gt;&lt;br /&gt;We will now apply the same concept to tables.&lt;br /&gt;When it comes to tables , S1 , S2 will be the tables with records {1,2,3} and {4,5} respectively.&lt;br /&gt;Lets take an example.&lt;br /&gt;&lt;br /&gt;Tab1. - has two fields f1 and f2&lt;br /&gt;Sory for the poor table representation. This is the best i could muster.&lt;br /&gt;&lt;br /&gt;f1 f2 &lt;br /&gt;1 a &lt;br /&gt;2 b &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tab2 has two fields f1 and f3&lt;br /&gt;&lt;br /&gt;f1 f3&lt;br /&gt;1   Rec1&lt;br /&gt;1   Rec2&lt;br /&gt;2   Rec3&lt;br /&gt;&lt;br /&gt;The cross product is&lt;br /&gt;where first two columns belong to tab1 , last two belong to tab2.&lt;br /&gt;&lt;br /&gt;f1 f2 tab2-f1 tab2-f3&lt;br /&gt;&lt;br /&gt;1 a 1 Rec1&lt;br /&gt;1 a 1 Rec2&lt;br /&gt;1 a 2 Rec3&lt;br /&gt;2 b 1 Rec1&lt;br /&gt;2 b 1 Rec2&lt;br /&gt;2 b 2 Rec3&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;from the above only rows which satisfy the condition f1=tab2-f1 are selected&lt;br /&gt;&lt;br /&gt;so only records 1 , 2 6 are selected.&lt;br /&gt;f1 and tab2-f1 is merged as they are equal.&lt;br /&gt;&lt;br /&gt;This is how select with for all entries works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-1967604445408197661?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/1967604445408197661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=1967604445408197661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1967604445408197661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/1967604445408197661'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/sap-abap-implicit-inner-join.html' title='SAP ABAP implicit inner join'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-2032019021870707514</id><published>2007-06-10T06:50:00.000-07:00</published><updated>2007-06-14T06:22:08.151-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='apostrophe'/><category scheme='http://www.blogger.com/atom/ns#' term='ABAP'/><title type='text'>How to print apostrophe in SAP ABAP</title><content type='html'>In one of the training sessions , the tutor posed a question..&lt;br /&gt;Write a program to display apostrophe (') in ABAP program.&lt;br /&gt;&lt;br /&gt;One of them answered , declare a text symbol of the form text-001 ,&lt;br /&gt;and set its value to '.&lt;br /&gt;Lateral thinking... It works.&lt;br /&gt;&lt;br /&gt;There is a more direct way to do it too.&lt;br /&gt;&lt;br /&gt;replce single quote with 2 single quote :-)&lt;br /&gt;&lt;br /&gt;hers how we do it&lt;br /&gt;&lt;br /&gt;data: LINE(20) type c.&lt;br /&gt;CONCATENATE 'It''' 's Hot'.&lt;br /&gt;write:/ LINE.&lt;br /&gt;&lt;br /&gt;Hope u found this helpful.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-2032019021870707514?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/2032019021870707514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=2032019021870707514' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2032019021870707514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/2032019021870707514'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/06/how-to-print-apostrophe-in-sap-abap.html' title='How to print apostrophe in SAP ABAP'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2326308400364830388.post-8078881754612332308</id><published>2007-04-03T10:31:00.000-07:00</published><updated>2007-04-03T10:55:50.505-07:00</updated><title type='text'>Impersonation-Runas</title><content type='html'>here goes the problem , Get a username , password and executable file name.&lt;br /&gt;Run in the context of the specified user. The program should work on windows 2000 , 2003 and xp ...&lt;br /&gt;&lt;br /&gt;I first thought .. easyyy .. then i said not that easyyy .. and then i realised i underestimated the problem ..&lt;br /&gt;&lt;br /&gt;This is my thought process flow ...&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Impersonate and Create Process:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Use LogonUser , get the user's token.&lt;br /&gt;ImersonateLoggedOnUser&lt;br /&gt;Then call CreateProcess...&lt;br /&gt;&lt;br /&gt;Thoroughly mistaken dear ,....&lt;br /&gt;CreateProcess runs the process in the security context of the primary token of the thread...&lt;br /&gt;ImpersonateLoggedOnUser creates an impersonation thread.&lt;br /&gt;This method will not work...&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;CreateProcessAsUser:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Use LogonUser , get the users token&lt;br /&gt;Call CreateProcessAsUser with the token obtained from the above step.&lt;br /&gt;I found the method good mainly because i need not store the password once i get the token.&lt;br /&gt;I ran the program , Boooom CreateProcessAsUser failed with "The Client Does Not Hold A required Privilege"&lt;br /&gt;Here is the catch ... The process that calls CreateProcessAsUser should have&lt;br /&gt;&lt;br /&gt;"Act as part of the operating system" (SeTcbPrivilege)&lt;br /&gt;"Bypass traverse checking" (SeChangeNotifyPrivilege)&lt;br /&gt;"Increase quotas" (SeIncreaseQuotaPrivilege)&lt;br /&gt;"Replace a process level token" (SeAssignPrimaryTokenPrivilege)&lt;br /&gt;&lt;br /&gt;Huh ... Even the administrator does not have these privileges !!!!&lt;br /&gt;I thought whats the use ?? Forget it ....&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;CreateProcessWithLogonW:&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;This does not require any special privilege.. Thanks ..&lt;br /&gt;It takes username and password and does the logging internally.&lt;br /&gt;The user should have log on locally permission ..&lt;br /&gt;Not bad..&lt;br /&gt;&lt;br /&gt;Now this creates a new console and there is no way ( i know of ) to prevent it ...&lt;br /&gt;So i sought to hiding the new window.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;STARTUPINFO sInfo;&lt;br /&gt;PROCESS_INFORMATION pInfo;&lt;br /&gt;DWORD ret = 0;&lt;br /&gt;memset(&amp;sInfo, 0, sizeof(sInfo));&lt;br /&gt;memset(&amp;pInfo, 0, sizeof(pInfo));&lt;br /&gt;sInfo.cb = sizeof(sInfo);&lt;br /&gt;// do not display the new window&lt;br /&gt;sInfo.dwFlags = STARTF_USESHOWWINDOW ;&lt;br /&gt;sInfo.wShowWindow = SW_HIDE;&lt;br /&gt;&lt;br /&gt;Great , no window appears now :-) .. But hey how am i suposed to know what the process has done ... I need to log it somewhere ...&lt;br /&gt;I was thinking about logging the output to a file..&lt;br /&gt;Here is how to go about it&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// create the redirection handle&lt;br /&gt;// this handle is used for output&lt;br /&gt;SECURITY_ATTRIBUTES secAttr;&lt;br /&gt;secAttr.nLength = sizeof ( secAttr);&lt;br /&gt;secAttr.lpSecurityDescriptor = NULL;&lt;br /&gt;secAttr.bInheritHandle = TRUE;&lt;br /&gt;HANDLE rOutput = CreateFile (&lt;br /&gt;_T("LogFile.log"),&lt;br /&gt;FILE_ALL_ACCESS,&lt;br /&gt;FILE_SHARE_READ,&lt;br /&gt;&amp;secAttr,&lt;br /&gt;OPEN_ALWAYS,&lt;br /&gt;FILE_ATTRIBUTE_NORMAL,&lt;br /&gt;NULL // template file&lt;br /&gt;);&lt;br /&gt;// open always return ERROR_ALREADY_EXISTS even though function succeeds&lt;br /&gt;if ( (0!= (retVal = GetLastError())) &amp;&amp;amp; ERROR_ALREADY_EXISTS != retVal )&lt;br /&gt;{&lt;br /&gt;printError ( retVal , _T("Unable To create log file") );&lt;br /&gt;goto cleanup;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// to append to specified file&lt;br /&gt;if ( INVALID_SET_FILE_POINTER == SetFilePointer ( rOutput , 0 , NULL , FILE_END ) )&lt;br /&gt;{&lt;br /&gt;printError ( retVal , _T("Unable To Set Log Append") );&lt;br /&gt;goto cleanup;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;STARTUPINFO sInfo;&lt;br /&gt;PROCESS_INFORMATION pInfo;&lt;br /&gt;DWORD ret = 0;&lt;br /&gt;memset(&amp;sInfo, 0, sizeof(sInfo));&lt;br /&gt;memset(&amp;pInfo, 0, sizeof(pInfo));&lt;br /&gt;sInfo.cb = sizeof(sInfo);&lt;br /&gt;// set the handles in startup info&lt;br /&gt;// do not display the new window&lt;br /&gt;sInfo.dwFlags = STARTF_USESHOWWINDOW  STARTF_USESTDHANDLES ;&lt;br /&gt;sInfo.wShowWindow = SW_HIDE;&lt;br /&gt;sInfo.hStdOutput = rOutput;&lt;br /&gt;sInfo.hStdError = rOutput;&lt;br /&gt;sInfo.hStdInput = GetStdHandle( STD_INPUT_HANDLE ) ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;LPTSTR wrkDir = _wgetcwd ( NULL , 0 );&lt;br /&gt;&lt;br /&gt;ret = CreateProcessWithLogonW(&lt;br /&gt;c_usrName, // user name&lt;br /&gt;c_fDom?c_DomName:NULL, // domain name&lt;br /&gt;c_pswd, // user pswd&lt;br /&gt;LOGON_WITH_PROFILE, // login with profile , otherwise keeps asking permission for psexec&lt;br /&gt;NULL, // name of program&lt;br /&gt;(LPTSTR)commandString, // command line&lt;br /&gt;0, // flags&lt;br /&gt;NULL,&lt;br /&gt;wrkDir, // new wrking dir for child process&lt;br /&gt;&amp;sInfo, // startup info&lt;br /&gt;&amp;amp;pInfo); // process info&lt;br /&gt;Problem solved&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2326308400364830388-8078881754612332308?l=tekxperience.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tekxperience.blogspot.com/feeds/8078881754612332308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=2326308400364830388&amp;postID=8078881754612332308' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/8078881754612332308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2326308400364830388/posts/default/8078881754612332308'/><link rel='alternate' type='text/html' href='http://tekxperience.blogspot.com/2007/04/impersonation-runas.html' title='Impersonation-Runas'/><author><name>Ayesha Seerin</name><uri>http://www.blogger.com/profile/09687490709446127612</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
