XSD to DDIC Structure
Hi,
Is there any way of creating a DDIC Structure based on a given XSD schema?
Thanks,
Pedro Leal
People, I have the same need and, although I can create DataType (dictionary) proxies (unlike Pedro), it doesn't allow me to import an .XSD, it's still looking for the portType definition (which belongs in a WSDL but not in a XSD).
Given that a DataType type proxy only creates structures, I don't get why it won't let me use an XSD file as input...
Specifically, I get the error:
Interface definition missing in WSDL document
(<portType> missing)
(Message no. SPRX125)
I may add that currently I'm trying to import a local XSD file directly in SE80 but I suppose that generating from XI definition (loading the XSD in XI first) will yield the same result.
Does anyone have an explanation for this?
Many thanks
Similar Messages
-
Anything for DDIC-structure to XSD transformation available???
Hi,
do you know a function module/class/transaction that allows <b>to transform any ddic structure to its XSD representation</b>?
I know that with "CALL TRANSFORMATION" you can transform ddic structures to an XML representation. But I need a simple XSD (Scheme) representation.
Any idea??Hi Christian,
the XSD editor is part of the XI Integration Builder and is running in the design part (Java). There you can create manually data types and the editor is converting that to XSD automatically. Another option there is to import existing XSD... My problem is I have a lot of ddic structures in R/3 and I need them for XI. -> import
I have asked this question also in the XI forum - not really helpful answers yet.
I thought there must be a standard SAP function module to create that XSD presentation. If not you have to create complex structures manually within XI. Nice work
Thanks anyway and best regards to Dr. Muller -
Simple transformation with reference to ddic structures
Hi, experts,
we decide to use xml as the format when exchanging massive data with other applications. and we want to use simple transformation because according to the document it's more fast.
actually our file structure is determined by certain ddic structures, one xml file main contain several ddic structures , and they are all flat one, not deep structure.
the xml file may look like this:
<data>
<ddic1>[components of ddic structure 1 ]</ddic1>
<ddic2>[components of ddic structure 2 ]</ddic2>
</data>
i am new to ST,i am wondering that is it possible to make the ST more easy with the help of ddic structure? do i still need to declare the components one by one in the ST program?
BR.
junIt only runs ok with 2 internal tables because of the way you set up the XML string. It will run ok with 3 internal tables too. If you strip out the '<C>' nodes or move the '<C>' nodes around, you'll see what I mean (move the C nodes to the last B node). Each time you start a loop in a simple transformation, the internal table is initialized. So, you need to form your sample XML string differently, declare your internal tables differently (nested), or use XSLT for a little more power.
-
Deep DDIC-Structure - Method to get the Comp.Type of a sub-structure
Dear colleagues,
thought the subsequent piece of coding might be helpful for the following problem:
In DDIC you have created a deep/nested Structure e.g. a complete Business Document representation like
s_doc_header type struct_doc_header
(incl.) item type tab_item
(incl) party type tab_party etc.
Now for some purpose you need to access somewhere a sub-part of this structure, e.g. the party-part. You only know (dynamically) the component name "party", but need for dynamic access also the Component Type ("tab_party") (in order to make use of a "CREATE DATA lr_reftodata TYPE (determined_comp_type)." )
The following piece of coding should help to query any start component type (here "struct_doc_header") for its embedded components.
Its a recursive use of features provided by the very nice class(set) of cl_abap_structdescr.
I implemented it as a static method.
When doing so, you need to ensure, that the TYPE-GROUP "ABAP" is linked to the class (class properties --> forward declarations),
Let me know if you find it useful.
And apologies in advance, if the same problem was already posted in the forum. I did only a rough search before due to a lag of ideas for appropriate search-strings ...
Best regards,
Rudy
Signature:
Importing:
IV_COMPNAME TYPE ABAP_COMPNAME
IV_START_STRUCTR TYPE KOMP_TYPE
Exporting/returning
EV_DDIC_STRUCT TYPE KOMP_TYPE
METHOD search_deep_ddic_by_comp.
* Description -------------------------------------------
* Methods looks into a deep DDIC-Structure and returns the
* corresponding TYPE
* Prerequsite for usage: Structures component names are unique.
* Local Data Defintions --------------------------------------
* Locals -----------------------------------------------------
* TYPES:
DATA: lv_compname TYPE abap_compname.
DATA: lt_componenttable TYPE abap_component_tab.
DATA: lv_relative_name TYPE string.
DATA: lv_ddic_header TYPE x030l.
DATA: lv_ddic_struct TYPE komp_type.
DATA: lv_start_struct TYPE komp_type.
* supporting
DATA: lv_lines TYPE i.
DATA: lv_message TYPE string.
DATA: lt_selopt TYPE sesf_selection_parameters_tab.
DATA: ls_selopt TYPE sesf_selection_parameter.
* References -------------------------------------------------
DATA: lo_struct_descr TYPE REF TO cl_abap_structdescr.
DATA: lo_type_descr TYPE REF TO cl_abap_typedescr.
* Field-Symbols ----------------------------------------------
FIELD-SYMBOLS:
<fs_struct_descr_component> TYPE abap_componentdescr.
lo_struct_descr ?= cl_abap_structdescr=>describe_by_name( p_name = iv_start_structr ).
IF lo_struct_descr IS BOUND.
* get all sub-structures/components of iv_start_structr
CALL METHOD lo_struct_descr->get_components
RECEIVING
p_result = lt_componenttable.
lv_compname = iv_compname.
READ TABLE lt_componenttable ASSIGNING <fs_struct_descr_component>
WITH KEY name = lv_compname.
IF sy-subrc = 0.
* matching component found - search for DDIC structure
CALL METHOD <fs_struct_descr_component>-type->get_relative_name
RECEIVING
p_relative_name = lv_relative_name.
ASSERT lv_relative_name IS NOT INITIAL.
CASE <fs_struct_descr_component>-type->type_kind.
WHEN 'u' OR 'v'. "structure
ev_ddic_struct = lv_relative_name.
RETURN.
WHEN 'h'. "table type - derive the line type
lo_type_descr ?= cl_abap_datadescr=>describe_by_name( p_name = lv_relative_name ).
CALL METHOD lo_type_descr->get_ddic_header
RECEIVING
p_header = lv_ddic_header.
IF sy-subrc = 0.
ev_ddic_struct = lv_ddic_header-refname.
RETURN.
ELSE.
"error
ENDIF.
WHEN OTHERS.
"error
ENDCASE.
ELSE.
* go deeper into structure and look into each sub-structure via recursion
LOOP AT lt_componenttable ASSIGNING <fs_struct_descr_component>.
CALL METHOD <fs_struct_descr_component>-type->get_relative_name
RECEIVING
p_relative_name = lv_relative_name.
ASSERT lv_relative_name IS NOT INITIAL.
CASE <fs_struct_descr_component>-type->type_kind.
WHEN 'u' OR 'v'. "structure
WHEN 'h'. "table type - derive the line type
lo_type_descr ?= cl_abap_datadescr=>describe_by_name( p_name = lv_relative_name ).
CALL METHOD lo_type_descr->get_ddic_header
RECEIVING
p_header = lv_ddic_header.
IF sy-subrc = 0.
lv_relative_name = lv_ddic_header-refname.
ELSE.
"error
ENDIF.
WHEN OTHERS.
EXIT. "next loop, investigate only struct and table
ENDCASE.
* lv_compname = <fs_struct_descr_component>-name.
lv_start_struct = lv_relative_name.
CALL METHOD /scmtms/cl_ddic_utility=>search_deep_ddic_by_comp
EXPORTING
iv_compname = iv_compname
iv_start_structr = lv_start_struct
IMPORTING
ev_ddic_struct = lv_ddic_struct.
IF lv_ddic_struct IS NOT INITIAL.
ev_ddic_struct = lv_ddic_struct.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDMETHOD.Using command:
ASSIGN COMPONENT idx OF STRUCTURE struc TO <fs>.
For example:
DESCRIBE FIELD pi_output TYPE pi_output COMPONENTS lv_columns. "For number of columns
DO lv_columns TIMES.
ASSIGN COMPONENT SY-INDEX OF
STRUCTURE (name of structure) TO <l_fs_output>. "<l_fs_output> - field of structure
DESCRIBE FIELD <l_fs_output>... "with other options.
ENDDO. -
Source of xslt mapping and XSD/ XMT target structures for standard Idocs
Hi,
I am working on R/3 - XI - ICH scenario. I need xslt mapping and XSD/ XML target structures for standard IDoc like PROACT01,DELFOR01, DELVRY03. I tried to search it on marketplace but couldn't find it there. As per configuration document, these things are shipped with XI mapping content in live cache CD. But I don't have this CD with me. Can anybody tell me the source for these target structures and mapping program. ( Please share marketplace, site link or send me across the mail [email protected])
Thank you in advance.
Anand More.Anand the other option is to import the corresponding idocs into your integration repository and then you can view the generated XSD there.
As regards XSLT mapping, you need to basically first identify as to what form you want to transform your source idoc into.
For some help on XSLT mapping check the following threads,
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/topusers.jspa%3FforumID%3D44
https://www.sdn.sap.com/sdn/collaboration.sdn?node=linkFnode1-6&contenttype=url&content=https://Process Integration (PI) & SOA Middleware
Also have a look at my code samples,
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-code-samples/generic xslt mapping in sap xi, part i.pdf
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9692eb84-0601-0010-5ca0-923b4fb8674a
cheers
Sameer -
CDIR is a DDIC structure used in the IMPORT DIRECTORY
CDIR is a DDIC structure used in the IMPORT DIRECTORY statementmy question is is it usqable for all cluster databases we make indeoendently apart from INDX or just for INDX
I have no real details, but based on your question I am guessing Thunderbird does not check the drive letter only the path. so H:\Stuff and G:\Stuff would be the same thing. Try a change to the actual folder names.
-
How to enhance the length of standard UI element which maps to DDIC structure?
Dear Webdynpro Expert,
I got a requirement to enhance the length of UI element which maps to DDIC structure attribute. I have tried by using
View Enhancement by hiding the standard UI element,
Adding the required field in the standard structure through append structure,
mapping the appended structure field to the UI element.
But it shows error as data compatibility.
Can you please share some light on it.
Thanks.Hi Mohsin,
When and where are you getting this data compatibility error???
Try to create a new context attribute and add your new DE.
BR,
RAM. -
Hi,
is there an easy way to create a xml string based on a ddic structure?
Its a nested structure and I want to avoid to create all elements manually.
Perfect way would be that i could fill the structure with data and then transform this into a xml string.
for instance:
ls_test-header-name = 'tester'
ls_test-header-county = 'germany'
ls_test-item-material = '4711'
ls_test-item-pos = '1'
should be transformed to:
<?xml version="1.0"?>
<ls_test>
<header>
<name>tester</name>
<country>germany</country>
</header>
<item>
<material>4711</material>
<pos>1</pos>
</item>
</ls_test>
Thanks,
ChristophHi Christoph,
following link describes the xml transformation suggested above:
http://help.sap.com/saphelp_erp2005vp/helpdata/en/e3/7d4719ca581441b6841f1054ff1326/frameset.htm
and here is a small example
http://help.sap.com/saphelp_erp2005vp/helpdata/en/ae/101640a991c742e10000000a1550b0/frameset.htm
Hope this is helpful.
Regards
Bernd -
BRFplus: DDIC Structure as Function Parameter results in Dump
Hi all,
I want to use Data Dictionary structure VBAK as a (signature) parameter to a BRFplus Function.
I have created a Data Object VBAK bound to the DDIC structure VBAK, and defined it as a parameter to my Function.
In my code to call the BRF function, I have:
DATA:
lo_context TYPE REF TO if_fdt_context,
lo_function TYPE REF TO if_fdt_function.
DATA:
ls_vbak TYPE VBAK.
lo_context = lo_function->get_process_context( ).
lo_context->set_value(
EXPORTING
iv_name = 'VBAK'
ia_value = ls_vbak ).
The SET_VALUE method results in a runtime error (program dump) of type UC_OBJECTS_NOT_CONVERTIBLE description u201CData objects in Unicode programs cannot be convertedu201D.
On investigation this seems to be because certain fields are represented differently in BRF. For example, the DDIC field VBAK-ERDAT (type DATS) is stored in BRF as TIMEPOINT, which is itself a structure (type FDT_S_TIMEPOINT). Trying to move the date value to the timepoint value is not possible and results in the dump.
How do I get around this ? Or in practice is it not feasible to use DDIC structures containing dates, times and possibly numbers as function parameters ??
Running on SAP NW 7.0 EHP1 SP5.
Thanks,
GroganTherefore you best create an internal structure reusing the types in IF_FDT_TYPES. Then you copy the data into the BRFplus internal format and then you process the function.
Is there a method to do this, or do I have to develop my own using RTTI / RTTC ?
NW 701 - *sigh*.
Thanks & regards,
Grogan -
DDIC-Structure - Need Byte Length of a DDIC-STRUCTURE!!!
Hello,
how can I write a Report/ Function that becomes in Input each DDIC-Structurename and gives the user an Output back, that contains the whole Byte Length of the STRUCTURE.
For Example, we have an DDIC-Structure with name structure_example:
Name TYPE c LENGTH 15,
Firstname TYPE c LENGTH 10,
Street TYPE c LENGTH 30,
ZIP-Code TYPE int2 LENGTH 5.
Their must existing a Functionality which can used the structurename and gives the user the Byte Length of the Structure back.
In our example the user gets for "structure_Example" the Output "60" Bytes back.
Input: structure_example
Output: 60
I hope someone can give me a solution to solve this problem.
Thanks for all help in this forum.
With kind regards
ETNHi,
check out the below code...
my be this might help you.
TYPES:
BEGIN OF my_struct,
comp_a type i,
comp_b type f,
END OF my_struct.
DATA:
my_data TYPE my_struct,
descr_ref TYPE ref to cl_abap_structdescr.
FIELD-SYMBOLS:
<comp_wa> TYPE abap_compdescr.
START-OF-SELECTION.
descr_ref ?= cl_abap_typedescr=>describe_by_data( my_data ).
WRITE: / 'Typename :', descr_ref->absolute_name.
WRITE: / 'Kind :', descr_ref->type_kind.
*WRITE: / 'Length :', descr_ref->length.*
WRITE: / 'Decimals :', descr_ref->decimals.
WRITE: / 'Struct Kind :', descr_ref->struct_kind.
WRITE: / 'Components'.
WRITE: / 'Name Kind Length Decimals'.
LOOP AT descr_ref->components ASSIGNING <comp_wa>.
WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
<comp_wa>-length, <comp_wa>-decimals.
ENDLOOP.
regards,
Santosh Thorat -
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
How to create and add table type to a DDIC Structure in sap 3.1H
-
Dynamic DDIC structure - work at runtime with changes
Hi Experts,
I have a problem in a method of Web Dynpro Abap. Ich have a database structure /SME/DED_DYN and change its fields at runtime. I do that with the function DDIF_TABL_PUT and the activation with DDIF_TABL_ACTIVATE.
I have:
COMMIT WORK and wait.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
NAME = '/SME/DED_DYN'
TABLES
DD03P_TAB = DD03P_TAB
DD05M_TAB = DD05M_TAB
DD08V_TAB = DD08V_TAB
DD35V_TAB = DD35V_TAB
DD36M_TAB = DD36M_TAB
EXCEPTIONS
tabl_not_found = 1
name_inconsistent = 2
tabl_inconsistent = 3
put_failure = 4
put_refused = 5
others = 6.
COMMIT WORK and wait.
if sy-subrc = 0.
call function 'DDIF_TABL_ACTIVATE'
exporting
name = '/SME/DED_DYN'
IMPORTING
rc = rc
exceptions
not_found = 1
put_failure = 2
others = 3.
endif.
The fields of the DDIC structure /SME/DED_DYN are changed at runtime dynamicly. Not their value, the fields themselves with fieldname and datatype. I need to work with these NEW fields of the DDIC structure at the same runtime. But somewhere the OLD /SME/DED_DYN is buffered I think, because the method only reads this old structure although in Transaction SE11 it changes to the NEW one at runtime correctly. I have to refresh my whole Web Dynpro Application in the browser and then it works with the new structure.What buffer could this be and how can I clear it, so that my method in WebDynpro can proceed with the new DDIC structure?
I hope you understand my problem.
Thanks for your help!!
Best regards,
IngmarHi,
I create a database table which name is ZTABL1 .
The fields of this table are MANDT and FIELDS1 .
Then i write the code below .
It changes the dbtable dynamically and the values of the fields.
I hope this help you.
DATA : DD03P_TAB LIKE DD03P OCCURS 0 WITH HEADER LINE .
DATA : DD05M_TAB LIKE DD05M OCCURS 0 WITH HEADER LINE .
DATA : DD08V_TAB LIKE DD08V OCCURS 0 WITH HEADER LINE .
DATA : DD12V_TAB LIKE DD12V OCCURS 0 WITH HEADER LINE .
DATA : DD17V_TAB LIKE DD17V OCCURS 0 WITH HEADER LINE .
DATA : DD35V_TAB LIKE DD35V OCCURS 0 WITH HEADER LINE .
DATA : DD36M_TAB LIKE DD36M OCCURS 0 WITH HEADER LINE .
DATA : lt_fcat TYPE lvc_t_fcat ,
ls_fcat TYPE lvc_s_fcat .
DATA : lt_table TYPE REF TO data.
DATA : ZTABL1 .
CALL FUNCTION 'DDIF_TABL_GET'
EXPORTING
NAME = 'ZTABL1'
TABLES
DD03P_TAB = DD03P_TAB
DD05M_TAB = DD05M_TAB
DD08V_TAB = DD08V_TAB
DD12V_TAB = DD12V_TAB
DD17V_TAB = DD17V_TAB
DD35V_TAB = DD35V_TAB
DD36M_TAB = DD36M_TAB
EXCEPTIONS
ILLEGAL_INPUT = 1
OTHERS = 2
LOOP AT DD05M_TAB WHERE FIELDNAME NE 'MANDT' .
DD05M_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD05M_TAB .
ENDLOOP.
LOOP AT DD03P_TAB WHERE FIELDNAME NE 'MANDT'
DD03P_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD03P_TAB .
ENDLOOP.
LOOP AT DD08V_TAB WHERE FIELDNAME NE 'MANDT' .
DD08V_TAB-FIELDNAME = 'FIELD2' .
APPEND DD08V_TAB .
ENDLOOP.
LOOP AT DD35V_TAB WHERE FIELDNAME NE 'MANDT' .
DD35V_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD35V_TAB .
ENDLOOP.
LOOP AT DD36M_TAB WHERE FIELDNAME NE 'MANDT' .
DD36M_TAB-FIELDNAME = 'FIELD2' .
MODIFY DD36M_TAB .
ENDLOOP.
CALL FUNCTION 'DDIF_TABL_PUT'
EXPORTING
NAME = 'ZTABL1'
TABLES
DD03P_TAB = DD03P_TAB
DD05M_TAB = DD05M_TAB
DD08V_TAB = DD08V_TAB
DD35V_TAB = DD35V_TAB
DD36M_TAB = DD36M_TAB
EXCEPTIONS
TABL_NOT_FOUND = 1
NAME_INCONSISTENT = 2
TABL_INCONSISTENT = 3
PUT_FAILURE = 4
PUT_REFUSED = 5
OTHERS = 6
COMMIT WORK AND WAIT .
DATA : lv_subrc like sy-subrc .
CALL FUNCTION 'DDIF_TABL_ACTIVATE'
EXPORTING
NAME = 'ZTABL1'
AUTH_CHK = ' '
IMPORTING
RC = lv_subrc
EXCEPTIONS
NOT_FOUND = 1
PUT_FAILURE = 2
OTHERS = 3
COMMIT WORK AND WAIT .
clear : lt_fcat , lt_fcat[] .
LOOP AT DD03P_TAB .
MOVE-CORRESPONDING DD03P_TAB TO ls_fcat .
APPEND ls_fcat TO lt_fcat .
ENDLOOP.
PERFORM process.
*& Form process
form process.
FIELD-SYMBOLS : <table> TYPE table .
FIELD-SYMBOLS : <s_table> TYPE ANY .
FIELD-SYMBOLS : <f_1> TYPE ANY .
DATA : ls_ZTABL1 type ZTABL1 .
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING it_fieldcatalog = lt_fcat
IMPORTING ep_table = lt_table.
ASSIGN lt_table->* TO <table>.
ASSIGN LOCAL COPY OF INITIAL LINE OF <table> TO <s_table>.
LOOP AT lt_fcat INTO ls_fcat.
IF ls_fcat-fieldname = 'FIELD2' .
ASSIGN COMPONENT ls_fcat-fieldname OF STRUCTURE <s_table> TO <f_1> .
<f_1> = 'A' .
ENDIF.
ENDLOOP.
MOVE-CORRESPONDING <s_table> TO ls_ZTABL1 .
INSERT INTO ZTABL1 values ls_ZTABL1.
endform. " process -
Transport the table not just the DDIC structure
I had a table in Dev as a local object. I assigned a package to the database table as follows.
Goto->Object Directory Entry -> Here click on edit mode --and enter the package name.
When I transported the object to QDF only the DDIC structure was transorted and not the table. How do I transport the table and not just the DDIC structure? Thanks,Hi,
What do you mean by entire table?
Do you mean that the table contents should also be transported?
Table contents will be transported only if you have included them in a customising request and you table is of type customising(C).
Regards,
Ankur Parab -
Defining table from DDIC-structure dynamically
Hi folks!
Does anybody know whether it is possible to build an internal table from DDIC-structures dynamically?
I have a deep structured itab_upload(whose structure is defined in the DDIC), which contains 2 fields(Number Name) and a third field which contains itab_desc.
This itab_desc can contain either 2 fields(Number Name) and a third field which contains another itab_desc <b>or</b> 3 fields for numbers(without any other itab).If itab_desc contains another itab_desc, the second itab_desc contains only 3 fields for numbers and names...
help will be very appreciated and points will be rewarded!
FelixHi Felix,
Please find below the material which will help you to solve your problem :-
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae
Please reward points if helpful.
Regards.
Srikanta Gope.
[email protected] -
Error mesg "Generated DDIC structure for form ZPAYSLIP1 contains errors"?
Hi,
I tried to create a payslip using TCODE HRFORMS.
I clicked on Create button, i specified all the details,
i.e Form Name
Country Grouping
Form Class
Here i specified Country Grouping as "40". And Form Class as "PAYSLIP"
After this i saved it. And i tried to Activate it. Its throwing an error message like....
"Generated DDIC structure for form ZPAYSLIP1 contains errors"
Any helps.....Hi,
That is CEDT only. I wrote in my thread description of that i.e PAYSLIP...
Regards,
Shankar.
Maybe you are looking for
-
Dashboard link is not working from BI Publisher
Dashboard link is not working from BI Publisher. Please let me know How to fix this problem.
-
In need of thread help...please!
Have a map like applet running on netscape6.2 and IE5.0 both using the java plug-in 1.4. Here is the deal, want to make applet as a thread so I can stop and start at will. Unfortunately my applet wont show as a thread. It runs all the way through to
-
I'm not sure what the problem is. I let it update overnight and still no luck. I've shutdown and started over still no help. It just hangs on "configuring installation"
-
I have just tried to install the ios7 update that fixes the initial bugs in ios7 and it wouldn't complete the install - an error occurred. now my phone is frozen and inoperable. what do i need to do to fix?
-
I am interested in making contact with anyone who has written custom extractors for EHS data or who has used EHS analytics. Carol