Deep structure to XML and saving in SAP tables

Hi all,
ich habe filled an internal table (deep strucure) with mutiple fields. Most of these fields are defined as structure.
Example: 1st field ist document number, 2nd field is defined as TLINETAB, 3rd field ist another document number, 4th field is filled with node table of a column tree, 5th field ist filled with the item table of a column tree and in the last field I save the ALV properties of buttons, defined with lvc_t_styl.
So my problem is that I want to save all these contents in database tables and restore in my application when the user ist starting again. How can I save this and how have I define the database table to save? I thought 1st field is e.g. document number, 2nd is a counter and 3rd field is a CHAR field. Then the internal table will be converted (XML?) and the result will be append to my table line by line.
Thanks for help and regards
Michael

Hi,
This looks like a perfect use for the Shared Objects functionality, introduced in SAP Web AS 6.40. See some [SAP documentation|http://help.sap.com/saphelp_nw70/helpdata/en/14/dafc3e9d3b6927e10000000a114084/frameset.htm] for this feature and an [example of use|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/900e3d9d-559e-2910-9dae-b132157a220f?QuickLink=index&overridelayout=true].
Hope this helps,
Grzegorz

Similar Messages

  • Easy way how to convert deep structure to XML

    Hi,
    is there any easy way how to convert a complex deep structure to XML. I have XSLT transformation ready for using, but when I look on examples on using CALL TRANSFORMATION, I am finding only examples for internal tables.
    Something like this CALL TRANSFORMATION SOURCE tab = sometab[].
    Instead of this I need to convert a comlex deep structure.
    Any help is appreciated.
    Thanks.
    Marian

    Hi,
    is there any easy way how to convert a complex deep structure to XML. I have XSLT transformation ready for using, but when I look on examples on using CALL TRANSFORMATION, I am finding only examples for internal tables.
    Something like this CALL TRANSFORMATION SOURCE tab = sometab[].
    Instead of this I need to convert a comlex deep structure.
    Any help is appreciated.
    Thanks.
    Marian

  • How to extract data from xml and insert into Oracle table

    Hi,
    I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
    There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
    I need to extract the values of these columns and insert into the table
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
    <Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>

    Re: Insert from XML to relational table
    http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta=

  • Strip off the base64 content from an XML and saving the rest in streaming fashion using XML Reader Class.

    Hi,
    I'm presently working in a scenario, where i need to read an XML (having base64 encoded images) using XmlReader class in a streaming fashion (considering the performance) .
    1) I have to strip offs the base64 encoded contents from the xml (front & back image node).
    2) Than saving the remaining XML (without base64 content) . 
    Sample XML:-
    <?xml version="1.0" encoding="utf-8"?>
    <tran>
      <tranheader>
     <feild1></feild1>
      </tranheader>
      <item>
    <fields></fields>
        <image>
          <frontimage>base64_content</frontimage>
          <rearimage>base64_content</rearimage>
        </image>
      </item>
      <item>
        <fields></fields>
        <image>
          <frontimage>base64_content</frontimage>
          <rearimage>base64_content</rearimage>
        </image>
      </item>
      <trantrailer>
        <feild1></feild1>
      </trantrailer>
    </tran>
    Please guide.
    Thanks & Regards

    E.g. a simplified skeleton:
    namespace ConsoleCS
    using System;
    using System.IO;
    using System.Xml;
    using System.Xml.Linq;
    class Program
    static void Main(string[] args)
    XDocument xdocument = XDocument.Parse(@"
    <Items>
    <Item>Test with a child element <more/> stuff</Item>
    <Item>Test with a CDATA section <![CDATA[<456>]]> def</Item>
    <Item>Test with a char entity: &#65;</Item>
    <SkipItem>Item to skip.</SkipItem>
    <!-- Fourteen chars in this element.-->
    <Item>1234567890ABCD</Item>
    </Items>");
    StringReader stringReader = new StringReader(xdocument.ToString());
    XmlReader xmlReader = XmlReader.Create(stringReader);
    xmlReader.MoveToContent();
    while (xmlReader.Read())
    switch (xmlReader.NodeType)
    case XmlNodeType.Element:
    if (xmlReader.Name == "SkipItem")
    Console.WriteLine("Skipping..");
    else
    Console.WriteLine("Pushing to output ({0}).", xmlReader.Name);
    break;
    Console.WriteLine("Done.");
    Console.ReadLine();

  • Query and retrieval of SAP table data

    Hi,
    Within PI Is it possible to use a select query on an ECC table and retrieve the relevant data. The data will then need to be mapped to the output.
    Can this be achieved through an RFC call?
    Thanks

    Hi,
    You can use RFC lookup and map the output to target field.
    view this article for step by step process...
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/40b64ca6-b1e3-2b10-4c9b-c48234ccea35
    Hope this helps....

  • Read xml and load fields into table + steps needed in Oracle.

    Dears,
    I have a xml file as below
    <service>
    <header>
    <ID="arte23" />
    </header>
    <body>
    <apId="1234567890" sId="012345678" sType="test">
    <capId="1454567890" sId="012345678" sType="test">
    </body>
    </service>
    just given sample xml, kindly neglec the errors.
    now I need to load sID which comes along with apId in one column and capid in another column.
    when tried with xmldom etc getting ORA-31011: XML parsing failed.
    kindly help me out.
    Edited by: 873718 on 20-Jul-2011 03:28

    here is the sample full xml.
    I just need to capture the values of the follwing.
    under papid I need sid value i.e. "012345678"
    need this 2 cdcid="112435" name="i-A B C" ( where ever it occurs whole occurences capture).
    under idet need is="fine"
    under all <sc>s if there the capid then need sids...
    also need of <or oid="123456789" /> value.
    <service>
    <header>
    <ID="aaaaaaaaaaaaa23Aaa" />
    </header>
    <body>
    <papid="1234567890" sid="012345678" sType="XX X">
    <capid="1234567890" sid="012345678" sType="XX X">
    <cdcid="112435" name="i-A B C" icn="Switch Srv In dialling" icid="10" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" iaid="XXX#19190000#47853#2#A##" bi="false" bulkQuantity="1" at="ddd" />
    <sc>
    <capid="1949187621">
    <cdcid="102912" name="c C" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949187623">
    <cdcid="99611" name="c C n" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187624">
    <cdcid="102916" name="c C ip" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187626">
    <cdcid="102917" name="c C ip n" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187628">
    <cdcid="102915" name="c C ip u" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949187629">
    <cdcid="34032" name="c C ip c" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187631">
    <cdcid="112396" name="C s" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949205880">
    <cdcid="112397" name="I O" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949187632">
    <cdcid="37701" name="C- T" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187634">
    <cdcid="40537" name="I M" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949205882">
    <cdcid="115869" name="I O P" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949187636">
    <cdcid="99612" name="V C" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949187637">
    <cdcid="113106" name="M b" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187639">
    <cdcid="111930" name="val in" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949187640">
    <cdcid="111931" name="M o" icn="Switch Feature" icid="6" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949205894" sid="012345678">
    <cdcid="112402" name="ip ran" icn="Range" icid="11" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949205895" sid="012345678">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205900" sid="012345671">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205904" sid="012345672">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205907" sid="012345673">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205910" sid="012345674">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205913" sid="012345675">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205916" sid="012345676">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205919" sid="012345677">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205922" sid="012345678">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    <capid="1949205930" sid="012345679">
    <cdcid="112405" name="XX X Indialing Number" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949206824" sid="023345679">
    <cdcid="112401" name="ip test" icn="Range" icid="11" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949206825" sid="023345679">
    <cdcid="112403" name="ip test num" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    <capid="1949206828" sid="153345679">
    <cdcid="112401" name="ip test" icn="Range" icid="11" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    <sc>
    <capid="1949206829" sid="153345679">
    <cdcid="112403" name="ip test num" icn="Subscription Number" icid="7" />
    <idet stdate="2011-07-20T 12:34:12" vs="Ord" is="fine" edat="2015-07-20T 13:34:12" bi="false" bulkQuantity="1" />
    </component>
    </sc>
    </component>
    </sc>
    </component>
    <or oid="123456789" />
    </product>
    </body>
    </service>
    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Acquiring two signals and saving at a Table

    Good Morning,
    I'm new to LabVIEW, and I need help at a Data Acquisition. Let me explain it, so I hope you guys can help me.
    I need a graph, and a Table displaying two signals acquired at a Field Point conection: Pressure and Temperature.
    At this measurement, I need the VI to measure every five minutes, during one minute every measure.
    And I need to save the signals to '.txt'.
    I need the Table to save both signals, and a "cronometer', to keep in control of any existant difference in the signals, observing the exact time the signals changed, if it changes.
    Sorry for the bad English, I'm an aprentice, using the User of the Area's Supervisor.
    Thanks.

    Check out the examples that ship with LV you will find something to get you started. Then if you have specific problems we can help more.Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • How to use STRANS to translate XML to ABAP with deep structure

    every experts, I want to use Tcode: STRANS to translate XML to ABAP, But it does not work well,
    here is XML code,I want to translate this XML into an an Inter table gt_orders with deep structure of oeb, and colum oeb is also and intertable,how can I do this.
    <?xml version="1.0" encoding="gb2312" ?><axmt410><ObjectID>setSalesOrder</ObjectID><azp01>000000</azp01><oea00>1</oea00><ta_oeaecn>SO-140227-3041</ta_oeaecn><oea03>25325017</oea03><oea02>2014-02-27 17:44:44.0</oea02><ta_oea002>2763.0</ta_oea002><ta_oea001>0.0</ta_oea001><oea14></oea14><oea15>25325017</oea15><oea23>RMB</oea23><oeaconf>S3</oeaconf><oea10></oea10><oeaud01>null</oeaud01><ta_oea007></ta_oea007><oea25>101</oea25><ta_oea008>0</ta_oea008><ta_oea009>null</ta_oea009><oeauser>Hanjingya</oeauser><ta_oeanday>2014-02-27 17:44:44.991</ta_oeanday><ta_oeamday>2014-02-28 08:30:14.866</ta_oeamday><ta_oeacday>2014-02-28 08:30:14.866</ta_oeacday><oeaud02>0</oeaud02><ta_oea030>null</ta_oea030><oeb><oeb03>1</oeb03><oeb04>7400208249</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address1</ta_oeb003><ta_oeb004>zhangdagui、zhanglan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb><oeb><oeb03>2</oeb03><oeb04>7400208250</oeb04><oeb05>PCS</oeb05><oeb17>921.0</oeb17><oeb13>921.0</oeb13><oeb15></oeb15><oeb12>5</oeb12><oeb09>990001</oeb09><ta_oeb001></ta_oeb001><ta_oeb002>Yunnan</ta_oeb002><ta_oeb003>address2</ta_oeb003><ta_oeb004>zhangdagui、chenlan</ta_oeb004><ta_oeb005>15974749998、15987782008</ta_oeb005><ta_oeb006>address and street</ta_oeb006><oebud01></oebud01></oeb></axmt410>
    I write these codes in SAP XSLT  editor
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
       <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
       <xsl:strip-space elements="*"/>
       <xsl:strip-space elements="*"/>
       <xsl:template match="/">
         <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
           <asx:values>
             <ORDERS>
               <xsl:apply-templates select="//axmt410"/>
             </ORDERS>
           </asx:values>
         </asx:abap>
       </xsl:template>
       <xsl:template match="axmt410">
         <OBJECTID>
           <xsl:value-of select="ObjectID"/>
         </OBJECTID>
         <AZP01>
           <xsl:value-of select="azp01"/>
         </AZP01>
         <OEA00>
           <xsl:value-of select="oea00"/>
         </OEA00>
         <TA_OEAECN>
           <xsl:value-of select="ta_oeaecn"/>
         </TA_OEAECN>
         <OEA03>
           <xsl:value-of select="oea03"/>
         </OEA03>
         <OEA05>
           <xsl:value-of select="oea05"/>
         </OEA05>
         <OEA02>
           <xsl:value-of select="oea02"/>
         </OEA02>
         <TA_OEA002>
           <xsl:value-of select="ta_oea002"/>
         </TA_OEA002>
         <TA_OEA001>
           <xsl:value-of select="ta_oea001"/>
         </TA_OEA001>
         <OEA14>
           <xsl:value-of select="ora14"/>
         </OEA14>
         <OEA15>
           <xsl:value-of select="ora15"/>
         </OEA15>
         <OEA23>
           <xsl:value-of select="ora23"/>
         </OEA23>
         <OEACONF>
           <xsl:value-of select="oeaconf"/>
         </OEACONF>
         <OEA10>
           <xsl:value-of select="ora10"/>
         </OEA10>
         <OEAUD01>
           <xsl:value-of select="oeaud01"/>
         </OEAUD01>
         <TA_OEA007>
           <xsl:value-of select="ta_oea007"/>
         </TA_OEA007>
         <OEA25>
           <xsl:value-of select="ora25"/>
         </OEA25>
         <TA_OEA008>
           <xsl:value-of select="ta_oea008"/>
         </TA_OEA008>
         <TA_OEA009>
           <xsl:value-of select="ta_oea009"/>
         </TA_OEA009>
         <TA_OEA013>
           <xsl:value-of select="ta_oea013"/>
         </TA_OEA013>
         <TA_OEA014>
           <xsl:value-of select="ta_oea014"/>
         </TA_OEA014>
         <TA_OEA015>
           <xsl:value-of select="ta_oea015"/>
         </TA_OEA015>
         <TA_OEA016>
           <xsl:value-of select="ta_oea016"/>
         </TA_OEA016>
         <TA_OEA017>
           <xsl:value-of select="ta_oea017"/>
         </TA_OEA017>
         <TA_OEA018>
           <xsl:value-of select="ta_oea018"/>
         </TA_OEA018>
         <TA_OEA019>
           <xsl:value-of select="ta_oea019"/>
         </TA_OEA019>
         <TA_OEA020>
           <xsl:value-of select="ta_oea020"/>
         </TA_OEA020>
         <TA_OEA021>
           <xsl:value-of select="ta_oea021"/>
         </TA_OEA021>
         <TA_OEA022>
           <xsl:value-of select="ta_oea022"/>
         </TA_OEA022>
         <TA_OEA028>
           <xsl:value-of select="ta_oea028"/>
         </TA_OEA028>
         <OEAUSER>
           <xsl:value-of select="oeauser"/>
         </OEAUSER>
         <TA_OEANDAY>
           <xsl:value-of select="ta_oeanday"/>
         </TA_OEANDAY>
         <TA_OEAMDAY>
           <xsl:value-of select="ta_oeamday"/>
         </TA_OEAMDAY>
         <TA_OEACDAY>
           <xsl:value-of select="ta_oeacday"/>
         </TA_OEACDAY>
         <OEAUD02>
           <xsl:value-of select="oeaud02"/>
         </OEAUD02>
         <TA_OEA030>
           <xsl:value-of select="ta_oea030"/>
         </TA_OEA030>
         <OEB>
           <xsl:for-each select="oeb">
             <OEB03>
               <xsl:value-of select="oeb03"/>
             </OEB03>
             <OEB04>
               <xsl:value-of select="oeb04"/>
             </OEB04>
             <OEB05>
               <xsl:value-of select="oeb05"/>
             </OEB05>
             <OEB17>
               <xsl:value-of select="oeb17"/>
             </OEB17>
             <OEB13>
               <xsl:value-of select="oeb13"/>
             </OEB13>
             <OEB15>
               <xsl:value-of select="oeb15"/>
             </OEB15>
             <OEB12>
               <xsl:value-of select="oeb12"/>
             </OEB12>
             <OEB09>
               <xsl:value-of select="oeb09"/>
             </OEB09>
             <TA_OEB001>
               <xsl:value-of select="ta_oeb001"/>
             </TA_OEB001>
             <TA_OEB002>
               <xsl:value-of select="ta_oeb002"/>
             </TA_OEB002>
             <TA_OEB003>
               <xsl:value-of select="ta_oeb003"/>
             </TA_OEB003>
             <TA_OEB004>
               <xsl:value-of select="ta_oeb004"/>
             </TA_OEB004>
             <TA_OEB005>
               <xsl:value-of select="ta_oeb005"/>
             </TA_OEB005>
             <TA_OEB006>
               <xsl:value-of select="ta_oeb006"/>
             </TA_OEB006>
             <OEBUD01>
               <xsl:value-of select="oebud01"/>
             </OEBUD01>
           </xsl:for-each>
         </OEB>
       </xsl:template>
    </xsl:transform>
    and I use below ABAP program for a test, but the items from XML can not translate into Interner table gt_orders-oeb[]
    TYPE-POOLS abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\temp\order02.xml'.
    * This is the structure for the data from the XML file
    TYPES:
       BEGIN OF typ_s_oeb,
         oeb03     TYPE string,    "
         oeb04     TYPE string,    "
         oeb05     TYPE string,    "
         oeb17     TYPE string,    "
         oeb13     TYPE string,   
         oeb15     TYPE string,   
         oeb12     TYPE string,    "
         oeb09     TYPE string,    "
         ta_oeb001 TYPE string,    "
         ta_oeb002 TYPE string,    "
         ta_oeb003 TYPE string,    "
         ta_oeb004 TYPE string,    "
         ta_oeb005 TYPE string,    "
         ta_oeb006 TYPE string,    "
         ta_oeb013 TYPE string,    "
         ta_oeb014 TYPE string,    "
         ta_oeb015 TYPE string,    "
         ta_oeb016 TYPE string,    "
         ta_oeb017 TYPE string,    "
         ta_oeb018 TYPE string,    "
         ta_oeb019 TYPE string,    "
         ta_oeb020 TYPE string,    "
         ta_oeb021 TYPE string,    "
         ta_oeb022 TYPE string,    "
         oebud01   TYPE string,    "
       END OF typ_s_oeb.
    TYPES: typ_t_oeb TYPE TABLE OF typ_s_oeb WITH KEY oeb03.
    TYPES:
       BEGIN OF typ_s_order,
         objectid   TYPE string,   "
         azp01      TYPE string,   "
         oea00      TYPE string,   "
         ta_oeaecn  TYPE string,   "
         oea03      TYPE string,   "
         oea02      TYPE string,   "
         ta_oea002  TYPE string,   "
         ta_oea001  TYPE string,   "
         oea14      TYPE string,   "
         oea15      TYPE string,  
         oea23      TYPE string,   "
         oeaconf    TYPE string,   "
         oea10      TYPE string,   "
         oeaud01    TYPE string,   "
         ta_oea007  TYPE string,   "
         oea25      TYPE string,   "
         ta_oea008  TYPE string,   "
         ta_oea009  TYPE string,   "
         oeauser    TYPE string,   "
         ta_oeanday TYPE string,   "
         ta_oeamday TYPE string,   "
         ta_oeacday TYPE string,   "
         oeaud02    TYPE string,   "
         ta_oea030  TYPE string,   "
         ta_oea013  TYPE string,
         ta_oea014  TYPE string,
         ta_oea015  TYPE string,
         ta_oea016  TYPE string,
         ta_oea017  TYPE string,
         ta_oea018  TYPE string,
         ta_oea019  TYPE string,
         ta_oea020  TYPE string,
         ta_oea021  TYPE string,
         ta_oea022  TYPE string,
         ta_oea025  TYPE string,
         oeb        TYPE typ_t_oeb,
        END OF typ_s_order.
    * Table for the XML content
    DATA: gt_itab       TYPE STANDARD TABLE OF char2048,
           gs_itab       LIKE LINE OF gt_itab.
    * Table and work ares for the data from the XML file
    DATA: gt_orders     TYPE STANDARD TABLE OF typ_s_order,
           gs_orders     TYPE typ_s_order.
    * Result table that contains references
    * of the internal tables to be filled
    DATA: gt_result_xml TYPE abap_trans_resbind_tab,
           gs_result_xml TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex     TYPE REF TO cx_root,
           gs_var_text   TYPE string.
    * Get the XML file from your client
    CALL METHOD cl_gui_frontend_services=>gui_upload
       EXPORTING
         filename                = gs_file
       CHANGING
         data_tab                = gt_itab
       EXCEPTIONS
         file_open_error         = 1
         file_read_error         = 2
         no_batch                = 3
         gui_refuse_filetransfer = 4
         invalid_type            = 5
         no_authority            = 6
         unknown_error           = 7
         bad_data_format         = 8
         header_not_allowed      = 9
         separator_not_allowed   = 10
         header_too_long         = 11
         unknown_dp_error        = 12
         access_denied           = 13
         dp_out_of_memory        = 14
         disk_full               = 15
         dp_timeout              = 16
         not_supported_by_gui    = 17
         error_no_gui            = 18
         OTHERS                  = 19.
    IF sy-subrc <> 0.
       MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
               WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    * Fill the result table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_orders INTO gs_result_xml-value.
    gs_result_xml-name = 'ORDERS'.
    APPEND gs_result_xml TO gt_result_xml.
    * Perform the XSLT styleshee
    TRY.
         CALL TRANSFORMATION zfx_so_xml_to_abap
         SOURCE XML gt_itab
         RESULT (gt_result_xml).
       CATCH cx_root INTO gs_rif_ex.
         gs_var_text = gs_rif_ex->get_text( ).
         MESSAGE gs_var_text TYPE 'S'.
    ENDTRY.
    LOOP AT gt_orders INTO gs_orders.
    ENDLOOP.

    The simplest way seems to me is to use a XSL file for that. The <xsl:output> attributes doctype-system and doctype-public generate the DTD declaration <!DOCTYPE YOUR_ROOT SYSTEM "yourDTDfile.dtd"> and <!DOCTYPE YOUR_ROOT PUBLIC "yourDTDfile.dtd">, respectively.
    When calling transformerInstance.transform() the XSLT processor performs the identity transformation - it just copies elements, attributes, content, processing instructions and comments to the result stream.
    If you're using an xsl file for your transformation already, simply add <xsl:output doctype-system="yourDTDfile.dtd"/> to your existing XSL file.
    If you're only using the identity transformation you'd need to change the line of code where you obtain the transformer instance from the TransformerFactory to:
    t_factory.newTransformer(new StreamSource("test.xsl"));
    and use this as test.xsl:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
       <xsl:output doctype-system="yourDTDfile.dtd"/>
       <!-- this is the identity transformation -->
       <xsl:template match="*|@*|comment()|processing-instruction()|text()">
          <xsl:copy>
             <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()"/>
          </xsl:copy>
       </xsl:template>
    </xsl:stylesheet>Good luck.

  • Flat structure,deep structure, and info structure

    hi,
    What is meant by flat ,deep ,info structures what is difference among them?

    Flat structure:
    If you have a structure with list of fields on it and You can have a structure with in the structure included
    Deep structure:
    If you have tabletype(internal table) included in the
    structure
    Flat structures contain only elementary data types with a fixed length (no internal tables, reference types, or strings).
    The term deep structure can apply regardless of whether the structure is nested or not
    The technical difference between deep structures and all others is as follows.
    When you create a deep structure, the system creates a pointer in memory that points to the real field contents or other administrative information.
    When you create a flat data type, the actual field contents are stored with the type in memory. Since the field contents are not stored with the field descriptions in the case of deep structures, assignments, offset and length specifications and other operations are handled differently from flat structures

  • Regarding creation of dynamic deep structure

    Hi all,
    I have to construct the dynamic deep structure.
    for example,
    With the help of information about address and t_table, i have to create the deep structure on runtime.
    In one case i need to create the deep strcuture with address alone and in another case i need to create the deep structure with address and t_table.
    DATA : begin of address ,
        address type string ,
        end of address.
    data : begin of t_tab  ,
      name(10) type c,
      age type i,
      address like address,
      end of t_tab,
      t_table like Table of t_tab.
    data: BEGIN OF wa_vig,
       details1 like address,
       details2 like t_table,
       END OF wa_vig.
    data: BEGIN OF wa_vig,
       details1 like address,
       END OF wa_vig.
    Please guide me, how should i acheive this with the help of dynamic declarion .
    regards
    Vignesh

    Hi All,
    I will be happy if i can acheive this using RTTS concept.
    Regards
    Vignesh

  • Creating dynamic internal table with deep structure

    Hi all,
    I need to create an internal table with deep structure dynamically. I've already created tables with method 'create_dynamic_table' but I'm struggling with the deep structure.
    I would need an internal table with the following structure:
    DATA: BEGIN OF lt_t1,
    s1 TYPE REF TO data,
    s2 TYPE REF TO data,
    END OF lt_t1.
    S1 and S2 have to be tables.
    It might be possible with RTTS but all the examples in the forums (that I've found so far) are related to at least one DDIC-structure. And that's my problem because both tables are created during runtime.
    Thank you in advance
    Nicola

    Hi Frédéric,
    I hope my english is good enough to explain it correctly:
    We use a function builder for SEM-BPS which copies data from one Cube to another. This Cube is transactional, so you can't easily read a structure out of DDIC.
    The export parameter of this function builder is a table with type 'any table'.
    Until today we used a fixed definition e.g.:
      TYPES:
        BEGIN OF xtyp_chas,
         /sie/sr_ocomp TYPE /b52/oisr_ocomp,
         /sie/ts_03psp TYPE /b52/oits_03psp,
         0activity     TYPE /bi0/oiactivity,
         0acty_elemt   TYPE /bi0/oiacty_elemt,
         0costelmnt    TYPE /bi0/oicostelmnt,
         0co_area      TYPE /bi0/oico_area,
         0creditor     TYPE /bi0/oicreditor,
         0currency     TYPE /bi0/oicurrency,
         0curtype      TYPE /bi0/oicurtype,
         0db_cr_ind    TYPE /bi0/oidb_cr_ind,
         0fiscper      TYPE /bi0/oifiscper,
         0fiscper3     TYPE /bi0/oifiscper3,
         0fiscyear     TYPE /bi0/oifiscyear,
         0metype       TYPE /bi0/oimetype,
         0network      TYPE /bi0/oinetwork,
         0part_actty   TYPE /bi0/oipart_actty,
         0part_cctr    TYPE /bi0/oipart_cctr,
         0piobjsv      TYPE /bi0/oipiobjsv,
         0project      TYPE /bi0/oiproject,
         0unit         TYPE /bi0/oiunit,
         0vtdetail     TYPE /bi0/oivtdetail,
         0vtstat       TYPE /bi0/oivtstat,
         0vtype        TYPE /bi0/oivtype,
         0bus_area     TYPE /bi0/oibus_area,
         0cashdetail   TYPE /bi0/oicashdetail,
         0cashtype     TYPE /bi0/oicashtype,
         0comp_code    TYPE /bi0/oicomp_code,
         0coorder      TYPE /bi0/oicoorder,
         0cs_dimen     TYPE /bi0/oics_dimen,
         0cs_unit      TYPE /bi0/oics_unit,
         0int_bus      TYPE /bi0/oiint_bus,
         0part_abcpr   TYPE /bi0/oipart_abcpr,
         0part_coord   TYPE /bi0/oipart_coord,
         0part_wbsel   TYPE /bi0/oipart_wbsel,
         0piovalue     TYPE /bi0/oipiovalue,
         0profit_ctr   TYPE /bi0/oiprofit_ctr,
         0ps_obj       TYPE /bi0/oips_obj,
         0statussys0   TYPE /bi0/oistatussys0,
         zfbwheroj     TYPE /bic/oizfbwheroj,
        END   OF xtyp_chas,
        BEGIN OF xtyp_kyfs,
          0amount      TYPE /bi0/oiamount,
          0quantity    TYPE /bi0/oiquantity,
          zf03oaws     TYPE /bic/oizf03oaws,
          zf03oqty     TYPE /bic/oizf03oqty,
          zf03ozsta    TYPE /bic/oizf03ozsta,
        END OF xtyp_kyfs,
        BEGIN OF xtyp_zf03g003,
          s_chas TYPE xtyp_chas,
          s_kyfs TYPE xtyp_kyfs,
        END   OF xtyp_zf03g003,
        xtyp_zf03g003_t TYPE HASHED TABLE OF xtyp_zf03g003
                          WITH UNIQUE KEY s_chas.
    DATA: lt_ibm_data TYPE xtyp_zf03g003_t,
          ls_ibm_data TYPE xtyp_zf03g003.
    So one table (s_chas) contains the characteristics of the Cube and the other (s_kyfs) contains the keyfigures. That's exactly the format we need for the export parameter. At the end of the program, we use the following coding to fill the export table (eto_chas):
    loop at lt_ibm_data into ls_ibm_data.
      collect ls_ibm_data-s_chas into eto_chas.
    endloop.
    So in this moment I give this table the structure that is needed to move the data into the cube. I can't change the requirement because it is a standard interface.
    I would like to change that coding to be dynamically. Because if somebody changes a charasteristic or a keyfigure in the cube, we would have to change the function builder too. I don't think that the SEM-BPS department will let us know every time they've changed something anyway.
    So I hope that my explanation wasn't too confusing
    Nicola

  • Budget and Target COPA Planning tables

    Dear All
    I started to use SAP .Net Connector 3 with VS2010.
    I want to get the Budget and Target from SAP tables it all reside in COPA planning.
    The TCode = “KEPM”.

    Almost all .NET Connector work begins with finding the right RFC-enabled BAPI to call.  In your case, this is most likely BAPI_COPAPLANNING_GETDATA.  From that point, please refer to the tutorials available for invoking this function module from your C# or VB code.
    Here's a good one for non-ABAP developers -- How-To Use SAP Nco 3 Connector | .Net 4 | Visual Studio 2010
    Basics
    Programming Guide

  • XSLT and ABAP Transformation Deep Structure

    Hello Everyone,
    While I've read the forums and the links of a number of folks doing the same thing. I am stuck in that I cannot figure out how to populate a deep structure via XSLT.  Not sure what is going wrong, but I suspect it is obvious. The simple problem is that my structure is not getting populated. It is blank.  The transformation works in testing STRANS (and in Stylus Studio). 
    I cannot figure out what is wrong that makes the t_pexr2002 table blank.  Thanks for any insight. 
    Greg
    The simple program is:
    TYPES: BEGIN OF ty_head,
              sndprn TYPE string,
              bgmref TYPE string,
              moabetrh TYPE string,
              create_date TYPE string,
              settlement_date TYPE string,
              no_lines TYPE string,
           END OF ty_head.
    TYPES: BEGIN OF ty_pricing,
            moabetr TYPE string,
           END OF ty_pricing.
    TYPES: BEGIN OF ty_item,
              docname TYPE string,
              docnummr TYPE string,
              pricing TYPE ty_pricing,
            END OF ty_item.
    TYPES: BEGIN OF ty_summary,
              status_message TYPE string,
           END OF ty_summary.
    TYPES: BEGIN OF ty_mn,
            header_data  TYPE ty_head,
            item_data    TYPE ty_item,
            summary_data TYPE ty_summary,
           END OF ty_mn.
    DATA: t_pexr2002 TYPE STANDARD TABLE OF ty_mn.
    DATA: xml_doc TYPE REF TO cl_xml_document, xml TYPE string.
    CREATE OBJECT xml_doc.
    CALL METHOD xml_doc->import_from_file
      EXPORTING
        filename = 'C:\temp\2640273.xml'.
    CALL METHOD xml_doc->render_2_string
      EXPORTING
        pretty_print = 'X'
      IMPORTING
        stream       = xml.
    CALL TRANSFORMATION zusl_pexr2002_v1
    SOURCE XML xml
    RESULT output = t_pexr2002.
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

    Here is my XSLT:
    Here is the transformation: Also pretty simple...
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... >
      <xsl:strip-space elements="*"/>
      <xsl:template match="/PEXR2002/IDOC">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTPUT>
                <HEADER_DATA>
                  <SNDPRN>
                    <xsl:value-of select="EDI_DC40/SNDPRN"/>
                  </SNDPRN>
                  <BGMREF>
                    <xsl:value-of select="E1IDKU1/BGMREF"/>
                  </BGMREF>
                  <MOABETRH>
                    <xsl:value-of select="E1IDKU5/MOABETR"/>
                  </MOABETRH>
                  <CREATE_DATE>
                    <xsl:value-of select="EDI_DC40/CREDAT"/>
                  </CREATE_DATE>
                  <SETTLEMENT_DATE>
                    <xsl:value-of select="E1EDK03/DATUM"/>
                  </SETTLEMENT_DATE>
                  <NO_LINES>
                    <xsl:value-of select="count(E1IDPU1)"/>
                  </NO_LINES>
                </HEADER_DATA>
                <ITEM_DATA>
                  <xsl:for-each select="E1IDPU1">
                    <DOCNAME>
                      <xsl:value-of select="DOCNAME"/>
                    </DOCNAME>
                    <DOCNUMMR>
                      <xsl:value-of select="DOCNUMMR"/>
                    </DOCNUMMR>
                    <PRICING_DATA>
                      <xsl:for-each select="E1IDPU5[MOAQUAL = '006']">
                        <MOABETR>
                          <xsl:value-of select="MOABETR"/>
                        </MOABETR>
                      </xsl:for-each>
                    </PRICING_DATA>
                  </xsl:for-each>
                </ITEM_DATA>
                <SUMMARY_DATA>
                  <xsl:for-each select="EDI_DS40">
                    <STATUS_MESSAGE>
                      <xsl:value-of select="STAPA1"/>
                    </STATUS_MESSAGE>
                  </xsl:for-each>
                </SUMMARY_DATA>
            </OUTPUT>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:transform>
    Edited by: Thomas Zloch on Jun 9, 2010 6:05 PM

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • How can i point to a specific field in DEEP structure and populate it?

    Hello,
    I have declared a internal table as below,
    DATA: BEGIN OF wa_data,
                  vkorg TYPE vkorg
                  vtweg TYPE vtweg
                  spartTYPE spart
                  field_name TYPE CHAR30
                   value TYPE CHAR50
                END OF wa_data
    DATA: ls_data TYPE wa_data,
                lt_data TYPE STANDARD TABLE OF wa_data.
    The lt_data is populated as below,
    VKORG-------VTWEG-------SPART-------FIELD_NAME-------VALUE
    1000-----------10-------------01------------KALKS---------------ZP00 "Pricing procedure
    1000-----------10-------------01------------ZTERM---------------15 days "Payment terms
    1000-----------10-------------01------------MAHNA---------------09 "Dunning
    Fine.
    Now, i have a DEEP DEEP DEEP structure as belowm
    DATA: ls_deep TYPE cmds_ei_extern. "Pls. see this deep structure 'cmds_ei_extern' in SAP DDIC / SE11
    This deep structure is part of Customer master creation. Now, i would like to POPULATE this deep structure from my lt_data itab DYNAMICALLy, i mean, with out mentioning the field names (like, ZTERM, KALKS, MAHNA etc etc), bcz its these i am pulling this lt_data from a custom table, so going further business may also ADD a new record / field like BUSAB (Accouting clerk) with a value of AL (Allen Christi), hence i want to hv dynamic and its less tediuos also bcz,
    We can LOOP lt_data INTO ls_data (for example, the ls_data-field_name = KALKS)
    Now, point the KALKS in the deep deep deep structure and populate it with a value of ls_data-value (= 15 days)
    ENDLLOOP.
    Pls. let me know How can i do this, i guess, we need to use field symbols, pls. let me know the code to achieve my requirement
    Thank you

    Hi,
    Please refer below code.This will populate field kunnr of the deep structure. Once you select the data as per your requirement,you can write similar code to populate rest of the fields in the deep strucure.
    TYPES : BEGIN OF ty_data,
                 kunnr TYPE kunnr,
                 END OF ty_data.
    FIELD-SYMBOLS : <lfs_cmds_ei_header>   TYPE cmds_ei_header,
                    <lfs_cmds_ei_instance>              TYPE cmds_ei_instance,
                    <lfs_kunnr>                                   TYPE kunnr.
    DATA:  lfs_cmds_ei_extern  TYPE cmds_ei_extern,
                 lr_dytable                  TYPE REF TO data,
                 lr_dytable_wa           TYPE REF TO data,
                 lt_data                       TYPE STANDARD TABLE of ty_data ,
                 wa_data                   TYPE ty_data.
      SELECT kunnr
      FROM yalb_kunde
      UP TO 1 ROWS
      INTO TABLE lt_data.
      IF sy-subrc = 0.
        LOOP AT lt_data INTO lwa_data.
          ASSIGN COMPONENT 'HEADER' OF STRUCTURE lfs_cmds_ei_extern TO <lfs_cmds_ei_header>.
          IF sy-subrc = 0.
            ASSIGN COMPONENT 'OBJECT_INSTANCE' OF STRUCTURE <lfs_cmds_ei_header> TO <lfs_cmds_ei_instance>.
            IF sy-subrc = 0.
              ASSIGN COMPONENT 'KUNNR' OF STRUCTURE <lfs_cmds_ei_instance> TO <lfs_kunnr>.
              IF sy-subrc = 0.
                <lfs_kunnr> = lwa_data-kunnr.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
    Thanks,
    Priya

Maybe you are looking for