Programmatically retrieve SAP BPC Dynamic Script source code - sap

I would like to know how to retrieve the source code of a SAP BPC package Dynamic Script.
I'll try to explain: in SAP BPC I can write a component called Dynamic Script, I can save the source using the Excel Addin.
The Dynamic Script is associated to a SAP BPC "Package", and is a piece of code that can call an ABAP BADI.
What I would like to know is how this piece of code is stored in BW, how it is linked to the relative package, and how programmatically retrieve it.
Thank you.

In the Microsoft version, there's a DTSX file associated with packages not sure for NW though

Related

Viewing SQL for SQL Server Integration Services (SSIS) Transformations

I am new to Database and SSIS. Can anyone please let me know is there a way to look or view SQL code generated by SSIS transformations.
I know in BI reporting tools such as Business Objects, when we pull fields or columns into the reporting panel, we can view its corresponding SQL.
Similarly in SSIS, is there any option to view the SQL for SSIS Transformations.
Thanks in Advance
Raj
SSIS unlike other tools does not generate SQL per se, although you can include your own SQL inside tasks and components, but I guess you are not interested in the SQL that you write yourself but rather what SSIS is doing behind the scenes.
An SSIS package is essentially an XML-structured file with a collection of properties marking up the flow and process of its components. You can access to this xml file by right clicking on the package and selecting View Code:
The example above is an empty package so it's a very small XML file. In a complex package, this file can be very large as you will see all the tasks, components, parameters, variables, etc. as well as your own SQL code and C#/VB scripts if any.
When the project is built it generates a .ispac file which is no other thing that a zip file containing the package(s) in project plus a manifest, a content type and any other file required for the package to be deployed and executed.
You can see what is inside a .ispac by renaming to .zip and opening it. In this example I've built the above empty package and renamed the ispac to zip, then opened it :
In summary, unlike other tools that are purely SQL generators, in SSIS there is not much you can see about the generated code, all you can see is its structure as shown above.
Also, as mentioned by Marko Ivkovic in comments it might be possible to get some more info about what is happening at run time by using tools like SQL profiler.

SAP data extraction through BAPI file in Automation Anywhere

I am working in automation anywhere enterprise client where i have to extract SAP data with the help of BAPI files and dump it to the .csv file, when there is no parameter or filters for selected BAPI then its works fine, but the problem is if we have to pass any parameter or filters its not working and it always generate blank csv file,
How to extract SAP data through BAPI file when we have to pass the parameter values?
i am using Automation Anywhere community edition.

How can i use some SAP scripting from windev?

I have a windev programm that needs to access some SAP data.
Because of my company's restrictions, i cannot use the SAP native access provided with WinDev.
So, How can I use vba code that uses SAP from windev?
This is for a .exe programm for Windows. I need to go through the SAP GUI, so SAP GUI scripting is used.
Unfortunately, due to my company's restrictions, i do not have any code to show.
I finally found an answer !
To use SAP Scripting without using the native access, you can use a Batch file to run your SAP Scripting file.
That is one way of doing it. You can also use an excel file, with macros, and analyze your data there before using those in Windev.
Sure it is a complicated way to do things, but if your company does not allow you to directly read SAP database's tables, you can do it using this method.

How do I upload an Excel sheet to a SQL table in a Lightswitch web client?

I have a lightswitch project in visual studio 2013, using vb.net. I would like the user to be able to click a button and have lightswitch find an excel file, and upload that file to a sql table according to a pre-determined column mapping.
My preference was to use the Office Integration extension for visual studio, which I got working with VS 2013 by downloading it from this link: http://www.ge.tt/71iuRQv/v/0
However, the documentation and examples for office integration seem to be very heavy on getting an excel spreadsheet into a display in the lightswitch web client, rather than into the sql data table, which is where I need it. Here are the examples I've been following:
http://blogs.msdn.com/b/bethmassi/archive/2012/07/18/new-and-improved-office-integration-pack-extension-for-lightswitch.aspx
Alternatively, I have an existing stored procedure, and I can request that the server call this stored proc by sending a web API extension from the client to the server. I have this working already for other stored procs, according to examples from Beth Masi and Paul van Bladel. (Stackoverflow won't let me post the links...)
The undesirable part of this approach is that the stored proc is old, and messy.
I've searched and searched, but have yet to find anyone approach this problem for VS 2013 with lightswitch. Any useful advice?
I've used the method detailed by Matt Sampson to store word files and it works very well. Since it just stores the raw binary it should handle Excel files just as well.
If you're creating the table in LightSwitch, use the Binary Type. If you use SQL create scripts use varbinary(MAX).
You need to create a custom Silverlight dialog box to gain access to the OpenFileDialog object. Then open the file in as a FileStream.
Finally, you need to add a handler for the closed method of the control and then show the control to the user. Most likely done in a button. This needs to be done on the main dispatcher.
The code examples are in C# but I just used one of the many available translators out on the web and copy/pasted the VB.NET code.
Another option might be to consider shelling out to the DTSEXEC run-time to execute an SSIS package to perform the upload - especially if the target Excel spreadsheets have predefined layouts and content data types.
Even simpler, you might be able to use the SQL Server BULK INSERT command to get the job done - although that would require a SQL Client connection to your database.
HTH

Saving an Access table as dBASE_IV file (.dbf) in VB.NET

I am making a small application that will read .csv files into a newly generated access table (generated with vb.net), I am filling this database with sql and now I would like to output that table as a .dbf file!
I can't find any info on this subject.
I know some of you will tell me to just make the script in vba in access, but there are some functions that require me to use vb.net and the client wants a single .exe file.
There is a forum post here that includes some VB.NET sample code to create a .dbf file and write some data into it. The code uses the Visual FoxPro OLEDB driver (VFPOLEDB) which is no longer distributed with Windows by default, but can be downloaded here.