How to delete the N days older files with bods on Windows

Take a notepad and write below code

REM Remove files backup older than 7 days
forfiles /p “C:\backup\folder” /s /m *.* /c “cmd /c Del @path” /d -7

Where,
/p <Path> : Specifies the path from which to start the search.
/s = search sub-directories
/m = search mask
/c = set a command
This code will delete files older than 7 days, if you want to delete 15 days older file write 15 instead of 7

Then call the bat file from bods script

exec(‘cmd’, ‘C:\delete_older_File.bat’, 8);

???dummy.action.DS.Repository_List.display.name???

SAP NOTE Answer

 

Symptom

  • ???dummy.action.DS.Repository_List.display.name??? option is shown in the Central Management Console (CMC)

CMCDataServices.jpg

  • Selecting link returns (partial error included below)
HTTP Status 500 –

——————————————————————————–

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: java.lang.RuntimeException: org.apache.jasper.JasperException: java.util.MissingResourceException: Can’t find bundle for base name com.sap.dataservices.resource.Strings, locale en
com.businessobjects.http.servlet.internal.BundlePathAwareServiceHandler.serviceHelper(BundlePathAwareServiceHandler.java:254)
com.businessobjects.http.servlet.internal.BundlePathAwareServiceHandler.service(BundlePathAwareServiceHandler.java:197)
com.businessobjects.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:220)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
com.businessobjects.pinger.TimeoutManagerFilter.doFilter(TimeoutManagerFilter.java:159)

root cause

java.lang.RuntimeException: org.apache.jasper.JasperException: java.util.MissingResourceException: Can’t find bundle for base name com.sap.dataservices.resource.Strings, locale en
com.businessobjects.http.servlet.internal.BundlePathAwareServiceHandler.serviceHelper(BundlePathAwareServiceHandler.java:254)
com.businessobjects.http.servlet.internal.BundlePathAwareServiceHandler.service(BundlePathAwareServiceHandler.java:197)
com.businessobjects.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:220)
…………

 

Environment

  • Windows
  • SAP BusinessObjects Business Intelligence 4.0
  • SAP BusinessObjects Data Services 4.0 SP01

 

Reproducing the Issue

  1. Install SAP Business Objects Business Intelligence 4.0
  2. Install SAP Business Objects Data Services 4.0 SP01

 

Resolution

  1. Copy the attached file, MissingDataServicesFiles.zip, to the SAP Business Objects Server machine.
  2. Extract the contents to a temporary directory – this will create a file called com.businessobjects.webpath.DSCmc_lang.en.jar and a directory called webpath.DSCmc_lang.en
  3. Copy the com.businessobjects.webpath.DSCmc_lang.en.jar file into <Business objects Installation Directory>\SAP BusinessObjects Enterprise XI 4.0\warfiles\webapps\BOE\WEB-INF\eclipse\plugins
  4. Redeploy the web application named BOE using wdeploy or wdeployGUI.  Please refer to the SAP Business Objects Web Application Deployment Guide for details on how to do this.

NOTE: If the web application server is tomcat it is possible to perform the following steps instead of redeploying (step 4)

  1. Stop Tomcat
  2. Copy the webpath.DSCmc_lang.en directory and its subdirectories, extracted from the .zip file, to <Tomcat Install Directory>\webapps\BOE\WEB-INF\eclipse\plugins.  If Tomcat was installed with Business Objects then this directory will be <Business objects Installation Directory>\Tomcat6\webapps\BOE\WEB-INF\eclipse\plugins
  3. Delete the directory <Tomcat Install Directory>\SAP BusinessObjects\Tomcat6\work\Catalina\localhost\BOE – note that this is the work directory of tomcat not the webapps directory.  This directory will be recreated when Tomcat is restarted.
  4. Start Tomcat

:

Error while loading webi application

Java Plug-in 11.25.2.18
Using JRE version 1.8.0_25-b18 Java HotSpot(TM) Client VM
User home directory = C:\Users\Arjun
—————————————————-
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
—————————————————-

Resolution: 

Java.1.8.0_25 was uninstalled.

And Java1.7.0_67 was installed.

Violation of PRIMARY KEY constraint

For example, if I have taken the sample data as given below, taken the Sno as a PK in query transform.  Violation of PRIMARY KEY constraint.

Sno;Country;Date;Sales

1;USA;2010.01.12;100

2;INDIA;2011.12.31;100

3;SINGAPORE;2012.09.02;200

4;AUSTRALIA;2013.05.21;600

5;UK;2014.12.05;100

6;CANADA;2010.01.12;100

7;JAPAN;2011.12.31;1200

8;GERMANY;2012.09.02;600

9;SWITZERLAND;2013.05.21;800

10;THAILAND;2014.12.05;1200

6;CANADA-USA;2010.01.12;100

7;JAPAN-ASEA;2011.12.31;1200

8;GERMANY-EU;2012.09.02;600

9;SWITZERLAND-EU;2013.05.21;800

10;THAILAND-ASEA;2014.12.05;1200

Untitled.png

Reason is because of Sno of 10,9,8,7 and 6 as shown in the sample data.

So we need to consider those records only once. Or eliminate Sno column and load the data with new surrogate key.

Finding Duplicate Rows:

Load the data by unchecking PK definition of the Sno column and load the data.

Execute the below SQL once you have loaded the data.

Capture.JPG

When I import .atl file into PROD, it is taking too much time, How to fix this?

When I import .atl file into PROD, it is taking too much time, 30 mins. File isze is 50 MB.

How to fix this?

1) Repository database should not be far away , should be in the same LAN segment.
2) Disable the calculate column mapping, for this go to tools -> Options in Desginer and expand General Node, uncheck the “Automatically Calculate Column Mapping” if its checked
3) We should try using the al_engine command to manage your atl export / import.
4) Truncate your al_statistic table and al_history table .
If these tables contain too many rows the import process is slow down.

How to replace single quotes with double quotes?

How to replace single quotes with double quotes?

replace_substr(DATE_Table.Remarks,’\”,'”‘)

Replace Singale quotes

How to use stored procedure in SAP BODS?

http://wiki.scn.sap.com/wiki/display/EIM/Calling+a+stored+procedure

IF we want to execute the stored procedure from script first import the SP into wer data store first and we can try the below scripts, i am not sure that it will works kindly try and let me know.
Datastore Name.Owner.Procedure_Name( $Var_1 , $Var_2 );

or

SQL(‘Datastore_name’,exec sp_xxx);

Procedure Code:
create or replace PROCEDURE findMin(x IN number, y IN number, z OUT number) IS
BEGIN
IF x < y THEN
z:= x;
ELSE
z:= y;
END IF;
END;
Below Syntax worked.
SQL(‘Datastore_Name’,’DECLARE a number :=10; b number :=20; c number; begin FINDMIN(a,b,c); end;’);