Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2638

Re: xml file line feed issue in methods

$
0
0

Hi sandra,

 

Thank you for replying..

 

I am taking excel file data in internal table.

 

and based on that data i am creating xml dom using below code.

 

I have implemented eitan's suggestion, unfortunately it did not worked.

 

LOOP AT gt_final INTO gw_final.

 

* Get data from excel file --- end

**-- Create the Main Factory

 

     ref_ixml = cl_ixml=>create( ).

 

**-- Create the Initial Document

     ref_ixml_document = ref_ixml->create_document( ).

 

**-- Create an Output Stream

     lif_ixml_stream_factory = ref_ixml->create_stream_factory( ).

     ref_ixml_ostream = lif_ixml_stream_factory->create_ostream_itable(

                                                 table = gt_string ).

 

     ref_ixml_ostream = lif_ixml_stream_factory->create_ostream_cstring(

                                                    string =    debug  ).

     ref_ixml_ostream->set_pretty_print( abap_true ).

 

 

**-- Create an Encoding

     ref_ixml_encoding = ref_ixml->create_encoding(

                                   byte_order = 0

                                   character_set = mc_character_set ).

 

**-- Set the Encoding

     ref_ixml_ostream->set_encoding( encoding = ref_ixml_encoding ).

 

**-- Create a Renderer

     ref_ixml_renderer = ref_ixml->create_renderer(

         document = ref_ixml_document

         ostream  = ref_ixml_ostream ).

 

**-- Create the Root Node

*    CONCATENATE gv_crlf 'COLLECTIONodoa' INTO lv_string3.

     ref_ixml_element = ref_ixml_document->create_element(

                                   name      = 'COLLECTIONodoa' ).

**-- Append the Root element to the Document

     ref_ixml_document->append_child( new_child = ref_ixml_element ).

 

**-- Define a Parent Node

     ref_ixml_node_parent = ref_ixml_element.

     lv_string2 = 'Transactionodoa'.

       gv_crlf = cl_abap_char_utilities=>cr_lf.

* for step node- start

     CLEAR lv_string3.

*    CONCATENATE gc_0 cl_abap_char_utilities=>cr_lf INTO lv_string3.

 

     ref_ixml_element = ref_ixml_document->create_simple_element(

                                           name = 'Releaseodoa'

                                           parent = ref_ixml_document ).

 

     ref_ixml_element->set_attribute( EXPORTING name = gc_name

                                                value = 'Releaseodoa' ).

     ref_ixml_element->set_attribute( EXPORTING name = gc_type

                                                value = gc_unknown ).

     ref_ixml_element->set_attribute( EXPORTING name = gc_status

                                                value = gc_0 ).

 

     ref_ixml_node_parent->append_child( new_child = ref_ixml_element ).

     gv_crlf = cl_abap_char_utilities=>cr_lf.

*** Transaction node

     ref2_ixml_element = ref_ixml_document->create_element(

                                                name      = lv_string2 ).

 

     ref2_ixml_element->set_value( value = '' ).

     ref_ixml_element->append_child( new_child = ref2_ixml_element ).

gv_crlf = cl_abap_char_utilities=>cr_lf.

