Author |
Message
|
Ody |
Posted: Tue Feb 16, 2010 7:43 am Post subject: Problem building an IDoc (WMB v6.1) |
|
|
Newbie
Joined: 16 Feb 2010 Posts: 2
|
With the help of SupportPac IA0F version 2.2 I try to build an IDoc in TDS-format (MRM-parser).
I want to build an IDoc which is sent to an AIX-system (not to a SAP r/3-link).
I created a messageset with a Tagged/Delimited String format called 'Text_IDoc'.
After this I created a message definition file from a c-header. I set the pre-processing option to 'SAP File IDoc'.
The string encoding is set to 'Fixed Length' and the Padding Character for String is set to 'SPACE'.
When I fill the IDoc-fields with:
SET OutputRoot.MRM.DD[1].segnam = 'E2T001W';
SET OutputRoot.MRM.DD[1].mandt2 = '';
SET OutputRoot.MRM.DD[1].docnum2 = '0000000485502465';
SET OutputRoot.MRM.DD[1].segnum = '';
SET OutputRoot.MRM.DD[1].psgnum = '';
SET OutputRoot.MRM.DD[1].hlevel = '';
The output-IDoc looks like:
(0x01000000:Name)D = (
(0x03000000:NameValue):segnam = 'E2T001W' (CHARACTER)
(0x03000000:NameValue):mandt2 = '' (CHARACTER)
(0x03000000:NameValue):docnum2 = '0000000485502465' (CHARACTER)
(0x03000000:NameValue):segnum = '' (CHARACTER)
(0x03000000:NameValue):psgnum = '' (CHARACTER)
(0x03000000:NameValue):hlevel = '' (CHARACTER)
Where I expected that the 'empty' fields would look like:
(0x01000000:Name)D = (
(0x03000000:NameValue):segnam = 'E2T001W ' (CHARACTER)
(0x03000000:NameValue):mandt2 = '... ' (CHARACTER)
(0x03000000:NameValue):docnum2 = '0000000485502465' (CHARACTER)
(0x03000000:NameValue):segnum = '......' (CHARACTER)
(0x03000000:NameValue):psgnum = '......' (CHARACTER)
(0x03000000:NameValue):hlevel = '...' (CHARACTER)
Where ... = SPACE
Any idea why the 'empty' fields are not filled out with spaces to their fixed length ? |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Feb 16, 2010 8:14 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
are you giving spaces while building the target message.
does your message set is handling when any trailing spaces comes in to? _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 16, 2010 9:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Seems a lot of work to me.
I would take the round about route of creating an IDOC message like for R3 Link, but you can always change the setup and remove the SAPH header.
Just make sure to have a legal Idoc without the SAPH header in your message set.... and remember to set the field length for each element in the DC40 and DD40 header. Remember also to define the filler to 1000 in the DD40-segmentdata....
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Feb 16, 2010 9:52 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
IDoc header is the most important part right, other it wont hit the sap server at all. _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
Ody |
Posted: Wed Feb 17, 2010 1:29 am Post subject: |
|
|
Newbie
Joined: 16 Feb 2010 Posts: 2
|
The problem is solved.
Instead of setting the pre-processing option to 'SAP File IDoc', I used 'SAP ALE IDoc'.
The messageType for the outputmessage is set to 'ALE_IDoc' and the messageFormat is set 'Text_IDoc'.
After these changes the messages are built correctly.
Thanks for the response. |
|
Back to top |
|
 |
|