Pass value at run time from one structure to diffrent structure
hi experts.
i m workin on crm domain and faching problem to pass value from one stucture to another . problem is that i want the output in xml file so i need all the values interm of segment.
initialy i have this structure.
DATA: BEGIN OF struc1 occurs 0,
ST_ORDERADM_H TYPE CRMT_ORDERADM_H_WRKT,
ST_PRICING TYPE CRMT_PRICING_WRKT,
ST_ORGMAN TYPE CRMT_ORGMAN_WRKT,
ST_PARTNER TYPE CRMT_PARTNER_EXTERNAL_WRKT,
END OF struc1.
and using fm CALL FUNCTION 'CRM_ORDER_READ' i got values on this structure at run time.
MOVE LT_ORDERADM_H to STRUC1-ST_ORDERADM_H.
MOVE LT_ORGMAN to STRUC1-ST_ORGMAN.
MOVE LT_PARTNER to STRUC1-ST_PARTNER.
MOVE LT_PRICING to STRUC1-ST_PRICING.
and after that using
try.
CALL TRANSFORMATION id
SOURCE data_node = STRUC1
RESULT XML xmlstring.
CATCH cx_st_error.
endtry.
CLEAR: tab_xstring,
lv_filename,
lv_path,
lv_fullpath,
lv_user_action.
REFRESH: tab_xstring.
lv_bytes = XSTRLEN( xmlstring ).
IF lv_bytes > 0.
lv_xstring = xmlstring.
DO.
APPEND lv_xstring TO tab_xstring.
lv_xcnt = XSTRLEN( lv_xstring ).
IF lv_xcnt > xsize.
lv_xstring = lv_xstring+xsize.
ELSE.
EXIT.
ENDIF.
ENDDO.
now it convert to xml file .
problem is it gives me value of all field associated with standared structure.
but client requirment is that he want only selected values of given structure.
so i think i make a new structure for given value but i m not able to get values in new structure.
thanks
Hi,
create a structure in se11 with following fields
ST_ORDERADM_H.
ST_ORGMAN.
ST_PARTNER.
ST_PRICING.
for example as STRUCT2.
data : begin of i_struct2 occurs 0.
include structure struct2.
data : end of i_struct2.
MOVE LT_ORDERADM_H to i_STRUCt2-ST_ORDERADM_H.
MOVE LT_ORGMAN to i_STRUCt2-ST_ORGMAN.
MOVE LT_PARTNER to i_STRUCt2-ST_PARTNER.
MOVE LT_PRICING to i_STRUCt2_PRICING.
then
try.
CALL TRANSFORMATION id
SOURCE data_node = i_STRUCt2
RESULT XML xmlstring.
CATCH cx_st_error.
endtry.
Similar Messages
-
Passing values at run time through a JSP page to selection formula to crystal report
<p>hi,</p><p> i am using one jsp page.in that page there is a field to select a date </p><p>this value will go to the report and report contain one selection formula.</p><p>which value we are passing on that basis the report should display</p><p>with date which we are passing from GUI.</p><p>help.............................................................</p><p>//R</p>
I believe the value of this is based on the owner of the scheduled object. So if the Admin is scheduling it on behalf of a user I think it should use the user the Admin scheduled on behalf of. It should be simple to test, simply create a report with this value being displayed and nothing else and see what values you get.
-
How Could I Pass Parameter at run time in form 10g???
I want to pass parameter value with run time,
Example:
When my form run I want to see only the employees of department 10,
& want to pass value 10 when my form run.
http://machine:port/forms90/f90servlet?form=c:\applications\doc_flow\doc_sign&userid=test/test@fil10g...........?
NajeebAlthough your example will work, it is not recommended to use blank spaced in a URL if it can be avoided. The preferred way of passing custom params would be to use the otherparams parameter. For example:
http://server/forms/frmservlet?form=helloworld&otherparams=param1=val1
If there are more than one parameter/value pair to pass, separate using a plus (+) sign. For example:
http://server/forms/frmservlet?form=helloworld&otherparams=param1=val1+param2=val2 -
How to pass values to dashboard prompts from external applications
Any idea is well appreciated.
How can I pass values of dashboard prompts from external applications to the dashboard prompts so that the dashboard is prefiltered based on values sent by external applications.
Thanks in Advance!
KrisKris,
i am able to change the session variable and able to call the dashboard from external app, but i identified prompt value not changing. but Finally i am able to found a workaround for you.
Use the following URL and it explained here
http://localhost:9704/analytics/saw.dll?Dashboard&nquser=Administrator&nqpassword=Administrator&PortalPath=/shared/abcd/_portal/dash1&Options=rmf&DSN=madan
PortalPath is your dashboard location. /shared/abcd is folder where i saved dashboards. dash1 is my dashboard name.
internally this dashboard includes many reports that uses the session variable. after doing above this i am able to update the session variable to the value i have given in URL, DSN=value.
You may observer here that calls the dashboard and passes the value but its not updating the prompt value. so workaround for this is edit your prompt,
change the Default to - SQL Results and place the sql
SELECT CASE WHEN 1=0 THEN Markets.Region ELSE VALUEOF(NQ_SESSION.DSN) END saw_0 FROM Paint
again here Market.Region is column from presentation layer and Paint is subject area. After doing this step, your prompt always shows value in the session varible as default.
Now include reports and dashboard prompt in the dashboard and run this url from external applicaitons.
http://localhost:9704/analytics/saw.dll?Dashboard&nquser=Administrator&nqpassword=Administrator&PortalPath=/shared/abcd/_portal/dash1&Options=rmf&DSN=madan
it worked for me and blog this soon. if it works for you mark the question as answered and mark my replies as correct.
thanks
- Madan -
Can I export my sidecar files to two or more hard drives at the same time from one computer?
Can I export my sidecar files to two or more hard drives at the same time from one computer? How do I do this, if it is possible?
Each image is imported into the LR Catalog from just one stated location on disk. And that is where the sidecar gets written.
But if you want, outside of LR, you can have a file sync utility replicate all physical changes within those folders on disk, into other corresponding locations on other drives - which hold a copy of all the same images, and a copy of the sidecars too. This might happen continuously, periodically or on demand depending on the particular tool you use... for example, the Dropbox desktop app.
If you also want to have your LR Catalog replicated, I think this can only be done when LR is not running and using that. -
How to change Crystal Reports XI database name at run time from ASP code using ADO
Dear All,
I need advises regarding to my problem below
I have two database in same SQL 2005 SERVER for TEST01 and LIVE01 Environtment, and I've created more than 100 reports with Crystal Reports 11 and call it from ASP classic page.
The problem is how can I change a database from TEST01 to LIVE01 at the run time from ASP code as I already using TEST01 database on Crystal Reports and I do not want to set a new database location inside crystal for each reports
Thanks and wait for your reply soon.
Below is my code, which has no effect to crystal reports although I've change the database from TEST01 to LIVE01:
<%
Dim oADOConnection, oRptTable, oADORecordset, sql
Dim struser, strpwd, strdriver, dblocation, dbname, strConnect
struser = "sa"
strpwd = ""
strdriver = "{SQL SERVER}"
dblocation = "SQL200501"
dbname = "LIVE01" ' Changed from TEST01 to LIVE01
strConnect = "User Id=" & strUser & ";"
strConnect = strConnect & "PWD=" & strPwd & ";"
strConnect = strConnect & "DRIVER=" & StrDriver & ";"
strConnect = strConnect & "SERVER=" & DBLocation & ";"
strConnect = strConnect & "DATABASE=" & dbName
sql="Select * from Employee"
Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
Set session("oRpt") = session("oApp").OpenReport("C:\REPORTS\RPT01.RPT", 1) 'USING TEST01 DATABASE
session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False
session("oRpt").DiscardSavedData
Set oADOConnection = Server.CreateObject("ADODB.Connection")
oADOConnection.Open (strConnect)
Set oADORecordset = Server.CreateObject("ADODB.Recordset")
Set oRptTable = session("oRpt").Database.Tables.Item(1)
oRptTable.SetDataSource oADORecordset, 3
session("oRpt").SQLQueryString = CStr(sql)
session("oRpt").ReadRecords
%>Did you ever find a solution to this problem? I have the same problem when moving reports from development to Test to Production environments. If the DBName is not the same the report ignores the name provided at runtime.
-
How to call & pass values to custom page from seeded page table region
Hi All,
can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
it is urgent. plssss
Regards,
purnaHi,
Yes, we do this by extending controller, but you can also try this without extending controller.
1. Create Submit Button on TableRN using personalization.
2. Set "Destination URI" property to like below
OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
Give your custom page path instead of EmpDetailsPG.
EmployeeId and EmployeeName are VO attributes(Table Region)
If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
In this case, only personalization will do our job. Hope it helps.
Thanks,
Venkat Y. -
Running two stepper motors at the same time from one port
Hello,
I have to run two motors at the same time - one used to move a linear ball screw and one to turn a grip. I am doing tension and torsion testing on small wires, but tension and torsion have to be done at the same time. I also have to build in the ability for each motor to take multiple steps, ie. have a motor take x number steps at y velocity and then move x number of steps at z velocity. Both motors need to be able to do this. However, I am having problems getting the motors to run at the same time and to take all the steps. The motors are connected to two RMS Technologies R356 controllers. Both of the controllers are then connected to one RS485 to USB converter card, and that card is connected to one of the USB ports in the computer. Currently, I pass an array of commands to two for loops each containing VISA read and writes. I've attached the vi to look at. All of the timing stuff in the code is because a new command cannot be sent to the controller before the motor is done executing the previous command. If commands are sent right after one another, the controller will only execute the first command and then return with an error.
Does anyone have a suggestion as to what I am doing wrong?
Thanks in advance for any help.
Solved!
Go to Solution.
Attachments:
Motor Controller (Sub VI 3).vi 41 KBI'm not too clear on exactly what you are trying to accomplish or some of the details.
Are there equal number of torsion and tension steps?
Is there a pairing between a torsion and tension? For example, you want to tension and torsion simultaneously, but those two together make a complete step?
Do you want to wait until both the torsion and tension have completed before moving on to the next torsion/tension pair?
Is there any time delay you want to hold at before moving on to the next step.
When working with state machines, it is important not only to define the states, but also the logical stepping from one state to the next, or alternatives based on conditions. It could be flowchard, but sometimes people call them state charts.
Right now your latest posting has goes to "Write to Motor" event though and will wait there forever because there is nothing in the queue to write out through the VISA port.
Let's assume your first state would happen to be Enqueue Tension (in order to get something in the queue), you will actually queue up all your tension commands at once with the For loop. Then i will be 1 less than the size of the array it always will be because for an array size n, i will go from 0 to n-1 on each iteration. So your false case will run and you will go to "Write to Motor". Write to Motor will run and dequeue the first command then go to Waiting for Response. Waiting for response will iterate through the while loop until 66 or 67 comes back. I assume only 66 will come back for tension since you have yet to write a torsion command. Once that comes back, it will go to Enqueue Tension again and insert a whole other series of commands. Then go back to write Motor and will take out the 2nd queue element from the first set of commands your wrote. It will stay in a Tension mode and the Queue will grow endlessly putting in a whole new series for each element that you dequeue.
A state machine is the way to go, but I can't really sketch one out for you because I'm not sure exactly how your applications is supposed to work. If a tension and torsion command are paired together, perhaps you should just queue them together and write them out at once. But the key thing is to sketch out on paper your application and flowchart exactly how the program should progress from step to step.
PS: One other thing, make sure you wire the queue reference wire through all states. -
Select more than one value at a time from an LOV?
Is it possible to configure an LOV-based text field so more than one value at a time can be chosen from the drop-down LOV list? This is a user requirement for specifying multiple values in an SQL WHERE clause.
Rather several select fields because single returned value is a functional limitation of <select>.
-
How to load the object library at run time from within the script.
What i am trying to do from my library is that I wanted to load the object library file (.properties) file at run time through the script. I know that open script has a deprecated method "ft.loadObjectLibrary". Is there any other method other than the deprecated one?. Also is there a way that I can unload the library?
Thanks,
SriObject.border.fill.color.value = "255,255,255";
if you want to use rawValue of textfields to insert in there you will have to do
Object.border.fill.color.value = R.rawValue + "," + G.rawValue + "," + B.rawValue -
hi friends
I have created zattribute for business object and i have delegated. when i debug the zattribute(ZSUBTYPE) its getting the value.Am using the zsubtype in my mail step to get the subtype.. But at run time am not getting any value in zsubtype but business object(EMPLOYEET) is getting filled Only my zsubtype attribute is not getting filled . I found this from the log. .
Regards
vijayhi Arghadip
I have created my custome virtual attribute namely zsubtype without any database refernce or object type. Inside the attribute i have written a code calculate the subtype of the applicant
My logic is
From these ptreq_header,ptreq_items,ptreq_attabsdata tables am calculating am getting the subtype of the leave and passing this as input to the function module which gives the output has text of the subtype. setting this text my container element. The statement is
SWC_SET_ELEMENT CONTAINER 'TEXT' ITAB-TEXT.
OBJECT-ZSUBTYPE = ITAB-TEXT.
SWC_SET_ELEMENT CONTAINER 'ZSUBTYPE' OBJECT-ZSUBTYPE.
when i hard code the request id and pernr and debug its working fine. My text is filling the object-zsubtype. But at run time its not filling.
am using zsubtype in my mail step only to get the subtype text. All the attribute at runtime its fills only my zsubtype attribute is not filling. I found it from log.
What is the way to solve this
Regards
vijay -
ORA-06502: PL/SQL: numeric or value error(Run Time Error)
Hi,
Intially the table structure goes something like this.
CREATE TABLE CLARITY_RESPONSE_LOG
REQUEST_CODE NUMBER,
RESPONSE_FILE BLOB,
DATE_CRATED DATE NOT NULL,
CREATED_BY NUMBER NOT NULL,
UPDATED_BY NUMBER DEFAULT 1,
)The content of the RESPONSE_FILE column which is a BLOB data type has some XML content(XML file).
The compiled proc which uses the above table is as follows.
CREATE OR REPLACE PROCEDURE "MWF_ONLINE_RESPONSE_XML"
AS
v_file UTL_FILE.FILE_TYPE;
v_text VARCHAR2 (20);
v_filename VARCHAR2 (200);
v_delimitedchar CHAR (1);
----log
v_process_name VARCHAR2(100) := 'MWF_ONLINE_RESPONSE_XML';
v_sqlerrorcd VARCHAR2(10);
v_sqlerrormsg VARCHAR2(255);
v_seq_auto_email_job NUMBER;
v_cnt NUMBER := 0;
v_user_name VARCHAR2(30);
BEGIN
--- for log use
SELECT sys_context('USERENV','OS_USER') INTO v_user_name FROM dual;
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'STA',
SYSDATE,
v_user_name);
v_delimitedchar := CHR (124);
v_filename := 'online_response_xml.txt';
v_file := UTL_FILE.FOPEN ('MWF_DATA_EXTRACTS', v_filename, 'W');
UTL_FILE.PUT_LINE
(v_file,
'online_response_xml'
FOR online_response IN
(SELECT XMLTYPE (response_file, NLS_CHARSET_ID ('char_cs')).getclobval () AS Online_Respone_xml
FROM CLARITY_RESPONSE_LOG
WHERE TRUNC(date_crated ) = TRUNC(SYSDATE-1)
LOOP
UTL_FILE.PUT_LINE (v_file, online_response.Online_Respone_xml);
v_cnt := v_cnt + 1;
END LOOP;
UTL_FILE.FCLOSE(v_file);
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
cnt,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'COM',
SYSDATE,
v_cnt,
v_user_name);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
v_sqlerrorcd := SQLCODE;
v_sqlerrormsg := SUBSTR(SQLERRM,1,255);
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
error_msg,
error_id,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'ERR',
SYSDATE,
v_sqlerrormsg,
v_sqlerrorcd,
v_user_name);
COMMIT;
END;The above code has been compiled without any compilation errors but at run time I am getting the error:
ORA-06502: PL/SQL: numeric or value error.
Is it because of below statement in the above proc:
SELECT XMLTYPE (response_file, NLS_CHARSET_ID ('char_cs')).getclobval () AS Online_Respone_xml
FROM CLARITY_RESPONSE_LOG
WHERE TRUNC(date_crated ) = TRUNC(SYSDATE-1)Please advicevine wrote:
Is it because of below statement in the above proc:
SELECT XMLTYPE (response_file, NLS_CHARSET_ID ('char_cs')).getclobval () AS Online_Respone_xml
FROM CLARITY_RESPONSE_LOG
WHERE TRUNC(date_crated ) = TRUNC(SYSDATE-1)Please adviceto see where the line code that gets the error try using dbms_output.put_line() and before you run your procedure use the SQL*Plus command set serveroutput on. see this example below using the dbms_output.put_line().
CREATE OR REPLACE PROCEDURE "MWF_ONLINE_RESPONSE_XML" AS
v_file UTL_FILE.FILE_TYPE;
v_text VARCHAR2 (20);
v_filename VARCHAR2 (200);
v_delimitedchar CHAR (1);
----log
v_process_name VARCHAR2(100) := 'MWF_ONLINE_RESPONSE_XML';
v_sqlerrorcd VARCHAR2(10);
v_sqlerrormsg VARCHAR2(255);
v_seq_auto_email_job NUMBER;
v_cnt NUMBER := 0;
v_user_name VARCHAR2(30);
BEGIN
--- for log use
SELECT sys_context('USERENV','OS_USER') INTO v_user_name FROM dual;
dbms_output.put_line('1');
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'STA',
SYSDATE,
v_user_name);
dbms_output.put_line('2');
v_delimitedchar := CHR (124);
v_filename := 'online_response_xml.txt';
v_file := UTL_FILE.FOPEN ('MWF_DATA_EXTRACTS', v_filename, 'W');
UTL_FILE.PUT_LINE(v_file,'online_response_xml');
dbms_output.put_line('3');
FOR online_response IN
(SELECT XMLTYPE (response_file, NLS_CHARSET_ID ('char_cs')).getclobval () AS Online_Respone_xml
FROM CLARITY_RESPONSE_LOG
WHERE TRUNC(date_crated ) = TRUNC(SYSDATE-1)) LOOP
UTL_FILE.PUT_LINE (v_file, online_response.Online_Respone_xml);
v_cnt := v_cnt + 1;
dbms_output.put_line('4');
END LOOP;
UTL_FILE.FCLOSE(v_file);
dbms_output.put_line('5');
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
cnt,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'COM',
SYSDATE,
v_cnt,
v_user_name);
COMMIT;
dbms_output.put_line('6');
EXCEPTION
WHEN OTHERS THEN
v_sqlerrorcd := SQLCODE;
v_sqlerrormsg := SUBSTR(SQLERRM,1,255);
INSERT INTO PROCESS_ERROR_LOG
(seq_num,
process_name,
status,
process_date,
error_msg,
error_id,
user_name)
VALUES (seq_dataxprocesslog.NEXTVAL,
v_process_name,
'ERR',
SYSDATE,
v_sqlerrormsg,
v_sqlerrorcd,
v_user_name);
COMMIT;
END; -
Hi,
I am trying to adding domain values to DVM at run time,
it is getting added to DVM at that movement ,bt
when i redeploy the service I am not able to see the changes.
so help required regarding thisHello
That is the solution to his problem, by the sounds of it when he redploys his code he gets the old values (the one in his code) if he migrates it to the MDS when he redeploys it won't change. This will seperate his deployment from run time configuration values which is a good idea.
Best Regards Tristan -
How can I build a table with the time values of a timer from a while loop
Hi:
I have a question concerning building a table:
Every 100ms I read a value from a sensor (while loop with a timer). I would like to build a table with the actual time and the concerning value. For example:
0msec 1V
100msec 2V
200msec 3V
300msec 4V
etc.
If I use the Express VI for building a table, I always get the date and time, but I don't need the date and the time is in the following format: HH:MMS, which is nonsensical for me as I can't differentiate within msec. Can I change the format anywhere?
Can I also save the table to a file or even to an Excelsheet? How can I do that?
Thanks for your help!Hi Craig:
thank you very much. To solve the mystery : ) :
I want to drive a stepper motor with a specific frequency. To get the current degree value of the motor I would like to measure the current time (from the beginning of the move on). (With a formula I get the degree value out of the time)
Concurrently I would like to get data from a torque sensor and from a pressure sensor. That's why I asked you about the time and the table. The measurement should start with the movement of the motor. How can I do that? Right now I have different block diagrams (different while loops) (see attachment) and I would like to put them in one.
I haven't done the block diagram for the pressure sensor yet, so there is only the one for the torque sensor and the one for the motor.
I also would like to set a mark in the table when the voltage value of an analog input gets under a specific threshold value. Is that possible?
I'm sorry, I'm a novice in LabVIEW. But maybe you can help me.
Thank you very much!
Steffi
Attachments:
motor.vi 238 KB
sensor.vi 59 KB -
Variable to hold the value at run time
Dear Friends,
I have a requirement in customer ageing report to select a particluar record from the cube based on the record selected by the query. Is there any option for holding a value of the dimension selected by the query in to a variable at run time. kindly let me know if am not clear.
Thanks
Premyou want to :
Exeute a query - this will select a particular record and this is to be used to select another reord from a cube. I assume that the seletion from the cube will also happen through a query - then try using a prequery - have a variable on the query on the cube which is filled using replacement path from the previous query..?
Maybe you are looking for
-
Report should run on "As On Date"
Hi, I have created a WEBI report connected to BEX Query, which displays Sales Value within Calendar Days between From Date and To Date (User Prompts). The requirement is to have From Date should display "1st Day of the Month with respect to the Curre
-
Create another purchase order for a material ordered in full
Hello friends, I have a little MM question for you. I've created a purchase requisition with a material A and quantity 100 UN I've then created a purchase order in reference to this PR. This PO has been released. Is it possible, in standard SAP, to c
-
Error in SXMB_MONI AS2--- PI --- ECC
Hi All, My scenario is AS2---> PI ---> ECC. I wrote a server proxy and tested, its working fine. While testing from PI RWB in integration server, messages got processed successfully from PI to ECC. But I am getiting below error in SXMB_MONI . Error w
-
"Scanner not installed" problem
I'm using a G-5, running 10.4.11 I use an Epson Expression 1600 scanner in Photoshop (CS3). The last time I used it, as the image finished scanning and appeared on the screen, the computer crashed. (Kernal panic). Since then, I've been unable to use
-
Is there a way to change the color scheme on charts in IOS numbers?