cancel
Showing results for 
Search instead for 
Did you mean: 

Message Type Creation - One Header Different Lines Items

tharaka_fernando
Contributor
0 Kudos

Dear All SAP Gurus,

May be I am asking a beginner question But I need your clarification because I am novel to this subject.

I need to pass Purchase Order(PO) and Sales Order(SO) in single message from an external system to SAP. Therefore I have declared the Message Type as below. Advice me whethre this is correct.

OutBound Message

Example 1

<Header   1...to unbounded>

<PO header Details>

<SO header Details>

</Header>

<LineItem   0...to unbounded>

<PO line Details>

</LineItem>

<LineItem   0...to unbounded>

<SO line Details>

</LineItem>

The message will contain 01 Header item NODE for both PO and SO and 02 different Line Item NODES for SO and PO Line Items.

This will be a SOAP to Proxy scenareo

OR

Example 2

<data type>

<Header1        1...to unbounded>

<PO header Details>

</Header>

     <LineItem   0...to unbounded>

     <PO line Details>

</LineItem>

<Header2        1...to unbounded>

<SO header Details>

</Header>

     <LineItem   0...to unbounded>

     <SO line Details>

     </LineItem>

  </data type>

Plz Advice

Accepted Solutions (1)

Accepted Solutions (1)

ambrish_mishra
Active Contributor
0 Kudos

Hi,

the structure in example 2 looks better. Header and Line Item structure is appropriate and better have an identifier to identify if it is a PO or SO.

Hope it helps!

Ambrish

Answers (2)

Answers (2)

tharaka_fernando
Contributor
0 Kudos

Dear Vikas Singh,

Thank you for the  reply.

Yes I need to create PO and SO in the same interface because User Needs to pass these details from a single click from the legacy system and need create in SAP (Synchronous scenareo with PO and SO number in response).

Dear Ambrish Mishra,

Thank you for the reply.

I was also confident in Exaple 2 and I have another way of creating the Data Type as suggestion.

<Msg Type>

<PO>       

<PO Header 1....Unboound></POheader> 

<PO line Item 0....Unbound><PO line Item>

</PO>

<SO>

<SO Header 1....Unboound></SOheader>

<SO line Item 0....Unbound><SO line Item>

</SO>

</Msg Type>

Former Member
0 Kudos

both the structure in example 2 & 3 looks better . I would more prefer  structure in example 2 as within One header we can list multiple line items and the approach looks good enough.

Thanks,

Sujit

ambrish_mishra
Active Contributor
0 Kudos

I would say choose a structure which makes your mapping simple. As of now, the design for the target mapping is not visible to us but decide based on what would make your mapping simple.

Hope it helps!

Ambrish

vikas2
Active Participant
0 Kudos

Are you going to create both sales order and PO from the same interface ?

Theoretically it can be done but it'll be perhaps cleaner if they're kept as separate interfaces.

Ofcourse in inbound proxy processing, you can investigate the input and create required business document but if you can, split them into separate interfaces to keep semantics of the interface clean.