cancel
Showing results for 
Search instead for 
Did you mean: 

Sales document type is not defined

Former Member
0 Kudos

Hello,

I'm working on a HTTP-to-BAPI exercise with using BAPI_SALESORDER_CREATEFROMDAT1. After execution, I got this error returned:Sales documente type is not defined. Please tell me what to do with it. Thank you!!!

The following XML is the source message that I submitted:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:MT_Order_Request xlns:ns0="urn:poc:workshop:group00:webapp">

<OrderHeader>

<DocumentType>CPF1</DocumentType>

<SalesOrganization>1000</SalesOrganization>

<DistributionChannel>10</DistributionChannel>

<Division>00</Division>

<CustomerNumber>0000001460</CustomerNumber>

<PartnerFunction>AG</PartnerFunction>

</OrderHeader>

<Item>

<ItemNumber>10</ItemNumber>

<Material>DPC1017</Material>

<Quantity>1</Quantity>

</Item>

</ns0:MT_Order_Request>

Accepted Solutions (1)

Accepted Solutions (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Steve ,

Try to execute this BAPI using Se37 with the same input and see if it works fine. If it does, then you can say this is an XI error and start debugging, if it does not, then it implies you need to find valid data for the BAPI's call and then pass the same from XI.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Thanks for the se37 tip. The test was fine. Then I went back to IR and found out the mapping was wrong. By the way, does each RFC doc have equivalent doc to IDoc? Or will there be any situation that you can only use one of them? What's the best way to find out which doc to use? Thanks a lot.

Regards,

Steve

bhavesh_kantilal
Active Contributor
0 Kudos

Steve,

This blog by my boss should answer your questions regarding RFC vs IDOC's,

/people/ravikumar.allampallam/blog/2005/08/14/choose-the-right-adapter-to-integrate-with-sap-systems

Regards,

Bhavesh

PS . Please close the thread if your problems are solved.

Former Member
0 Kudos

Bhavesh,

Alright, I'll look into that blog. How do you close a thread?

Regards,

Steve

bhavesh_kantilal
Active Contributor
0 Kudos

Steve,

<i>How do you close a thread?</i>

You already have

When you select the SOLVED problem star across any reply, the thread is closed. This allows a better segregation of threads on SDN and allows one to search for solutions easier when needed.

Regards,

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

<DocumentType>CPF1</DocumentType>

Run t-code va01 to create a sales order manually.

Check whether there's a Document Type "CPF1" in your system. I don't think so:)

Since I'm not good at business, maybe you should ask other consultants who knows how to create a Document Type in R/3 System.

Or just try another Document Type that already exsit. Maybe it will works.

hope it helps:)

Message was edited by: YiNing Mao

Former Member
0 Kudos

Hi ,

Check weather you have mapped with all the mandatory fileds of the target BAPI and also do the sample test manually in SE37 wether it is creating sales order or not.

Check this thread also.......

Sekhar

Former Member
0 Kudos

Hi sekhar,

Thanks for the tip. Problem solved.

Regards,

Steve

bhavesh_kantilal
Active Contributor
0 Kudos

Steve,

Another point, when using your RFC, you need not create any message type or message interface explicitly. You can use the RFC itself as the Message Type and Message Interface.

Regards,

Bhavesh