BAPI/FM to display data(result) in spool
Hi all,
I am using bapi BAPI_REQUISITION_DELETE to set deletion flag of PR.
Here all the error messages are captured and i need to display that resulttant error data in spool.
How can I dispaly resultant error message captured by BAPI in Spool.
Is there a FM/BAPI or i shld be using Simple write statement.
Hi Sachin,
Check with the simple write statement.
If you run this report program in back ground job, then this
should work.
If it doens't work, there are few class methods to handle this.
Regards,
Dinakar.
Similar Messages
-
Need to display date result but has to exclude sat & sun day
Hi all,
I need to display date (A), from the plan date (B) for qty more than 10, but the result of A, should be B -10 and should not include sat & sunday.
I managed to do in excel but I have problem in oracle sql here.
My quote in excel, =IF(qty<=10, WORKDAY(plan_date,-5), WORKDAY(plan_date,-10))
If qty=12, plan_date is 30/05/11, the result is 16/05/11
qty=2, plan_date is 30/05/11, the result is 23/05/11
Anyone can help me to quote in SQL ?
Thanks.
LimCREATE OR REPLACE FUNCTION GOKHAN.business_date (start_date DATE, days NUMBER)
RETURN DATE
IS
counter number := 0;
curdate DATE:= start_date;
BEGIN
WHILE counter < days
LOOP
curdate := curdate - 1;
IF TO_CHAR (curdate, 'D') BETWEEN 1 AND 5
THEN
dbms_output.put_line( curdate || ' ' || TO_CHAR (curdate, 'D'));
counter := counter + 1;
END IF;
END LOOP;
RETURN curdate;
END;
with t as (
select to_date('30/05/11','DD/MM/YY' ) plan_date, 12 qty from dual
union all
select to_date('30/05/11','DD/MM/YY' ) , 2 from dual
select qty, case when qty <= 10 then business_date( plan_date, 5 ) else business_date( plan_date, 10 ) end plan_date from t;
QTY PLAN_DATE
12 16/05/2011
2 23/05/2011Best Regards,
Gokhan Atil
If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks -
Display data in EP using BAPI- BAPI_PO_GETITEMSREL
hi all!!
I need to display data in EP from R/3 and i'm using a BAPI mentioned in subject for it ,can anybody provide the step by step instructions.
eagerly waitin
sachinHi Sachin,
Go through the step by step tutorial for the WebDynpro application creation from following link.
You can then create your application in Netweaver development studio Webdynpro.
Link:
http://help.sap.com/saphelp_nw04/helpdata/en/c3/76b45d9688e04abe1a1070410ddc1e/content.htm
Regards,
Tejas -
How to Read the one Source Column data and Display the Results
Hi All,
I have one PR_ProjectType Column in my Mastertable,Based on that Column we need to reed the column data and Display the Results
Ex:
Pr_ProjectType
AD,AM
AD
AM
AD,AM,TS,CS.OT,TS
AD,AM
like that data will come now we need 1. Ad,AM then same we need 2. AD also same we need 3. AM also we need
4.AD,AM,TS,CS.OT,TS in this string we need AD,AM only.
this logic we need we have thousand of data in the table.Please help this is urgent issue
vasuHi Vasu,
Based on your description, you want to eliminate the substrings (eliminated by comma) that are not AD or AM in each value of the column. Personally, I don’t think this can be done by just using an expression in the Derived Column. To achieve your goal, here
are two approaches for your reference:
Method 1: On the query level. Replace the target substrings with different integer characters, and create a function to eliminate non-numeric characters, then replace the integer characters with the corresponding substrings. The statements
for the custom function is as follows:
CREATE FUNCTION dbo.udf_GetNumeric
(@strAlphaNumeric VARCHAR(256))
RETURNS VARCHAR(256)
AS
BEGIN
DECLARE @intAlpha INT
SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric)
BEGIN
WHILE @intAlpha > 0
BEGIN
SET @strAlphaNumeric = STUFF(@strAlphaNumeric, @intAlpha, 1, '' )
SET @intAlpha = PATINDEX('%[^0-9]%', @strAlphaNumeric )
END
END
RETURN ISNULL(@strAlphaNumeric,0)
END
GO
The SQL commands used in the OLE DB Source is like:
SELECT
ID, REPLACE(REPLACE(REPLACE(REPLACE(dbo.udf_GetNumeric(REPLACE(REPLACE(REPLACE(REPLACE([ProjectType],'AD,',1),'AM,',2),'AD',3),'AM',4)),4,'AM'),3,'AD'),2,'AM,'),1,'AD,')
FROM MyTable
Method 2: Using a Script Component. Add a Derived Column Transform to replace the target substrings as method 1, use Regex in script to remove all non-numeric characters from the string, add another Derived Column to replace the integer
characters to the corresponding substring. The script is as follows:
using System.Text.RegularExpressions;
Row.OutProjectType= Regex.Replace(Row.ProjectType, "[^.0-9]", "");
References:
http://blog.sqlauthority.com/2008/10/14/sql-server-get-numeric-value-from-alpha-numeric-string-udf-for-get-numeric-numbers-only/
http://labs.kaliko.com/2009/09/c-remove-all-non-numeric-characters.html
Regards,
Mike Yin
TechNet Community Support -
BAPI for displaying data of standard tables
Dear All,
Could anybody tell me the name for BAPI to display data in standard tables
i.e. import : table name and
fields
Output : table entries ( data in those tables )
thanks.........why dont u write ur own code for tht
in the selection screen take the name of table now use a field symbol to create an internal table of type tht table now use select query to get the data -
Display data of query in Analysis Process Designer mismatch query result
Hi experts,
I am having an issue with APD.when ii am display data of the query in apd i am having wrong values for key figures.
any solutions?
ThanksHi,
after doing a check by restricting data in the query, I see that the condition I have set in the query, to only give me the data where keyfigure X <= 2, the DSO is updated with all the values. So it seems that conditions in queries are ignored by the APD. Does anybody know anything more about this? Then I can understand why the job was taking so much time...
Regards,
Øystein -
SQL*plus not displaying the result of XMLELEMENT
HI,
I am using SQL*Plus: Release 10.1.0.4.2
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0
When I run the following query in SQL*PLUS, I get nothing displayed. However when I run the same query connecting to the same database using SQL Developer then I get the result
SQL> select XMLELEMENT("form_id",form_id)
2 FROM collections;
XMLELEMENT("FORM_ID",FORM_ID)
In SQL developer
<form_id>101</form_id>
I set long and longchuncksize to 32K , and I change linesize, pages, but nothing helped
Is there any configuration that I have to do, so that SQL*plus display the result of “ select XMLELEMENT("form_id",form_id) query.
Appreciate you help, thanksFrom a fresh start ;) :
SQL*Plus: Release 10.1.0.4.2 - Production on Fri Feb 26 15:29:04 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> select xmlelement("value", a.object_name )
2 from all_objects a
3 where rownum <= 5;
XMLELEMENT("VALUE",A.OBJECT_NAME)
SQL> select xmlelement("value", (select b.object_name
2 from all_objects b
3 where b.object_name = a.object_name
4 )
5 )
6 from all_objects a
7 where rownum <= 5;
XMLELEMENT("VALUE",(SELECTB.OBJECT_NAMEFROMALL_OBJECTSBWHEREB.OBJECT_NAME=A.OBJE
<value>ICOL$</value>
<value>I_USER1</value>
<value>CON$</value>
<value>UNDO$</value>
<value>C_COBJ#</value>
SQL> show all
appinfo is OFF and set to "SQL*Plus"
arraysize 15
autocommit OFF
autoprint OFF
autorecovery OFF
autotrace OFF
blockterminator "." (hex 2e)
btitle OFF and is the first few characters of the next SELECT statement
cmdsep OFF
colsep " "
compatibility version NATIVE
concat "." (hex 2e)
copycommit 0
COPYTYPECHECK is ON
define "&" (hex 26)
describe DEPTH 1 LINENUM OFF INDENT ON
echo OFF
editfile "afiedt.buf"
embedded OFF
escape OFF
FEEDBACK ON for 6 or more rows
flagger OFF
flush ON
heading ON
headsep "|" (hex 7c)
instance "local"
linesize 80
lno 9
loboffset 1
logsource ""
long 80
longchunksize 80
markup HTML OFF HEAD "<style type='text/css'> body {font:10pt Arial,Helvetica,sans-serif; color:blac
newpage 1
null ""
numformat ""
numwidth 10
pagesize 14
PAUSE is OFF
pno 1
recsep WRAP
recsepchar " " (hex 20)
release 1002000300
repfooter OFF and is NULL
repheader OFF and is NULL
serveroutput OFF
shiftinout INVISIBLE
showmode OFF
spool OFF
sqlblanklines OFF
sqlcase MIXED
sqlcode 0
sqlcontinue "> "
sqlnumber ON
sqlpluscompatibility 10.1.0
sqlprefix "#" (hex 23)
sqlprompt "SQL> "
sqlterminator ";" (hex 3b)
suffix "sql"
tab ON
termout ON
timing OFF
trimout ON
trimspool OFF
ttitle OFF and is the first few characters of the next SELECT statement
underline "-" (hex 2d)
USER is "HR"
verify ON
wrap : lines will be wrapped
SQL>
{code} -
Displaying the result of the TOP N query
Hi all,
we are facing a challenging task were we are going to build a query that gives the answer on the question:
How many different materials (of the top sold) represent 80% of the total sales in quantity?
The result should of the query should be very short:
2002 2003 2004
Nr of materials
reps 80% 432 453 499
The query is build on a CO-PA based cube, where each line corresponds to a billing item with material and quantity.
By using a Top 80% condition on the quantity sold keyfigure we get out the top 80% materials sold:
Year Material QTYSold QTYSold-Ranked
2002 Mtr0323 10000 1
Mtr0262 9000 2
Mtr0243 8700 3
Mtr0763 600 423
Result 932000 423
2003 Mtr0123 9700 1
Mtr0332 9100 2
Mtr0243 8700 3
Mtr0763 543 453
Result 912000 453
We would like to supress the materials and only show the result row (or the raked position of the last material).
The problem is that the 'Calculate Single Value As' properties of a formula (or keyfigure) only applies on Displayed Data values. All tests we have done so far with 'supression of zeros' & 'always hide' has messed up or counting / ranking functions.
Is there any function in within formulas that have same functionality like Count,Rank etc?
Is there any other way to supress materials and only show results?
Any suggestions are welcome!Irina,
Should be achievable using exception aggregation and pre-query.
Create a query that gives the list of material that account for 80% of the sales using condition on the sales column.
In the second query, using exception aggregation, count the number of materials that make up this set for the year. Create a new calculated key figure with the formula as qual to sales key figure. In the properties window, press the enhance button and select count of all values in the first drop down and material in the second drop down. Filter the query on material with a characteristic variable with processing as replacement path. In the variable point it to the first query. Drilldown for this will be year.
This will give you number of materials for one year. If you want comparitive for three years, then three pre-queries and three variables with the calculated key figure restricted to a variable pointing to one years query.
You can use pre-calculated value sets to improve the run for the result query.
Cheers
Aneesh -
Unable to display data no entry in the table without using Model clause
Hi,
I've an urgent requirement described below :
The previously posted Question has been answerted using Model Clause:
Is there any way out to solve it without using Model clause:
I've a table named as "sale" consisting of three columns : empno, sale_amt and sale_date.
(Please ref. The table script with data as given below)
Now if I execute the query :
"select trunc(sale_date) sale_date, sum(sale_amt) total_sale from sale group by trunc(sale_date) order by 1"
then it displays the data for the dates of which there is an entry in that table. But it does not display data for the
date of which there is no entry in that table.
If you run the Table script with data in your schema, then u'll see that there is no entry for 28th. Nov. 2009 in
sale table. Now the above query displays data for rest of the dates as its are in sale table except for 28th. Nov. 2009.
But I need its presence in the query output with a value of "sale_date" as "28th. Nov. 2009" and that of "total_sale" as
"0".
Is there any means to get the result as I require?
Please help ASAP.
Thanks in advance.
Create table script with data:
CREATE TABLE SALE
EMPNO NUMBER,
SALE_AMT NUMBER,
SALE_DATE DATE
SET DEFINE OFF;
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('12/01/2009 10:20:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/30/2009 10:21:04', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/29/2009 10:21:05', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/26/2009 10:21:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(100, 1000, TO_DATE('11/25/2009 10:21:07', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 5000, TO_DATE('11/27/2009 10:23:06', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 4000, TO_DATE('11/29/2009 10:23:08', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 3000, TO_DATE('11/24/2009 10:23:09', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(200, 2000, TO_DATE('11/30/2009 10:23:10', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 7000, TO_DATE('11/24/2009 10:24:19', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 5000, TO_DATE('11/25/2009 10:24:20', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 3000, TO_DATE('11/27/2009 10:24:21', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 2000, TO_DATE('11/29/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
Insert into SALE
(EMPNO, SALE_AMT, SALE_DATE)
Values
(300, 1000, TO_DATE('11/30/2009 10:24:22', 'MM/DD/YYYY HH24:MI:SS'));
COMMIT;
Any help will be needful for me
Regards,select sale_date,sum(sale_amt) total_sale
from
select empno,0 sale_amt,(sale_date + ao.rn) sale_date
from
select empno,sale_amt,sale_date ,(t.nxt_dt - t.sale_date) diff
from
select empno
,sale_amt,trunc(sale_date) sale_date
,trunc(nvl(lead(sale_date) over (partition by 1 order by sale_date),sale_date)) nxt_dt
from sale
) t
where (t.nxt_dt - t.sale_date) >1
) rec,(select rownum rn from user_objects where rownum<=200) ao
where ao.rn <=(rec.diff-1)
union all
select empno,sale_amt,trunc(sale_date) sale_date
from sale
group by sale_date
order by 1;
~~~~Guess this will serve the purpose...
Cheers Arpan -
Display data in list and combo box
hi all....
how to display data from database in list and combo box? i use MYSQL...
help me please..... tq...1 - Write a query to retrieve the data you want from database
2 - In a servlet, connect to database, Run the query, scroll through the result set and put the data into a list of Java Objects.
3 - Set a request/session attribute of that list of objects
4 - Forward to JSP
5 - In JSP, create a <select> box, and then use a <c:forEach> loop to generate <option> tags from the list. -
Display data in diagonally in table using XML publisher
Hi,
I need to display data of the invoice which contains columns ( invoice_number,receipt_number,amount,quantity)
where i need to dispay amount and quantity diagonally for the invoces i.e. the data will extend dynamically.
please give me an idea to resolve this issue.
Thanks in advancein wdinit(),
Collection col = new ArrayList();
try{
MyCommandBean bean = new MyCommandBean();
col = bean.getDataFromDbViaEJB();
wdContext.nodeMyCommandBean().bind(col);
} catch (Exception ex) {
ex.printStackTrace(ex);
in your JavaBean model class, MyCommandBean getDatafromDbViaEJB() method:
Collection col = new ArrayList();
Collection newcol = new ArrayList();
//include your own context initialization etc...
col = local.getDataViaSessionBean(param);
// if your returned result also a bean class, reassigned it to current MyCommandBean
for (Iterator iterator = col.iterator(); iterator.hasNext();) {
MyOtherBean otherBean=(MyOtherBean)iterator.next();
MyCommmandBean bean = new MyCommandBean();
bean.attribute1 = outBean.getAttirbute1();
// get other attibutes
newcol.add(bean);
return newcol; -
Display Data on waveform chart or XY graph over a long period of time
Display Data on waveform chart or XY graph over a long period of time
Can anyone help?
I am acquiring data from an Ni DAQ card with the following parameters - sample rate = 12800, number of samples = 4096. I want to extract order information so as to track changes in the amplitudes of certain frequency harmonics. So I use the sound and vibration toolkit to extract this information as shown in the attached Vi. I will like to plot the resulting amplitudes against real-time starting at the time the Vi was run. I really want the display to show these changes over long periods (eg. days, months and even years).
Problem.
I have tried to plot the Y component of the resulting magnitude for a given order on a waveform chart. My choice of the waveform chart is because I also want to display alarm limits (using the mask and limit vi) (I can't have these lines displayed on an XY graph plot). I tried adjusting the scale offset using the property node and setting the offset to current time. However, the display on the X-axis can only show a span of 2 minutes as will be seen when you run the attached vi. I want the time display on the x-axis to be over a period of days, months and even years. Is there a way to set the maximum scale on the x-axis to be say a year or so in future.
I really want the display to be like the one in in the second attachment.
Attached is a sample VI created using an Ni USB 9234 DAQ card. Any card will do but I am only getting the signal from one channel for this example
I will appreciate any help that can be given to me.
Thanks
Attachments:
Real-Time Graph Display.vi 170 KB
Sampe screen1.doc 37 KBLong term testing can be tricky- and we'l get into that later. Lets start with the basics that you have wrong.
The vi as you have constructed it has only one memory element, the chart history length (default is 1024.)
You can change the number of points the Chart will remember by Right-clicking the chart an select Chart History Length from the menu.
But for a long term test - and one where you want to REMEMBER the first value you need a memeory element that is independant of the application. Your PC WILL loose power or need to be rebooted eventually. Heck it might even need to be replaced! you really need to store your data in a file. Preferablly in a file that is backed-up on a regular basis so you don't lose every point of data if the PC dies. It realy hurts when you have to restart a 2yr test because you've lost the 18months of data you collected.
For an application like this I would seperate my "collection" and "Evaluation" operations.
Have one vi that takes the reading and writes it to a file at a configurable rate You may want 1reading per minute for seveal days then 1 per hour for a few weeks- then maybe only once or twice a week for the next couple of years since you are looking for LONG TERM stability. having too much data to evaluate can take a lot of digging to find the few things that interest you (but always take more that you think you need)
Have another utility that COPIES the files, reads them and displays the data you are interested in that day. The data you want to look at won't change over time HOWEVER, you WILL want to analize it in different ways depending on what the data trends look like. Having seperate routines for collection and display allows you to update the display style and analisys without even stopping the collection vi (much less editing the vi)
Jeff -
TestStand2.0 generates for each result property ( data, limits, status...) of each array element in a NumericArrayTest an extra line in the test report.
How can I change this to display all result properties of one array element in a single line?
How can I reduce the spaces between the property name and its value in the report?
How can I delete the message: "Measurement[x]" and display only the Measurement Alias (named in the Edit Limits menu)?
This means I like to change my report from:
Measurement[0] (ADC1):
Data: 5000
Status: Passed
Measurement[1] (AD
C2):
To:
ADC1: Data: 5000 Status: Passed
ADC2: ...Hi,
What you can do, is use the Override Callbacks for Modify the Report that is Generated.
Also you can also change the report sequence 'reportgen_txt.seq' to achieve the desired affect. If you go for modifying the report sequence then copy this to the User folder and then make your changes.
In the Resources Library you can find simple examples were the report has been modified by either using the Override Callbacks or by modifying the actual sequence.
One other item in the Report Options you will have to set the 'Select a Report Generator for Producing the Report Body' control to use the Sequence instead of the DLL.
Hope this helps
Ray Farmer
Regards
Ray Farmer -
Printing ZPL (Zebra) data to printer spooler without character conversion
Hi all,
We are printing shipping labels from UPS, with a process where we recive the ZPL label code directly from UPS, and we just need to pass the data to the printer to get the labels. We have already implemented this with Fedex and some custom labels, and it works perfectly. The problem with the UPS label data is that it contains non-printable characters (in the MaxiCode data field). When passed to the SAP printer spooler (see code example below), the data gets corrupted because SAP interprets these non-printable characters as printer control codes.
I have verified this by saving the ZPL data to a local file, before printing it through the SAP spooler. I then print this raw data and compare the output with the labels printed from the spooler. The MaxiCode (the big 2D barcode) is different in these labels. UPS has also tested the labels, and rejected them because of incorrect data in the barcode.
For printing, we are using printers defined as type "PLAIN", but I also tried using the "LZEB2" device type with the same result. The error we see in the spooler entry is this:
Print ctrl S_0D_ is not defined for this printer. Page 1, line 2, col. 2201
Print output may not be as intended
The printer ctrl code differs, depending om the label. I have examined the spooler data in "raw" mode, and there is always an ASCII character 28 (hex 1C) in front of the characters that SAP think are control codes, and this is why I think these non-printable characters are the reason for the problems.
This is the function module I use to print the ZPL data (and as stated above, this works fine for Fedex and custom labels). The ZPL data is converted to binary format before passed to the function module, but I also tried to send the data in text format with another FM, but the result is the same. I have experimented with the "codepage" parameter, and this one gives the least amount of errors, and some labels actually get through without errors. But still at least 50% of the labels gets corrupted, with log entries like above.
CALL FUNCTION 'RSPO_SR_WRITE_BINARY'
EXPORTING
handle = lv_spool_handle
data = lv_label_line_bin
length = lv_len
codepage = '2010'
EXCEPTIONS
handle_not_valid = 1
operation_failed = 2
OTHERS = 3.
Does anyone know if there is a way to send data to the spooler without character conversion or interpretation of printer control codes? Or is there any other smart way to get around this problem?
/LeifI do a more direct output to the spooler, to avoid any issues with the WRITE statement and SAP's report output processing. At the same time, I insert line breaks so that the output is easy to debug in the spooler if needed. Also included is the code to to detect the escape code (ASCII #28) and to insert a control code ZZUPS in its place (you can skip this for Fedex). Here's a simplified example, but please note this is for a Unicode system, some minor changes is required in a non-Unicode system.
CONSTANTS: lc_spcode TYPE c LENGTH 5 VALUE 'ZZUPS',
lc_xlen TYPE i VALUE 5.
DATA: lv_print_params TYPE pri_params,
lv_spool_handle TYPE sy-tabix,
lv_name TYPE tsp01-rq0name,
lv_spool_id TYPE rspoid,
lv_crlf(2) TYPE c,
lv_lf TYPE c,
lstr_label_data TYPE zship_label_data_s,
lv_label_line TYPE char512,
lv_label_line_bin TYPE x LENGTH 1024,
lv_len TYPE i,
ltab_label_data_255 TYPE TABLE OF char512,
ltab_label_data TYPE TABLE OF x,
lv_c1 TYPE i,
lv_c2 TYPE i,
lv_cnt1 TYPE i,
lv_cnt2 TYPE i,
lv_x(2) TYPE x.
FIELD-SYMBOLS: <n> TYPE x.
lv_crlf = cl_abap_char_utilities=>cr_lf.
lv_lf = lv_crlf+1(1).
lv_name = 'ZPLLBL'.
CALL FUNCTION 'RSPO_SR_OPEN'
EXPORTING
dest = i_dest
name = lv_name
prio = '5'
immediate_print = 'X'
titleline = i_title
receiver = sy-uname
* lifetime = '0'
doctype = ''
IMPORTING
handle = lv_spool_handle
spoolid = lv_spool_id
EXCEPTIONS
device_missing = 1
name_twice = 2
no_such_device = 3
operation_failed = 4
OTHERS = 5.
IF sy-subrc <> 0.
RAISE spool_open_failed.
ENDIF.
LOOP AT i_label_data INTO lstr_label_data.
CLEAR ltab_label_data_255.
SPLIT lstr_label_data-label_data AT lv_lf INTO TABLE ltab_label_data_255.
LOOP AT ltab_label_data_255 INTO lv_label_line.
IF lv_label_line NE ''.
lv_len = STRLEN( lv_label_line ).
* Convert character to hex type
lv_c1 = 0.
lv_c2 = 0.
DO lv_len TIMES.
ASSIGN lv_label_line+lv_c1(1) TO <n> CASTING.
MOVE <n> TO lv_x.
IF lv_x = 28.
lv_cnt1 = 0.
lv_label_line_bin+lv_c2(1) = lv_x.
lv_c2 = lv_c2 + 1.
DO lc_xlen TIMES.
ASSIGN lc_spcode+lv_cnt1(1) TO <n> CASTING.
MOVE <n> TO lv_x.
lv_cnt2 = lv_c2 + lv_cnt1.
lv_label_line_bin+lv_c2(2) = lv_x.
lv_c2 = lv_c2 + 2.
lv_cnt1 = lv_cnt1 + 1.
lv_len = lv_len + 1.
ENDDO.
ELSE.
lv_label_line_bin+lv_c2(2) = lv_x.
lv_c2 = lv_c2 + 2.
ENDIF.
lv_c1 = lv_c1 + 1.
ENDDO.
* Print binary data to spool
lv_len = lv_len * 2. "Unicode is 2 bytes per character
CALL FUNCTION 'RSPO_SR_WRITE_BINARY'
EXPORTING
handle = lv_spool_handle
data = lv_label_line_bin
LENGTH = lv_len
EXCEPTIONS
handle_not_valid = 1
operation_failed = 2
OTHERS = 3.
IF sy-subrc <> 0.
RAISE spool_write_failed.
ENDIF.
ENDIF.
ENDLOOP.
ENDLOOP.
CALL FUNCTION 'RSPO_SR_CLOSE'
EXPORTING
handle = lv_spool_handle.
IF sy-subrc <> 0.
RAISE spool_close_failed.
ENDIF. -
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script>
<![CDATA[
import mx.controls.*;
import mx.collections.*;
import flash.events.*;
import mx.collections.ArrayCollection
[Bindable]
private var records:Array=new Array();
[Bindable]
private var datarecords:ArrayCollection=new ArrayCollection();
private var xmldata:String="<?xml version=\"1.0\"?>\r\n<dataset>\r\n";
private var fileref:FileReference=new FileReference();;
private function readExcel():void
var request:URLRequest=new URLRequest();
request.url="data/chart.csv";
var loader:URLLoader=new URLLoader();
loader.dataFormat=URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE,eventComplete);
loader.addEventListener(IOErrorEvent.IO_ERROR,onIOError);
loader.load(request);
private function eventComplete(event:Event):void
var loader:URLLoader=URLLoader(event.target);
var record:Array=new Array();
var fields:Array=new Array();
var obj:Object;
var str:String=new String();
loader.dataFormat=URLLoaderDataFormat.TEXT;
var result:String=new String(loader.data);
record=result.split("\r\n");
for(var i:int=1;i<record.length;i++)
obj=new Object();
fields=record[i].split(",");
/* obj.col1="Timestamp: "+fields[0];
obj.col2="EndDevice-PaLnaMode: "+fields[1];
obj.col3="Wap-PaLnaMode: "+fields[2];
obj.col4="DownstreamLqi: "+fields[3];
obj.col5="UpstreamLqi: "+fields[4]; */
obj.col1="<Timestamp>"+fields[0]+"</Timestamp>";
xmldata+=obj.col1+"\r\n";
obj.col2="<EndDevice-PaLnaMode>"+fields[1]+"</EndDevice-PaLnaMode>";
xmldata+=obj.col2+"\r\n";;
obj.col3="<Wap-PaLnaMode>"+fields[2]+"</Wap-PaLnaMode>";
xmldata+=obj.col3+"\r\n";
obj.col4="<DownstreamLqi>"+fields[3]+"</DownstreamLqi>";
xmldata+=obj.col4+"\r\n";;
obj.col5="<UpstreamLqi>"+fields[4]+"</UpstreamLqi>";
records.push(obj);
datarecords.addItem(obj);
xmldata+="</dataset>";
datagrid.dataProvider=records;
linechart1.dataProvider=records;
private function onIOError(event:Event):void
Alert.show("I/O error"+event.type);
private function saveXML():void
fileref.save(xmldata,"xmldata.xml");
//fileref.save(xmldata,"NewFileName.txt");
private function dispData():void
fileContents_txt.text=xmldata;
]]>
</mx:Script>
<mx:DataGrid id="datagrid" x="19" y="76" width="528" height="242">
<mx:columns>
<mx:DataGridColumn headerText="Timestamp" dataField="col1"/>
<mx:DataGridColumn headerText="DevicePaLnaMode" dataField="col2"/>
<mx:DataGridColumn headerText="Wap-PaLnaMode" dataField="col3"/>
<mx:DataGridColumn headerText="DownstreamLqi" dataField="col4"/>
<mx:DataGridColumn headerText="UpstreamLqi" dataField="col5"/>
</mx:columns>
</mx:DataGrid>
<mx:Button x="126" y="32" label="read" click="readExcel()"/>
<mx:Button x="240" y="32" label="display data" click="dispData();"/>
<mx:Text id="fileContents_txt" x="10" y="326"/>
<!-- Define custom Strokes. -->
<mx:Stroke id = "s1" color="blue" weight="2"/>
<mx:LineChart id="linechart1" height="286" width="385"
paddingLeft="5" paddingRight="5"
showDataTips="true" dataProvider="{datarecords}" x="566" y="32">
<mx:horizontalAxis>
<mx:CategoryAxis categoryField="Timestamp"/>
</mx:horizontalAxis>
<mx:series>
<mx:LineSeries yField="Timestamp" xField="UpstreamLqi" interpolateValues="true" form="curve" displayName="Timestamp" lineStroke="{s1}"/>
</mx:series>
</mx:LineChart>
<mx:Button x="406" y="32" label="SaveXML" click="saveXML()"/>
</mx:Application>Um, wrong forum.
I think you want to ask this question in the Flex forum.
Maybe you are looking for
-
Hi Sales order is created 1st November for 200 tooth pastes 100 brushes free of goods(2+1 free goods).At the time of delivery on 15th November you have shortage of brushes by 40. offer closed on 15th November . How do you solve in this scenario? Than
-
One IDOC to multiple XML messages
Hi! I am using the graphical mapper in XI to map the SHPMNT03 IDOC to an XML message. The IDOC has a shipment node and potentially multiple delivery nodes, for example: E1EDT20 - E1EDL20 - E1EDL20 - E1EDL20 I need to create one XML message per
-
How to find out operation unit used in preliminary cost estimate.
Please tell me in which table operation unit used in cost estimate is stored.I dont want information from routing.Can i get the information from cost estimate table itself.
-
Hi All, I am developing one object using ALE IDOC. But i have little knowledge of ALE IDOC. The requirement is to pass data from from corporate HCM side to SAP BW side if there is corresponding field in the SAP BW side. i know i have to use ALE ,IDOC
-
In my ps touch app is a Facebook Window and i cannot close it!!??