Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML element attribute with different value per element instance

konstantinos_vassiliadis
Active Participant
0 Likes
476

Dear experts,

I have an executable report that generates an XML based on an XSL transformation. The requirement is that the element attribute RECID of the element RECORD has a different value as follows:

.....

<RECORD RECID="E4DEA6BB3ADCCBF18E4700145E1B2298">

...............................

<RECORD RECID="E4DEA6BB3ADCCBF111111111111111111">

........................................................

<RECORD RECID="E4DEA6245WDUT185737373737373737373">


How can I achieve this? Currently the result I get is the following


RECORD RECID="E4DEA6BB3ADCCBF18E4700145E1B2298">

...............................

RECORD RECID="E4DEA6BB3ADCCBF18E4700145E1B2298">

................................

RECORD RECID="E4DEA6BB3ADCCBF18E4700145E1B2298">

...............................


that is, I get the same value because I use the FM GUID_CREATE and pass to the transformation the following in ABAP


CALL FUNCTION 'GUID_CREATE'

       IMPORTING

         EV_GUID_32 = gv_recid.


call TRANSFORMATION ZPOS_UP_MAT_MAST_2

       PARAMETERS RECID = gv_recid

       SOURCE ITEM_ITEM = ltrans_MATERIAL_DATA[]

       RESULT XML lxml_string.

     CATCH CX_TRANSFORMATION_ERROR.

       RAISE TRANSFORMATION_ERROR.


The problem is somehow to make the value of RECID a structured data type and pass it to transformation or do it directly in XSLT


Thanks in advance,

Konstantinos

1 ACCEPTED SOLUTION
Read only

konstantinos_vassiliadis
Active Participant
0 Likes
430
1 REPLY 1
Read only

konstantinos_vassiliadis
Active Participant
0 Likes
431