XSLT statement for recursive elements

Hi I am using following statement in the XSLT pogram for transforming internal table data in to XML
XSLT- Program
  <Size>
    <GrossSquareFeet>
     <xsl:value-of select="GROSSSQUAREFEET"/>
    </GrossSquareFeet>
   </Size>
and the ressult is
RESULT-
- <Size>
  <GrossSquareFeet>1008.0</GrossSquareFeet>
  </Size>
My question is what if i have multiple sizes. what XSLT statment should i be using?
my result should be something like this
- <Size>
   <GrossSquareFeet>1008.0</GrossSquareFeet>
   <GrossSquareFeet>1006.0</GrossSquareFeet>
   <GrossSquareFeet>1007.0</GrossSquareFeet>
   <GrossSquareFeet>1005.0</GrossSquareFeet>
  </Size>
PLease help or direct me to some documentation.I am in 4.7 enterprise version.
Thanks in advance.

it is
<xsl:for-each [elemtn]>
for transforming internal table to xml why cant you simply use
call transformation?
Regards
Raja

Similar Messages

  • Tuning PL/SQL - tkprof shows much more work for RECURSIVE STATEMENTS

    Hi,
    Firstly I'm not sure if this should be in "Database - General" or "SQL and PL/SQL". Since it's more of a performance tuning question than specifically about the PL/SQL, I'm going to put it here in "Database - General". I hope that doesn't offend anyone.
    I've just started looking at a reported performance problem in our app. One of the developers set me up a procedure that replicates the issue, I ran it while tracing the session and then fed the trace file to tkprof. The results at the bottom of my tkprof output file look like this:
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.01       0.07         10         60          0           0
    Execute      3      0.01       0.01          0          3          0           3
    Fetch        0      0.00       0.00          0          0          0           0
    total        6      0.03       0.08         10         63          0           3
    Misses in library cache during parse: 1
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      SQL*Net message from client                     4        1.68          1.70
      db file sequential read                        18        0.01          0.10
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      416      0.00       0.01          0          0          2           0
    Execute   1456      0.71       0.75         26       1739        425         590
    Fetch     2932      0.12       2.21        337       6338          0        3061
    total     4804      0.84       2.98        363       8077        427        3651
    Misses in library cache during parse: 25
    Misses in library cache during execute: 24
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       343        0.08          2.09
      db file scattered read                          1        0.00          0.00
       47  user  SQL statements in session.
      888  internal SQL statements in session.
      935  SQL statements in session.
       31  statements EXPLAINed in this session.I'm looking in particular at that relatively high activity for RECURSIVE STATEMENTS, because to me, the NON-RECURSIVE (ie the actual submitted statements that form our code) looks pretty harmless. This is my first experience of trying to tune some complex looking PL/SQL and I've no idea what could be considered more "normal", but from what I think I know, and google searches, the results look quite odd to me.
    Is this high activity for RECURSIVE STATEMENTS a problem, and if so, what should I start looking at to reduce that activity?
    Regards,
    Ados

    If you have a PLSQL block or stored procedure running SQL statements, the SQL statements, too, will appear as RECURSIVE STATEMENTS in the trace file and tkprof.
    It is a misconception that RECURSIVE STATEMENTS are only SYS statements doing data dictionary lookups / updates.
    For example, I ran this :
    SQL> create or replace procedure test_procedure as
      2  begin
      3  insert into my_emp_table select * from my_emp_table;
      4  dbms_output.put_line('Rows Inserted :  ' || sql%rowcount);
      5  insert into my_emp_table select * from my_emp_table where emplid=1;
      6  dbms_output.put_line('Rows Inserted :  ' || sql%rowcount);
      7  end;
      8  /
    Procedure created.
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    SQL> execute test_procedure;
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.
    SQL> select 'x' from dual;
    x
    SQL> exitThe tkprof shows ;
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        3      0.00       0.00          0          0          0           0
    Execute      3      0.00       0.00          0          0          1           1
    Fetch        2      0.00       0.00          0          0          0           1
    total        8      0.00       0.00          0          0          1           2
    Misses in library cache during parse: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       5        0.00          0.00
      SQL*Net message from client                     5        5.31         11.97
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        4      0.00       0.00          0          2          0           0
    Execute      4      0.00       0.00          2         16          7           5
    Fetch        2      0.00       0.00          0         14          0           2
    total       10      0.01       0.01          2         32          7           7
    Misses in library cache during parse: 2
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                         2        0.00          0.00
        7  user  SQL statements in session.
        0  internal SQL statements in session.
        7  SQL statements in session.Which were the Non-Recursive statements ?
    BEGIN test_procedure; END;
    commit
    select 'x' from  dualWhich were the RECURSIVE statements (which you can identify by the keywords : (recursive depth) ?
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
      NVL(SUM(C2),:"SYS_B_1")
    FROM
    (SELECT /*+ NO_PARALLEL("MY_EMP_TABLE") FULL("MY_EMP_TABLE")
      NO_PARALLEL_INDEX("MY_EMP_TABLE") */ :"SYS_B_2" AS C1, :"SYS_B_3" AS C2
      FROM "MY_EMP_TABLE" "MY_EMP_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          7          0           1
    total        3      0.00       0.00          0          7          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 2)
    INSERT INTO MY_EMP_TABLE SELECT * FROM MY_EMP_TABLE
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          1          0           0
    Execute      1      0.00       0.00          2          8          4           3
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          2          9          4           3
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 1)
    SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS IGNORE_WHERE_CLAUSE
      NO_PARALLEL(SAMPLESUB) opt_param('parallel_execution_enabled', 'false')
      NO_PARALLEL_INDEX(SAMPLESUB) NO_SQL_TUNE */ NVL(SUM(C1),:"SYS_B_0"),
      NVL(SUM(C2),:"SYS_B_1")
    FROM
    (SELECT /*+ IGNORE_WHERE_CLAUSE NO_PARALLEL("MY_EMP_TABLE")
      FULL("MY_EMP_TABLE") NO_PARALLEL_INDEX("MY_EMP_TABLE") */ :"SYS_B_2" AS C1,
      CASE WHEN "MY_EMP_TABLE"."EMPLID"=:"SYS_B_3" THEN :"SYS_B_4" ELSE
      :"SYS_B_5" END AS C2 FROM "MY_EMP_TABLE" "MY_EMP_TABLE") SAMPLESUB
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          7          0           1
    total        3      0.00       0.00          0          7          0           1
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 2)
    INSERT INTO MY_EMP_TABLE SELECT * FROM MY_EMP_TABLE WHERE EMPLID=1
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          1          0           0
    Execute      1      0.00       0.00          0          8          3           2
    Fetch        0      0.00       0.00          0          0          0           0
    total        2      0.00       0.00          0          9          3           2
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 64     (recursive depth: 1)The INSERT statments are recursive depth 1 while the SELECTS they cause are recursive depth 2.
    Note that neither of these are are actually SYS statements agaisnt the data dictionary !!
    Edit :
    IF you read the last few lines, it would become evident that some (in my case all) the RECURSIVE STATEMENTS are non-SYS statements, actually being my code, not Oracle's code.
           1  session in tracefile.
           7  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           7  SQL statements in trace file.
           7  unique SQL statements in trace file.
          87  lines in trace file.
           6  elapsed seconds in trace file.I have 3 non-recursive and 4 "RECURSIVE" statements. All 7 are correctly identified as "user SQL statements in trace file".
    Hemant K Chitale
    http://hemantoracledba.blogspot.com
    Edited by: Hemant K Chitale on Jul 29, 2009 11:44 PM
    Edited by: Hemant K Chitale on Jul 29, 2009 11:47 PM

  • Error when executing statement for table/stored proc

    Hi All,
          I am getting this error when executing IDOC to JDBC (Stored Procedure) Scenario.
         In my stored procedure I have three insert statements to insert rows in to 3 tables.
        This stored procedure is working fine for two insert statements i.e, 
             For this I have created data type for stored procedure with 10 elements and executed the scenario and was successfully running.
        when I added 3rd insert statement to stored procedure ie., when i added 5 more elements to the datatype (totally 15 elements) it starts giving the bellow error in Message Monitoring.
    <i><b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
    <i><b>Delivery of the message to the application using connection JDBC_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'COGRP_TMP_PROC_1' (structure 'Statements'): java.sql.SQLException: General error</b></i>
       Note:- I have run the stored procedure  with three insert statements in Sql Server, and also by calling an external program also, and was working fine.
    <i><b> Note : Is there any structure needs to be follow when working with IDOC to Stored procedure.</b></i>
    I am struck up with the error, can any body resolve this issue.
    Thanks in Advance,
    Murthy

    Hi narasimha,
                      This seems to be any error due to incorrect query formation.In your receiver jdbc channel set the parameter logSQLstatement = true.you can find this parameter in the advanced mode. Using this parameter you will be able to see the sql query which is generated at runtime in the audit log in RWB.
    Regards,
    Pragati

  • XSLT samples for XML- ABAP mapping

    Hi all,
    Does anyone have a XSLT samples for XML->ABAP mapping ?
    regards

    first create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
    <b>XSLT code</b>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:output indent="yes"/>
      <xsl:template match="NewDataSet">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="Table">
                <OUTTAB1>
                  <AIRPORTCODE>
                    <xsl:value-of select="AirportCode"/>
                  </AIRPORTCODE>
                  <CITYOFAIRPORTNAME>
                    <xsl:value-of select="CityOrAirportName"/>
                  </CITYOFAIRPORTNAME>
                  <COUNTRY>
                    <xsl:value-of select="Country"/>
                  </COUNTRY>
                  <COUNTRYABBRIVATION>
                    <xsl:value-of select="CountryAbbrviation"/>
                  </COUNTRYABBRIVATION>
                  <COUNTRYCODE>
                    <xsl:value-of select="CountryCode"/>
                  </COUNTRYCODE>
                  <GMTOFFSET>
                    <xsl:value-of select="GMTOffset"/>
                  </GMTOFFSET>
                  <RUNWAYLENGTHFEET>
                    <xsl:value-of select="RunwayLengthFeet"/>
                  </RUNWAYLENGTHFEET>
                  <RUNWAYELEVATIONFEET>
                    <xsl:value-of select="RunwayElevationFeet"/>
                  </RUNWAYELEVATIONFEET>
                  <LATITUDEDEGREE>
                    <xsl:value-of select="LatitudeDegree"/>
                  </LATITUDEDEGREE>
                  <LATITUDEMINUTE>
                    <xsl:value-of select="LatitudeMinute"/>
                  </LATITUDEMINUTE>
                  <LATITUDESECOND>
                    <xsl:value-of select="LatitudeSecond"/>
                  </LATITUDESECOND>
                  <LATITUDENPEERS>
                    <xsl:value-of select="LatitudeNpeerS"/>
                  </LATITUDENPEERS>
                  <LONGITUDEDEGREE>
                    <xsl:value-of select="LongitudeDegree"/>
                  </LONGITUDEDEGREE>
                  <LONGITUDEMINUTE>
                    <xsl:value-of select="LongitudeMinute"/>
                  </LONGITUDEMINUTE>
                  <LONGITUDESECONDS>
                    <xsl:value-of select="LongitudeSeconds"/>
                  </LONGITUDESECONDS>
                  <LONGITUDEEPERW>
                    <xsl:value-of select="LongitudeEperW"/>
                  </LONGITUDEEPERW>
                </OUTTAB1>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:stylesheet>
    <b>just create a type 1 program and paste the below given code.</b>
    report y_consume_webservice .
    data: wf_user type string .
    data: wf_password type string .
    types: begin of outtab1 ,
       airportcode(6)  ,
       cityofairportname(50),
       country(30)  ,
       countryabbrivation(10),
       countrycode(6)  ,
       gmtoffset(10)  ,
       runwaylengthfeet(15),
       runwayelevationfeet(15),
       latitudedegree(10)  ,
       latitudeminute(10)  ,
       latitudesecond(10)  ,
       latitudenpeers(10)  ,
       longitudedegree(10)  ,
       longitudeminute(10)  ,
       longitudeseconds(10)  ,
       longitudeeperw(10) ,
       end of outtab1 .
    data: outtab type  table of outtab1.
    data: wf_o like line of outtab .
    data: g_okcode like sy-ucomm .
    data: my_container   type ref to cl_gui_custom_container .
    data: g_dock type ref to cl_gui_docking_container .
    data: mygrid type ref to cl_gui_alv_grid .
    data: wf_field_cat type lvc_t_fcat .
    data: wf_field_cat_wa like line of wf_field_cat ,
          wf_is_layout type lvc_s_layo .
    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_fld_cat_wa like line of wf_fld_cat .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    data: xslt_err type ref to cx_xslt_exception .
    constants:
    * encoding for download of XML files
    encoding     type string value 'utf-8' .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: uri2(132) type c lower case .
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default 'proxy.xxx.com' ,
                p_port(4) default '80'.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
    clear wf_string .
    concatenate
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '<soap:Body>'
    '<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
    '<country>' uri2 '</country>'
    '</GetAirportInformationByCountry>'
    '</soap:Body>'
    '</soap:Envelope>'
    into wf_string .
    clear :rlength , txlen .
    rlength = strlen( wf_string ) .
    move: rlength to txlen .
    clear: wf_proxy, wf_port .
    move: p_proxy to wf_proxy ,
          p_port to wf_port .
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Length'
        value = txlen.
    call method http_client->request->set_header_field
      exporting
        name  = 'SOAPAction'
        value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
    call method http_client->request->set_cdata
      exporting
        data   = wf_string
        offset = 0
        length = rlength.
    call method http_client->send
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2.
    call method http_client->receive
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    clear wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).
    replace all occurrences of
        '<' in wf_string1 with '<' .
    replace all occurrences of
    '>' in wf_string1 with '>' .
    replace all occurrences of
    'xmlns=' in wf_string1 with 'xmlns:xsl=' .
    try .
        call transformation (`Y_TEST`)
                source xml wf_string1
                result     outtab = outtab.
      catch cx_xslt_exception into xslt_err.
        data: s type string.
        s = xslt_err->get_text( ).
        write: ': ', s.
        stop.
    endtry .
    break-point .
    Try this and give me your feedback.
    Regards
    Raja

  • XSLT transformation for deep structure .....

    Hello,
            I am trying to do an XSLT transformation for a deep structure HAP_S_PDF_DOCUMENT (see it in SE11), I have managed to achieve this. but not with perfection. i still get some redundant data and data have been experiencing Data duplication. I was hoping if you people point out the what is wrong in the transfromation. The data repeats for every once under node DATA and then under node of the refered structure name. Besides it also create a blank row even if the record is 0. I am mostly facing problem with nodes T_ELEMENTS. T_COL_CELL and T_FIELD. These are the nested structures, Can anybody help / guide me to achieve these transforamtion?
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" version="1.0">
    <xsl:strip-space elements="*"/>
    <xsl:template match="HAP_DOCUMENT">
    <xsl:element name="HAP_DOCUMENT" namespace="">
    <xsl:apply-templates select="MAIN_HEADER"/>
    <xsl:apply-templates select="T_ELEMENTS"/>
    <xsl:apply-templates select="T_STAT_CHG_BUTTONS"/>
    <xsl:apply-templates select="S_APPRAISAL_ID"/>
    <xsl:apply-templates select="S_HEADER"/>
    <xsl:apply-templates select="POSITIONS"/>
    <xsl:element name="STAT_CHG_BUTTON">
    <xsl:value-of select="../STAT_CHG_BUTTON"/>
    </xsl:element>
    <xsl:element name="OFFLINE_ID">
    <xsl:value-of select="OFFLINE_ID"/>
    </xsl:element>
    <xsl:element name="BSP_FLAG">
    <xsl:value-of select="BSP_FLAG"/>
    </xsl:element>
    <xsl:element name="ROLE">
    <xsl:value-of select="ROLE"/>
    </xsl:element>
    <xsl:element name="APPRAISAL_YEAR">
    <xsl:value-of select="APPRAISAL_YEAR"/>
    </xsl:element>
    </xsl:element>
    </xsl:template>
    <xsl:template match="MAIN_HEADER">
    <xsl:element name="MAIN_HEADER">
    <xsl:for-each select="ZBGAPR_FORM_HEADER">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_ELEMENTS">
    <xsl:element name="T_ELEMENTS">
    <xsl:for-each select="ZHAP_S_PDF_ELEMENTS">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_COL_CELL"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_COL_CELL">
    <xsl:element name="T_COL_CELL">
    <xsl:for-each select="ZHAP_S_PDF_COL_CELL">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_FIELD"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_FIELD">
    <xsl:element name="T_FIELD">
    <xsl:for-each select="ZHAP_S_PDF_FIELD">
    <xsl:element name="DATA">
    <xsl:apply-templates select="T_VAL_VALUES"/>
    <xsl:apply-templates select="T_VAL_RANGES"/>
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_VAL_VALUES">
    <xsl:element name="T_VAL_VALUES">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_VALUES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_VAL_RANGES">
    <xsl:element name="T_VAL_RANGES">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_RANGES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_STAT_CHG_BUTTONS">
    <xsl:element name="T_STAT_CHG_BUTTONS">
    <xsl:for-each select="HAP_S_BODY_CELL_VAL_RANGES">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_APPRAISAL_ID">
    <xsl:element name="S_APPRAISAL_ID">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_HEADER">
    <xsl:element name="S_HEADER">
    <xsl:apply-templates select="S_TEXTS"/>
    <xsl:apply-templates select="T_APPRAISER"/>
    <xsl:apply-templates select="T_APPRAISEE"/>
    <xsl:apply-templates select="T_PART_APPRAISER"/>
    <xsl:apply-templates select="T_OTHERS"/>
    <xsl:apply-templates select="S_STATUS"/>
    <xsl:apply-templates select="S_DATES"/>
    <xsl:apply-templates select="S_DISPLAY"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="POSITIONS">
    <xsl:element name="POSITION">
    <xsl:for-each select="ZBGHR_APR_POSITION_DET">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_TEXTS">
    <xsl:element name="S_TEXTS">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_APPRAISER">
    <xsl:element name="T_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_APPRAISER">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_APPRAISEE">
    <xsl:element name="T_APPRAISEE">
    <xsl:for-each select="HAP_S_PDF_APPRAISEE">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_OTHERS">
    <xsl:element name="T_OTHERS">
    <xsl:for-each select="HAP_S_PDF_OTHERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_PART_APPRAISER">
    <xsl:element name="T_PART_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_PART_APPRAISERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="T_PART_APPRAISER">
    <xsl:element name="T_PART_APPRAISER">
    <xsl:for-each select="HAP_S_PDF_PART_APPRAISERS">
    <xsl:element name="DATA">
    <xsl:copy-of select="child::node()"/>
    </xsl:element>
    </xsl:for-each>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_STATUS">
    <xsl:element name="S_STATUS">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_DATES">
    <xsl:element name="S_DATES">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="S_DISPLAY">
    <xsl:element name="S_DISPLAY">
    <xsl:copy-of select="node()"/>
    </xsl:element>
    </xsl:template>
    <xsl:template match="STAT_CHG_BUTTON">
    </xsl:template>
      <xsl:template match="OFFLINE_ID">
    </xsl:template>
      <xsl:template match="BSP_FLAG">
    </xsl:template>
      <xsl:template match="ROLE">
    </xsl:template>
      <xsl:template match="APPRAISAL_YEAR">
    </xsl:template>
    </xsl:transform>
    Regards,
    Shishir.P

    "XSLT transformation for a deep structure"
    which way abap to xml or xml to abap?
    you may want to check this thread
    Re: Problem converting XML back to structure using XSLT

  • Using the XSLT processor for non-workbench XSLT

    Hi there,
    is it possible to use the built-in XSLT processor for arbitrary XSLT transformations which aren't checked in in the ABAP workbench but instead given as a runtime object (string or iXML)?
    Instead of the built-in command CALL TRANSFORMATION which according to the doc is restricted to workbench transformations, I am looking for an option like this:
    data: lo_transformation type ref to if_ixml_document,
          lo_source         type ref to if_ixml_document,
          lo_target         type ref to if_ixml_focument.
    * I get lo_transformation and lo_source from somewhere out there
    try.
        lo_target ?= cl_some_fine_class_which_i_am_looking_for=>transform(
                          io_source         = lo_source
                          io_transformation = lo_transformation ).
      catch cx_xslt_runtime_error.
    endtry.
    Does anybody know such a feature?
    For a background about this problem - in German language - see my blog
    http://ruediger-plantiko.blogspot.com/2007/08/xslt-in-bsp-anwendungen-und-in-abap.html
    Thanks and Regards,
    Rüdiger

    Dear Rashid,
    thanks - this is the answer! I wonder why I didn't find this class one year ago. A little test prog shows that it works fine and even performant (about 0.5 millisec for creating the new dynamic XSLT program with the method set_source_stream( ) ). For usage in web apps, it would be nice to know whether the temporary program remains available in the application servers' buffer after end of process. I can't check this, since this is performed on the C/C++ level, and SE30 doesn't track the method set_source_stream() itself (it could show a decrease of runtime after the first call).
    Here comes a little self-contained ABAP program to test the functionality. It works well on our system with SAPKB70012.
    Thanks and regards,
    Rüdiger
    * --- Test usage of a dynamically given non-workbench XSLT program
    report  zz_test_cl_xslt_processor.
    data:
    * iXML master
      go_xml type ref to if_ixml,
    * iXML stream factory
      go_sf  type ref to if_ixml_stream_factory.
    load-of-program.
      go_xml = cl_ixml=>create( ).
      go_sf  = go_xml->create_stream_factory( ).
    start-of-selection.
      perform start.
    * --- Start
    form start.
      data: lo_source    type ref to if_ixml_document,
            lo_result    type ref to if_ixml_document,
            lo_processor type ref to cl_xslt_processor,
            lv_p         type progname,
            lo_ex        type ref to cx_xslt_exception.
      perform get_source changing lo_source.
      create object lo_processor.
      try.
    * Set source
          lo_processor->set_source_node( lo_source ).
    * Set result
          lo_result = go_xml->create_document( ).
          lo_processor->set_result_document( lo_result ).
    * This could be time-critical, the creation of a dynamical XSLT prog?
          perform set_transformation using lo_processor
                                     changing lv_p.
    * call xslt-proc
          lo_processor->run( lv_p ).
    * Display result
          call function 'SDIXML_DOM_TO_SCREEN'
            exporting
              document    = lo_result
              title       = 'Result of Transformation'
            exceptions
              no_document = 1
              others      = 2.
        catch cx_xslt_exception into lo_ex.
          sy-msgli = lo_ex->get_text( ).
          message sy-msgli type 'I'.
      endtry.
    endform.                    "start
    * --- Set XSLT transformation from stream
    form set_transformation using io_processor type ref to cl_xslt_processor
                            changing cv_p type progname.
      data: lo_trans     type ref to if_ixml_istream.
    * sv_p contains temp. name of XSLT program after first call
      statics: sv_p   type string.
      if sv_p is initial.
    * It seems that the name can be buffered on appserver level?
        import progname to sv_p
               from shared buffer indx(zx) id 'ZZ_TEST_XSLT_PROC'.
        if sv_p is initial.
          sv_p = 'X'.
        endif.
      endif.
    * Provide the stream containing the XSLT document (as a stream)
      perform get_transformation changing lo_trans.
    * Set transformation
      io_processor->set_source_stream( exporting stream = lo_trans
                                       changing  p      = sv_p ).
    * Buffer progname on server - seems to work
      export progname from sv_p
             to shared buffer indx(zx) id 'ZZ_TEST_XSLT_PROC'.
    * string -> c move necessary, since xslt-proc-interface doesn't use
    * the generic type csequence for program name
      cv_p = sv_p.
    endform.                    "set_transformation
    * --- Parse a source given as string into an if_ixml_document
    form get_source changing co_src type ref to if_ixml_document.
      data: lv_s      type string,
            lo_stream type ref to if_ixml_istream,
            lo_parser type ref to if_ixml_parser.
      concatenate
    `<?xml version="1.0" encoding="iso-8859-1"?>`
    `<countings filiale="2412" invnu="TIEFKUEHL SEPT.07">`
    `<count recNum="1" gid="1" ean="59111828843" menge="1"`
    `preis="0" recNumFrom="1"></count>`
    `</countings>`
    into lv_s.
    * Eingabestream erzeugen und in if_ixml_document abbilden
      lo_stream   = go_sf->create_istream_string( lv_s ).
      co_src      = go_xml->create_document( ).
      lo_parser   = go_xml->create_parser( document       = co_src
                                           istream        = lo_stream
                                           stream_factory = go_sf ).
      lo_parser->parse( ).
    endform.                    "get_source
    * --- Put the transformation given as string into an if_ixml_istrean
    form get_transformation changing co_trans type ref to if_ixml_istream.
      data: lv_s   type string.
      concatenate
      `<?xml version="1.0" encoding="iso-8859-1"?>`
      `<xsl:transform version="1.0"`
      ` xmlns:xsl="http://www.w3.org/1999/XSL/Transform"`
      ` xmlns:asx="http://www.sap.com/abapxml">`
      `<xsl:strip-space elements="*"></xsl:strip-space>`
      `<xsl:template match="countings">`
      ` <asx:abap>`
      `   <asx:values>`
      `     <SELOPT>`
      `       <WERKS><xsl:value-of select="@filiale"></xsl:value-of></WERKS>`
      `       <INVNU><xsl:value-of select="@invnu"></xsl:value-of></INVNU>`
      `     </SELOPT>`
      `     <COUNTINGS>`
      `       <xsl:for-each select="count">`
      `         <ZSRS_ZWSTI_LINE>`
      `           <MATNR></MATNR>`
      `           <EAN11><xsl:value-of select="@ean"></xsl:value-of></EAN11>`
      `           <MAKTX></MAKTX>`
      `           <MENGE><xsl:value-of select="@menge"></xsl:value-of></MENGE>`
      `           <MEINH></MEINH>`
      `           <UNAME></UNAME>`
      `           <EXVKW></EXVKW>`
      `           <WAERS></WAERS>`
      `           <FF></FF>`
      `           <GID><xsl:value-of select="@gid"></xsl:value-of></GID>`
      `           <RECNUM><xsl:value-of select="@recNum"></xsl:value-of></RECNUM>`
      `           <RECNUM_FROM><xsl:value-of select="@recNumFrom"></xsl:value-of></RECNUM_FROM>`
      `           <REF_RECNUM><xsl:value-of select="@refRecNum"></xsl:value-of></REF_RECNUM>`
      `         </ZSRS_ZWSTI_LINE>`
      `       </xsl:for-each>`
      `     </COUNTINGS>`
      `   </asx:values>`
      ` </asx:abap>`
      `</xsl:template>`
      `</xsl:transform>`
      into lv_s.
      co_trans = go_sf->create_istream_string( lv_s ).
    endform.                    "get_transformation
    Edited by: Rüdiger Plantiko on Jul 4, 2008 10:25 AM

  • Uniqueness for xml element is not validated with the xsd:unique

    Hi
    I am using <xsd:unique> to specify uniqueness for certain elements in the schema. But when i create the xml for the schema,it allows me to create elements with duplicate values for which the uniqueness is defined and also it is allowed to parse the xml correctly.I am using jaxb2.0 and jaxp2.0 to bind the xml and parse it. The schema is described below :
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <xsd:include schemaLocation="ArtifactDetails.xsd" />
         <xsd:element name="EKMArtifacts">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element name="Artifact" minOccurs="0" maxOccurs="unbounded">
                             <xsd:complexType>
                                  <xsd:sequence>
                                       <xsd:element name="ArtifactType" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="ArtifactName" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Status" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="VersionString" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Artifactdesc" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Functionaldesc" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Department" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Location" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Rated" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Category" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Createdby" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="OSPlatform" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="APPPlatform" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Country" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="State" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element name="Vendor" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="1" />
                                       <xsd:element ref="ArtifactDetails" minOccurs="0" maxOccurs="1" />
                                  </xsd:sequence>
                             </xsd:complexType>
                        </xsd:element>
                   </xsd:sequence>
              </xsd:complexType>
              <xsd:unique name="ArtifactNameUnique">
                   <xsd:selector xpath="Artifact" />
                   <xsd:field xpath="ArtifactName" />
              </xsd:unique>
         </xsd:element>
    </xsd:schema>
    Can anyone help me out
    Thanks in advance

    Well there's nothing wrong with your schema (I copyied it into XMLSpy and wasn't able to create two artifacts with the same name). My guess is that JAXB still does not support xsd:unqiue
    http://www.onjava.com/pub/a/onjava/2004/12/15/jaxb.html

  • XSLT does not put element into output

    HI Gentlemen,
    I have the following code segment, reflecting a 4-level hierarchical structure. Only the first two levels are guaranteed to be present; the last two are optional (if pe:scheinuntergruppen_liste is present, then at least one pe:scheinuntergruppe must be present, too.)
              <xsl:for-each select="pe:bedingung/pe:scheinarten_liste">
                <xsl:variable name="span1" select="count(descendant::pe:scheinuntergruppe)"/>
                <xsl:variable name="pos1" select="position()"/>
                <xsl:for-each select="pe:scheinart">
                  <xsl:variable name="span2" select="count(descendant::pe:scheinuntergruppe)"/>
                  <xsl:variable name="pos2" select="position()"/>
                  <xsl:for-each select="pe:scheinuntergruppen_liste">
                    <xsl:variable name="span3" select="count(descendant::pe:scheinuntergruppe)"/>
                    <xsl:variable name="pos3" select="position()"/>
                    <xsl:for-each select="pe:scheinuntergruppe"> 
                      <tr>
                        <xsl:if test="position()=1">
                          <xsl:if test="$pos3=1">
                            <xsl:if test="$pos2=1">
                              <td rowspan="{$span1}"><xsl:value-of select="../../../@V"/></td>
                            </xsl:if>
                            <td rowspan="{$span2}"><xsl:value-of select="../../@V"/></td>
                          </xsl:if>
                          <td rowspan="{$span3}"><xsl:value-of select="../@V"/></td>
                        </xsl:if>
                        <td><xsl:value-of select="@V"/></td>
                      </tr>
                    </xsl:for-each>
                  </xsl:for-each>
                </xsl:for-each>
              </xsl:for-each>Since a tabular representation is not working for missing elements, I tried to insert them under pe:scheinart., using the following template:
    <xsl:template name="fill" match="pe:scheinart">
      <xsl:if test="not(./pe:scheinuntergruppen_liste)">
        <xsl:element name="pe:scheinuntergruppen_liste" use-attribute-sets="V">
          <xsl:attribute name="V">
            <xsl:value-of select="XX"/>
          </xsl:attribute>
          <xsl:element name="pe:scheinuntergruppe" use-attribute-sets="V">
            <xsl:attribute name="V">
              <xsl:value-of select="YY"/>
            </xsl:attribute>
          </xsl:element>
        </xsl:element>
      </xsl:if>
    </xsl:template>This should be executed once for each pe:scheinart node inserting a child and a grandchild node. The template is called by
    <xsl:apply-templates select="pe:scheinart"/>Unfortunately, it does nothing; the rowspan values are not affected. Could anyone give me a hint, where I am wrong?
    Thanks, kind regards,
    Miklos HERBOLY
    Edited by: mh**** on Aug 11, 2011 10:31 AM

    [0]
    Since a tabular representation is not working for missing elements, I tried to insert them under pe:scheinart., using the following template...I have'nt read into the template... but if you meant to setup a template within the same xslt document (not in cascade) as pre-processing of the xml document, then I doubt it would do as a matter of conceptual approach.
    [1] In fact, there is no reason the possibility of missing element pe:scheinuntergruppen_liste and/or pe:scheinuntergruppe cannot be handled by the logic. It can and I would like to show you a realization to that effect.
    [1.1] One crucial point is to count correctly the needed rows (tr) disregard whether one or both of the elements be absent or not. The number of rows to span for both pe:scheinarten_liste and pe:scheinart individually is to calculate how many ending tree node amongst the four named elements (in the sense of element of the descendant of them contains no more elements of the four named elements.) That calculation is reflected in the demo below at span1, span2 variables following your notations.
    [1.2] And then, once the elements being absent, one has to insert something to avoid the html table collaping the cell --- use border="1" for inspection purpose, if you so desired. That's quite necessary as far as the html table is concerned. It is usually a non-breakable space ( ). That I do as well.
    [1.3] There are two degenerate cases: pe:scheinuntergruppen_liste absent and pe:scheinuntergruppen_liste present but pe:scheinuntergruppe absent. It results in four branching out (reflecting in the use of xsl:choose).
    [2] This is a demo realization containing the 4 levels of for-each which should behaviour properly with enough generality.
    <xsl:for-each select="pe:bedingung/pe:scheinarten_liste">
      <xsl:variable name="span1" select="count(descendant-or-self::*[count(descendant::*)=0])" />
      <xsl:variable name="pos1" select="position()"/>
      <xsl:for-each select="pe:scheinart">
        <xsl:variable name="span2" select="count(descendant-or-self::*[count(descendant::*)=0])" />
        <xsl:variable name="pos2" select="position()"/>
        <xsl:choose>
          <xsl:when test="count(pe:scheinuntergruppen_liste)=0">
            <tr>
              <xsl:if test="$pos2=1">
                <td rowspan="{$span1}"><xsl:value-of select="../@V" /></td>
              </xsl:if>
              <td><xsl:value-of select="@V" /></td>
              <td><xsl:value-of select="'&#xa0;'" /></td>
              <td><xsl:value-of select="'&#xa0;'" /></td>
            </tr>
          </xsl:when>
          <xsl:otherwise>
            <xsl:for-each select="pe:scheinuntergruppen_liste">
              <xsl:variable name="span3" select="count(descendant-or-self::*[count(descendant::*)=0])" />
              <xsl:variable name="pos3" select="position()" />
              <xsl:choose>
                <xsl:when test="count(pe:scheinuntergruppe)=0">
                  <tr>
                    <xsl:if test="$pos3=1">
                      <xsl:if test="$pos2=1">
                        <td rowspan="{$span1}"><xsl:value-of select="../../@V" /></td>
                      </xsl:if>
                      <td rowspan="{$span2}"><xsl:value-of select="../@V" /></td>
                   </xsl:if>
                   <td><xsl:value-of select="@V" /></td>
                   <td><xsl:value-of select="'&#xa0;'" /></td>
                 </tr>
               </xsl:when>
               <xsl:otherwise>
                 <xsl:for-each select="pe:scheinuntergruppe">
                   <xsl:variable name="pos4" select="position()" />
                   <tr>
                     <xsl:if test="$pos4=1">
                       <xsl:if test="$pos3=1">
                         <xsl:if test="$pos2=1">
                           <td rowspan="{$span1}"><xsl:value-of select="../../../@V" /></td>
                         </xsl:if>
                         <td rowspan="{$span2}"><xsl:value-of select="../../@V" /></td>
                       </xsl:if>
                       <td rowspan="{$span3}"><xsl:value-of select="../@V" /></td>
                     </xsl:if>
                     <td><xsl:value-of select="./@V" /></td>
                   </tr>
                 </xsl:for-each>
               </xsl:otherwise>
             </xsl:choose>
           </xsl:for-each>
         </xsl:otherwise>
       </xsl:choose>
      </xsl:for-each>
    </xsl:for-each>

  • Tags for UI elements / How to create a dynmic menu

    Hi everybody
    We currently do a lot with WD and are building a huge framework. this means that we mostly using dynamic programming for the ui but also for contexts an so on.
    Known from other architectures (e.g. java swing, android sdk) every ui element supports an attribute "tag" with a generic type (normally type object). Here you can store additional information for each ui element. WD for ABAP has no such additional attribute, we can use for own purposes.
    I'd like to define some popup menu for trays at runtime, but i just want to have one menu action. in this menu action handler i'd like to have a switch/case statement for the corresponding functions. At this point the only information i have is the ID, but what i need is something like a functioncode, i'd like to store anywhere in the action item using such a "tag". I cannot use the ID for my switch/case because the id is generated at runtime an i cannot use the functioncode as ID, because the functioncode can be used in severel menus and the id would not be unique.
    Since im used to work with such tags (escpecially for action handler), i get restricted a lot when working with WD and dynamic ui generation.
    How do you handle that?
    Thx!

    Dear Fab,
    I may not be 100% accurate with the solution, but each method or action handler has a default parameter called "WDEVENT". From this parameter you can get the details of the actions being performed during the runtime, as you said, the Function Code could be the NAME attribute of WDEVENT parameter.
    Please check the same, else, if you get to know the answer please do suggest me the same.
    Regards,
    -Syed.

  • Efficient searching in a large XML file for specific elements

    Hi
    How can I search in a large XML file for a specific element efficiently (fast and memory savvy?) I have a large (approximately 32MB with about 140,000 main elements) XML file and I have to search through it for specific elements. What stable and production-ready open source tools are available for such tasks? I think PDOM is a solution but I can't find any well-known and stable implementations on the web.
    Thanks in advance,
    Behrang Saeedzadeh.

    The problem with DOM parsers is that the whole document needs to be parsed!
    So with large documents this uses up a lot of memory.
    I suggest you look at sometthing like a pull parser (Piccolo or MPX1) which is a fast parser that is program driven and not event driven like SAX. This has the advantage of not needing to remember your state between events.
    I have used Piccolo to extract events from large xml based log files.
    Carl.

  • Segment for WBS element in Inbound Sales Order Idoc

    Hi gurus,
    I am trying to create an inbound idoc for sales order ' VA01'. I need to populate WBS element in the item level under Account Assignment Tab. I am using ORDERS05 basic type. Please help to find which segment to use for WBS element. Waiting for your reply. Please help.
    Regards,
    Satyajit

    Hello,
            As far as I know, there is no Segment / Field definition in ORDERS05 for WBS Element as it is not mandatory information to be filled in order for the Sales Order to be Complete. So, you need to create an Extension of the IDoc Type ORDERS05. For your requirement, here is the Approach I have.
    1. Create an extension for IDoc Type ORDERS05 to ZORDER05 with a Custom Segment Z1EDP01 in which you'll have the Custom Field Name VBAP-PS_PSP_PNR which is the WBS Element field in VBAP Table.
    2. Now, use the Customer Exit EXIT_SAPLVEDA_001 in the Enhancement VEDA0001 in which you can actually populate the Field WBS Element that would be already available in the Inbound IDoc to store it in a Work Area. As you are aware, you'll need to create a Project in CMOD for the same.
    3. Export the same to some MEMORY ID 'XXX'.
    4. Come back to the Selection Program for ORDER05 which is IDOC_INPUT_ORDERS in which you'll find the below CASE Statement.
        CASE xaprau.
              WHEN ' '.
                PERFORM call_va01_new_orders USING ok.
              WHEN 'Q'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Angebot
    call transaction Order Entry VA01 with refer to quote number.
                PERFORM call_va01_new_orders_angbt USING ok.
              WHEN 'C'.
    Aufruf Transaktion Auftragerfassung VA01 mit Bezug auf Kontrakt
    call transaction Order Entry VA01 with refer to contract number
                PERFORM call_va01_new_orders_contk USING ok.
              WHEN 'L'.
    5. Now, since our Standard Order Type (VBAK-VBTYP) is 'C',
        we'll have to choose the Subroutine for the 'C' Option.
    6. In this Subroutine, there is another Subroutine va01_dynpro_kopf_kaufmann_kde2 which is for populating Custom Dynpro Fields for the Sales Order. So, we need to choose the same Subroutine inside which we have to Create an Enhancement Implementation.
    7. In this Enhancement Implementation (Implicit), we have to IMPORT the value of the WBS Element which was exported in the Customer Exit.
    8. Check if it is initial. If it is not, then Call the Perform as below.
         IF NOT WA_Z1EDP01 IS INITIAL. "Checking if the Segment
                                                           " is Empty
       PERFORM DYNPRO_SETZEN USING 'COBL-PS_POSID' WA_Z1EDP01-ZZWBSELEMENT.
    ENDIF.
    9. Since the Sales Orders are posting using BDC here, by calling the above Subroutine DYNPRO_xxx, we are appending our Custom Segment / Field value to the BDC_DATA table.
    10. In Step 8, I've given the Notation for Work Area. It will also be applicable when there are multiple Line Items. All you have to do is to EXPORT an Internal Table instead of Work Area and use the same here for each Line Item.
    11. I've given you above procedure because I've worked on similar requirement in which I had to populate the Special Processing Indicator instead of WBS Element.
    Hope it would be helpful for you.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • Runtime error for ui element multipane

    hello.
    i have a question.
    i implemented uielement multipane example in wda.
    it worked very well in only first trying, but it occured a runtime error -that is Access via 'NULL' object reference not possible.- from second trying.
    context -
    hd                               <node>
    attribute1            <hd of attribute>
    attribute2            <hd of attribute>         
    item                    <hd of subnode>
    attribute1 <item of attribute>
    attribute2 <item of attribute>
    below is source.
    ==========================================================
      DATA: node_hd        type ref to if_wd_context_node,
                 node_item     type ref to if_wd_context_node,
                 itab_hd        type wd_this->elements_hd,
                 stru_hd        type wd_this->element_hd,
                 itab_item      type wd_this->elements_item,
                 rt_auart type ref to data,
                 rt_vbeln type ref to data.
      field-symbols: <fs_auart> type table,
                           <fs_vbeln> type table.
    retrieve the data from the select option
      rt_auart = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'AUART' ).
    assign it to a field symbol
      assign rt_auart->* to <fs_auart>.
    retrieve the data from the select option
      rt_vbeln = wd_this->m_handler->get_range_table_of_sel_field( i_id = 'VBELN' ).
    assign it to a field symbol
      assign rt_vbeln->* to <fs_vbeln>.
    retrieve that data from the database.
    Normally it is suggested to encapsulate the data retrieval in a separate class.
    For simplicity, the select statement has been implemented here.
      select * into corresponding fields of table itab_hd
      from vbak
      where vbeln in <fs_vbeln>
      and auart in <fs_auart>.
    bind the data to the context
      node_hd = wd_context->get_child_node( name = 'HD' ).
      node_hd->bind_table( itab_hd ).
    bind the data to the context  
      loop at itab_hd into stru_hd.
    retrieve item_node object each sy-tabix
    i could't get item_node object when sy-tabix is 1.
    i hope to know why i can't get item_node object when sy-tabix is 1.  
          node_hd->get_child_node(
            exporting
              index = sy-tabix
              name = 'ITEM'
            receiving
              child_node = node_item ).
          when index = 1
          node_item object is null.
          why node_item object is null?????
          i don't got it.
          can sombody explain about it???
          because of this matter, i can't acess frist node_item to insert value.
          do you have a solving this matter? 
            select * into corresponding fields of table itab_item
            from vbap
            where vbeln = stru_hd-vbeln.
            node_item->bind_table( itab_item ).
      endloop.

    Hi Regina.
    So you say if it is not declared as singleton it is created for each element. But
    when I declare my subnode with cardinality 0..1 I face the same problem.
    This is what I do:
    I bind the elements to the parent node. Afterwards I loop all elements of the parent
    node and try to get the subnode with element->get_child_node( ). If cardinality of
    the sub node is 0..1 or 0..n the reference is NULL. If cardinality is 1..1 or 1..n the
    reference is not initial.
    At what step does the frameowrk create the subnode then?
    Cheers,
    Sascha

  • KB15N_No adjustment account found for cost element Message no. K5112

    When I am trying to post Manual Cost Allocation through TC KB15N with the following input data I am getting the following error message and the same could not be posted.  Kindly advise.
    Screen Variant used: 01 SAP Cost Center
    Input Type: List Entry
    Item No.1
    Sender Cost Center : 3402100942
    Cost Element: 6200001
    Amount : 62,201.56
    Receiving Cost Center: 3405100945
    First four digits represent profit center code.  If first four digits are equal the above error is not coming. But posting is needed with different profit centers.
    No adjustment account found for cost element
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element  in company code SCCL.
    Procedure
    Maintain the standard or enhanced account determination for transaction KAMV. Information on maintenance can be found in the program documentation.
    Execute

    Hi all,
    I face the issue like this but with transaction KOAP - Plan settlement
    But, the problem is that, I do not active reconciliation ledger, so I do not maintain any thing relate to reconciation ledger or adjustment posting? I can do transaction "actual settlement"  without error
    So, How this error come to me?
    And how I can fix it?
    Thanks all!

  • No Adjustment account found for cost element

    Dear Gurus,
    I am getting Three errors  msg "No Adjustment account found for cost element" when i try to run the conformation of production order create  ( T Code : C015 )"  and I am not able to save the record . like
    1 ).No adjustment account found for cost element
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element  in company code XXXX
    Procedure
    Maintain the standard or enhanced account determination. Information on maintenance can be found in the program documentation.
    Execute
    2) . No adjustment account found for cost element XXXXXXXX
    Message no. K5112
    Diagnosis
    Neither standard account determination nor the enhanced function found an adjustment account for the reconciliation posting.
    System Response
    No adjustment account could be determined for cost element XXXXXXX in company code XXXX.
    Procedure
    Maintain the standard or enhanced account determination. Information on maintenance can be found in the program documentation.
    Execute
    3 ) No account is specified in item 0000000002
    Message no. F5670
    Diagnosis
    No account was specified for account type "S" in item "0000000002" of the FI/CO document.
    System Response
    The Financial Accounting program cannot process the document.
    Procedure
    A system error has probably occurred in the application you called up. Check the data transferred to item "0000000002" of the FI/CO document.
    Could anyone please help me with this.
    Regards
    SAP CO

    Hi,
    iam not able to understand of this  SAP Notes: 531606 and 1027645
    Could you pl give me full details for come out this problem.
    Regards
    SAP CO

  • I cannot access online statements for my credit card account when using firefox, but have no problem when using safari.

    When I attempted to check the monthly statement for my credit card account and clicked on "See statement", the next screen that appeared, which was labeled Online Statement", was blank. In the past, I have never had any problems with this. When I checked with the bank that issued the credit card, the representative I spoke with said that it was a browser issue and that, since I was working on a Mac, I should try using Safari. When I switched to Safari, I had no problem bringing up my statement. But I would prefer to be able to use Firefox to obtain information like this, since it's the browser I always use.

    Can you upgrade your browser to Firefox 12 and check?
    * getfirefox.com

