Dynamically changing the flatfile name..
Hi friends,
I 'm Getting data from 30 Flat files...all are with same structure but different data.. .. all these files are now in Application server...
now i want to upload data into with a single DataSource and to ODS with process chains..
so, how can i dynamically change the file name in Data Source level.. i saw previous threads.. in that.. through Routines.. we can solve this problem.. but I dont know ABAP code... so, can any one plz give me the exact code.. what i have to write...exact coding..
<b>
I already post this question in forums.... but evry one gave different options.. some one gave the function module..
BAPI_IPACK_CHANGE and BAPI_IPACK_START.
and some one gave other function module.. like .. EPS_GET_DIRECTORY_LISTING
i tryd for All these options.. but i'm not getting the exact solution... even i'm unable to pass the parameters also.. beacuse.. in that function what parameters can i pass....</b>
can u plz suggest me the solution..
Thanks
Babu
Hi Friends,
for the above requirement i had write the bellow coding in the routine.. it is working.. but the problem is.. it was loading only the last file..(30 th file data only..)
data : z1(50) type c,
z2 type c,
z3(50) type c,
z4(50) type c.
Z2 = 1.
Do 5 times.
z1 = 'C:\Documents and Settings\e10035\Desktop\'.
z3 = '.csv'.
concatenate z1 z2 z3 into z4.
p_filename = z4.
z2 = z2 + 1.
Enddo.
SO, CAN YOU PLZ SUGGEST ME.. when ever the file name was changing in the loop.. that automatically should load into the PSA ..
plz... plz.... help regarding this..
Bbau
Similar Messages
-
Dynamically change the column name....
Hi,
I am facing a problem in displaying name of the columns dynamically as a parameter selected from the dashboard prompt.
I have some facts which contains data according to the selected month (From Prompt).
As of now the column names are:
Curr, Next1, Next2, Next3 which displays the data for the months accordingly to the selected month from prompt.
Data is coming correctly but on the report the column name are displayed as Curr, Next1, Next2 and Next3 which I want to be displayed as the month name for which it contains data.
How can I do that? I have tried presentation variables to be used in custom heading but that is only as string.
Thanks in advance !!!
Regards,
S Anand
Edited by: S Anand on Nov 20, 2009 2:29 AM
Edited by: S Anand on Nov 20, 2009 2:29 AMMy scenario is little different, let me explain:
My columns will remain same but values changes (based on column formula) according to the selected prompt value
If I select 'Oct' from prompt then
Curr will contain data for 'Oct' only
Next1 will contain data for 'Nov' only
Next2 will contain data for 'Dec' only
Next3 will contain data for 'Jan' of next year only.
Later if I select 'Jul' from prompt then
Curr will contain data for 'Jul' only
Next1 will contain data for 'Aug' only
Next2 will contain data for 'Sep' only
Next3 will contain data for 'Oct' only.
I don't have different columns for each months but the columns are capable to reflect data for any month.
So, how can I reflect the column name as month name for which that contains data.
Regards,
S Anand -
Dynamically changing the file name using the submit button
I am currently using a submit button to send information to myself from the user of the form. Is there any way to change the name of the file that is emailed as a .pdf file according to some type of parameter or data set that is collected in the form?
Not programmatically. The attachment wil take the same name as the opened PDF. If you change the name of the PDF then it will change your form name as well. That cannot be done programmatically.
-
How to dynamically change the table name inside a view
Hi All,
create table t_auto_feeds
id number,
table_name vachar2(100));
insert into t_auto_feeds values(1,'T_FEED_POSITIONS');
insert into t_auto_feeds values(2,'T_KAP_MTM');
assume there are 100 records on id=1 in T_FEED_POSITIONS and 100 records of id=2 in T_KAP_MTM (id 1 is present only in t_feed_positions & id 2 is present only in t_kap_mtm)
i need to create a view such that it needs to give the count of records based on the id
create or replace view aa_view as
select count(*), id from t_feed_position group by id
union
select count(*), id from t_kap_mtm group by id;
I am getting a proper result when i query the view like select * from aa_view where id=1 but will the other union query seems to be a overhead?. I am having 10 such tables configured for different id in t_auto_feeds.so do i need to put 10 unions or is there a better way to handle this stuff.
I know i can use a PLSQL block and dynamically build view structure, the problem is the view itself is configured in a table , so i cant write a proc for this.. can this aa_view be modified such that it queries only the table(using the t_auto_feeds ) which matches the id rather than the entire list.
Kindly help me in this regard and let me know in case u need any further information from my side.>
so do i need to put 10 unions or is there a better way to handle this stuff.
>
Yes - you need 10 unions
Yes - there is a better way so that only one of the 10 queries does anything.
You can use SYS_CONTEXT to control the query selection.
Here is an example of using SYS_CONTEXT. Try this code in the SCOTT schema.
create or replace context VIEW_CTX using SET_VIEW_FLAG;
create or replace procedure SET_VIEW_FLAG ( p_table_name in varchar2 default 'EMP')
as
begin
dbms_session.set_context( 'VIEW_CTX', 'TABLE_NAME', upper(p_table_name));
end;
select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' );
select * from emp2 where 'EMP2' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
exec set_view_flag( p_table_name => 'EMP' );
exec set_view_flag( p_table_name => 'EMP1' );
exec set_view_flag( p_table_name => 'EMP2');
SELECT sys_context( 'VIEW_CTX', 'TABLE_NAME' ) FROM DUAL
CREATE VIEW THREE_TABLE_EMP_VIEW AS
select * from emp where 'EMP' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
union all
select * from emp1 where 'EMP1' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
union all
select * from emp2 where 'EMP2' = sys_context( 'VIEW_CTX', 'TABLE_NAME' )
SELECT * FROM THREE_TABLE_EMP_VIEWNote that you set the context for the table you want. This doesn't have to be a table name it could just be flag value
-- use the emp table
exec set_view_flag( p_table_name => 'EMP' );
-- ue the emp1 table
exec set_view_flag( p_table_name => 'EMP1' );
-- use the emp2 table
exec set_view_flag( p_table_name => 'EMP2'); -
Can we dynamically change the file name in dst file in Report 6i, Urgent!
I am calling dst file to generate file with diffenet format.
but name of the pdf file should generate dynamically everytime i call dst file,
is there anyway to set the desname in dst file in Report 6i? Any solution,
Thanks for your helpHi Roshan,
Create two RKF's one for Normal Invoices and another for canceled invoices, for doing this you should have some characteristics or some status value which will identify the normal and canceled invoice.
In the Normal Invoice RKF simply restrict the key figure with status restriction as Normal and pull the invoice amount as key figure. And in case of Canceled key figure you will set the status restriction as "canceled" and pull the invoice amount, now for canceled invoice key figure to show the negative value do the following,
Go to RKF properties of canceled invoice and mark the check box +/- Reverse sign, which will show the negative amount.
Regards,
Durgesh. -
How to dynamically change the table name for a update statement
Hi All,
I need to update a coulumn xyz in either of tables abc and efg based on some condition.
I wrote a cursor which has union of two queries(one querying abc and other efg)
Now based on some inparameter only one will be executed at a time.
And based on some condition a coulumn xyz needs to be updated which is in either of the table.
As the update condition is same
Update abc/efg set xyz=data where condition
I am looking to initialize a variable like v_tname based on some condition and update like
update v_tname .........
(Exactly that may not be like so, But looking a technique like this)
Please helpIf there is only two tables you'll need to update then you are better off using static SQL and implementing something like this instead:
DECLARE
update_condition BOOLEAN;
BEGIN
-- initialize update_condition
update_condition := <some_boolean_check>;
IF update_condition
THEN
UPDATE abc
SET xyz = some_val
WHERE some_col = some_other_val;
ELSE
UPDATE fgh
SET xyz = some_val
WHERE some_col = some_other_val;
END IF;
END;
/Hope this helps! -
Dynamically changing the name of the .dll file to load in call Library
Our current model is to use dll files as "plug-in" modules for instruments and a top layer test step calls the appropriate driver dll.
For instance
the TestStep is called with the kenmore.dll passed as a parameter so the kenmore.dll file is loaded, the functions are registered and the functions are called. Next the TestStep is called with whirlpool.dll as a parameter now the whirlpool.dll is loaded the functions are registered and the functions are called. This works very well in our current CVI/LabWindows environment. Now we plan to work with LabView, we wish to retain this model (as DLL files, there are advantages in our model for us). We have not found a way to load these dll files from LabView without hard coding the path and filenames in.
Any suggestions on how to dynamically change the path in the Call Library module, or another suggested method of loading the dll via LabView?
Thanks,John Stuart wrote:
Our current model is to
use dll files as "plug-in" modules for instruments and a top layer test
step calls the appropriate driver dll.
For instance
the TestStep is called with the kenmore.dll passed as
a parameter so the kenmore.dll file is loaded, the functions are
registered and the functions are called. Next the TestStep is
called with whirlpool.dll as a parameter now the whirlpool.dll is
loaded the functions are registered and the functions are called.
This works very well in our current CVI/LabWindows environment.
Now we plan to work with LabView, we wish to retain this model (as DLL
files, there are advantages in our model for us). We have not
found a way to load these dll files from LabView without hard coding
the path and filenames in.
Any suggestions on how to dynamically change the path in the Call
Library module, or another suggested method of loading the dll via
LabView?
Thanks,
As Ben has pointed out LabVIEW
scripting may be a possibility but you are going with that in highly
unsupported area. Also I happen to know that changing the library name
of a Call Library Node through scripting has produced unsupported
feature errors previous to LabVIEW 7.1 eventhough the method was there.
And LabVIEW 8 hides the whole scripting business behind the license
manager.
Another approach at least if the different DLLs do not change to often
thier functions and parameters would be to create a wrapper DLL. Have
it a method that loads the desired DLL and links its functions to
internal function pointers. Then when calling the actual function entry
points just redirect directly to the correct fucntion through that
function pointer. Since you are already working in CVI creating such a
DLL should be only a matter of taking out a little bit of your already
existing code and put it into a DLL project.
Rolf Kalbermatter
Message Edited by rolfk on 04-12-2006 07:40 AM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How to dynamically change the text of a TextObject with embedded DataField?
Hi
I'm trying to dynamically change the text of a TextObject at runtime, by using the .NET library. My problem is that if one or more DatabaseFieldDefinition is embedded inside my text, I'm unable to change the "static text" only, by keeping the field, e.g. I have :
Text1 => "Contact Name: {Contact.Name}"
and I'd like to change it to anything else like:
Text1 => "Nom du Contact: {Contact.Name}"
Half of my TextObject is static text while second part comes from the dataset.
(of course the translation is dynamic - it is called at run-time and the new value to be set depends on the calling application language)
If I simply modify the Text property of my TextObject, the {Contact.Name} embedded field is not evaluated anymore by the Crystal Engine, but considered as a single text.
Using formulas or parameters looks quite difficult, because it means having many ones just for translation needs - I cannot control the way my users will create their reports and "force them" to use complex methods just in order to put a text and a value together...
Anyone knows how to deal with that ?Only way I can think of doing this:
1) Create a formula (call it lang) and enter the string "Contact Name" in it
2) Place the {Contact.Name} field next to the string
3) So now you have:
ContactName: {Contact.Name}
4) Check what localization you are after. If you need "Nom du Contact", change the lang formula so it shows "Nom du Contact" using the code below:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class Form1
Inherits System.Windows.Forms.Form
Dim Report As New CrystalReport1()
Dim FormulaFields As FormulaFieldDefinitions
Dim FormulaField As FormulaFieldDefinition
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormulaFields = Report.DataDefinition.FormulaFields
FormulaField = FormulaFields.Item(0)
FormulaField.Text = "[formula text]"
CrystalReportViewer1.ReportSource = Report
End Sub
I realize this may not give you consistent spacing as the translations may have strings of differnt length. Perhaps someone has other idea(s)... -
Changing the file name dynamicallly in file Adapter
Hi i want to change the file name directly from Java Mapping in the file adapter
for this i have written this code
DynamicConfiguration dynamicConfiguration = (DynamicConfiguration)map.get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey keyFile = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
DynamicConfigurationKey keyDir = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","Directory");
dynamicConfiguration.put(keyFile,fileName);
dynamicConfiguration.put(keyDir,outputpath);
but it gives a null pointer exception at dynamicConfiguration.put(keyFile,fileName);
please suggest.
regards
Nilesh Taunk.Hi Nilesh,
If your requirement is to create , the file name dynamically for your receiver file adapter, you can do so using your <b>FILE ADAPTER CONFIGURATION</b> itself, and need not go for any JAVA Mappping / Java Code at all.
The dynamic filename generation concept is as follows.
In your filename field in the receiver file adapter, just give a variable with <b>%</b> symbols. (eg: %file% ).
Now, under the option <b>Variable Name Substitution</b>, you can give how the value has to be created.
<b>It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.</b>
For the former, your give
<b>message:interface_name</b> ,etc
and for the payload part you give,
<b>Payload: "your element root which u wanna acecss"</b>
Just check this link out,
http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
And read the contents under variable substitution and it will help you understand the concepts better.
Also, in your FILE Adapter under the option FILE CREATION MODE, you have options like,
1.Add Counter,
2. Append
3. Create
4. Add Time Stamp
If you have any clarifications on this approach, do get back.
Regards,
Bhavesh -
Dynamically Pass the Column Name cursor. || Dynamic Column Name
Hi,
I need to dynamically pass the column name based on a Mapping table in a loop ( Right now i have hardcoded stuff )just like using Execute immediate.... Inside the procedure, I have commented as where i hit the problem.
Thanks for all of your time...
Thanks
Muthu
CREATE OR REPLACE PROCEDURE xml_testing_clob AS
doc xmldom.DOMDocument;
main_node xmldom.DOMNode;
root_node xmldom.DOMNode;
user_node xmldom.DOMNode; item_node xmldom.DOMNode;
root_elmt xmldom.DOMElement;
item_elmt xmldom.DOMElement;
item_text xmldom.DOMText;
item_test xmldom.DOMText;
nodelist xmldom.DOMNodeList;
sub_variable varchar2(4000);
x varchar2(200);
y varchar2(200);
sub_var varchar2(4000);
CURSOR get_users IS
SELECT FIRST_NAME,LAST_NAME,ROWNUM FROM USER_INFO_TBL WHERE WEIN_NUMBER = '1234' ;
CURSOR get_cdisc_name IS
select CTS_COL_NAME,CDISC_NAME from CTS2CDISC_DICTIONARY where CTS_TABLE_NAME = 'USER_INFO_TBL';
BEGIN
-- get document
doc := xmldom.newDOMDocument;
doc := xmldom.NewDomDocument;
xmldom.setVersion(doc, '1.0');
xmldom.setStandalone(doc, 'no');
xmldom.setCharSet(doc, 'ISO-8859-1');
-- create root element main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createElement(doc,'AdminData');
root_node := xmldom.appendChild(main_node,xmldom.makeNode(root_elmt));
FOR get_users_rec IN get_users LOOP
item_elmt := xmldom.createElement(doc,'User');
xmldom.setAttribute(item_elmt,'OID' , get_users_rec.rownum);
user_node := xmldom.appendChild(root_node,xmldom.makeNode(item_elmt));
FOR cv_get_cdisc_name IN get_cdisc_name LOOP
EXIT WHEN get_cdisc_name%NOTFOUND;
sub_var := cv_get_cdisc_name.cts_col_name;
sub_variable := 'get_users_rec.';
sub_variable := 'get_users_rec.'||cv_get_cdisc_name.cts_col_name;
x := sub_variable;
dbms_output.put_line(x); -------------- Here i just see the literal string
y := get_users_rec.FIRST_NAME;
dbms_output.put_line(y); -------------- Here i just see actual value ( data )
item_elmt := xmldom.createElement(doc,cv_get_cdisc_name.cdisc_name);
item_node := xmldom.appendChild(user_node,xmldom.makeNode(item_elmt));
item_text := xmldom.createTextNode(doc,x ); ---- This is the place i am hitting with an error .
If i use variable X then i am able to see only the literal
string in the output. BUT if i put cursor name.coulmname,
then the resumt (XML) is fine.I wanted acheive this
dynamically just like execute Immediate
item_node := xmldom.appendChild( item_node , xmldom.makeNode(item_text));
END LOOP;
END LOOP;
-- write document to file using default character set from database
xmldom.WRITETOCLOB(doc,);
xmldom.writeToFile(doc, 'c:\ash\testing_out.xml');
-- free resources
xmldom.freeDocument(doc);
END;
+++++++++++++++++++++++++++++++++++ XML OUTPUT +++++++++++++++++++++++++++++++++++++++++
<?xml version="1.0" ?>
- <AdminData>
- <User OID="1">
<FirstName>get_users_rec.FIRST_NAME</FirstName>
<LastName>get_users_rec.LAST_NAME</LastName> </User>
- <User OID="2">
<FirstName>get_users_rec.FIRST_NAME</FirstName>
<LastName>get_users_rec.LAST_NAME</LastName>
</User>
- <User OID="3">
<FirstName>get_users_rec.FIRST_NAME</FirstName>
<LastName>get_users_rec.LAST_NAME</LastName>
</User>
- <User OID="4">
<FirstName>get_users_rec.FIRST_NAME</FirstName>
<LastName>get_users_rec.LAST_NAME</LastName>
</User>
- <User OID="5">
<FirstName>get_users_rec.FIRST_NAME</FirstName>
<LastName>get_users_rec.LAST_NAME</LastName>
</User>
++++++++++++++++++++++++++++++++++++++++++++++++++++ MAPPING TABLE DETAILS +++++++++++++++++
CTS_COL_NAME CDISC_NAME CTS_TABLE_NAME XML_TAG -----------> Column Name
FIRST_NAME FirstName USER_INFO_TBL Element -----------> Records
LAST_NAME LastName USER_INFO_TBL Element -----------> RecordsMy scenario is little different, let me explain:
My columns will remain same but values changes (based on column formula) according to the selected prompt value
If I select 'Oct' from prompt then
Curr will contain data for 'Oct' only
Next1 will contain data for 'Nov' only
Next2 will contain data for 'Dec' only
Next3 will contain data for 'Jan' of next year only.
Later if I select 'Jul' from prompt then
Curr will contain data for 'Jul' only
Next1 will contain data for 'Aug' only
Next2 will contain data for 'Sep' only
Next3 will contain data for 'Oct' only.
I don't have different columns for each months but the columns are capable to reflect data for any month.
So, how can I reflect the column name as month name for which that contains data.
Regards,
S Anand -
Is it possible to change the font name and size without having to compile?
Dear All
We have one requirement that we need to change the font name and font size at run time dynamically without having to compile all the forms in 6i.
Is there any way or work around to achieve the same.Kindly suggest us.
something like using uifont.ali or forms60_defaultfont, or set_item_property
Thanks and Regards
Thangaraj.Dear All,
Thanks for your updates, Technically what both of you said is correct. but in application server we used something like ClientDPI to match the client server font with the application server, i need to know that is there anyother way something like this...?
I have read one document(Note:28397.1 in metalink) saying that using uifont.ali file we can change the font at run time, but i have used this only for report
Thanks and Regards
Thangaraj.S -
Dynamically assign the file name for "on demand read"
Hi.
A quick question.
I need to poll a directory using the on demand read function of the FB component, and change the file name in the BPEL process.
Basically I need to dynamically overwrite the destination file name at runtime.
These are the steps in my Process
1. Pick up XML file,
2. Assign a field in the xml file (fileName) to a variable (flatFileName)
3. Poll a specific directory using onDemandRead and look for the fileName specified in the variable
So obviously,
I have tried to assign the variable flatFileName to the fileName property in the FB component of the readout variable. But it doesn't seem to work.
Firstly I want to know if this is possible, and secondly, any idea on how to solve this issue.
Thanks in advanceI think it is not possible. becuase the date & time added at runtime. so if you check the table PATH you can find filename and their definitions
a® -
OBIEE 10g AGO Function Dynamically Change the Heading
I created columns in my rpd named Sales Previous Month, Sales 2 months ago and Sales 3 months ago using the AGO Function. This is working fine.
My problem is when displaying these headings the users would like to see the Month Name instead of the Headings I created. For example if looking at a report for January the users would like to see:
Sales Previous Month = December
Sales 2 Months ago = November
Sales 3 Months ago = October
Is there any way to dynamically change the value of the column header to show the name of the month?Hi SriniVEERAVALLI,
Thanks for the reply. I have found that I might haven't created the relationship between dimension and fact tables correctly.
I initially created the foreign key relationship (instead of creating complex join) in physical diagram between the dimension and fact table. And the relationship type is hence greyed out.
I have deleted the foreign key relationship in physical diagram. Then
1. In physical diagram, create complex join between dimension and fact . The relationship is 'inner' and can't be changed.
2. In Logical table diagram, create foreign key between dimension and fact . The relationship can be changed (inner, outer, etc).
Is this the correct way?
I tried these on two newly created dummy tables and it worked. -
Is it possible to dynamically change the image in a Picture Field?
Is it possible to dynamically change the image in a Picture Field?
Thank youTry using the In Proc RAS SDK.
[Here are the sample applications.|http://www.sdn.sap.com/irj/boc/samples?rid=/webcontent/uuid/b02c1cac-ad86-2b10-88ae-cb36551bab06] Take a look at the 'Add Image' sample.
Insert the picture at design or runtime and change the location / name of the image at runtime.
- Bhushan. -
Hi
we are facing some problem in Dynamic Changing the LOV.
Lets assume the below scenario.
I have tables like location and department table.
In location table i have values like country name and location. For one country there will be multiple locations.
First i need to show the unique country names in LOV. based on the country selection i need to show locations.
all we need to achieve in same page meaning i have two lovs in one page. first one is country and second one is locations.
pls. help us to resolve this issue.Why wouldn't you put two items (visible=no) on page; first of them with "select distinct..." of country on record group for LOV1 and the second with LOV2 with locations, depending of values in item1 where you took value from LOV1?
Maybe you are looking for
-
Playback only stutters in preview screen, not full screen.
Brand new iMac 5k, maxed processor and graphics driver, and loaded up with 32gb of ram. Files live on internal 1tb drive. Originally 1080p 30fps MP4 with h.264 codec. Have created proxy, have optimized, have used compressor to switch to prores format
-
Keep exported image size in HTML as shown in PDF
I have many inline formulas (imported from Word file via using mathtype) in PDF article made by ID. But when I export the articles as HTML, the images for formulas become much larger than shown in PDF version. How can i keep the exported images to th
-
Hi all! In crystal report 2008, can we create a manual query. How to use it! Thanks!
-
Hello, I have been going through the tutorials in Adobe's Flash 8 training from the source, and I have run into a syntax question about arrays and was hoping someone could explain something for me. specifically why I can trace an element in the first
-
Iphone 4s suggesting for restoration
I have an iphone 4s with a corrupted ios7 install and no current backup on the computer. I do have an older backup that is a year old on an older imac however the phone is not recogniged on that computer. Any suggestions