2008 Mar 03 1:26 PM
Hi all,
I want to make an internal table's data xml file but I do not know much on XML.
Please direct me how to start and how to go on this topic.
Note the xml file should be like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <Transaction>
- <TXNHEAD>
<RecordID>01</RecordID>
<FileName>002</FileName>
<IntermediaryCode>66000004</IntermediaryCode>
<ActualizationDate>20041201</ActualizationDate>
<SequenceNumber>001</SequenceNumber>
<NumberofRecords>0002</NumberofRecords>
<AmountofRecords>2000</AmountofRecords>
</TXNHEAD>
- <TXNDETAIL>
<RecordID>02</RecordID>
<SequenceNumber>001</SequenceNumber>
<TransactionType>01</TransactionType>
<ActionCode>01</ActionCode>
<TransactionID>WF1UPL1</TransactionID>
<SellerCode>66000002</SellerCode>
<BuyerCode>66000004</BuyerCode>
<TransactionReference>Transaction file with id WF1UPL1</TransactionReference>
<TransactionDescription1>To check the amount</TransactionDescription1>
<TransactionDescription2>To check the buy sell account</TransactionDescription2>
<DocumentType>01</DocumentType>
<DocumentNumber>00001</DocumentNumber>
<DocumentDate>20041202</DocumentDate>
<DocumentAmount>1000</DocumentAmount>
<CurrencyCode>840</CurrencyCode>
<TransactionAmount>1000</TransactionAmount>
<TransactionDueDate>20050425</TransactionDueDate>
<AdditionalInformation1>Please check the transaction amount
</AdditionalInformation1>
<AdditionalInformation2>
Should be same as invoice amount where approving
</AdditionalInformation2>
<payaccount>00000012345677</payaccount>
<payswift>0000000010</payswift>
</TXNDETAIL>
- <TXNDETAIL>
<RecordID>02</RecordID>
<SequenceNumber>002</SequenceNumber>
<TransactionType>01</TransactionType>
<ActionCode>01</ActionCode>
<TransactionID>WF1UPL1</TransactionID>
<SellerCode>66000002</SellerCode>
<BuyerCode>66000004</BuyerCode>
<TransactionReference>
Transaction file with id WF1UPL1
</TransactionReference>
<DocumentType>01</DocumentType>
<DocumentNumber>00001</DocumentNumber>
<DocumentDate>20041202</DocumentDate>
<DocumentAmount>1000</DocumentAmount>
<CurrencyCode>840</CurrencyCode>
<TransactionAmount>1000</TransactionAmount>
<TransactionDueDate>20050425</TransactionDueDate>
<AdditionalInformation1>Please check the transaction amount</AdditionalInformation1>
<AdditionalInformation2>Please check the payment amount</AdditionalInformation2>
<payaccount>00000012345678</payaccount>
<payswift>0000000010</payswift>
</TXNDETAIL>
</Transaction>
First question:
Is an internal table is enough or we need one for header data and one for details.
Secondly, How can I create such a file via XML class?
Thanks.
Hi all,
I want to make an internal table's data xml file but I do not know much on XML.
Please direct me how to start and how to go on this topic.
Note the xml file should be like this:
<?xml version="1.0" encoding="UTF-8" ?>
- <Transaction>
- <TXNHEAD>
<RecordID>01</RecordID>
<FileName>002</FileName>
<IntermediaryCode>66000004</IntermediaryCode>
<ActualizationDate>20041201</ActualizationDate>
<SequenceNumber>001</SequenceNumber>
<NumberofRecords>0002</NumberofRecords>
<AmountofRecords>2000</AmountofRecords>
</TXNHEAD>
- <TXNDETAIL>
<RecordID>02</RecordID>
<SequenceNumber>001</SequenceNumber>
<TransactionType>01</TransactionType>
<ActionCode>01</ActionCode>
<TransactionID>WF1UPL1</TransactionID>
<SellerCode>66000002</SellerCode>
<BuyerCode>66000004</BuyerCode>
<TransactionReference>Transaction file with id WF1UPL1</TransactionReference>
<TransactionDescription1>To check the amount</TransactionDescription1>
<TransactionDescription2>To check the buy sell account</TransactionDescription2>
<DocumentType>01</DocumentType>
<DocumentNumber>00001</DocumentNumber>
<DocumentDate>20041202</DocumentDate>
<DocumentAmount>1000</DocumentAmount>
<CurrencyCode>840</CurrencyCode>
<TransactionAmount>1000</TransactionAmount>
<TransactionDueDate>20050425</TransactionDueDate>
<AdditionalInformation1>Please check the transaction amount
</AdditionalInformation1>
<AdditionalInformation2>
Should be same as invoice amount where approving
</AdditionalInformation2>
<payaccount>00000012345677</payaccount>
<payswift>0000000010</payswift>
</TXNDETAIL>
- <TXNDETAIL>
<RecordID>02</RecordID>
<SequenceNumber>002</SequenceNumber>
<TransactionType>01</TransactionType>
<ActionCode>01</ActionCode>
<TransactionID>WF1UPL1</TransactionID>
<SellerCode>66000002</SellerCode>
<BuyerCode>66000004</BuyerCode>
<TransactionReference>
Transaction file with id WF1UPL1
</TransactionReference>
<DocumentType>01</DocumentType>
<DocumentNumber>00001</DocumentNumber>
<DocumentDate>20041202</DocumentDate>
<DocumentAmount>1000</DocumentAmount>
<CurrencyCode>840</CurrencyCode>
<TransactionAmount>1000</TransactionAmount>
<TransactionDueDate>20050425</TransactionDueDate>
<AdditionalInformation1>Please check the transaction amount</AdditionalInformation1>
<AdditionalInformation2>Please check the payment amount</AdditionalInformation2>
<payaccount>00000012345678</payaccount>
<payswift>0000000010</payswift>
</TXNDETAIL>
</Transaction>
First question:
Is an internal table is enough or we need one for header data and one for details.
Secondly, How can I create such a file via XML class?
Thanks.
2008 Mar 03 2:31 PM
You could write your opinions also, not just the exact answer.
Thoughts also may be useful.
Please write.
2008 Mar 03 3:33 PM
Hi,
Check the following link:
http://www.sap-img.com/abap/sample-xml-source-code-for-sap.htm
Regards,
Bhaskar
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |