cancel
Showing results for 
Search instead for 
Did you mean: 

Problem on Creating Sales Order using .NET Connector 2.0

former_member220801
Participant
0 Kudos

I have built a .NET application which can create a sales order by calling BAPI BAPI_SALESORDER_CREATEFROMDAT2.

I have tested it with SE37 together with BAPI_TRANSACTION_COMMIT. Everythings work well. But when I executes my .NET application using exactly the same set of data (those I have filled in the import parameters and tables in SE37, I filled exactly the same into the data structure generated by .NET connector). I got the return message 'Document type OR is not defined'. I am pitty sure that order type OR (standard order) exists in my R/3 system and works well.

Can anyone please suggest what is the problem?

or advice me a way to debug it?

Thanks a lot!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I can only confirm what Reiner stated.

We spent a lot of time with debugging a similar problem on the SAP and .NET components. Finally we found out that SE37 automatically filled the input variable up to the required length which NCO does not.

So my tip as referred to input variables transferred to SAP via NCO: Check the <b>exact data type definition and field length via SE11</b>, verify that you <b>submit the variable in the right length</b> to SAP and see also initial values of the used data types in http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb2fcc358411d1829f0000e829fbfe/frameset.htm

Former Member
0 Kudos

hi mr.Gerald Kloimstein

i do the same project " Create Sales Order using .Net " i use

BAPI " BAPI_SALESORDER_CREATEFROMDAT1 " For creating Order and retrive result . And

BAPI "BAPI_SALESORDER_CREATEFROMDAT2" For Update and conditional pricing .

But when i use the the first one for creation , it return message "Please enter sold-to party or ship-to party"

i put all fields in bapi in my code ( initial and my data fields) .

can you please guide me what the problem .

thank you

reiner_hille-doering
Active Contributor
0 Kudos

Many parameter types needs to be normalized, e.g. NumChar must be filled with "0"s to the required length. SE37 does this automatically, NCo not.