Load xml to Datagrid, add row or edit and save it to the xml file??
Good afternoon,
I know how to load the xml, add a row or edit the data in a datagrid . Only thing I dont't know
how to save the changes to the xml file. I'm ussing Flash Professional CC and it wil be an Adobe Air
desktop application.
Hi, and thank for the reply. Problem is not saving the xml, but getting the edited or new rows in the datagrid to be saved in the xml.....
Similar Messages
-
Problem with alv edit and save
hi all,
can anyone find me a solution for alv edit and save...the issue is that i will be editing and just clicking on save button withot any row selction and the data changed should be updated in database.
sunil.Hi Bhaskar,
To make fields editable in ALV, while creating the field catalog for ALV, use:-
wa_field-edit = 'X'. " to make a field editable
To check the data changed in ALV, use code:-
ALV GRID Display
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy_repid " report id
i_callback_user_command = 'USER_COMMAND' " to handle user command
it_fieldcat = it_field " for field catalog
it_sort = it_sort " for sort records info
TABLES
t_outtab = it_final "internal table with records
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Sub-routine USER_COMMAND
FORM user_command USING v_okcode LIKE sy-ucomm selfield TYPE slis_selfield.
* assign the function code to variable v_okcode
v_okcode = sy-ucomm.
* handle the code execution based on the function code encountered
CASE v_okcode.
* when the function code is EXECUTE then process the selected records
WHEN 'EXECUTE'.
*to reflect the data changed into internal table
DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
IF ref_grid IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = ref_grid.
ENDIF.
IF NOT ref_grid IS INITIAL.
CALL METHOD ref_grid->check_changed_data.
ENDIF.
* refresh the ALV Grid output from internal table
selfield-refresh = c_check.
ENDCASE.
Hope this solves your problem.
Thanks & Regards,
Tarun Gambhir -
Hi All,
Im relatively new to Ai and Indesign, and have been doing Uni work over Christmas, and have a rather urgent question thats stressing me out.
I originally had many art boards in my ai file, but due to the number, I split these into single files to help my computer run better.
Now I want to organise them into one document to save. From searching online Indesign can import these and save as one file, yet automatically update if the original ai file is updated. I would like to do this but just don't know how to do this correctly?
Any help would be greatly appreciated.
Im using CC Ai and indesign.
Thanks in advance
SamYes, effectively I would like to catalogue the files into one collection so i can save as one PDF and Print as one.:)
I know I could save each AI as a pdf them then merge the pdf's together in acrobat, but I have nearly 100 files so would feel more comfortable seeing them all together before print / saving.
My concern is that if I insert them in Ai, will the file resolution reduce? and will the ai still be editable and would it update the indesign file?
Thanks for the quick reply -
Loading XML File to Physical table in BW
Hi,
I have a requirement to load XML file BW physical table.
The XML file that I am getting looks pretty complex compared to the XML file I have seen online.
I need help in transforming the file and Abap code to load the file to physical table
I have already created the table in SE11.
XML file
<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Row ss:AutoFitHeight="0" ss:Height="36">
<Cell ss:StyleID="s62"><Data ss:Type="String">First Name</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Bank Name -
add. info</Data></Cell>
</Row>
<Row ss:AutoFitHeight="0" ss:Height="22.5" ss:StyleID="s67">
<Cell><Data ss:Type="String">John Mayor</Data></Cell>
<Cell><Data ss:Type="String">New: Local bank</Data></Cell
</Row>
my requirement is to get this values into physical table i.e
First name bank name
John Mayor new: local bank
thanks
Edited by: Bhat Vaidya on Apr 14, 2010 11:59 AM
Edited by: Bhat Vaidya on Apr 14, 2010 12:00 PM
Edited by: Bhat Vaidya on Apr 14, 2010 12:01 PM
Edited by: Bhat Vaidya on Apr 14, 2010 12:01 PMNo longer working on the issue.
-
Error while loading XML files into scott user
Hi All,
I'm new to xml files. I need to load xml files into database through OWB.
I have xml file in my local machine & am trying to load into table PO of Scott. Scott is registered as repository user.
Followed same steps as specified in userguide.
But, when executing the procedure ( in two ways one as just table name, and other as user.table name) it is showing the below error:
Procedure is:(1)--with username.tablename
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">scott.PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object SCOTT.PO.
Base exception: ORA-01031: insufficient privileges
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at "SCOTT.SAMPLE1", line 3
ORA-06512: at line 1
Procedure is:(2) with out username
begin
wb_xml_load(
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>&&SAMPLES_DIR.sample1.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target dateFormat="yyyy.MM.dd">PO</target>'||
'</targets>'||
'</OWBXMLRuntime>'
end;
ERROR at line 1:
ORA-20006: Error occurred while truncating target database object PO.
Base exception: ORA-00942: table or view does not exist
ORA-06512: at "OWBSYS.WB_XML_LOAD_F", line 12
ORA-06512: at "OWBSYS.WB_XML_LOAD", line 4
ORA-06512: at line 2
xml file:
<ROWSET>
<ROW>
<ID>100</ID>
<ORDER_DATE>2000.12.20</ORDER_DATE>
<SHIPTO_NAME>Adrian Howard</SHIPTO_NAME>
<SHIPTO_STREET>500 Marine World Parkway</SHIPTO_STREET>
<SHIPTO_CITY>Redwood City</SHIPTO_CITY>
<SHIPTO_STATE>CA</SHIPTO_STATE>
<SHIPTO_ZIP>94065</SHIPTO_ZIP>
</ROW>
</ROWSET>
Note: Everything works fine if I create PO table in OWBSYS user and execute the procedurein OWBSYS user. OWBSYS.PO table will be loaded.
What privileges are missing, what shouldI do if I want to execute the procedure from scott user and load the table of scott.
Thanks in advance for the help.
Regards,
JoshnaHi Joshna,
Please follow below steps to load xml file to oracle database.
1.First connect to owb (Design Center) through your repository owner user (ex : REP_OWNER).
2. Import WB_XML_LOAD procedure . and exit to repository owner.
3. connect to owb design center through your repository user (ex : REP_USER)
Create New mapping and drag one Constant Operator and create one attribute, paste / edit following code
'<OWBXMLRuntime>'||
'<XMLSource>'||
'<file>E:\SOURCE\emp.xml</file>'||
'</XMLSource>'||
'<targets>'||
'<target truncateFirst = "FALSE" dateFormat="yyyy.MM.dd">rep_user.emp</target>'||
'</targets>'||
'</OWBXMLRuntime>'
4. Drag pre mapping operator and select WB_XML_LOAD procedure
5. Connect Constant Operator attribute to pre mapping operator.
6. Drag two dummy tables and connect source to target. (ex : drag t1 (table) tab two times and connect.
7. Validate and deploy the mapping.
8. grant necessary grant command to rep_owner user to rep_user user.
(Note : target truncateFirst = "FALSE" by default truncate the table. So you have to give grant privileges
To rep_user , select ,insert, delete privileges.
9. Execute the mapping , and check EMP table. (Note : before loading EMP table delete all records ).
10 . If you want more description please go through the below link
http://download.oracle.com/docs/html/A95931_01/apf.htm
Regards
Venkat -
Hi.
My PL/SQL procedure loading xml files from oracle logical directory ("c:\temp") and inserting values into columns of the table. I use XSU with procedure:
create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
insCtx DBMS_XMLSave.ctxType;
rows number;
begin
insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
end;
For translate xml document to CLOB, I use :
CREATE OR REPLACE function getdocument(
p_directory in varchar2,
p_filename in varchar2)
return clob
is
l_bfile bfile;
l_clob clob;
begin
l_bfile := bfilename(p_directory, p_filename);
dbms_lob.open(l_bfile);
dbms_lob.createtemporary(l_clob, true, dbms_lob.session);
dbms_lob.loadfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile));
dbms_lob.close(l_bfile);
return l_clob;
end getdocument;
I didn't have problem with this procedures. But now i want load my xml files from another computer (i want use URL, not oracle logical directory).
How can i do it, using standart PL/SQL methods?Since you are parsing the XML what prevents you from delaying your requests for the image URL's? You can just as well add the image URL's to some kind of collection and load them after you have processed all the text content.
-
Loading XML file into DB Table
Hi
I m quite new to the loading XML file into database table.
It will be great if anyone could guide me to through.
Now,
i have an XML file which has to be loaded into the DB table.
what are the steps involved in doing this. How do i go from here ??
your help is greatly appriciated ???
Thank you so much!!
-ShashiOK - Although you really should read the XMLDB FAQ on this forum, here is some sample code of ONE of the ways of doing it
(there are multiple ways - and this is not the most simple one)
Based on Oracle 11gR1
-- sqlplus /nolog
clear screen
set termout on
set feed on
set lines 40
set long 10000000
set serveroutput on
set lines 100
set echo on
connect / as sysdba
col filename for a80
col xml for a80
-- Create schema “OTN”
drop user OTN cascade;
purge dba_recyclebin;
create user OTN identified by OTN;
grant dba, xdbadmin to OTN;
EXECUTE dbms_java.grant_permission( 'OTN', 'java.io.FilePermission','G:\OTN\xmlstore','read' );
prompt pause
pause
clear screen
-- Create directory
connect OTN/OTN;
show user
drop directory OTN_USE_CASE;
CREATE directory OTN_USE_CASE AS 'G:\OTN\xmlstore';
SELECT extract((XMLTYPE(bfilename('OTN_USE_CASE','ABANDA-20030407215829881GMT.xml'),NLS_CHARSET_ID('AL32UTF8'))),'*') AS "XML"
from dual;
prompt pause
pause
clear screen
-- Directory Listing - Tom Kyte
create global temporary table DIR_LIST
( filename varchar2(255) )
on commit delete rows
create or replace
and compile java source named "DirList"
as
import java.io.*;
import java.sql.*;
public class DirList
{public static void getList(String directory)
throws SQLException
{ File path = new File( directory );
String[] list = path.list();
String element;
for(int i = 0; i < list.length; i++)
{ element = list;
#sql { INSERT INTO DIR_LIST (FILENAME)
VALUES (:element) };
create or replace procedure get_dir_list( p_directory in varchar2 )
as language java
name 'DirList.getList( java.lang.String )';
prompt pause
pause
clear screen
-- The content of the global temporary table
exec get_dir_list( 'G:\OTN\xmlstore' );
select * from dir_list;
-- "COMMIT" will clear / truncate the global temporary table...
prompt pause
pause
clear screen
-- Combined: Reading XML content from multiple XML files
commit;
exec get_dir_list( 'G:\OTN\xmlstore' );
select * from dir_list where filename like '%.xml'
and rownum <= 10;
prompt pause
pause
clear screen
select extract((XMLTYPE(bfilename('OTN_USE_CASE',dl.filename),NLS_CHARSET_ID('AL32UTF8'))),'*') AS "XML"
from dir_list dl
where dl.filename like '%.xml' and rownum <= 2;
prompt pause
pause
clear screen
-- If you can select it you can insert it...
-- drop table OTN_xml_store purge;
create table OTN_xml_store of xmltype
xmltype store as binary xml
commit;
exec get_dir_list( 'G:\OTN\xmlstore' );
set time on timing on
insert into OTN_xml_store
select XMLTYPE(bfilename('OTN_USE_CASE',dl.filename),NLS_CHARSET_ID('AL32UTF8')) AS "XML"
from dir_list dl
where dl.filename like '%.xml';
set time off timing off
commit;
select count(*) from OTN_xml_store;
prompt pause
pause
clear screen
-- If you can select it you can create resources and files
set time on timing on
commit;
exec get_dir_list( 'G:\OTN\xmlstore' );
select count(*) from dir_list where filename like '%.xml';
set serveroutput on size 10000
DECLARE
XMLdoc XMLType;
res BOOLEAN;
v_foldername varchar2(4000) := '/public/OTN/';
cursor c1
is
select dl.filename FNAME
, XMLTYPE(bfilename('OTN_USE_CASE',dl.filename),NLS_CHARSET_ID('AL32UTF8')) XMLCONTENT
from dir_list dl
where dl.filename like '%.xml'
and rownum <= 100;
BEGIN
-- Create XDB repository Folder
if (dbms_xdb.existsResource(v_foldername))
then
dbms_xdb.deleteResource(v_foldername,dbms_xdb.DELETE_RECURSIVE_FORCE);
end if;
res:=DBMS_XDB.createFolder(v_foldername);
-- Create XML files in the XDB Repository
for r1 in c1
loop
if (DBMS_XDB.CREATERESOURCE(v_foldername||r1.fname, r1.xmlcontent))
then
dbms_output.put_line(v_foldername||r1.fname);
null;
else
dbms_output.put_line('Loop Exception :'||sqlerrm);
end if;
end loop;
EXCEPTION WHEN OTHERS THEN
dbms_output.put_line('Others Exception: '||sqlerrm);
END;
set time off timing off
commit;
prompt pause
pause
clear screen
-- FTP and HTTP
clear screen
prompt
prompt *** FTP - Demo ***
prompt
prompt pause
pause
host ftp
-- open localhost 2100
-- user OTN OTN
-- cd public
-- cd OTN
-- ls
-- bye
clear screen
prompt
prompt *** Microsoft Internet Explorer - Demo ***
prompt
prompt pause
pause
host "C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://OTN:OTN@localhost:8080/public/OTN/
prompt pause
pause
-- Accessing the XDB Repository content via Resource View
-- Selecting content from a resource via XBDUriType
clear screen
prompt set long 300
set long 300
prompt Relative Path - (path)
SELECT path(1) as filename
FROM RESOURCE_VIEW
WHERE under_path(RES, '/public/OTN', 1) = 1
and rownum <= 10
prompt pause
pause
clear screen
prompt Absolute Path - (any_path)
select xdburitype(any_path).getClob() as xml
FROM RESOURCE_VIEW
WHERE under_path(RES, '/public/OTN', 1) = 1
and rownum <= 1;
prompt pause
pause
-- CLEANUP ENVIRONMENT
clear screen
prompt
prompt >>>>> Clean UP !!! <<<<<<
prompt
prompt Cleanup environment and drop user...!!!
prompt
pause
clear screen
conn / as sysdba
alter session set current_schema=OTN;
begin
dbms_xdb.deleteResource('/public/OTN',dbms_xdb.DELETE_RECURSIVE_FORCE);
commit;
end;
alter session set current_schema=sys;
drop user OTN cascade;
Based on http://www.liberidu.com/blog/?p=1053 -
Failed to load XML file with Content ID 'XYZ'
Hello,
We are using UCM Version:11.1.1.8.1DEV-2014-01-06 04:18:30Z-r114490 (Build:7.3.5.185) with site studio for creating templates and web sites.
While switching to contribution mode, we find 'Failed to load XML file with Content ID 'XYZ' error.[Here XYZ is the local checkin content]
In region we are using dynamic converter to convert the style of native document here below are region and its element details.
<region id="region3" name="Add_Content_Here" flags="1111111100100" metadata="xIdcProfile%3AisHidden%3Dtrue%26xTemplateType%3AisHidden%3Dtrue%26xShowInStaff%3AisHidden%3Dtrue%26xShowInVisitors%3AisHidden%3Dtrue%26xShowInFaculty%3AisHidden%3Dtrue%26xDiscussionCount%3AisHidden%3Dtrue%26xDiscussionType%3AisHidden%3Dtrue" dccommand="ssIncDynamicConversionByRule(SS_DATAFILE, 'Colleges_Template_Rule')">
<!--$region3_ACTIONS="EIMPRS",region3_DCCOMMAND="ssIncDynamicConversionByRule(SS_DATAFILE, 'Colleges_Template_Rule')" -->
<element id="region3_element1" name="Editor" label="Editor" type="1" flags="111111111111111111111100000111100000000000001111001110111010001111101000000000000000000000000000">
<!--$region3_element1="Add_Content_Here/Editor" -->
<linktoregioncontent createnewxml="true" createnewnative="false" choosemanaged="true" chooselocal="false" choosenone="false">
<choosemanagedquerytext corecontentonly="FALSE">
<![CDATA[xWebsiteObjectType <Matches> `Data File` <OR> xWebsiteObjectType <Matches> `Native Document`]]>
</choosemanagedquerytext>
</linktoregioncontent>
</element>
<switchregioncontent createnewxml="true" createnewnative="true" choosemanaged="true" chooselocal="false" choosenone="false">
<createnewnativedoctypes >
<![CDATA[.doc,.docx,.txt,.rtf]]>
</createnewnativedoctypes>
<choosemanagedquerytext corecontentonly="FALSE">
<![CDATA[xWebsiteObjectType <Matches> `Data File` <OR> xWebsiteObjectType <Matches> `Native Document`]]>
</choosemanagedquerytext>
<defaultmetadata >
<![CDATA[xIdcProfile%3AisHidden%3Dtrue%26xTemplateType%3AisHidden%3Dtrue%26xCollegesList%3AisHidden%3Dtrue%26xShowInStudents%3AisHidden%3Dtrue%26xShowInStaff%3AisHidden%3Dtrue%26xShowInVisitors%3AisHidden%3Dtrue%26xShowInFaculty%3AisHidden%3Dtrue%26xArticleSection%3AisHidden%3Dtrue%26xDiscussionCount%3AisHidden%3Dtrue%26xDiscussionType%3AisHidden%3Dtrue%26dpTriggerValue%3DCSE]]>
</defaultmetadata>
</switchregioncontent>
</region>
<!--SS_BEGIN_OPENREGIONMARKER(region3)--><!--$SS_REGIONID="region3"--><!--$include ss_open_region_definition --><!--SS_END_OPENREGIONMARKER(region3)-->
<!--SS_BEGIN_ELEMENT(region3_element1)--><!--$ssIncludeXml(SS_DATAFILE,region3_element1 & "/node()")--><!--SS_END_ELEMENT(region3_element1)-->
<!--SS_BEGIN_CLOSEREGIONMARKER(region3)--><!--$include ss_close_region_definition --><!--SS_END_CLOSEREGIONMARKER(region3)-->
Regardrs,
SyedHi Syed ,
Add the following trace sections :
requestaudit,sitestudio*,system + Full verbose tracing
Clear the server output .
Replicate the same steps and once error shows up , refresh server output and copy the logs to a text file and upload here .
Thanks,
Srinath -
Loading XML files using TCP/IP
Hi.
My PL/SQL procedure loading xml files from oracle logical directory ("c:\temp") and inserting values into columns of the table. I use XSU with procedure:
create or replace procedure insProc(xmlDoc IN CLOB, tableName IN VARCHAR2) is
insCtx DBMS_XMLSave.ctxType;
rows number;
begin
insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
end;
For translate xml document to CLOB, I use :
CREATE OR REPLACE function getdocument(
p_directory in varchar2,
p_filename in varchar2)
return clob
is
l_bfile bfile;
l_clob clob;
begin
l_bfile := bfilename(p_directory, p_filename);
dbms_lob.open(l_bfile);
dbms_lob.createtemporary(l_clob, true, dbms_lob.session);
dbms_lob.loadfromfile(l_clob, l_bfile, dbms_lob.getlength(l_bfile));
dbms_lob.close(l_bfile);
return l_clob;
end getdocument;
I didn't have problem with this procedures. But now i want load my xml files from another computer (i want use TCP/IP, not oracle logical directory). Is it within the realm of possibility?
How can i do it, using standart PL/SQL methods?
P.S. Sorry my English.The UTL_TCP package should give you exactly what you want. See
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_tcp.htm -
ORA-22288:file or LOB operation FILEOPEN failed while loading XML file.
Hello all,
I am getting the following error messages while loading XML file to Oracle 9i table.
declare
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at line 10
The script I am using is all follows:-
1. Created a file ldxmldata.sh on unix server directory
dd conv=ucase if=$1|sed 's/<?XML/<?xml/'|sed 's/VERSION/version/'|sed 's
/RECORD/ROW/'|sed 's/DATE/TRANSDATE/'|sed 's/&/-/'|sed 's/\/DATE>// TRANSDATE>/'>$1.UCASE
sqlplus sales/sales@rac @upld.sql $1.UCASE
2. Created SQL file upld.sql on unix server
set serveroutput on
exec DBMS_JAVA.SET_OUTPUT(1000000);
@ldxml.sql bsl.xml.UCASE
commit;
exit
3. Created sql file ldxml.sql on unix server
declare
insCtx DBMS_XMLSave.ctxType;
rows number;
file bfile := bfilename('XML_DIR','&1');
charContent CLOB := ' ';
targetFile bfile;
warning number;
begin
targetFile := file;
DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
DBMS_LOB.loadfromFile(charContent,targetFile,DBMS_LOB.getLength(tar
getFile),1,1);
insCtx := DBMS_XMLSave.newContext('sales.s_price');
rows := DBMS_XMLSave.insertXML(insCtx,charContent);
DBMS_XMLSave.closeContext(insCtx);
DBMS_LOB.fileclose(targetFile);
end;
4. As Sys,
Created a directory XML_DIR and assigned it the path of Unix server directory
where the script files reside.
Granted read priviledge on XML_DIR to user sales.
I am getting the above error messages. Kindly help with some possible solution.
Arun Patodia
Bokaro Steel CityHi guys,
Sybrand, aplogoies, the second line of the error stack was on one line in the first post, full error stack below:
ORA-22288: file or LOB operation FILEOPEN failed
The program issued a command but the command length is incorrect.
ORA-06512: at "SYS.DBMS_LOB", line 716
ORA-06512: at "JLMS.LOAD_DATA_UTIL", line 417
ORA-06512: at line 2I have looked at that error code as you mentioned, but the second line here doesn't really help much.
Hoek, i took your advice and tried to replace FILEOPEN with OPEn but got the same error.
Just to clarify as well, I am not using UNC or relative file paths as I know that these can cause problems.
Rgds
Dan -
Error while loading xml files using JDBC
Hi,
I am trying to load xml files into an xmltype table using JDBC calls and am getting this error for some files
LPX-00200: could not convert from encoding UTF-8 to UCS2
The xml files and our database are both UTF-8 encoded. The version of oracle that we have here is 9.2.0.6
Any suggestions in this matter will be greatly appreciated.
Thanks,
UmaI also experienced this problem and unfortunately this solution didn't work for me given that the tag you suggested was already on the XML file.
-
One row as editable and other row as non-editable in table control
Hi Experts,
Is this possible to make one row as editable and another row is non editable in table control?
My Requirement is
1st row non editable field
Customer code, description,amount will come from the previous screen this will be non editable for user.
2nd row editable
User has to enter the amount in 2nd row here the customer code description will be empty.
If 4 customer are there
1,3,5,7 should be non editable and 2,4,6,8 should be editable..
Pls help me in this issue..
Thanks in Advance!hI
This is a simple Module POOL program with only Table control and nothing else
" This is Tested to Enable one row and disabling the next row
in TOP Include
controls : tc type tableview using screen 100.
DATA : OK TYPE SY-UCOMM.
DATA : ITAB TYPE TABLE OF SPFLI WITH HEADER LINE.
in PBO
PROCESS BEFORE OUTPUT.
MODULE status_0100.
LOOP AT itab WITH CONTROL tc.
MODULE TC_MOD.
ENDLOOP.
in PAI
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
LOOP AT itab.
ENDLOOP.
MODULE status_0100 OUTPUT.
SET PF-STATUS 'TEST'.
SET TITLEBAR 'TEST'.
DESCRIBE TABLE itab LINES tc-lines.
IF tc-lines = 0.
tc-lines = 20.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
MODULE tc_mod OUTPUT.
DATA : mod TYPE i.
LOOP AT SCREEN.
mod = tc-CURRENT_LINE MOD 2 .
IF mod = 1.
IF screen-name = 'SPFLI-CARRID'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
ENDMODULE. " TC_MOD OUTPUT
Edited by: Ramchander Krishnamraju on Jan 25, 2011 7:17 AM -
Load XML file from addon domain without cross-domain Policy file
Hello.
Assuming that there are two addon domains on the same server: /public_html/domain1.com and /public_html/domain2.com
I try to load XML file from domain2.com into domain1.com without using cross-domain policy file (since it doesn’t work on xml files in my case).
So the idea is to use php file in order to load XML and read it back to flash.
I’ve found an interesting scripts that seems to do the job but unfortunately I can't get it to work. In my opinion there is somewhere problem with AS3 part. Please take a look.
Here are the AS3/PHP scripts:
AS3 (.swf in www.domain1.com):
// location of the xml that you would like to load, full http address
var xmlLoc:String = "http://www.domain2.com/MyFile.xml";
// location of the php xml grabber file, in relation to the .swf
var phpLoc:String = "loadXML.php";
var xml:XML;
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(phpLoc+"?location="+escape(xmlLoc) );
loader.addEventListener(Event.COMPLETE, onXMLLoaded);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
loader.load(request);
function onIOErrorHandler(e:IOErrorEvent):void {
trace("There was an error with the xml file "+e);
function onXMLLoaded(e:Event):void {
trace("the rss feed has been loaded");
xml = new XML(loader.data);
// set to string, since it is passed back from php as an object
xml = XML(xml.toString());
xml_txt.text = xml;
PHP (loadXML.php in www.domain1.com):
<?php
header("Content-type: text/xml");
$location = "";
if(isset($_GET["location"])) {
$location = $_GET["location"];
$location = urldecode($location);
$xml_string = getData($location);
// pass the url encoded vars back to Flash
echo $xml_string;
//cURLs a URL and returns it
function getData($query) {
// create curl resource
$ch = curl_init();
// cURL url
curl_setopt($ch, CURLOPT_URL, $query);
//Set some necessary params for using CURL
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//Execute the curl function, and decode the returned JSON data
$result = curl_exec($ch);
return $result;
// close curl resource to free up system resources
curl_close($ch);
?>I think you might be right about permissions/settings on the server for php. Unfortunately I'm not allowed to adjust them.
So I wrote my own script - this time I used file path instead of http address of the XML file. It works fine in my case.
Here it is:
XML file on domain2.com:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<image imagePath="galleries/gallery_1/images/1.jpg" thumbPath="galleries/gallery_1/thumbs/1.jpg" file_name= "1"> </image>
<image imagePath="galleries/gallery_1/images/2.jpg" thumbPath="galleries/gallery_1/thumbs/2.jpg" file_name= "2"> </image>
<image imagePath="galleries/gallery_1/images/3.jpg" thumbPath="galleries/gallery_1/thumbs/3.jpg" file_name= "3"> </image>
</gallery>
swf on domain1.com:
var imagesXML:XML;
var variables:URLVariables = new URLVariables();
var varURL:URLRequest = new URLRequest("MyPHPfile.php");
varURL.method = URLRequestMethod.POST;
varURL.data = variables;
var MyLoader:URLLoader = new URLLoader;
MyLoader.dataFormat =URLLoaderDataFormat.VARIABLES;
MyLoader.addEventListener(Event.COMPLETE, XMLDone);
MyLoader.load(varURL);
function XMLDone(event:Event):void {
var imported_XML:Object = event.target.data.imported_XML;
imagesXML = new XML(imported_XML);
MyTextfield_1.text = imagesXML;
MyTextfield_2.text = imagesXML.image[0].attribute("thumbPath"); // sample reference to attribute "thumbPath" of the first element
php file on domain1.com:
<?php
$xml_file = simplexml_load_file('../../domain2.com/galleries/gallery_1/MyXMLfile.xml'); // directory to XML file on the same server
$imported_XML = $xml_file->asXML();
print "imported_XML=" . $imported_XML;
?>
Regards
PS: for those who read the above discussion: the first and the second script work but you must test which one is better in your situation. The first script will also work between two domains on different servers. No cross domain policy file needed. -
Can I load xml file from SWC without using @embed
I'm developing a mobile application in which I need to load xml files from File.applicationDirectory. This works great if the xml files are part of the main application swf. But I would like to move these xml files into a SWC so they could be shared across multiple applications.
Using FlashBuilder 4.5, when a SWC is built, I can specify files to embed in the library that are not assets (Assets Tab of Flex Library Build Path). For various design reasons, I do NOT want to embed the xml files via @embed.
When the swc is built and I open it up using a zip utility, I see the xml files in there just fine. So they are being bundled with the SWC. But how can I load these files in my main application that does not involve using @embed? When the main application is built, the swc setting for link type is "merged into code".
I wouldn't expect the application to automatically pull out the xml files from the swc and place them in the File.applicationDirectory on the mobile device. I've tried loading from there just in case but file.exists is false (as expected).
I've searched the web (and continue to do so) and all the answers seem to be to use @embed. Is there another way?
RandyIt's actually a lot easier than you think.
Just reference the file like any'ol URL using a path relative to the SWC's src directory.
So if you include the file "assets/xml/some.xml", just use that same string like you would any remote resource.
For example:
var loader:URLLoader = new URLLoader( new URLRequest("assets/xml/some.xml"));
I believe it would also work like this "/assets/xml/some.xml", but I prefer relative paths so the link doesnt break if moved out of the SWC... -
How to load XML files ? HELP!
Hi folks.
We have an old Oracle database 7.3..
So we need to load XML files into its tables.
As we understand Oracle Loader doesn't help us.
Is the way to load that files?
Thanks in advance
AlexI know you realize 7.3 is old but this is sort of like trying trying to view a DVD when you only have a VCR. Simple answer would be buy a DVD player, i.e. upgrade to a more recent version of Oracle where you will get many features to handle XML.
How do you want the XML loaded, all as a single object? That could be a CLOB column if 7.3 had them, I am not sure. You would probably have to write PL/SQL and something with UTL_FILE (if 7.3 had that) to load it.
If you want to put it multiple columns based on its tags, you would be better off parsing it using PERL (or something) into a CSV and loading that in SQL*Loader.
I assume as this is using XML it is a reasonably recent design, combining that with an ancient version of the database is just going to lead to endless headaches.
Maybe you are looking for
-
Wake on Lan not working properly?
So as far as i'm aware Windows 8 supports wake on lan whilst the device is either in sleep or hibernate (not completely off) and so far it works fine when in sleep mode (no randomly turning on like lots of people have been saying) but nothing happens
-
Hi! I need kelp, Illustrator CC2014 crashes at launch on Mac OS X Yosemite (10.10.1), I've updated Java and it still crash. Then I moved to a different carpet plugin files that look like this and didn't worked.
-
I installed a Yahoo suggested Firefox update. I had approximately 10 tabs open prior to the update now they have disappeared. I need to get them back. Thank you
-
Hi I want to add a column in my query. This column is the sum of the net value and the tax ..please how can I do this without refering to ABAP development.. thanks in advance
-
No. of outstanding tasks/New tasks in UWL
Hi Experts, I need your help in showing the number of outstanding tasks and number of new tasks that are coming in UWL in portal home page. I need to develop one par file in achieving this. Can you please let me know what services I need to use to g