SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

XML



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP
View previous topic :: View next topic  
Author Message
Kurier
Участник
Участник



Joined: 21 Jan 2010
Posts: 3

PostPosted: Wed Feb 03, 2010 10:07 pm    Post subject: XML Reply with quote

помогите плиз!
первый раз в жизни пытаюсь вывести отчет XML....

когда создаю преобразование выдает ошибку :"undeclared namespace prefix 'xsl'
в alv отчете, где собираю данные
Code:
***************************************
DATA: BEGIN OF obraz1 OCCURS 100,
  orgeh LIKE pa0001-orgeh,
  stext LIKE hrp1000-stext,
  kolvo TYPE i,
  jen TYPE i,
  kerspe TYPE i,
  slujb TYPE i,
  dokmex TYPE i,
  robrem TYPE i,
  vodi TYPE i,
  komps TYPE i,
  rjdps TYPE i,
  talm TYPE i,
  insh TYPE i,
  krim TYPE i,
END OF obraz1.

TYPES: BEGIN OF obraz,
  orgeh LIKE pa0001-orgeh,
  stext TYPE hrp1000-stext,
  kolvo TYPE i,
  jen TYPE i,
  kerspe TYPE i,
  slujb TYPE i,
  dokmex TYPE i,
  robrem TYPE i,
  vodi TYPE i,
  komps TYPE i,
  rjdps TYPE i,
  talm TYPE i,
  insh TYPE i,
  krim TYPE i,
END OF obraz.


TYPES:
xmlline TYPE obraz.
DATA: lt_xml TYPE STANDARD TABLE OF xmlline.
******************************************************
* бла-бла-бла
**************************************************

FORM xml_load.
  CALL TRANSFORMATION z_alv_xml2
  SOURCE table = obraz1
  RESULT XML lt_xml.

  CALL METHOD cl_gui_frontend_services=>gui_download
    EXPORTING
      filename      = 'C:\Tmp\table.xls'
      filetype      = 'BIN'
    CHANGING
      data_tab      = lt_xml
    EXCEPTIONS
      access_denied = 15.
ENDFORM.                    "


в преобразовании ( простая трансформация)

Code:
<xsl:for-each select="//DOC_TABLE/item"> ------- вот тут выдает ошибку!
<Row>
<Cell ss:StyleID="s33"><Data ss:Type="String">фівфівфів</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
<Cell ss:StyleID="s34"><Data ss:Type="Number">0</Data></Cell>
</Row>
</xsl:for-each>

помогите! пол дня мучаюсь!!!!!
Back to top
View user's profile Send private message
vga
Мастер
Мастер


Age: 170
Joined: 04 Oct 2007
Posts: 1218
Location: Санкт-Петербург

PostPosted: Thu Feb 04, 2010 3:53 pm    Post subject: Reply with quote

Посмотрите темку call+transformation. Синтаксис у вас совсем не правильный. Начальные-конечные теги пропущены.
Back to top
View user's profile Send private message Blog Visit poster's website
Kurier
Участник
Участник



Joined: 21 Jan 2010
Posts: 3

PostPosted: Thu Feb 04, 2010 4:02 pm    Post subject: Reply with quote

Всем спасиб! Тема закрыта!

перед <xsl:for-each select="data_tab">
нужно добавить <xsl:transform version="1.0" encoding="UTF-8"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sap="http://www.sap.com/sapxsl">

ну и соответственно </xsl:transform> после </xsl:for-each> тоже не забывайте! Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> ABAP All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.