Excel Macro help
Dear Experts,
I need to filter the following shown in the BEx report:
_______From_______To
A_B_C_01.01.2010__01.01.2011
A_B_C_01.02.2011__01.03.2011
A_B_C_01.04.2011__31.12.2011
To filter to or hide the rest:
A_B_C_01.04.2011__31.12.2011 (latest 'To' Date)
Could you kindly provide an Excel macro to do the above such that for each A-B-C combination the one with the furthest 'To' date?
Thanks.
Best regards
Bass
bump *
Similar Messages
-
I hope this is the right forum - sorry if it's not. I'm working with Excel Macros. Having a few problems adjusting to Mac from PC. I want to do a send key type command to close a web window (command F4). In my PC, the command was:
Application.SendKeys "%({F4})"
I'd like to do a send key type command on the mac for "command+F4".
I have no idea what I'm doing - I admit, but I've basically successfully pieced together bits and pieces of help from various web sources and made some macros that do what I need. This is one I haven't been able to figure out.
Thank you so much and again, I'm a newbie, so be kind! Thanks :-)
Katbump *
-
Running Excel macros from ABAP
Hello everyone,
I am trying to execute an Excel macro from an ABAP program. We are currently on a 46C system. While doing some research on help.sap.com I came across the method execute_macro in class i_oi_document_proxy. Ive never used methods in ABAP before and Im not really sure what Im doing. Has anyone got this to work? When I try to run the program it dumps with error OBJECTS_OBJREF_NOT_ASSIGNED.
Thanks,
Becky
Here is the program:
REPORT ztest_program.
INCLUDE ole2incl.
DATA gs_excel TYPE ole2_object .
DATA gs_wbooks TYPE ole2_object .
DATA gs_wbook TYPE ole2_object .
DATA gs_application TYPE ole2_object .
DATA: h_sheet TYPE ole2_object.
DATA: document TYPE REF TO i_oi_document_proxy.
*Name of the macro in Excel
DATA: macro_string(50) TYPE c
VALUE 'FB03process.FromTheBeginning',
no_flush TYPE c,
param_count TYPE i VALUE 0,
script_name TYPE c VALUE 'X',
error TYPE REF TO i_oi_error
OCCURS 0 WITH HEADER LINE,
retcode TYPE soi_ret_string,
error_string(50) TYPE c,
retvalue(30) TYPE c.
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
text = text-007
EXCEPTIONS
OTHERS = 1.
CREATE OBJECT gs_excel 'EXCEL.APPLICATION' .
SET PROPERTY OF gs_excel 'Visible' = 1 .
GET PROPERTY OF gs_excel 'Workbooks' = gs_wbooks .
GET PROPERTY OF gs_wbooks 'Application' = gs_application .
*--Opening the existing document
CALL METHOD OF gs_wbooks 'Open' = gs_wbook
EXPORTING #1 = 'D:\temp\FB03process.xls' .
tell user what is going on
CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
EXPORTING
PERCENTAGE = 0
text = text-009
EXCEPTIONS
OTHERS = 1.
GET PROPERTY OF gs_excel 'ACTIVESHEET' = h_sheet.
CALL METHOD document->execute_macro
EXPORTING macro_string = macro_string
param_count = param_count
script_name = script_name
no_flush = no_flush
IMPORTING error = error
retcode = retcode
CHANGING error_string = error_string
retvalue = retvalue.
disconnect from Excel
FREE OBJECT gs_excel.
PERFORM err_hdl.
FORM err_hdl.
IF sy-subrc <> 0.
WRITE: / 'Fehler bei OLE-Automation:'(010), sy-subrc.
STOP.
ENDIF.
ENDFORM. " ERR_HDLHi,
Please correct me if I am wrong but it seems that you have not fetched a handle to the document object before issuing the statement CALL METHOD document->execute_macro. Hence the error OBJECTS_OBJREF_NOT_ASSIGNED is being dislayed. If you want to use SAP Desktop Office Integration using ABAP Objects, take a look at this article at http://www.intelligenterp.com/feature/archive/ or http://www.sapinfo.net/public/en/index.php4/article/comvArticle-193333c63b4bd807d2/en/articleStatistic
Hope this helps.
Regards
Message was edited by: Shehryar Khan -
How to call excel macros programmatically in C#?
Hi,
I have a requirement where i need to call excel (2003) macros in C# program. Can anyone help me with a code snippet to do the same?
The excel macro function takes two input parameters? how can the parameters be passed?
Any code snippet to do the same in C# would be helpful.
Thanks.Hey there, Sid. I am tryin gto run your code, but I couldn't even gte it to fire. Here's what I ahve now:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
namespace WindowsFormsApplication2
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
//~~> Define your Excel Objects
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWorkBook;
//~~> Start Excel and open the workbook.
xlWorkBook = xlApp.Workbooks.Open("C:\\Users\\Ryan\\Desktop\\Coding\\Microsoft Excel\\Work Samples\\Work Samples\\Historical Stock Prices.xlsb");
//~~> Run the macros by supplying the necessary arguments
xlApp.Run("ShowMsg", "Hello from C# Client", "Demo to run Excel macros from C#");
//~~> Clean-up: Close the workbook
xlWorkBook.Close(false);
//~~> Quit the Excel Application
xlApp.Quit();
//~~> Clean Up
releaseObject(xlApp);
releaseObject(xlWorkBook);
//~~> Release the objects
private void releaseObject(object obj)
try
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
obj = null;
catch (Exception ex)
obj = null;
finally
GC.Collect();
When I hit the play button nothing happens. When I hot F5 nothing happens. Do you ahve any idea what I'm doing wrong. I'd appreciate any advice with this!!
Thanks!!
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Excel macro error after deploying in Weblogic
Halo,
I have written excel macros and it is working fine.
but if the same file if i try to open from hyperlink after deploying in Weblogic server , I get the error
"error occured initializing the VBA libraries.
If Microsoft Visual Basic for Applications (VBA) was not installed, or was set to Install on first use,
(advertised, or set to install on demand) you may receive this error message.
Depending on the mode of installation used and the rights of the user to change current settings,
it is possible to install VBA through Control Panel, Add/Remove Programs, Microsoft Office, Add or Remove
features. If Visual Basic for Applications is not listed as an installable feature of Office, the administrator
of your system may have disabled it so it is impossible for you to install it. If VBA is not installed,
it is impossible to run VBA applications/projects on this computer. "
1. Even though Excel VBA application is installed in my machine , why am i getting this error.??
2. I would like to know is there any way to open the excel file even though if the excel software is not installed in client machine??
Appreciate your help.
Thanks.Hi,
I do not see any reason for this to not work.
Is there any difference between the preferences for RX and RXI. Please go to "edit" -> "Preferences" -> "Security(Enhanced)" and uncheck "Enable protected mode at startup".
Are you able to open any pdf from command line with the same command:
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" <<PDF_FILE>>
Thanks,
Amish. -
Hey there, I am a chemist so Labview and programming aren't exactly my strong point.
We have a Labview program that we run to control and automated valve manifold that has a thermocouple and pressure transducer that displays the temperature and pressure on the "front panel" of the labview file we run. The temperature and pressure of the manifold changes in real time while the labview is running. We must attach a sample to the manifold, take the pressure and temperature, then record those values in an excel spread sheet, one at a time.
What I would like to do is make a key board macro in excel to automatically type in the current read out of the temperature (and another for pressure) into which ever selected excel cell you are on, so that you don't have to switch back to the labview window to look at it. I have a very basic understanding of macros in VB but I don't know how to get the labview to make the read outs available for the excel macros to find it.
Thanks for the help, Here is a screen shot of the block layout of the program.
Attachments:
back.JPG 79 KBWhy not have LV put the data in Excel for you? You can use Actvie X to do this. There is plenty of information on the forum and knowledge base on how to use Active X and reporting to Excel. Plus you have the example finder. Do you have the Report Generation Toolkit? LV7 is quite old, so I don't know if this is an option for you.
Reese, (former CLAD, future CLD)
Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home -
'Edit in Place' for XLSM-files (Excel Macro-Enabled)
Hi,
is it possible to activate 'Edit in Place' for xlsm-files (Excel Macro-Enabled Workbook file)?
For xls(x)-files there is the link 'Edit This File', but not for files of type 'xlsm' allthough they could be dealt the same way with Excel.
I know I can edit this files using the 'Add-in for MS Office' and via the 'Vibe Desktop', but it would be nice to deal them like other Excel-files.
thx
MartinOriginally Posted by mschuhmann
RTFM helps I admit:
Novell Vibe 3.3 Administration Guide > Site Setup > Setting Up Site-Wide Customizations > Configuring File Associations for Edit in Place Applications
Novell Doc: Novell Vibe 3.3 Administration Guide - Configuring File Associations for Edit in Place Applications
Append ".xlsm" for the variable edit.in.place.file.applet.extensions, edit.in.place.file.webdav.extensions
Hi Martin,
Yeah, the Vibe docs can help on occasion
Still, thanks for feeding it back to the forums as it can be quicker finding a hit in the forums than having to go through the docs!
Cheers,
Willem -
Export to Excel - Macro problems
I have moved this to the Discoverer forum. Exporting to Excel - Macro Problems
Message was edited by:
user385142Hello Denes.
Excuse me for send you a message in this way , but I dont find other way to contact with you.
Im using the export_excel_pkg, and really it work good.
I have only one problem, I tell you.
When, in one item, data is very long and numeric, by example a EAN code, without any class of format, by default it give me the value ###, Im studing the package and trying to resolve this, but if you can send me any idea it can help me a lot.
Thanks in advanced.
You are doing a great work for us. -
Execute Infopackage Through BAPI Using Excel Macro (BAPI_IPAK_START)
Hi everyone,
I have a problem when execute infopackage through BAPI using excel macro. I have create a button in macro. When this button is clicked, BAPI for trigger InfoPackage will executed (BAPI_IPAK_START) and this button will disabled.
After this process completely done (traffic indicator for the request is green in update rules), the button will enabled again.
Here the subroutine or pseudocode that i will write :
Private Sub ClickButton()
Begin
1. ThisButton.Activated = False --> Disabled Button
2. Call BAPI/custom Function Module to execute InfoPackage (BAPI_IPAK_START)
4. ThisButton.Activated = True --> Enabled Button
End
The problem is i need some statement like this between statement no 2 and statement no 4
Statement That I Want :
3. Wait Until BAPI Execute Completely
So user can click this button again only after the process is finished completely. I don't know how to do this in macro (in ABAP i know i can use "WAIT ... SECOND"), others said this can be done using event in schedule option at infopackage. Anyone,please help me.
Thank you.
Regards,
Satria BEnter that req number in RSRQ and monitor the load
or right click on the DS - manage - you will req in yellow status which is in progress and you can click on the ...takes you monitor screen
Edited by: Srinivas on Jul 6, 2010 7:51 AM -
Excel macro on SharePoint 2013
Hi,
I know that SharePoint doesn't support Excel macro but in the next future will it change anything?
ThanksHi,
I don't think so it may happen. May be in next release of SharePoint version we can expect some extra features like this. Let's wait and see
Sekar - Our life is short, so help others to grow
Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
you see a reply being an answer to the question of the thread, click "Mark As Answer -
Excel Macro to click on publish button of Master Data Services Add-in
I am creating an excel macro to perform extra validation and defaults whilst the user is editing the MDS entity. It will be added as a workbook add-in. At the end of the macro I would like to be able to launch publish. The MDS addin is a ribbon.
Does anyone have an example of how I can simulate a click on the Publish button or what the call that the button does is?
David RosenederHi David
here is a code sample to add mds actions with excel Buttons
you can find the connection class separately, by downloading my sample project (C#) on codeplex :
http://mdsmanager.codeplex.com
(I use this MDS connection class for many projects)
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
using Microsoft.VisualStudio.Tools.Applications.Runtime;
using Excel = Microsoft.Office.Interop.Excel;
using Office = Microsoft.Office.Core;
using System.Xml;
using System.Collections.ObjectModel;
using Common.ServiceReference1;
namespace ExcelToMDS
public partial class Sheet1
public const string mdsEndPoint = "http://yourMDSEndpointUrl:4040/Service/Service.svc";
ServiceClient c = null;
International intl = new International();
OperationResult or = new OperationResult();
Metadata md = null;
private void Sheet1_Startup(object sender, System.EventArgs e)
using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
c.Open();
International intl = new International();
OperationResult or = new OperationResult();
md = GetMetaData(intl, ref or);
cbModels.Items.Clear();
foreach (Model mo in md.Models)
cbModels.Items.Add(mo.Identifier);
cbModels.DisplayMember = "Name";
cbEntities.Visible = true;
private Metadata GetMetaData(International intl, ref OperationResult or)
MetadataResultOptions mro = new MetadataResultOptions();
MetadataSearchCriteria msc = new MetadataSearchCriteria();
msc.Models = new Collection<Identifier>() { new Identifier() };
msc.Versions = new Collection<Identifier>() { new Identifier() };
msc.SearchOption = SearchOption.UserDefinedObjectsOnly;
mro.Models = ResultType.Identifiers;
mro.Versions = ResultType.Identifiers;
cbModels.Items.Clear();
Metadata md = c.MetadataGet(intl, mro, msc, out or);
return md;
private void Sheet1_Shutdown(object sender, System.EventArgs e)
if (c != null && c.State != System.ServiceModel.CommunicationState.Closed)
c.Close();
#region VSTO Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InternalStartup()
this.btGetMDSData.Click += new System.EventHandler(this.btGetMDSData_Click);
this.btGetTransactions.Click += new System.EventHandler(this.btGetTransactions_Click);
this.btUpdateAttribute.Click += new System.EventHandler(this.btUpdateAttribute_Click);
this.cbModels.SelectedIndexChanged += new System.EventHandler(this.cbModels_SelectedIndexChanged);
this.cbMembers.SelectedIndexChanged += new System.EventHandler(this.cbMembers_SelectedIndexChanged);
this.cbEntities.SelectedIndexChanged += new System.EventHandler(this.cbEntities_SelectedIndexChanged);
this.cbVersions.SelectedIndexChanged += new System.EventHandler(this.cbVersions_SelectedIndexChanged);
this.cbAttributes.SelectedIndexChanged += new System.EventHandler(this.cbAttributes_SelectedIndexChanged);
this.btReverseTran.Click += new System.EventHandler(this.btReverseTran_Click);
this.Shutdown += new System.EventHandler(this.Sheet1_Shutdown);
this.Startup += new System.EventHandler(this.Sheet1_Startup);
#endregion
private void btGetMDSData_Click(object sender, EventArgs e)
Cursor.Current = Cursors.WaitCursor;
DisplayEntityMembers(c);
Cursor.Current = Cursors.Default;
private void DisplayEntityMembers(ServiceClient c)
EntityMembers em = GetEntityMembers(c);
if (em != null)
Member[] members = em.Members.ToArray();
((Excel.Range)this.Cells[2, 2]).Value2 = "MemberName";
((Excel.Range)this.Cells[2, 3]).Value2 = "AttributeName";
((Excel.Range)this.Cells[2, 4]).Value2 = "AttributeValue";
for (int i = 0; i < members.Length; i++)
((Excel.Range)this.Cells[i + 3, 2]).Value2 = members[i].MemberId.Name;
int cptAtt = 0;
foreach (Common.ServiceReference1.Attribute att in members[i].Attributes)
((Excel.Range)this.Cells[i + 3, cptAtt + 3]).Value2 = att.Identifier.Name.ToString();
((Excel.Range)this.Cells[i + 3, cptAtt + 4]).Value2 = att.Value != null ? att.Value.ToString() : "";
cptAtt += members[i].Attributes.Count();
private EntityMembers GetEntityMembers(ServiceClient c)
if (cbModels.SelectedItem != null && cbEntities.SelectedItem != null && cbVersions.SelectedItem != null)
EntityMembersGetCriteria emGetCrit = new EntityMembersGetCriteria();
emGetCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
emGetCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
emGetCrit.VersionId = new Identifier() { Name = ((Identifier)cbVersions.SelectedItem).Name };
//ExportView[] ev = c.ExportViewListGet(new International(), out or);
EntityMembersInformation emi = new EntityMembersInformation();
emGetCrit.DisplayType = DisplayType.CodeName;
EntityMembers em = c.EntityMembersGet(intl, emGetCrit, out emi, out or);
return em;
else
MessageBox.Show("Please select model, version and entity in comboboxes");
return null;
private void btGetTransactions_Click(object sender, EventArgs e)
if (cbModels.SelectedItem != null)
this.Rows.Clear();
using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
c.Open();
DisplayTransactions(c);
c.Close();
else
MessageBox.Show("Please select Model in combos");
private void DisplayTransactions(ServiceClient c)
string versionName = "VERSION_1";
if (cbVersions.SelectedItem != null)
versionName = ((Identifier)cbVersions.SelectedItem).Name;
TransactionSearchCriteria trSrchCrit = new TransactionSearchCriteria();
trSrchCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
//trSrchCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
trSrchCrit.EntityId = new Identifier();
trSrchCrit.VersionId = new Identifier() { Name = versionName };
//ExportView[] ev = c.ExportViewListGet(new International(), out or);
EntityMembersInformation emi = new EntityMembersInformation();
int totalTranCount = 0;
Collection<Transaction> transactions = new Collection<Transaction>();
OperationResult or = c.TransactionsGet(intl, trSrchCrit, out totalTranCount, out transactions);
int startY = 4;
int startDataY = startY + 1;
int startX = 4;
((Excel.Range)this.Cells[startY, startX]).Value2 = "TransactionID";
((Excel.Range)this.Cells[startY, startX + 1]).Value2 = "Code";
((Excel.Range)this.Cells[startY, startX + 2]).Value2 = "Name";
((Excel.Range)this.Cells[startY, startX + 3]).Value2 = "MemberType";
((Excel.Range)this.Cells[startY, startX + 4]).Value2 = "Date";
((Excel.Range)this.Cells[startY, startX + 5]).Value2 = "AttributeName";
((Excel.Range)this.Cells[startY, startX + 6]).Value2 = "PriorValue";
((Excel.Range)this.Cells[startY, startX + 7]).Value2 = "NewValue";
for (int i = 0; i < transactions.Count(); i++)
((Excel.Range)this.Cells[i + startDataY, startX]).Value2 = transactions[i].Id.ToString();
((Excel.Range)this.Cells[i + startDataY, startX + 1]).Value2 = transactions[i].MemberId.Code;
((Excel.Range)this.Cells[i + startDataY, startX + 2]).Value2 = transactions[i].MemberId.Name;
((Excel.Range)this.Cells[i + startDataY, startX + 3]).Value2 = transactions[i].MemberId.MemberType.ToString();
((Excel.Range)this.Cells[i + startDataY, startX + 4]).Value2 = transactions[i].Date.ToString();
((Excel.Range)this.Cells[i + startDataY, startX + 5]).Value2 = transactions[i].AttributeId.Name;
((Excel.Range)this.Cells[i + startDataY, startX + 6]).Value2 = transactions[i].PriorValue;
((Excel.Range)this.Cells[i + startDataY, startX + 7]).Value2 = transactions[i].NewValue;
private void btUpdateAttribute_Click(object sender, EventArgs e)
Cursor.Current = Cursors.WaitCursor;
using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
c.Open();
EntityMembers em = GetEntityMembers(c);
Member[] members = em.Members.ToArray();
for (int i = 0; i < members.Length; i++)
((Excel.Range)this.Cells[i + 3, 2]).Value2 = members[i].MemberId.Name;
foreach (Common.ServiceReference1.Attribute att in members[i].Attributes)
if (att.Identifier.Name == "ValidDandT")
att.Value = DateTime.Now;
c.EntityMembersUpdate(intl, em);
DisplayEntityMembers(c);
c.Close();
Cursor.Current = Cursors.Default;
private void cbModels_SelectedIndexChanged(object sender, EventArgs e)
Identifier i = (Identifier)cbModels.SelectedItem;
if (md != null)
cbVersions.Items.Clear();
foreach (Common.ServiceReference1.Version v in md.Versions)
if (v.Identifier.ModelId.Id == i.Id)
cbVersions.Items.Add(v.Identifier);
cbVersions.DisplayMember = "Name";
private void cbVersions_SelectedIndexChanged(object sender, EventArgs e)
Identifier iVer = (Identifier)cbVersions.SelectedItem;
ModelMembersGetCriteria mmgc = new ModelMembersGetCriteria();
mmgc.Models = new Collection<Identifier>() { new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name } };
ModelMembersResultCriteria mmrc = new ModelMembersResultCriteria();
mmgc.Versions = new Collection<Identifier>() { new Identifier() { Id = iVer.Id } };
mmrc.IncludeLeafMembers = true;
cbEntities.Items.Clear();
cbMembers.Items.Clear();
Collection<EntityMembers> colEm = c.ModelMembersGet(intl, mmgc, mmrc, out or);
foreach (EntityMembers em in colEm)
cbEntities.Items.Add(em.EntityId);
cbEntities.DisplayMember = "Name";
private void cbEntities_SelectedIndexChanged(object sender, EventArgs e)
DisplayEntityAttributesCombo(c);
DisplayEntityAttributesAndMembersInSheet();
private void DisplayEntityAttributesAndMembersInSheet()
EntityMembers em = GetEntityMembers(c);
Member[] members = em.Members.ToArray();
((Excel.Range)this.Cells[2, 2]).Value2 = "MemberName";
((Excel.Range)this.Cells[2, 3]).Value2 = "AttributeName";
((Excel.Range)this.Cells[2, 4]).Value2 = "AttributeValue";
if (members.Count() > 0)
int ii = 0;
//attributes name on header line
foreach (Common.ServiceReference1.Attribute att in members[0].Attributes)
((Excel.Range)this.Cells[3, ii + 3]).Value2 = att.Identifier.Name.ToString();
ii++;
//members Data
int cptnbAttributes = members[0].Attributes.Count();
for (int i = 0; i < members.Length; i++)
for (int j = 0; j < cptnbAttributes - 1; j++)
((Excel.Range)this.Cells[i + 4, j + 3]).Value2 = members[i].MemberId.MemberType;
private void DisplayEntityAttributesCombo(ServiceClient c)
EntityMembers em = GetEntityMembers(c);
Member[] members = em.Members.ToArray();
if (members.Count() > 0)
cbAttributes.Items.Clear();
foreach (Common.ServiceReference1.Attribute a in members[0].Attributes)
cbAttributes.Items.Add(a.Identifier);
cbAttributes.DisplayMember = "Name";
cbAttributes.Visible = true;
private void cbMembers_SelectedIndexChanged(object sender, EventArgs e)
Identifier idMember = (Identifier)cbMembers.SelectedItem;
EntityMembers em = GetEntityMembers(c);
Member[] members = em.Members.ToArray();
Member m = members.FirstOrDefault(p => p.MemberId.Id == idMember.Id);
cbAttributes.Items.Clear();
foreach (Common.ServiceReference1.Attribute att in m.Attributes)
cbAttributes.Items.Add(att.Identifier);
cbAttributes.DisplayMember = "Name";
cbAttributes.Visible = true;
private void cbAttributes_SelectedIndexChanged(object sender, EventArgs e)
private void btReverseTran_Click(object sender, EventArgs e)
using (var c = Common.MDS_WSConnect.CreateMdsProxy("yourdomain", "yourlogin", "yourpassword", mdsEndPoint))
c.Open();
UpdateTransaction(c);
DisplayTransactions(c);
c.Close();
private void UpdateTransaction(ServiceClient c)
string versionName = "VERSION_1";
if (cbVersions.SelectedItem != null)
versionName = ((Identifier)cbVersions.SelectedItem).Name;
TransactionSearchCriteria trSrchCrit = new TransactionSearchCriteria();
trSrchCrit.ModelId = new Identifier() { Name = ((Identifier)cbModels.SelectedItem).Name };
//trSrchCrit.EntityId = new Identifier() { Name = ((Identifier)cbEntities.SelectedItem).Name };
trSrchCrit.EntityId = new Identifier();
trSrchCrit.VersionId = new Identifier() { Name = versionName };
//ExportView[] ev = c.ExportViewListGet(new International(), out or);
EntityMembersInformation emi = new EntityMembersInformation();
int totalTranCount = 0;
Collection<Transaction> transactions = new Collection<Transaction>();
OperationResult or = c.TransactionsGet(intl, trSrchCrit, out totalTranCount, out transactions);
Collection<ReplacementId> transactionReversed = new Collection<ReplacementId>();
or = c.TransactionsReverse(intl, new Collection<int>() { transactions.First().Id }, out transactionReversed);
Xavier Averbouch
Microsoft Community Contributor
Avanade , FRANCE
If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful". -
How to run excel macros using lookout
Hi,
I want use Excel macros for generating custom reports.Is it possible to run macros using run object in lookout
thanksHi,
I am pretty sure you can activate macros in Excel using the Run object in Lookout. I can think of two ways you can do this:
1. You can setup your Excel to run macros on startup using the Auto_Activate method. In this case, you will just launch excel with your workbook using the Run object and that should run the macros automatically. No brainer!
2. To better control as to when the macros are run we can assign in Excel some shortcut keys for their launching. We then would need to simulate these keystrokes to launch our macros. This can be done using the SendKeys method and some scripting, WHS Scripting for instance. See this pos
t for a scripting example which simulates Alt+Tab keys to bring-to-front an app.
You will launch the script from the Run object and this in turn launches Excel and then simulates the keys for luanching the appropriate macros. I admit this is kinda involved, but hey it works!
Hope this helps,
Khalid -
How to run Excel Macros using JDBC-ODBC
Hi,
I want to run the excel macros in the excel file, after I connected to excel file, using JDBC-ODBC bridge.
How macros treated here?
Help needed please..........
- RameshHow to run Excel Macros using JDBC-ODBCYou don't.
As my fuzzy understanding goes.....
Macros (excel, word, etc) run via a "OLE" extension of the script host system.
So the only way to run them is via the OLE interface. That has nothing to do with ODBC. You can write your own JNI to do that, or you might get lucky and find that someone else has written a java library to do it for you. -
Rfc code to call any sap tcode in excel macro
Hi all,
We are trying call sap tcode in excel macro programm using RFC.
Can any one send me sample code for this?
This is urgent.points will be rewarded.
regards,
ShyamHi harish kollipara
you should create the FM in the B system, that return some data that you can catch in system A after have called the FM.
check this link for the function:
http://help.sap.com/saphelp_nw04/helpdata/en/f9/3f69fd11a80b4e93a5c9230bafc767/frameset.htm
CALL FUNCTION 'NAME OF FUNCTION' DESTINATION rfc_destination_name
importing ...
exporting ...
EXCEPTIONS
system_failure = 1
OTHERS = 2.
hope this help you
Marco -
Calling a Siebel Business Service from an Excel Macro
Hi Everyone !!
I have a requirement where i have to call a siebel Business Service from an excel macro. Please help me with the code.
Regards,
AbhiHere's a starter for one:
Private Function ConnectToSiebel(sConnectString As String, sUserName As String, sPassword As String, _
oSiebel As SiebelDataControl) As Boolean
On Error GoTo ErrorHandler
' Uses the specified parameters to connect to the Data Control
Dim iErrCode As Integer
Set oSiebel = CreateObject("SiebelDataControl.SiebelDataControl.1")
oSiebel.Login sConnectString, sUserName, sPassword
If (oSiebel.GetLastErrCode <> 0) Then GoTo ErrorHandler
ConnectToSiebel = True
Exit Function
ErrorHandler:
MsgBox oSiebel.GetLastErrCode
ConnectToSiebel = False
End Function
The connect string passed takes the format:
host="siebel://<SERVER_HOST>/<SERVER_NAME>/PSCcObjMgr_enu"
You can then use the 'oSiebel' object as if it was the Application(). For example, Set oService = oSiebel.GetBusService("Blah")
Regards,
mroshaw
Maybe you are looking for
-
looking for a download link for acrobat 9.0 standard and 8.0 standard looking thru the forum the links seem to be outdated
-
Hi everyone, In screen painter there is the code: WHEN 'EXIT'. LEAVE PROGRAM. But it doesn't exit the current screen. What's the problem? (leave screen doesn't work either.) Thanks!
-
We just purchased Cisco AP350 and I'm wanting to use WEP but when I go to the security--Radio Data Encryption (WEP). I get the following message at the top of the screen "Use of Data Encryption by Stations is: Not Available Must set an Encryption Key
-
ITunes download error 12001 and 8003?
When trying to download something I keep getting error 8003 and error 12001. It says I have a network connection problem but my connection is fine. Help?
-
Cannot use Itunes or Quicktime
Can someone please help with reinstalling Itunes. No matter how many times I try to uninstall Itunes (and quicktime, Itunes Helper, Bonjour etc etc) and reinstall I cannot get the program to work. I think I did an update a while back and since then i