Creating character variable with dynamic length
Hello Experts,
I need to send contents of an internal table via FTP in character mode,
the entire contents of a internal table is concatenated in a string(v_string) which needs to be moved to the character variable of same size say l_count = strlen( v_string ).
can anyone help me to define the character variable say of length l_count.
I have already tried creating a dynamic character variable using CREATE DATA.
eg DATA: dref TYPE REF TO DATA.
CREATE DATA dref TYPE c LENGTH l_count.
but this is not working.
Any response will be helpful.
Thanks & Regards,
Sumukh Kapoor.
Hi Marcin,
Thanks for your response,
Reason i need character variable of dynamic length is because the requirement is to send data to client's Windows terminal . We already have FTP code in place and suddenly client has asked to send us data of an internal table in a single line.
I have concatenated the entire table into a string and then thought of moving the entire data from string to that character.. as the size in character goes beyond 60000 characters in many cases....
It seems this is not possible as the string cannot be converted to the data type of variable newly declared.
anyways your input was of great help.
Thanks & Regards,
Sumukh Kapoor.
Edited by: Sumukh Kapoor on Jul 26, 2010 7:56 AM
Similar Messages
-
Creating context node with dynamic type
When we are creating context node thru wizard, Dictionary type must be filled. I'm trying to create Context node manually.Did any one tried created Context node class with Dynamic type.
Hi Prasad,
I have a similar requirement.
Can you please share with me how did you create context node with dynamic table data?
Thanks
Vicky -
Create SCOM Group with dynamic members about 10minutes !
in our SCOM 2012 SP1 (CU3) environment with about 800 Windows Agents.
OperationsDB on a Windows Cluster (2 physical server with 2 processors (six cores). Datawarehouse on separate cluster.
When i create a group with dynamic members, it took about 10min. During this period all the consoles are busy and freezing.
Is that normal ?
Regards
Lehugoon the management server i got follow eventlog error durung this time:
OpsMgr Management Configuration Service failed to execute 'ConfigStoreStatsUpdate' engine work item due to the following exception
Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessException: Data access operation failed
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.DataAccessOperation.ExecuteSynchronously(Int32 timeoutSeconds, WaitHandle stopWaitHandle)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.ExecuteOperationSynchronously(IDataAccessConnectedOperation operation, String operationName)
at Microsoft.EnterpriseManagement.ManagementConfiguration.SqlConfigurationStore.ConfigurationStore.WorkItemCompleted(IConfigServiceEngineWorkItemHandle workItemHandle, IConfigServiceEngineWorkItemResult workItemResult)
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.SharedWorkItem.ExecuteWorkItem()
at Microsoft.EnterpriseManagement.ManagementConfiguration.Interop.ConfigServiceEngineWorkItem.Execute()
System.Data.SqlClient.SqlException (0x80131904): Sql execution failed. Error 50000, Level 16, State 1, Procedure WorkItemMarkCompleted, Line 61, Message: Failed to report work item completion. Work item with id 1888748 is not assigned to service instance 'XXXXXX\Default'
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()
at System.Data.SqlClient.SqlCommand.EndExecuteNonQuery(IAsyncResult asyncResult)
at Microsoft.EnterpriseManagement.ManagementConfiguration.DataAccessLayer.NonQuerySqlCommandOperation.SqlCommandCompleted(IAsyncResult asyncResult) -
Has anyone been able to create a HtmlDataTable with dynamic col and rows?
Has anyone been able to create a HtmlDataTable with dynamic col and rows?
If so please explain. I am successfully able to dynamically add columns using the getChildren method of the htmldatatable object
BUT for each new column created no data is displayed.
I am only able to display data for columns originally created when i clicked and dragged the dataTable icon from the pallette in netbeans visual web kit.
Any help on this is greatly appreciated. I have been searching the web and these forums for around 8 hours and no one seems to have a working example of this. Lots of similar posts asking how to do it though :(
Thanks in advance.This might be useful: http://balusc.xs4all.nl/srv/dev-jep-dat.html
-
How to create date variable with interval in VC
Hi Everyone,
I have 2 questions:
<u>My scenario:</u>
I am using a BI 7.0 Query which is having some variables. I want the same variables to be displayed in the VC output.
<u>Question 1:</u>
I know that how to bring these variables in variable screen, but when we use these queries, dont the variables in the variable screen automatically ask for the input?
I tried it but it is not happening automatically.
There are 2 inputs for queries with variables, i tried using both, but it is not working properly. Can any one tell me is it possible.
<u>Question 2:</u>
In this variable screen, I have to select date with interval format. but i dont know how to use variable with interval. ( Date with interval format).
I hope some one might have come across the same scenario .. If so please share with the solution me ..
Regards,
ChanOk .. Let me be very clear .. I think I confused you.
As you mentioned I have done every thing in query level.
I have created a query with a variable which is an interval based variable(date).
When I execute the query it asks for the dates to display the inbetween data.
I gave the inputs and the data is displayed properly.( So far what I have mentioned is all in Query designer).
In VC, I have used this query and it is having two ports named INPUT and VARIABLE. I know that I need to give input in variables. I selected the calander month variable from the list to display. After this I deployed the model. In the output screen the table is displayed and 1 text box is also available for the date input. I know that here I have to give date with same format as in Query designer output. I tried so many ways to give input by even selecting some other options like date picker but it is giving the following error - <b>Variable expects interval values; enter an interval.</b>
The date format which I m using in Query is "MM.YYYY" and I m using the same format in VC too.
Now I hope that u can understand better.
I want to know is there any other way through which this can enter interval value or what mistake I m doing in the above explained scenario?
Regards,
Chan -
Compare character variable in dynamic sql
hi all
i have a requirment in which i'll be using a dynamic sql:
sql_string :='select * from temp_table where emp_name='||v_name;
execute immediate ;
i'm getting this error
ORA-06502: PL/SQL: numeric or value error
this is becouse v_name is character variable and we have to write
select * from temp_table where emp_name='joe';
can any one plz help me out..More correctly you should use bind variables (if you really really have to do dynamic SQL in the first place)...
sql_string :='select * from temp_table where emp_name=:n;
execute immediate sql_string using v_name;This allows the optimiser to re-use the execution plan rather than hard-parsing the query every time.
However this still isn't right because within PL/SQL you will need to be selecting your result INTO something e.g.
sql_string :='select * from temp_table where emp_name=:n;
execute immediate sql_string into v_data using v_name;v_data will be a variable declared suitably to accept whatever data is being selected in the query. -
Odi Variable with dynamical refreshing(Solved)
Hi,
I have a ODI variable used in 3 packages. This variable get number of records of the table, but table changes. Example:
if package A Variable refreshing with select count(1) from TABLE_SYS
if package B Variable refreshing with select count(1) from TABLE_DEM
if package C Variable refreshing with select count(1) from TABLE_BOL
I do not want create 3 variables, I want to use only one. Its possible?
Thanks.
Edited by: Uthred on Sep 1, 2008 6:04 PMHi, i solved the problem!
I use java tags in the refreshing variable:
select count(1) from
<@ if ("<%=odiRef.getSession( "SESS_NAME" )%>" == "PACKAGE_A") {@>
<%=odiRef.getSchemaName( "D" )%>.TABLE_SYS
<@} else if ("<%=odiRef.getSession( "SESS_NAME" )%>" == "PACKAGE_B") {@>
<%=odiRef.getSchemaName( "D" )%>.TABLE_DEM
<@} else if ("<%=odiRef.getSession( "SESS_NAME" )%>" == "PACKAGE_C") {@>
<%=odiRef.getSchemaName( "D" )%>.TABLE_BOL
<@} else {@>
<%=odiRef.getSchemaName( "D" )%>.TABLE_SYS
<@ } @>
where FL = 'N'
Thanks. -
How create a variable with not like 'Virtual'
I'm creating a report and my requirement is to select all plant names wich does not have 'VIRTUAL' word in the name. Can you tell me how to do this?
Can you tell me how to create a variable and what to have in it?
Thanks,
PVDear P V,
The variable processing types are,
1)Manual Entry/Default Value
2)Replacement Path
3)Customer Exit
4)SAP Exit
5)Authorizations
OverView
http://help.sap.com/saphelp_nw04s/helpdata/en/cf/579b3c494d8e15e10000000a114084/frameset.htm
Check this Link for more
http://help.sap.com/saphelp_nw04s/helpdata/en/61/579b3c494d8e15e10000000a114084/frameset.htm
Check this for Replacement Path,
http://www.sd-solutions.com/documents/SDS_BW_Replacement
http://help.sap.com/saphelp_nw04/helpdata/en/ca/5f9ac61a205a459d0e7ef313d10321/frameset.htm
You can find details about variables here:
http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a56a7e09411d2acb90000e829fbfe/content.htm
You can see the following link for details on processing types .
http://help.sap.com/saphelp_nw04/helpdata/en/61/579b3c494d8e15e10000000a114084/content.htm
see the below links u can find examples as wel as good stuff
http://help.sap.com/saphelp_nw04/helpdata/en/5c/8db07d555411d189660000e829fbbd/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
replacement path
variables
Hope it helps
regards
bala -
Creating a variable with a dynamic name
I read a XML which has a unknown number of
TextFormat-Definitions.
I used Arrays to hold the data. Every time the TextFormat
should be used, I overwrite a temporary one with the data i hold in
the array and then I apply this format to the specific text.
Now I want to optimise this and create TextFormats at once
which can be applied when needed, without all the conversion.
The best way I can think of is by having
dynamic names for the
TextFormats for the user to call.
I can't use the way I did in AS2:
var ["TF_"+string]:TextFormat = new TextFormat(x,y,z);
How is the
right Syntax in ActionScript3.0?Yeah, the Application class is no longer dynamic, so you can
just add members on the fly.
You could create an "associative array" (object), and store
the formats in that, keyed by 'string". Associative arrays are like
hash tables and are efficient at looking up values by key.
I have heard of but not used Dictionary objects.
Tracy -
How to create a report with dynamic columns
Hi all,
I am using Apex 4.0 with Oracle 10g
I am creating a report and I need to display columns dynamically based on the item values.
example:
I have a table employee with columns name, designation, sal
In the report page i have a select list with designations and when I select a designation from the select list,
I need to display the names of the employees horizontally,
like each name as a new column in the report with that particular designation. and same has to continue when I select different designations.
Can some one help me how we can do that.
I appreciate your answer
Thanks,
RikEssentially you want to write a pl/sql function which returns a varchar2 string. The contents of the string must be a valid sql statement.
Once you have done this, you need to add a report region as type sql report and you will have the option of writing it as a query or as a function returning query. Choose function returning query and enter in the function call.
Note your function must be valid, and must be executable by your apex parsing schema.
example:
create or replace
function test_report( p1_tablename in varchar2)
return varchar2
is
v_query varchar2(4000);
begin
v_query :=
'SELECT * from '||p_tablename;
return v_query;
end test_report;Edited by: Keith Jamieson on Aug 15, 2011 4:50 PM -
Create export-csv with dynamic (unknown amount) columns
Hi,
This is my first post, hopefully I include everything you need. My code block is at the bottom of my post.....
I have written a PS script that gives me the info I need, but I would like to format it differently. Currently I import a CSV with 2 columns - username and print queue name. The script then takes each username and looks it up in SCCM
to find the workstations the username has logged into. I then export to csv - this is where I would like to format it differently. The export csv has 4 columns username, print queue name, workstation name, and details.
username1,printqueue,workstation1,details
username1,printqueue,workstation2,details
username2,printqueue,workstation1,details
username2,printqueue,workstation2,details
My problem is that if the user logs into 5 workstations I have 5 rows with duplicated username and print queue name. If my next username logs into 8 workstations I have 8 rows, etc. I would like to format the export dynamically using as many
columns (not rows) as need. For example
username1, printqueue,workstation1,workstaion2, workstation3
username2,printqueue,workstation1,workstation2, workstation3,workstation4
I expect where I have my pscustomobject would be where I could change this - I have tried setting up a count variable and using that in my loop to be able to assign dynamic column name, I have tried using an array but still new to setting that up, maybe
I just wasn't doing it correctly. If anyone has any ideas that would be great.
Thanks, Kevin
Here is my code:
#Declare variables
$now = Get-date
$date = get-date -uformat "%Y_%m_%d_%I%M%p"
$Queues = Import-Csv "c:\Users.csv"
$SiteName="XXX"
$SCCMServer="your.sccm.server.com"
$SCCMNameSpace="root\sms\site_$SiteName"
$CSVPath1 = "c:\PrinterUsersByComputer_$date.CSV"
#Notify user that script is starting
Write-Host -ForegroundColor Green "Starting script"
#Loop through each account and find any workstations from SCCM that the user has logged into
foreach ($Queue in $Queues){
$Queue.Username
$WSs = Get-WmiObject -namespace $SCCMNameSpace -computer $SCCMServer -query "select Name from sms_r_system where LastLogonUserName = '$($queue.username)'" | Select-Object -ExpandProperty Name
#Check if the workstation variable has data
if ($WSs){
foreach ($WS in $WSs) {
#Check if workstation is ALIVE and if we have access to it to get OS version
$rtn = (Test-Connection -Cn $WS -BufferSize 16 -Count 1 -Quiet)
IF ($rtn -match 'True') {
$OS = Get-WmiObject Win32_OperatingSystem -ComputerName $WS | Select-Object -ExpandProperty Caption -ErrorAction Stop
#Write to screen device to show progress
Write-Host -ForegroundColor Green "Computer information found: $WS"
#Write to log file the username, workstation(s) logged into, and OS version
[PSCustomObject] [Ordered] @{
'UserName' = $Queue.Username
'Print Queue' = $Queue.PrintQueue
'ComputerName' = $WS
'Operating System' = $OS
} | Export-Csv $CSVpath1 -Append -NoTypeInformationOk, just a sec, I'm not sure we are on the same page. I don't think that isn't what I'm look for. Unless I'm missing something, your code above assume 4 workstation columns for every row. What if there is 5 or 8. My current output
from the full script is this (based on checking if PC is pingable, whether I'm denied the WMI query, etc)
UserName
Print Queue
ComputerName
Operating System
User1
PQ1
Computer1
Microsoft Windows 7 Enterprise
User1
PQ1
Computer2
Microsoft Windows 7 Enterprise
User1
PQ1
Computer3
Microsoft Windows 7 Enterprise
User1
PQ1
Computer4
Microsoft Windows 7 Enterprise
User1
PQ1
Computer5
Microsoft Windows 7 Enterprise
User1
PQ1
Computer6
Microsoft Windows 7 Enterprise
User1
PQ1
Computer7
Microsoft Windows 7 Enterprise
User1
PQ1
Computer8
Microsoft Windows 7 Enterprise
User1
PQ1
Computer9
Microsoft Windows 7 Enterprise
User1
PQ1
Computer10
Microsoft Windows 7 Enterprise
User1
PQ1
Computer11
Microsoft Windows 7 Enterprise
User1
PQ1
Computer12
Microsoft Windows 7 Enterprise
User1
PQ1
Computer13
No device name to query
User1
PQ1
Computer14
Microsoft Windows 7 Enterprise
User2
PQ2
Computer15
Microsoft Windows 7 Enterprise
User3
PQ3
Computer1
Microsoft Windows 7 Enterprise
User4
PQ4
Computer2
Access denied connecting to device. No access to it: Computer2
What I would really like is this, getting rid of the OS name for now:
User1
PQ1
Computer1
Computer2
Computer3
Computer4
Computer5
User2
PQ3
Computer1
User3
PQ13
Computer1
Computer2
I would just like to condense the workstations to columns instead of 1 workstation per row and be able to expand the # of columns required based on the amount of workstations in $WSs - -
How to create fillable PDF with dynamic content dropdowns?
I'm creating a March Madness bracket for people that don't really understand how they work. What I'd like to do is have dropdowns for each of bracket lines (they would list the teams playing against each other for that game and they would select who they think would win). I would then like the dropdown for the next game to auto-populate with only the two options for the next round.
For example, team A and team B play against each other and teams C and D play against each other. There are two separate dropdowns, one with A and B as choices and the other with C and D as choices. The user thinks A and C will win their games, so the next dropdown would only have the options of selecting A and C. To illustrate:
AA and B are listed in the dropdown, and the user selects A to win.
BA or C are listed in the dropdown because the user has selected A and C to win their previous games.
CC and D are listed in the dropdown, and the user selects C to win.
D
I can make the first round dropdowns just fine, but I'm not sure how to conditionally/dynamically populate the second round dropdowns based off of user selections.I don't understand your request but my english is not the best.
But here you can see a script. You can copy this in the first dropdown in the exit-event.
In this example you will give the first dropdwon the entries
"123"
"345"
"678"
The first case describes what happens when the user clicks "123" the second drowdown will get the entries "456" and "789".
When the user clicks "456" the second drowdown will get the entries "123" and "789".
I think you can adapt this script as you need.
Hope I could help a little bit,
Mandy
switch (xfa.event.newText)
case "123":
DropdownListe2.clearItems();
DropdownListe2.addItem("Please select a value");
DropdownListe2.addItem("456");
DropdownListe2.addItem("789");
DropdownListe2.selectedIndex = 0;
break;
case "456":
DropdownListe2.clearItems();
DropdownListe2.addItem("Please select a value");
DropdownListe2.addItem("123");
DropdownListe2.addItem("789");
DropdownListe2.selectedIndex = 0;
break;
case "789":
DropdownListe2.clearItems();
DropdownListe2.addItem("Please select a value");
DropdownListe2.addItem("123");
DropdownListe2.addItem("456");
DropdownListe2.selectedIndex = 0;
break;
default:
break; -
How would I create a PDF with dynamic spelling notations intact?
Hi Everyone,
Is there a way to print a PDF version of everything I see on the screen when I run the Dynamic Spellcheck in InDesign? I'd like to send everyone on my staff a PDF proof that includes all of the spelling suggestions.
I would be extremely grateful for your help. Nothing I've tried seems to work, and this forum is my last hope. Thank you!
BrianCheck this site: http://www.kerntiff.co.uk/products-4-indesign/spellproof-id
Using it, and it works great. There is an option for highlighting words which can be turned off, if you just want the dynamic "squiggles".
It works with printing, but if you want a PDF you have to create the PDF as a postscript and then distill it. -
Controlling SWFs with dynamic lengths
I need to load SWF applications into my Director files.
Currently, I am using the timeline with an arbitrary amount of
time. My problem is that the length (playtime) of these SWFs are
dependent on the end-user interactivity. If they press every
button, answer every questions, etc… one viewer could be done
in 5 minutes and another user could be done in 30 minutes. I have
no way of determining. Currently, my timeline will run out and I
send the users to a Menu screen. Is there a way to dynamically load
a SWF and have it play indefinitely? I will have a button on the
screen if the use wishes to exit early.
Thanks in advance for any help with this problem!-
|rossimo|EDIT: After
trying out Rafael's suggestions, it looks like that has solved my
problem. Thanks for the help Rafael!!
Thanks for the reply Rafael!-
No suggestion would be dumb. I am a Flash user trying to get
terms with Director 11. I am still trying to wrap my head around
the differences in timelines. I would have thought that would stop
the playback of the SWF, but I think you may be correct! I will
give that a shot and report back. More to come...
|rossimo| -
Calling variables with dynamic names
so lets say theres 5 variables,
name1 = "james";
name2 = "billy";
name3 = "nilly";
name4 = "dilly";
name5 = "alfred";
is there any way to enumerate through those names by doing something like this...
for(i=1;i<6;i++){
System.out.println(["name"+i]) // where ["name"+i] uses variable name1, name2, name3 etc...
ending up with something like
james
billy
nilly
dilly
alfred
i know its possible to do it in some other programming languages, and if java can do it too, it'd be very useful to me.woops - noticed I was in New To Java...
You can search for this, the question came up quite a bit some time back.
Use an implementation of Map (like HashMap) and call the put method with the name you want as a key and the value as a value. You can then call get with the name to get the value, or you can iterate over the key set to do what you're after.
Or, you could create a "Name" array (or List) and the you get "name0", let's say, by saying "name[0]" or nameList.get(0).
Make sense?
Good Luck
Lee
Maybe you are looking for
-
Hi All, We have created two select option fields for Billing Documnet(VBRP-VBELN) and Billing document Item (VBRP-POSNR). <b> SELECT-OPTIONS : V_VBELN FOR VBRP-VBELN , "Billing Document Number V_POSNR FOR VBRP-POSNR . "Billin
-
Hi everyone, Am beginner of ale idoc can anyone clear my doubts. 1)In an idoc How to get a value for a particular field in a segment which system is not generating.But a field exist for it. For Eg. I want a field(TLCCAT) in the idoc(TPSLOC).But it is
-
Hi again, anyone knows if there is any universal-and-generic servlet, for any application server, that is able to translate an xml file using xsl templates? In fact, our problem is that we are trying to port our application (developed using XML and X
-
Printing a 31x220 inch pdf map
I am trying to print a pdf map, 31x220 inches. It prints just over 100 inches and stops on my OCE plotter. Any ideas?? Thanks, Nick
-
Script : Crops and name one image
Hello there, I'm completely new with scrip on photoshop.. I know there is a way to use one image for different crops and name them. There is no batch involve. Which means : -Click on the script, a croping open, crop it, got a message saying if the cr