Maybe you are looking for

  • Smart playlists won't play on video ipod after upgrade to itunes version 7

    Upgraded to ITunes version 7 on Windows XP using Video Ipod with firmware level 1.2. Resynced Ipod after Itunes upgrade. Now when I hit ipod's play button on a smart playlist, nothing happens. If I hit play button from itunes, no problems... Is this

  • Export JSP to Excel : Weird problem  (Urgent)

    Hi, Sorry for the length of question. I am facing a bit weired problem while exporting my JSP report to Excel. I have multiple tables in my JSP page .( Use of Multiple tables is a requirement .). I am using Struts and Oracle 9i JDeveloper for develop

  • Uninstalled printer (would not scan) now Mac cannot find it again

    Hello. I am hoping for some help. In a nutshell, I have a printer that was going on the fritz about a month ago, but I could always get it to connect after a few attempts. Today I uninstalled the software but now my computer cannot find the device AT

  • 'cannot connect to itunes' on ipad 3, help?

    As soon as I type in my password and ID in settings I get the message 'Cannot connect to iTunes Store'. Same thing when I go straight through the itunes app. I have followed the advice about setting the date to a year in the future to no avail. It ju

  • Latest version of Itunes, sound is popping....horrible!

    Hey all, I just recently installed latest version of iTunes, and now every song I play sounds horrible! I have a very generic PC with generic audio card, and have no problems in other audio apps. It sounds like some popping and garbled noises in the