Dynamically create data type for structure
Hello Experts.
how to create dynamic data type for structres. for example.
data lv_struc_name type strukname.
lv_struc_name = get_struct_name( ) ****** this method gives the structure name('ct_struc')
now I want to create one data type, which is having the type of lv_struc_name content.(ct_struct)
thanks
Tim
Hi,
here is the link to really good presentation about generic programming ABAP351.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b332e090-0201-0010-bdbd-b735e96fe0ae
It contains examples how to create dynamic structure and tables.
Cheers
Similar Messages
-
How create data type for coulmn name having special characters in IR
hi ,
any idea how to create how to do create data type for coulmn name having special charactersHi Amit,
Can you ellaborate ?
Actually if you are reading a file(or anything else) which contains special characters, the data type can be created as done for other interfaces. But it is in the adapters that we actually take care of handling these special characters.
ShabZ -
How to do create data type for coulmn name as QS$FGD .
hi ,
In my database i have a column as QS$FGD.
How do i map it in XI , since $ is not accepted when u create a data type.
One way is to give alias at the databse level for the column . is there any other way to slove it .
Thanks
amitHi Amit,
Were you able to solve your issue? I'm facing the similar issue now. My DB table contains field names with '.' i.e. say xyz.abc. How to solve this??
I feel SP could be an alternative??
Thanks,
Hussain. -
Error while creating data type
Hi
I am creating data type for the scenario from File to IDOC
Namespace urn:xiworkshop:groupxx:legacy is not defined in the software component version NEWPRODUCT , 100 of sap Object Message Type Vendor | urn:xiworkshop:groupxx:legacy references the inactive object Data Type Vendor | urn:xiworkshop:groupxx:legacy
Please help meHi;
First activate your namespace and then create the data type.
Namespace + default datatypes should be activated together.
Then your data type
Mudit -
Hey guys
i have a HTTP to File scenario where in my getting and XML file which has sone tags of this form
<ServiceDateTime dateTypeIndicator="PromisedForDelivery">2007-04-06</ServiceDateTime>
how should i create data type for this?
is this an attribute?
thanx
ahmadHi,
Just "Insert Attribute" by right-clicking on ServiceDateTime.
Regards,
Bill -
Create dynamic data type in structure
Hi Experts,
I am new to ABAP.
In my scenario data type is varying for the field. for that I need to create dynamic data type in structure, this structure I am using for internal table for OVS search input.
Please suggest the solution for this.
Advance thanks,
Regards,
BBCThanks for your quick reply,
I used your logic like this.
data:
ls_component type abap_componentdescr,
lt_component type abap_component_tab.
*... (1) define structure components :
clear ls_component.
ls_component-name = 'NVALUE'.
ls_component-type ?= cl_abap_typedescr=>describe_by_name( <fs_seg_v>-fieldname ).
insert ls_component into table lt_component.
*... (2) create structure
data lr_strucdescr type ref to cl_abap_structdescr.
data lr_data_struc type ref to data.
lr_strucdescr = cl_abap_structdescr=>create( lt_component ).
create data lr_data_struc type handle lr_strucdescr.
field-symbols <fs> TYPE any.
assign lr_data_struc->* to <fs>.
your logic is working fine.
here I am getting feild name (<fs_seg_v>-fieldname) from internal table.
But I need to assign same field name structure to query parameter.
FIELD-SYMBOLS: <ls_query_params> TYPE lty_stru_input.
Please can you suggest how I can refer the field name structure?
Regards,
BBC -
Problem in Creating Data type strcuture for Proxies.
Hello gurus
My scenario is to send data from ECC system to SRM system through proxies. we have to fetch's data from source system and post the data to target system through XI.
Because of massive data coming from source system, I am going for proxy to proxy scenario. What I do not understand is the Data type’s structure.
This is the structure of Data type for sender end
Can anyone help me to create the data type for the Receiver end(SRM).
Thanks in advance.
Regards
karanhello sir
I have done the config in ESR as-
Data type, message type, service interface, message mapping, operational mapping as well.
while transportation, the data filled in sender is shown in receiver side also.
sir, i need to know now that do we have to do the configuration in IR as well as
Receiver determination, Interface determination. sender agreement, receiver agreement as well .
because ther's no XML created when in go to transaction SXMB_MONI.
help?
Thanks
Regards
karan -
How to create the Data Type for the receiver end?
Hello Expertise
I wanted to Create a Data type for Receiver end in PI.
Sender end is ECC.
Receiver end is SRM
Here's the Data type for Sender end as
Can anyone help to create the Data type for Receiver end i.e SRM.
Thanks in advance.
Regards
karanHi Karan,
Please don't call Sir, we are just trying to help each other.
Please go through below scenario's and check your configuration.
ABAP Client Proxy to ABAP Server Proxy Scenario - Process Integration - SCN Wiki
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/e0ac1a33-debf-2c10-45bf-fb19f6e15649?overridelayout=true
http://wiki.scn.sap.com/wiki/display/XI/Step-by-step+FTP+to+ABAP+Proxy
regards,
Harish -
Why need message type when u create data type...
why need message type when u create data type...
Hi,
A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:
· More than one message interface can use the same message type. For example, an asynchronous outbound message interface and an asynchronous inbound message interface can reference the same message type because the request message does not need to be mapped.
· When defining a message mapping you can directly reference message types to map messages from an outbound interface to messages from a receiver interface.
For technical reasons, a data type is not sufficient to describe the instance of a message. In XML schema, data types are defined as abstract types that are not yet fixed to an element. You can only describe an instance of a message when you have specified a data type as an element type. Therefore, a message type defines the root element of a message.
A message type does not define the direction of the message exchange, in other words, whether it is a request or a response. In exceptional cases you can use the same message type for both the request and the response message.
A message type has the following characteristics:
· It comprises exactly one data type, which determines the content of the message to be transferred.
· It is identified by a name and an XML namespace. The name (together with the namespace) of a message type is located in the uppermost tag of the message to be exchanged. This is an element tag.
You have defined a message type GreetingRes that references a simple data type of type xsd:string. The XML namespace of the message type is http://sap.com/xi/myExample. The corresponding payload might look like this:
<?xml version="1.0" encoding="utf-8" ?>
<ns1:GreetingRes xmlns:ns1="http://sap.com/xi/myExample"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
Hello Mrs. Miller
</ns1:GreetingRes>
You can specify how a message type is used in more detail in the description
hope this will help you.
regards
Aashish Sinha
PS : reward points if helpful -
Hi
How do u create a data type when u get an input file.
How do u know when to create header , footer n all?
Can some one tell me or send a url on how to create data types. would be of great help!
Thanks!HI,
Generally identifying the structure from the input file need some analysis work.
You may refer some of the below tips while creating the data types
1. List down the input structure of data fields from input file.
2. Decide the Header and detail information based on the data and go for sub-structure.
3. With File adapter try to maintain the structure level max. upto 2.
i.e. Root>Header>Fields etc.
4. Try to avoid the substructure for the internal fields.
5. Decide the Occurances fo every root and sub structures and fields.
6. Identify if there any relations within Header and detail fields.etc.
Check with SAP Help for various activities
http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/content.htm
Thanks
Swarup -
Import XSD to create Data type in Design
hi,
I know that we can import XSD in Design and create data type,my question is:
1. Can i import an XSD thats been created in message mapping and use that to create my data type in design.
(or)
2.Should i have to write an XSD on my own and then import it to create my data type, and is there any standard format to write it.Hello Prashanth,
For your first question: i don't know exactly what you mean that the the xsd you create in the data mapping steps. So can you explain it in details?
For your 2nd question: Sure you can write your own XSD to create a data type. And i will give you an example xsd file format. Then you can import it in the XSD tab view.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/hansteel" targetNamespace="http://sap.com/xi/XI/hansteel">
<xsd:complexType name="CustomerInfo">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
a6c26c80000f11dac45e00096b1669b3
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="ID">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
dfe699c0e7bc11d9c736d51c0a0013e1
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="NAME">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
dfe82060e7bc11d9b2efd51c0a0013e1
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="35" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CUSTTYPE">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
dfe82061e7bc11d9c193d51c0a0013e1
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="4" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="POSTCODE">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
e93039a0e7bc11d9c7c6d51c0a0013e1
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="10" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="CITY">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
f0122850e7bc11d99189d51c0a0013e1
</xsd:appinfo>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:length value="35" />
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Hope this will be helpful.
Eric Ma -
hi..
i've problem in creating data type in xi after importing idoc from the R/3 sender
plz tell me the basic steps for creating data type in the receiver i.e xi.....
thanks in advanceHi,
You don't need to create a data type after importing the IDOC.
Idoc itself acts as message type and message interface.
check this for creating a data type..
http://help.sap.com/saphelp_nw70/helpdata/en/2d/c0633c3a892251e10000000a114084/frameset.htm
Thanks,
Vijaya. -
Labview How to specify 1d array of clusters as data types for variant to data
Hi, I'm new to labview. Can anyone tell me how to specify 1d array of clusters as data types for variant to data?
First of all, you should be sure that there is such a data type within the variant; otherwise, you will run into errors.
I recommend you to create the cluster and create a type definition from it. Then drop an array shell from the array palette and drop the cluster type into that array.
Connect that constant to the data type input of the Variant To Data function.
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
How to change data type for a field?
Hi Experts,
I have one std screen having one field having numeric type. So it will accept only numeric value. Remember I am using standard transaction.
Now my user wants to enter the special character like + or - in that field(having data type numeric).
How i can change the data type for the particular field so that it will also accept + or -?
Plz reply me as earliest as possible.
Thanks in advance.Hi salil ,
u have to change / create Domain of that Data Element.
but u have to check the Implications. i have done the same thing , but that one is Customer defined one , i got nearly 20 short dumps while doing the TP.
regards
Prabhu -
Validation while create data type
HI All ,
I have a pop-up in my report that user can create data type in didc,
There is a simple way to support validation for data types ,
I have pop-up where the user need to provide name of attribute
he need to create and the data type for it (char ,string ,int etc )
and he also need to provide the leng of the attribute he want to create
(e.g. char10 ) and also decimal places .
the issue here that i need to do some validation in the pop-up
for e.g. if user choose
case 1
name - attribute1
datatype - string
leng - in this case he dont need to provide leng (string )
dec - dont need to provide (string )
case 2
name - attribute1
datatype - char
leng - 10
dec - dont need to provide (char )
Any idea how to do this validation in a simple way (maybe to use standard functionlity)
Regards
AlexHI Keshav.
What i did is created a popup with FM in the popup i have 4 field
the field with the data type which i want to trigger event to it is domain and not ref to FM
The ppoup have 4 field
attr name
datatype
length
decimal
so from what you are say there is not option to trigger event when the user press F4
and choose a entry from it ,
since what i want to do is that if user for instance chose string i want that the next to fields (length and dec ) will be
remove from the popup since he dont need them .
and for he choose char the the decimal field will remove from the popup
Any idea how to solve this issue ?
Regards
Alex
Edited by: Alex Dean on Oct 12, 2010 3:02 PM
Maybe you are looking for
-
Where do I find my Acrobat Serial Number? It's nowhere on the box.
Hi there, I've been trying to licence my Acrobat Pro software, but I can't find the serial number on the box. I only have the barcode Can anyone tell me where I could find this, because I have about 5 days left on my trial version. Prema
-
Illustrator CS5.1 crashes on opening or saving a file-
I am on a Macbook Pro using Yosemite and Illustrator CS5.1. Everything was working great then out of the blue I couldn't save a file (or open one) onto my hard drive from Illustrator (PhotoShop works great). I can still save on to and open from a fla
-
How to create a database schema
could any one help me with database schema I need create one thanks!
-
BADI or EXIT while Checking Budget of PO against WBS
Hi , while creating the PO there is one pop us is coming. In tha pop up warnings/errors are coming. There is one warning which is stating: Budget is almost exhausted. Now I have one requirement that while checking budget by summing all condition type
-
Hi, what -server option means ?. I use weblogic and it crash all the time, I had "-server" flag and it is working good . what it is mean ? thank