cancel
Showing results for 
Search instead for 
Did you mean: 

EDI: creating a sales order with reference to contract

former_member504446
Participant
0 Kudos

Dear gurus,

we would like to create a sales order with reference to a SD contract from an ORDERS IDoc.

OSS say we have to populate the E1EDx02 segments with the contract number to do this.

We tested this in our system by manually editing the incoming IDoc and this is what we found:

- qualifier u201C005 : Customer Contract Numberu201D set and BELNR = u201Cthe customeru2019s outline agreement number in his MMu201D (= normal MM behaviour) -> reference is not processed at all, sales order is created without reference

- qualifier u201C043: Vendor Contract Numberu201D set and BELNR = our contract number in SD -> Sales order successfully created. BUT where can I store an external outline agreement number in MM so that the BELNR in the IDoc is populated with it?

- qualifier u201C058: Customer Contract Numberu201D set and BELNR = the customeru2019s outline agreement number in his MM -> Error:

The system could not determine a contract number

Message no. VG226

Diagnosis

The system could not determine a contract number for the selection criteria: external contract number 5100000020 and customer number 0044000004.

This error appears although we maintained the external number 5100000020 in the PO number field (VBKD-BSTKD) in our SD contract.

Could anyone please explain what we do wrong?

Cheers

Alicia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alicia,

Though I didn't work on creating order w.ref to a contract.. I did work on creating a sales order w/ ref to an invoice and sales order. I tried a lot to use the standard ORDERS05 IDoc with the given qualifiers etc.. landed up modifying BDC to std SAP screens etc..and even then couldn't!

What I did finally was copy IDOC_INPUT_ORDERS into ZIDOC_INPUT_ORDERS and changed it to meet my requirements.

This worked for me..

If you don't get other options you could consider doing the above.

Regards,

Raghu.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Alicia,

For qualf 058 in E1EDK02 SAP fills XVBAK-CONTK_REF and BSTKD with qualf 001.

Pls check LVEDAF5S for all qualifiers and the fields SAP fills the value from each qualifier.

Regards

Raghu.

Lakshmipathi
Active Contributor
0 Kudos
The system could not determine a contract number
Message no. VG226

If the error message number is VG228, then implement the source correction as detailed in note 1302121

G. Lakshmipathi

former_member504446
Participant
0 Kudos

Hi again,

@Lakshmipathi: Thank you, but it is VG226, like I wrote. But still, the OSS note is interesting: "You create a sales order with reference to an MM contract using EDI." Where's the sense in that? Why would I ever want to create a sales order with reference to an outline agreement in MM???

@Rags: Sure we could do that, but I find it hard to believe that there is no standard way to do this. Especially given there are plenty of OSS notes stating that this is possible, e.g. note 562710.

Any other ideas?

Cheers

Alicia