How to Handle sorting stage in datastage on ODI level?
Hi,
How to handle sorting stage in datastage on ODI level ?
Need to do KM customization..
if yes how?
else what to do?
Thanks.
Hi,
In Datastage, there is sorting stage specially sort the data after applying the transormations and filters seperately.
My requirement is we need to apply sorting on Target Database after applying some transformations,Aggregations and filters on source database *(Before Loading into Target data should be in the sorted Order)*
In odi,there is no sorting stage separtely for those requirement sorting the data either Ascending / Descending order *(how can i approach sorting stage in ODI)*
Thanks in Advance
Edited by: anu on Oct 11, 2011 6:10 AM
Similar Messages
-
How to Handle the LOV AM in the page level Controller
Hi All,
I have standard page ,In that page there is LOV in which user can select any value.
But the client requirement is the value in the lov has to be displayed has to be displayed automatically the first record of the LOVwhen page is rendered.
For that i am trying to handle the Lov AM in the extended controller by using
OAApplicationModule rootAM = pageContext.getRootApplicationModule();
OAApplicationModule childAM1=(OAApplicationModule)rootAM.findApplicationModule("CsfPoLovAM");
Here CsfPoLovAM is the AM of the LOV
when i am doing this i am getting the value of childAM1 as null.
Could you please let me know is there any other way of handling the AM of lov on the extended controller
And there is controller is defined for the LOV .
Thanks
AjayIf there is no CO than you can put a new custom controller in the LOVRN ,in the PR method of new controller get the VO and call the firs() method of this VO like
LOVVO.first() ;this will full fill your requirement .
HI Pratap,
I had created a new custom controller in the LOVRN and in the Process Request.of the controller i am getting the first record.
like follows
OAViewObjectImpl vo=(OAViewObjectImpl)am.findViewObject("CsfInstallLotNumberVO1");
oapagecontext.writeDiagnostics("IN LOV CO Process Request ","vo:"+vo,4);
if(vo!=null)
vo.executeQuery();
Row row=vo.first();
oapagecontext.writeDiagnostics("IN LOV CO Process Request ","row:"+row,4);
if(row!=null){
String lotnumber=(String)row.getAttribute("LotNumber");
oapagecontext.writeDiagnostics("IN LOV CO Process Request ","lotnumber:"+lotnumber,4);
oapagecontext.putSessionValue("LotNumberParam",lotnumber);
i am able to get this lov value in the lov window when the lov item is clicked
and i am trying to handle that value in my exteded co its getting that value
Thanks
Ajay -
How to handle movielclip of stage by class
i m making three movie Clip A, B, C in Main movieclip on stage .
can u tell me how to handle these movieclip by cleass file in actionscript 3.0.
i dont want to access these movieclip from libaray.For each clip in the library that you want to control from your class you set the linkage properties and give the item a class name. The class name you give it allows you to instantiate it from code.
So, say you have a document class, and want to put clip A on stage in the constructor, and you've given it a class name of LibraryClipA:
package{
class MyDoc{
private var clipA:LibraryClipA;
function MyDoc(){
clipA = new LibraryClipA();
clipA.x = 100;
clipA.y = 100;
addChild(clipA); -
I have audiobook of abt.500 files, all titles are the name of the book. iPhone music player does not understand sorting by file names, but by title, hterfore it plays files chaotic. So, how I can sort audiobook files in music player by file name, not by title name?
I have the same problem.
I've went through the pains of merging all chapters into one big file for each and every audiobook, so that at least the chapters don't get played in random order. Month and month of work….. In iTunes 12.01. I can now order my audiobooks by title or by author.
But once they're uploaded to my blo*dy expensive iPhone 6Plus 128 (which I bought especially to have all my music and my audiobooks on one device) my audiobooks are NOT sorted by author, but by Title.
So, let's say I have 15 books by Ken Follet, they don't appear as Ken Follet > Title of the book but they are sorted alphabetically with all the other titles of other authors.
iPods where originally designed for music and audiobooks, but each and every version of iOS makes handling your music and especially your audiobooks harder and harder….
I am very disappointed and after so many years of using apple, I am considering to move on to android devices. -
How to handle interactive list in alv reports
hi experts.
how to handle interactive list in alv reports.
regards.
subhasisHI Subhasis,
below is the sample code for handling an interactive ALV report, hope this helps you ..
REPORT ZTEST_ALV123.
TYPE-POOLS:SLIS.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
VGBEL LIKE LIPS-VGBEL,
VGPOS LIKE LIPS-VGPOS,
END OF ITAB1.
DATA: IT_LIPS LIKE ITAB1 OCCURS 0 WITH HEADER LINE.
SELECT VBELN
POSNR
FROM VBAP
INTO TABLE ITAB.
IF SY-SUBRC = 0.
SORT ITAB BY VBELN .
SELECT VBELN
POSNR
VGBEL
VGPOS
INTO TABLE ITAB1
FROM LIPS
FOR ALL ENTRIES IN ITAB
WHERE VGBEL = ITAB-VBELN
AND VGPOS = ITAB-POSNR.
ENDIF.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
ENDIF.
*& Form POPUP
text
-->P_EXTAB text
FORM POPUP USING P_EXTAB TYPE SLIS_T_EXTAB.
"here double click on PFSTATUS and create the status, "activate, before that set PICK for choose(F2).
*- Pf status
SET PF-STATUS 'PFSTATUS'.
ENDFORM. " POPUP
*& Form HANDLE_USER_COMMAND
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'VBELN'.
READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
LOOP AT ITAB1 WHERE VGBEL = ITAB-VBELN
AND VGPOS = ITAB-POSNR.
MOVE-CORRESPONDING ITAB1 TO IT_LIPS.
APPEND IT_LIPS.
ENDLOOP.
PERFORM INTERACTIVE_REPORT.
ENDIF.
ENDCASE.
ENDFORM. "HANDLE_USER_COMMAND
*& Form interactive_report
text
FORM INTERACTIVE_REPORT .
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'ITEM'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VGBEL'.
X_FIELDCAT-SELTEXT_M = 'SO #'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VGPOS'.
X_FIELDCAT-SELTEXT_M = 'SO ITEM'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 4.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = IT_FIELDCAT1
TABLES
T_OUTTAB = IT_LIPS
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
ENDIF.
ENDFORM. " interactive_report
Regards,
Ranjita
null -
How to Prevent Sorting on Hyperion Interactive Reporting ?
Dear All ,
I am having an outline in specific order , When I make the OLAP query to use my Alias table in Hyperion Interactive reporting ,
The data retrieved in a sorted way for the outline but sorting alias
So how to stop sorting ? and how to make retrieve 2 columns near each other ; one for members name and its corresponding Aliasadd a stage covering rectangle to the lowest layer of your external swf and make sure the stage sizes of the loading and loaded swf are the same. convert that shape to a movieclip and assign an instance name (eg, bg_mc). in the actions panel, you can use:
bg_mc._alpha=0;
bg_mc.onRelease=function(){
bg_mc.useHandCursor=false; -
How to handle checkbox in struts
Hi,
Can you help me how to handle checkbox in Struts?
When i select/unselect checkbox in one page ,It should be selected/unselected stage when i come next time to that same page.Hi,
Can you help me how to handle checkbox in Struts?
When i select/unselect checkbox in one page ,It should be selected/unselected stage when i come next time to that same page. -
How to handle currency & unit fields in call transaction?
Hi,
Can any one tell me How to handle currency & unit fields in call transaction? & how to dael with error for this fields? whith some sort of coding.
Thanks In Advance.
PravinHi Pravin,
The same topic has been discussed in the following thread:
How to handle currency & unit fields in BDC recording method?
Regards,
Chandra Sekhar -
Better documentation of how LR handles metadata
I would like the on-line help to accurately describe how LR handles metadata, especially writing them in files like DNG and TIFF, the usage of sidecar files (.XMP), and how all of that interacts with Adobe Photoshop CS and its Browser, and Photoshop CS2 and CS3 and Bridge.
The short answer is that the IPTC, EXIF and other built-in core metadata is written to DNG and TIFF and JPEG and travels with the file and can be viewed in any application that provides xmp functionality to view it - like a File Info... menu item. Metadata about changes made to the file and how it looks is not carried as embedded metadata when the image is exported. There is no functionality in CS2 or CS3 to view a sort of history file with images alterations.
-
How to Handle Unwanted Contact Requests
Unfortunately, there is currently no method to sort or filter incoming contact requests. I think it would be very difficult for Skype to determine if a certain person is a potential scammer or spammer, unless they receive relevant reports from users who receive suspicious contact requests from them. Below are some suggested steps on how to deal with unwanted, random, unknown, or suspicious contact requests.
1. Take note of the username and display name of the user (please see image sample below)
2. Open the Contact request then click the Block Button.
3. The Block This Person window will also appear, you can click the Report Abuse box if you feel that that contact is indeed a highly potential scammer or spammer. Click the Block button to confirm your action.
4. You can also report them to [email protected]
Then Skype will be notified of the suspicious activities of the reported user/s and will most likely prompt them to check and investigate those users. Their account might be put under suspension, termination, or prevent them from creating new accounts or using Skype services.
Note: Setting your account's privacy settings to allow messages and calls from people in your contact list only will only prevent the ability of non-contacts to call you or send you instant messages. It will not stop unwanted contact requests from random users.
IF YOU FOUND OUR POST USEFUL THEN PLEASE GIVE "KUDOS". IF IT HELPED TO FIX YOUR ISSUE PLEASE MARK IT AS A "SOLUTION" TO HELP OTHERS. THANKS!
ALTERNATIVE SKYPE DOWNLOAD LINKS | HOW TO RECORD SKYPE VIDEO CALLS | HOW TO HANDLE SUSPICIOS CALLS AND MESSAGES
SEE MORE TIPS, TRICKS, TUTORIALS AND UPDATES in
| skypefordummies.blogspot.com | I think the problem results from the level of visibility Skype users present. For these random requests to come in, there must be some way of trawling for Skype IDs, which would allow would-be scammers and spammers to make the requests. My wife gets many of them and I get virtually none, so they obviously target women.
If Skype users could manage their level of visibility to prevent random trawling or browsing, but allow targeted searches, that should reduce the incidence of this problem enormously.
Another way would be to create an option for a "Contact Token" which could be forwarded to people you allow to make contact requests. They would need to supply the correct token (matching your individual "Contact Token") in order for the request to be submitted. ie. in Privacy Settings, add the followng option:
"Only accept and display contact requests from users supplying the following Contact Token: _____"
This may seem overly heavy-handed, but it would suit many people who don't want to be bothered by nuisance contact requests, and if they like spam and scam, they don't have to enable the option! -
How I can sort all columns alphabetically? in Itunes
How I can sort all columns alphabetically? in Itunes
I have the same problem.
I've went through the pains of merging all chapters into one big file for each and every audiobook, so that at least the chapters don't get played in random order. Month and month of work….. In iTunes 12.01. I can now order my audiobooks by title or by author.
But once they're uploaded to my blo*dy expensive iPhone 6Plus 128 (which I bought especially to have all my music and my audiobooks on one device) my audiobooks are NOT sorted by author, but by Title.
So, let's say I have 15 books by Ken Follet, they don't appear as Ken Follet > Title of the book but they are sorted alphabetically with all the other titles of other authors.
iPods where originally designed for music and audiobooks, but each and every version of iOS makes handling your music and especially your audiobooks harder and harder….
I am very disappointed and after so many years of using apple, I am considering to move on to android devices. -
How can I sort lines of data (alphabetically) in the new pages 5.0?
How can I sort lines of data (alphabetically) in the new pages 5.0?
It was very simple to do in the previou version of pages.I'm not sure why people are torturing themselves with Pages 5 given the nearly universal outcry on this forum and the incredibly negative reviews elswhere, such as the App Store.
Pages 4.3 should still be in an iWorks folder within your Applications folder. Just use that.
Please remember to tell Apple what we need from them at:
http://www.apple.com/feedback/pages.html -
How to handle exception CX_SY_REF_IS_INITIAL
hi experts,
im working on a test scenario for abap mapping in SAP XI im getting this error
An exception with the type CX_SY_REF_IS_INITIAL occurred, but was neither handled locally, nor declared in a RAISING clause Dereferencing of the NULL reference
i understand that i need to catch this exception in the abap coding but i'm not familiar with oops concepts
can any one please suggest me how to handle this exception for the following code...
method IF_MAPPING~EXECUTE.
break x1149.
* initialize iXML
TYPE-POOLS: ixml.
class cl_ixml definition load.
** Instances & Variable declaration =======================
* instance main factory
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
* instance input stream factory
l_streamfactory TYPE REF TO if_ixml_stream_factory,
* instance input stream
l_istream TYPE REF TO if_ixml_istream,
* instance input document
l_document TYPE REF TO if_ixml_document,
* instance parse input document
l_parser TYPE REF TO if_ixml_parser,
* instance for elements within the nodes
node TYPE REF TO if_ixml_node,
*instance of nodemap
nodemap TYPE REF TO if_ixml_named_node_map,
* instance for iterator
iterator TYPE REF TO if_ixml_node_iterator,
name TYPE string,
value TYPE string,
* instance main factory
o_ixml TYPE REF TO if_ixml,
* instance output document
o_document TYPE REF TO if_ixml_document,
* instance output stream
o_istream TYPE REF TO if_ixml_ostream,
* instance parse output document
o_parser TYPE REF TO if_ixml_parser,
* instance fot renderer
renderer type ref to if_ixml_renderer,
irc type i,
l_xml_size TYPE i,
*ROOT ELEMENT
l_element_MT_DEMANDTEC_COST TYPE REF TO if_ixml_element,
*NEXT CHILD ELEMENT FROM THE ABOVE PARENT
l_element_DT_DEMANDTEC TYPE REF TO if_ixml_element,
*CHILDREN1 ELEMENT FOR DT_DEMANDTEC
l_element_DT_WHSE TYPE REF TO if_ixml_element,
*CHILDREN2 ELEMENT FOR DT_DEMANDTEC
l_element_DT_DC TYPE REF TO if_ixml_element,
*CHILDREN3 ELEMENT FOR DT_DEMANDTEC
l_element_DT_PLANT TYPE REF TO if_ixml_element,
*CHILDREN4 ELEMENT FOR DT_DEMANDTEC
l_element_DT_QTY TYPE REF TO if_ixml_element.
*saving the xml document
DATA: l_xml_table TYPE TABLE OF t_xml_line.
types: begin of t_source,
whse(5),
dc(4) ,
plant(4),
qty type i,
end of t_source.
types: tt_source TYPE STANDARD TABLE OF t_source.
data: wa_source type t_source.
data: it_source TYPE tt_source,
ivalue type string.
* Procedures and business logic =======================================
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
* create input stream
l_istream = l_streamfactory->create_istream_xstring( source ).
* initialize input document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* parse input document
l_parser->parse( ).
* Validate a document
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
refresh : it_source.
node ?= l_document.
CHECK NOT node IS INITIAL.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WHEN if_ixml_node=>co_node_text.
* text node
value = node->get_value( ).
if name eq 'DT_WHSE'.
wa_source-whse = value.
ELSEIF name eq 'DT_DC'.
wa_source-DC = value.
ELSEIF name eq 'DT_PLANT'.
wa_source-PLANT = value.
ELSEIF name eq 'DT_QTY'.
wa_source-QTY = value.
COLLECT wa_source INto it_source.
CLEAR wa_source.
ENDIF.
endcase.
node = iterator->get_next( ).
endwhile.
ENDIF.
loop at it_source into wa_source .
at first.
* Creating a ixml factory
o_ixml = cl_ixml=>create( ).
* Creating the dom object model
o_document = l_ixml->create_document( ).
endat.
* Build and Fill root node MT_DEMANDTEC_COST
AT FIRST.
l_element_MT_DEMANDTEC_COST =
O_document->create_simple_element(
name = 'MT_DEMANDTEC_COST'
parent = o_document ).
ENDAT.
* Build and Fill Child node DT_DEMANDTEC for parent
* MT_DEMANDTEC_COST
l_element_DT_DEMANDTEC = O_document->create_simple_element(
name = 'DT_DEMANDTEC'
parent = l_element_MT_DEMANDTEC_COST ).
* Build and Fill Child node1 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-WHSE.
l_element_DT_WHSE = O_document->create_simple_element(
name = 'DT_WHSE'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node2 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-DC.
l_element_DT_DC = O_document->create_simple_element(
name = 'DT_DC'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node3 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-PLANT.
l_element_DT_PLANT = O_document->create_simple_element(
name = 'DT_PLANT'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node4 DT_QTY for parent DT_DEMANDTEC
ivalue = wa_source-QTY.
l_element_DT_QTY = O_document->create_simple_element(
name = 'DT_QTY'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
endloop.
* render document ======================================================
* create output stream
o_istream = l_streamfactory->create_ostream_xstring( result ).
* Connect internal XML table to stream factory
o_istream = l_streamfactory->create_ostream_itable( table =
l_xml_table ).
renderer = o_ixml->create_renderer( ostream = o_istream
document = o_document ).
irc = renderer->render( ).
* how do i catch the exception for type CX_SY_REF_IS_INITIAL ...?
endmethod.
full reward points for answers.
Thanks & Regards,
Uday Kumar.
Edited by: UDAY on May 6, 2008 9:32 PMHi Uday,
Its occurs because you're trying to access a objects with null reference. Or you forgot to create an instance or an error occurs during the instance creation. So You should put all your "Procedures and business logic" inside a Try/catch block. as follow.
" Define a class exception object to get error message......
DATA o_exception TYPE REF TO cx_sy_ref_is_initial.
"// Use the statment Try block to catch the error.
TRY.
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
* create input stream
l_istream = l_streamfactory->create_istream_xstring( source ).
* initialize input document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* parse input document
l_parser->parse( ).
* Validate a document
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
refresh : it_source.
node ?= l_document.
CHECK NOT node IS INITIAL.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WHEN if_ixml_node=>co_node_text.
* text node
value = node->get_value( ).
if name eq 'DT_WHSE'.
wa_source-whse = value.
ELSEIF name eq 'DT_DC'.
wa_source-DC = value.
ELSEIF name eq 'DT_PLANT'.
wa_source-PLANT = value.
ELSEIF name eq 'DT_QTY'.
wa_source-QTY = value.
COLLECT wa_source INto it_source.
CLEAR wa_source.
ENDIF.
endcase.
node = iterator->get_next( ).
endwhile.
ENDIF.
loop at it_source into wa_source .
at first.
* Creating a ixml factory
o_ixml = cl_ixml=>create( ).
* Creating the dom object model
o_document = l_ixml->create_document( ).
endat.
* Build and Fill root node MT_DEMANDTEC_COST
AT FIRST.
l_element_MT_DEMANDTEC_COST =
O_document->create_simple_element(
name = 'MT_DEMANDTEC_COST'
parent = o_document ).
ENDAT.
* Build and Fill Child node DT_DEMANDTEC for parent
* MT_DEMANDTEC_COST
l_element_DT_DEMANDTEC = O_document->create_simple_element(
name = 'DT_DEMANDTEC'
parent = l_element_MT_DEMANDTEC_COST ).
* Build and Fill Child node1 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-WHSE.
l_element_DT_WHSE = O_document->create_simple_element(
name = 'DT_WHSE'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node2 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-DC.
l_element_DT_DC = O_document->create_simple_element(
name = 'DT_DC'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node3 DT_WHSE for parent DT_DEMANDTEC
ivalue = wa_source-PLANT.
l_element_DT_PLANT = O_document->create_simple_element(
name = 'DT_PLANT'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
* Build and Fill Child node4 DT_QTY for parent DT_DEMANDTEC
ivalue = wa_source-QTY.
l_element_DT_QTY = O_document->create_simple_element(
name = 'DT_QTY'
VALUE = ivalue
parent = l_element_DT_DEMANDTEC ).
endloop.
* render document ======================================================
* create output stream
o_istream = l_streamfactory->create_ostream_xstring( result ).
* Connect internal XML table to stream factory
o_istream = l_streamfactory->create_ostream_itable( table =
l_xml_table ).
renderer = o_ixml->create_renderer( ostream = o_istream
document = o_document ).
irc = renderer->render( ).
" The Statement CATCH define a block that catches the exceptions of the
" exception class cx_sy_ref_is_initial
CATCH cx_sy_ref_is_initial INTO o_exception.
" If you need to get the error message text do as follow
DATA errorMsg type string.
" Get the message text
errorMsg = o_exception->GET_TEXT( ).
" Display the error information
MESSAGE errorMsg TYPE 'I'.
ENDTRY.
The TRY block defines a guarded area whose class-based exceptions can be caught in the subsequent CATCH blocks. If no exception occurs in the TRY block and it reaches its end, the system continues the processing after ENDTRY. If a class-based exception occurs in the TRY block, the system searches for an exception handler in the same or an external TRY control structure.
Font: SAP Help
You can see a how to create and use an exception in this example [ ABAP Objects - Defining a Class-based exceptions|https://wiki.sdn.sap.com/wiki/x/19w] .
Best Regards.
Marcelo Ramos -
How to handle null values in RTF templates
Hi - I have two groups in a report for different SQL and two formulas for each group, CF_ELE_CNT and CF_ELE_CNT1. In the template I use the below code to print or not print a section.
<?if:number(CF_ELE_CNT +CF_ELE_CNT1) >0?>
The problem is when there is no data in the second group its not creating the XML tag for CF_ELE_CNT1, though CF_ELE_CNT has 13, it still does not print that partucular section. If I remove CF_ELE_CNT1 from the condition it works fine. I was wondering how to handle this.
Any help would be appreciated!!
Thanks,
RavHey Rav,
You can add a check to identify it the element/tag is present or not
<?if:(CF_ELE_CNT1)?> will give true, if the element is present otherwise falsesince you are adding the two elements, you have to add a or condition.
<?if:(CF_ELE_CNT and number(CF_ELE_CNT) >0 ) or ( CF_ELE_CNT1 and CF_ELE_CNT1 >0)?> -
How to handle file on application server without coading?
HI all,
can anybody tell me How to handle file on application server without coading? Is there any solution?
Thanks in advance.> can anybody tell me How to handle file on application server without coading? Is there any solution?
what is that you want to handle. what you do if you don't code ...
Maybe you are looking for
-
InfoSpoke fails with message "Could not open file on application server"
BW Experts, I created an InfoSpoke that is configured to extract to a flat file. The name of the file is specified using a logical filename. During extraction, the infospoke reports the error message "Could not open file on application server" adnd
-
hi, While doing Goods receipt for subcontracting order, following error is coming Account 46811050 requires an assignment to a CO object. Whereas acct. 46811050 is subcontracting expense GL acct. Where i should enter cost centre this GL acct in MIGO
-
Hi experts, I have a doubt, in my program i created one parameter(Material description), but in output i need to display with lowercase..( when i type in lowercase, its converting into upper case) plz urgent. point will be sure. Thanks, Gowri
-
hi, if i design screen painter form then how to connect that form to business one 2005B patch 36 regards sandip adhav
-
Wi-Fi not working on iphone 3g
I have owned my iphone 3g since Christmas. Up until other day, the wi-fi and 3g have been working perfectly well. But now the wi-fi has stopped working completely. The 3g is still working fine, but it means I cant use youtube on it any more. I cant p