*** sub elements of transaction nodes

     transaction_element_sub = ref_ixml_document->create_element(

                                   name      = 'TransactionNumberodoa' ).

 

   transaction_element_sub->set_value( value = gw_final-transactionnum ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

gv_crlf = cl_abap_char_utilities=>cr_lf.

** ReleaseNumber

     transaction_element_sub = ref_ixml_document->create_element(

             name      = 'ReleaseNumberodoa' ).

 

   transaction_element_sub->set_value( value = gw_final-transactionnum ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

 

** PrimaryObjectID

 

     transaction_element_sub = ref_ixml_document->create_element(

                                   name   = 'PrimaryObjectIDodoa' ).

 

     transaction_element_sub->set_value( value =

'OR:wt.change2.WTChangeOrder2:20160063593:534788860-1193866430993-298' &

'16902-52-4-16-172@procom-qa1.harman.comodoa' ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

*** CreatedBy

 

     transaction_element_sub = ref_ixml_document->create_element(

                                         name      = 'CreatedByodoa' ).

 

     transaction_element_sub->set_value( value = 'wcadminodoa' ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

 

** CreatedDate

     transaction_element_sub = ref_ixml_document->create_element(

                                       name      = 'CreatedDateodoa' ).

     CONCATENATE gw_final-createddate '09:03:22 UTC' INTO gv_createddate

                                            SEPARATED BY space.

     transaction_element_sub->set_value( value = gv_createddate ).

ref2_ixml_element->append_child( new_child = transaction_element_sub  ).

 

* Locale

     transaction_element_sub = ref_ixml_document->create_element(

                                           name      = 'Localeodoa' ).

 

     transaction_element_sub->set_value( value = 'en_GBodoa' ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

 

* Destination

     transaction_element_sub = ref_ixml_document->create_element(

                                     name      = 'Destinationodoa' ).

 

     transaction_element_sub->set_value( value = '1' ).

  ref2_ixml_element->append_child( new_child = transaction_element_sub ).

 

* adding single node DeletedECN.

 

     ref3_ixml_element = ref_ixml_document->create_simple_element(

                                            name = 'DeletedECNodoa'

                                            parent = ref_ixml_document ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_name

                                          value = 'DeletedECNodoa' ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_type

                                                 value = gc_unknown ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ).

 

     ref3_ixml_element->set_value( c_newline ).

     ref_ixml_node_parent->append_child( new_child = ref3_ixml_element ).

 

* New node <AddedECN    "" change 17

 

     ref3_ixml_element = ref_ixml_document->create_simple_element(

                                            name = 'AddedECNodoa'

                                            parent = ref_ixml_document ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_name

                                            value = 'AddedECNodoa' ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_type

                                                 value = gc_unknown ).

     ref3_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ).

 

     ref_ixml_node_parent->append_child( new_child = ref3_ixml_element ).

* ""change 17 end

* ECN Header

     ref4_ixml_element = ref_ixml_document->create_element(

                                       name      = 'ECNHeaderodoa' ).

 

     ref4_ixml_element->set_value( value = '' ).

     ref3_ixml_element->append_child( new_child = ref4_ixml_element ).

 

* Object ID

     gv_string5 =

'OR:wt.change2.WTChangeOrder2:20160063593:534788860-1193866430993-298' &

'16902-52-4-16-172@procom-qa1.harman.comodoa'.

     ecnheader_element_sub = ref_ixml_document->create_element(

                                               name      = 'ObjectID' ).

     ecnheader_element_sub->set_value( value = gv_string5 ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* Class

     ecnheader_element_sub = ref_ixml_document->create_element(

                                             name      = 'Classodoa' ).

     ecnheader_element_sub->set_value( value =

                              'com.ptc.windchill.esi.ChangeHeaderodoa' ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* LastChangedBy

     ecnheader_element_sub = ref_ixml_document->create_element(

                                         name   = 'LastChangedByodoa' ).

     ecnheader_element_sub->set_value( value = '' ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* Number

     ecnheader_element_sub = ref_ixml_document->create_element(

                                              name  = 'Numberodoa' ).

     ecnheader_element_sub->set_value( value = gw_final-cnnum  ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* Name

     ecnheader_element_sub = ref_ixml_document->create_element(

                                                name    = gc_name ).

     ecnheader_element_sub->set_value( value =

                                 'HPD Extend to Plants Changeodoa' ).

   ref4_ixml_element->append_child( new_child = ecnheader_element_sub ) .

 

* Reason

     ecnheader_element_sub = ref_ixml_document->create_element(

                                         name      = 'Reasonodoa' ).

     ecnheader_element_sub->set_value( value = '' ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* Description

     ecnheader_element_sub = ref_ixml_document->create_element(

                                      name      = 'Descriptionodoa' ).

     ecnheader_element_sub->set_value( value =

                           'HPD Extend to Plants Change Orderodoa' ).

   ref4_ixml_element->append_child( new_child = ecnheader_element_sub ) .

 

* TargetID

     ecnheader_element_sub = ref_ixml_document->create_element(

                                         name      = 'TargetIDodoa' ).

     ecnheader_element_sub->set_value( value = '1' ).

    ref4_ixml_element->append_child( new_child = ecnheader_element_sub ).

 

* Create ChangedECN single node

     ref5_ixml_element = ref_ixml_document->create_simple_element(

                                        name = 'ChangedECNodoa'

                                            parent = ref_ixml_document ).

     ref5_ixml_element->set_attribute( EXPORTING name = gc_name

                                        value = 'ChangedECNodoa' ) .

     ref5_ixml_element->set_attribute( EXPORTING name = gc_type

                                                 value = gc_unknown ) .

     ref5_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ) .

 

     ref5_ixml_element->set_value( c_newline ).

     ref_ixml_node_parent->append_child( new_child = ref5_ixml_element ).

 

* create UnchangedECN single node

     ref6_ixml_element = ref_ixml_document->create_simple_element(

                                        name = 'UnchangedECNodoa'

                                            parent = ref_ixml_document ).

 

     ref6_ixml_element->set_attribute( EXPORTING name = gc_name

                                       value = 'UnchangedECNodoa' ) .

     ref6_ixml_element->set_attribute( EXPORTING name gc_type

                                                 value = gc_unknown ) .

 

     ref6_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ) .

     ref6_ixml_element->set_value( c_newline ).

     ref_ixml_node_parent->append_child( new_child = ref6_ixml_element ).

 

* create DeletedParts single node

     ref7_ixml_element = ref_ixml_document->create_simple_element(

                                            name = 'DeletedPartsodoa'

                                            parent = ref_ixml_document ).

 

     ref7_ixml_element->set_attribute( EXPORTING name = gc_name

                                        value = 'DeletedPartsodoa' ).

 

     ref7_ixml_element->set_attribute( EXPORTING name = gc_type

                                                 value = gc_unknown ) .

 

     ref7_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ).

 

     ref7_ixml_element->set_value( c_newline ).

     ref_ixml_node_parent->append_child( new_child = ref7_ixml_element ).

 

* new node AddedParts

 

     ref8_ixml_element = ref_ixml_document->create_simple_element(

                                            name = 'AddedPartsodoa'

                                            parent = ref_ixml_document ).

 

     ref8_ixml_element->set_attribute( EXPORTING name = gc_name

                                          value = 'AddedPartsodoa' ).

 

     ref8_ixml_element->set_attribute( EXPORTING name = gc_type

                                                 value = gc_unknown ) .

 

     ref8_ixml_element->set_attribute( EXPORTING name = gc_status

                                                 value = gc_0 ).

 

     ref8_ixml_element->set_value( c_newline ).

     ref_ixml_node_parent->append_child( new_child = ref8_ixml_element ).

 

*** Part

     ref9_ixml_element = ref_ixml_document->create_element(

                                            name      = 'Partodoa' ).

 

     ref9_ixml_element->set_value( value = '' ).

     ref8_ixml_element->append_child( new_child = ref9_ixml_element ).

 

*** parts sub elements ObjectID

     parts_element_sub = ref_ixml_document->create_element(

                                       name      = 'ObjectIDodoa' ).

 

     parts_element_sub->set_value( value =

'OR:wt.part.WTPart:20159860925:534788860-1193866430993-29816902-52-4-' &

'16-172@procom-qa1.harman.comodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**  Class

 

     parts_element_sub = ref_ixml_document->create_element(

                                         name      = 'Classodoa' ).

 

     parts_element_sub->set_value( value =

     'com.ptc.windchill.esi.Partodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

** LastChangedBy

 

     parts_element_sub = ref_ixml_document->create_element(

                                   name      = 'LastChangedByodoa' ).

 

     parts_element_sub->set_value( value = 'CPAGEodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** Number

 

     parts_element_sub = ref_ixml_document->create_element(

                                        name      = 'Numberodoa' ).

 

     parts_element_sub->set_value( value = gw_final-matnum ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** StartEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                          name      = 'StartEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** EndEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                                  name      = 'EndEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** StartSerialNumberEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                     name      = 'StartSerialNumberEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** EndSerialNumberEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                      name      = 'EndSerialNumberEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** StartLotNumberEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                         name      = 'StartLotNumberEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** EndLotNumberEffectivity

     parts_element_sub = ref_ixml_document->create_element(

                          name      = 'EndLotNumberEffectivityodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** SerialNumberEffectivityCxtPartNumber

     parts_element_sub = ref_ixml_document->create_element(

             name      = 'SerialNumberEffectivityCxtPartNumberodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** LotNumberEffectivityCxtPartNumber

     parts_element_sub = ref_ixml_document->create_element(

                  name      = 'LotNumberEffectivityCxtPartNumberodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** DefaultUnit

     parts_element_sub = ref_ixml_document->create_element(

                                     name      = 'DefaultUnitodoa' ).

 

     parts_element_sub->set_value( value = 'ea' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

***  Name

 

     parts_element_sub = ref_ixml_document->create_element(

                                            name      = gc_name ).

 

     parts_element_sub->set_value( value = gw_final-matnum ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** PartType

 

     parts_element_sub = ref_ixml_document->create_element(

                                       name      = 'PartTypeodoa' ).

 

     parts_element_sub->set_value( value = 'componentodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

* LifecycleState

 

     parts_element_sub = ref_ixml_document->create_element(

                                    name      = 'LifecycleStateodoa' ).

 

     parts_element_sub->set_value( value = 'INDESIGNodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

** BusinessUnit

 

     parts_element_sub = ref_ixml_document->create_element(

                                     name      = 'BusinessUnitodoa' ).

 

     parts_element_sub->set_value( value = gw_final-plmbusunit ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** Currency

     parts_element_sub = ref_ixml_document->create_element(

                                          name      = 'Currencyodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** EstimatedCost

     parts_element_sub = ref_ixml_document->create_element(

                                    name      = 'EstimatedCostodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** ChangeStatus

     parts_element_sub = ref_ixml_document->create_element(

                                     name      = 'ChangeStatusodoa' ).

 

     parts_element_sub->set_value( value = 'trueodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** MaterialType

 

     parts_element_sub = ref_ixml_document->create_element(

                                     name      = 'MaterialTypeodoa' ).

 

     parts_element_sub->set_value( value = gw_final-plmmattype ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** MaterialSubtype

     parts_element_sub = ref_ixml_document->create_element(

                                    name      = 'MaterialSubtypeodoa' ).

 

     parts_element_sub->set_value( value = gw_final-mstyp ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** CustomStandard

     parts_element_sub = ref_ixml_document->create_element(

                                   name      = 'CustomStandardodoa' ).

 

     parts_element_sub->set_value( value = gw_final-curst ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

***  ProductLine

     parts_element_sub = ref_ixml_document->create_element(

                                        name      = 'ProductLineodoa' ).

 

     parts_element_sub->set_value( value = gw_final-prdln ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

****  RoHSCompliant

     parts_element_sub = ref_ixml_document->create_element(

                                       name   = 'RoHSCompliantodoa' ).

 

     parts_element_sub->set_value( value = 'Yesodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** TargetCost

     parts_element_sub = ref_ixml_document->create_element(

                                         name  = 'TargetCostodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** OldMatNum

     parts_element_sub = ref_ixml_document->create_element(

                                          name   = 'OldMatNumodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** EAN

     parts_element_sub = ref_ixml_document->create_element(

                                            name   = 'EANodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** UPC

     parts_element_sub = ref_ixml_document->create_element(

                                            name  = 'UPCodoa' ).

 

     parts_element_sub->set_value( value = '' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** SafetyCritical

     parts_element_sub = ref_ixml_document->create_element(

                                       name  = 'SafetyCriticalodoa' ).

 

     parts_element_sub->set_value( value = 'Noodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** Source

     parts_element_sub = ref_ixml_document->create_element(

                                          name      = 'Sourceodoa' ).

 

     parts_element_sub->set_value( value = gw_final-source ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** State

     parts_element_sub = ref_ixml_document->create_element(

                                            name      = 'Stateodoa' ).

 

     parts_element_sub->set_value( value = 'INDESIGNodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** Version

     parts_element_sub = ref_ixml_document->create_element(

                                         name      = 'Versionodoa' ).

 

     parts_element_sub->set_value( value = 'Aodoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** Iteration

     parts_element_sub = ref_ixml_document->create_element(

                                        name      = 'Iterationodoa' ).

 

     parts_element_sub->set_value( value = '3odoa' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

**** TargetID

     parts_element_sub = ref_ixml_document->create_element(

                                        name      = 'TargetIDodoa' ).

 

     parts_element_sub->set_value( value = '1' ).

     ref9_ixml_element->append_child( new_child = parts_element_sub ).

 

*** ChangedParts single node

     ref10_ixml_element = ref_ixml_document->create_simple_element(

                                             name = 'ChangedPartsodoa'

                                            parent = ref_ixml_document ).

     ref10_ixml_element->set_attribute( EXPORTING name = gc_name

                                         value = 'ChangedPartsodoa' ).

     ref10_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ).

     ref10_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ).

 

 

     ref10_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref10_ixml_element ).

 

*** UnchangedParts single node

     ref11_ixml_element = ref_ixml_document->create_simple_element(

                                         name = 'UnchangedPartsodoa'

                                            parent = ref_ixml_document ).

     ref11_ixml_element->set_attribute( EXPORTING name = gc_name

                                       value ='UnchangedPartsodoa' ).

     ref11_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ) .

     ref11_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ).

 

     ref11_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref11_ixml_element ).

 

*** UnchangedParts  single node

     ref12_ixml_element = ref_ixml_document->create_simple_element(

                                    name = 'DeletedAlternateLinksodoa'

                                           parent = ref_ixml_document ).

     ref12_ixml_element->set_attribute( EXPORTING name = gc_name

                                  value ='DeletedAlternateLinksodoa' ) .

     ref12_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ) .

     ref12_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ) .

 

     ref12_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref12_ixml_element ).

 

*** AddedAlternateLinks

     ref13_ixml_element = ref_ixml_document->create_simple_element(

                                      name = 'AddedAlternateLinksodoa'

                                            parent = ref_ixml_document ).

     ref13_ixml_element->set_attribute( EXPORTING name = gc_name

                                  value = 'AddedAlternateLinksodoa' ).

 

     ref13_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ) .

     ref13_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ) .

 

     ref13_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref13_ixml_element ).

 

*** DeletedDocuments

     ref14_ixml_element = ref_ixml_document->create_simple_element(

                                        name = 'DeletedDocumentsodoa'

                                            parent = ref_ixml_document ).

     ref14_ixml_element->set_attribute( EXPORTING name = gc_name

                                        value = 'DeletedDocumentsodoa' ).

     ref14_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ) .

     ref14_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ).

 

     ref14_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref14_ixml_element ).

 

**** AddedDocuments

     ref15_ixml_element = ref_ixml_document->create_simple_element(

                                             name = 'AddedDocumentsodoa'

                                            parent = ref_ixml_document ).

     ref15_ixml_element->set_attribute( EXPORTING name = gc_name

                                         value = 'AddedDocumentsodoa' ).

     ref15_ixml_element->set_attribute( EXPORTING name = gc_type

                                                  value = gc_unknown ).

     ref15_ixml_element->set_attribute( EXPORTING name = gc_status

                                                  value = gc_0 ).

 

     ref15_ixml_element->set_value( c_newline ).

    ref_ixml_node_parent->append_child( new_child = ref15_ixml_element ).

 

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedDocumentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedDocumentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedDocumentLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedDocumentLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedDocumentLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedDocumentLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedBOMsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedBOMsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedBOMsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedBOMsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedBOMComponentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedBOMComponentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedBOMComponentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedBOMComponentsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedSubstitutesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedSubstitutesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedReferenceDesignatorsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedReferenceDesignatorsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedProcessMaterialsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedProcessMaterialsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedProcessMaterialsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedProcessMaterialsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedToolingsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedToolingsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedToolingsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedToolingsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedProcessPlansodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedProcessPlansodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedProcessPlansodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedProcessPlansodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedOperationsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedOperationsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedOperationsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedOperationsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedProcessPlanPartLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedProcessPlanPartLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedProcessPlanPartLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedProcessPlanPartLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedSequencesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedSequencesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedSequencesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedSequencesodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedOprConsumableResourceLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedOprConsumableResourceLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedOprConsumableResourceLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedOprConsumableResourceLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedOprWorkCenterLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedOprWorkCenterLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedOprWorkCenterLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedOprWorkCenterLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedOprBomAllocatedPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedOprBomAllocatedPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedOprBomAllocatedPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedOprBomAllocatedPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedOprOperatedOnPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedOprOperatedOnPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedOprOperatedOnPartsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedStandardProcedureLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedStandardProcedureLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedStandardProcedureLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedStandardProcedureLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedSkillsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedSkillsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedSkillsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedSkillsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'CurrentAUMsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedEPMRepresentationsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedControlCharacteristicsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedControlCharacteristicsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedControlCharacteristicsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedControlCharacteristicsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ModelItemsodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'DeletedQualityLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'AddedQualityLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'ChangedQualityLinksodoa'.

     PERFORM create_single_node USING  ref_ixml_document

     ref_ixml_node_parent 'UnchangedQualityLinksodoa'.

 

 

 

* Converts DOM tree data into xml string

     CALL FUNCTION 'SDIXML_DOM_TO_XML'

       EXPORTING

         document      = ref_ixml_document

       IMPORTING

         xml_as_string = gv_xstring

       EXCEPTIONS

         no_document   = 1

         OTHERS        = 2.

     IF sy-subrc <> 0.

**--Exception Handling

     ENDIF.

 

**--convert xstring to string

     CALL METHOD cl_abap_conv_in_ce=>create

       EXPORTING

         encoding    = 'UTF-8'

         endian      = 'L'

         ignore_cerr = gc_x

         replacement = '#'

         input       = gv_xstring              " Xstring

       RECEIVING

         conv        = convin.

 

* Convert string to binary

     CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'

       EXPORTING

         buffer        = gv_xstring

       IMPORTING

         output_length = gv_filesize

       TABLES

         binary_tab    = gt_line.

 

     CONCATENATE gv_filename1 gw_final-trans_filename INTO gv_filename.

 

* FM for downloding xml file

     CALL FUNCTION 'GUI_DOWNLOAD'

       EXPORTING

         bin_filesize = gv_filesize

         filename     = gv_filename

         filetype     = 'BIN'

       TABLES

         data_tab     = gt_line

       EXCEPTIONS

         OTHERS       = 1.

 

     IF sy-subrc EQ 0.

 

     ENDIF.

     CLEAR : gv_filename, gw_final,gv_filesize,gv_filename,gv_xstring.

     REFRESH: gt_line.

   ENDLOOP.


Viewing all articles
Browse latest Browse all 2638

Trending Articles