2007 Oct 31 12:02 PM
Hi All,
I have to create an XML file, The input kind is not decided yet . It may be a string or an internal table. I have searched various questions posted here. But they have either the length of the string or they are using the maximum length 255 in the examples.
In my case, if i use string , how will it be handle data which exceeds 255 chars? Also in case, I have to go for internal table, the structure is not fixed yet. But the file generated should look like this :
XML file contents ***********************
<outgoing_mail>
<document>Document Number</document>
<strsrv_direction>
<archiving>
<archive></archive>
<object> </object>
<objectkey></objectkey>
</archiving>
<local_printing>
<local_print> </local_print>
<printer> </printer>
</local_printing>
<printshop>
<print></print>
</printshop>
<emailing>
<as_text></as_text> (As text or Attachment)
<email_address>Receiver email address</email_address>
</emailing>
</strsrv_direction>
<naw>
<number></number>
<name></name>
<street></street>
<housenumber></housenumber>
<housenr_supplement></housenr_supplement>
<postal_code></postalcode>
<city></city>
</naw>
<textblock_01>
The text from the send email
</textblock_01>
</outgoing_mail>
XML file contents ***********************
2007 Oct 31 9:45 PM
Namita,
Type string can handle more than 255 characters (look up SAP Help for "string" under "Built in ABAP Types").
If you are using an internal table define it's record type as a string.
eg.
types: begin of ty_rec,
rec type string,
end of ty_rec.
data: tbl_data type table of ty_rec.
Hope this helps.
Pat.
2007 Nov 01 8:32 AM
Hi,
I agree to that. But in the case I mentioned, how do I acccept the entire contents in a string?