‎2009 Apr 02 1:31 PM
Hi All,
Based upon customer's input file which contains header and line item details I have to create sales order in our system. We would like to use IDoc for this. Customer will send us file once a day by email or FTP.
For this I have created a port and partner profile but I am not sure how the process will get initiated?
Can someone please let me know how can I do this? There is now outbound process involved, I just need to create sales order based upon input file using IDoc.
Regards,
Sanjay
‎2009 Apr 02 1:38 PM
Hello Sanjay,
Please let me know the following points.
1. Format of the file.
2. Does the vendor is having SAP system.
If the format of the file is text with header and item details of sales order then there must be some specfic format in which data is coming from vendor in text. If it is non SAP system then in this case some middleware system is required which map those header and item details with standard sales order IDOC in the system. once it is mapped then it will send inbound IDOC to SAP system. To get the inbound idoc the ALE configuration should be done with the system. In partner profile for the same partner inbound and outbound idoc will be defined.
Without Middleware system the data can not be converted into IDOC format.
Please let me know if you have any details.
‎2009 Apr 02 1:38 PM
Hello Sanjay,
Please let me know the following points.
1. Format of the file.
2. Does the vendor is having SAP system.
If the format of the file is text with header and item details of sales order then there must be some specfic format in which data is coming from vendor in text. If it is non SAP system then in this case some middleware system is required which map those header and item details with standard sales order IDOC in the system. once it is mapped then it will send inbound IDOC to SAP system. To get the inbound idoc the ALE configuration should be done with the system. In partner profile for the same partner inbound and outbound idoc will be defined.
Without Middleware system the data can not be converted into IDOC format.
Please let me know if you have any details.
‎2009 Apr 02 1:47 PM
Hi Mukund,
Our customer is not using SAP. File will be a text file and they can create in whatever format required.
Is it not possible to conver data into IDoc format in SAP and pass it to IDoc and then it creates sales order?
Regards,
Sanjay
‎2009 Apr 02 1:54 PM
Hello,
if the file is at application server then write a program to extract that file and map that file according to the BAPI_SALESORDER_CREATEFROMDAT2 BAPI in the program which will create a SO and schdule this program as a job which will read the file and creates SO. Here there is no need of IDOC to be created. IDOC is container which gets and sends the data to other SAP system. If the IDOC to be created then some other sytem like SAP XI (middleware ) should send the data in SO IDOC format to SAP. The file will be mapped to standard SO IDOC in middleware then it triggers this message type/IDOC of inbound SAP system where it will accpet this IDOC as inbound IDOC. for that ALE customization to be completed.
regards,
mukund
‎2009 Apr 02 1:56 PM
‎2009 Apr 02 1:39 PM
‎2009 Apr 02 1:41 PM
We have two options here to post SO from file after reading file from application server and mapping to respective format.
1) using BAPI_SALESORDER_CREATEFROMDAT2 BAPI
2) or Idoc ORDERS02 / message type ORDERS to post SO
‎2009 Apr 02 1:57 PM
Hi Manohar,
We have already considerred option one creating sales order using BAPI - BAPI_SALESORDER_CREATEFROMDAT2. But we would like to do this using IDoc. I am not sure whether its possible or not?because we are not using any middleware and also we don't have to do any outboud process.
‎2009 Apr 02 2:10 PM
Hello Sanjay,
ALE/EDI is used to automated the systems. The data is transferd in IDOC format in SAP. My question is why you need IDOC to be created without any system involved.
‎2009 Apr 02 2:12 PM
then keep sales order file in the port you created with in IDOC format and in abap program use EDI_DATA_INCOMING function module to process and created sales order.
CALL FUNCTION 'EDI_DATA_INCOMING'
EXPORTING
PATHNAME = w_in_filename "Application server file name with full path
PORT = p_port.
you file should be of same format including EDIDC/EDIDD structure fields.
‎2009 Apr 02 1:57 PM
In case of non sap system the data is flow in below order.
Non SAP system ->Middleware-> SAP system which is called EDI.
ALE is done within SAP systems only.
‎2009 Apr 02 2:20 PM
Hello,
You can try in LSMW. do the setting for inbound proecessing in setting menu. Create file port and give the file path and also creates other parameter.
In object creation select IDOC proecssing. Select message type and IDOC of saled order creation.
But i am not sure how it map the file with standard IDOC of sales order as i have not tried before.
regards,
mukund
‎2009 Apr 02 2:27 PM
HI,
You cannot directly call the function modules that process the idoc, because these functions are called dynamically by the ALE layer and the function expects data in a certian format (IDoc format ).
BAPI would be the best way to go for your scenario.
However there is a workaround if you want to use IDoc only. You can follow this approach :
1. Populate an outbound ORDERS05 IDoc from the file data.
2. Distribute it to the same system, i.e sender system and receiver system is same.
3. On the Inbound side the Idoc that you created on the outbound side will be received and processed.
"R3 File----->Outound ORDRES05 -----
______________________________________|
|
'------> " Inbound ORDERS05 ( in the same R3 system)
The tricky part is sending an Idoc and receiving in the same system, but you can find how to do this on the wiki pages.
regards,
Advait
‎2009 Jul 09 5:05 PM