09-30-2013 2:28 PM
Hi All,
I am building a non-standard IDoc for "inbound transportation cost documents". It would probably be best to copy one and modify that but I haven't been able to find a standard IDoc for it. I am following the below to achieve this:
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-a-step-by-step-approach/18/
http://www.riyaz.net/sap/beginners-guide-to-ale-and-idocs-part-iii/20/
However, a friend told me that I should use previously used IDoc fields in the segment definitions so that SAP EDI would be able to interpret them without assistance. Could someone let me know how to find such fields?
Also, I'm thinking that the field name is irrelevant but the DE is the critical portion. Is that true?
Neal (obviously my first time into real EDI)
09-30-2013 3:37 PM
Hi Neal,
For IDoc fields, please check from existing data element from SE11, if it can be reused. If your requirement is not matching go ahead with custom IDoc fields. Please check from some standard IDoc how the quantity and amount fields are handled. You may face issues on these type of fields.
BR,
Tanmay
09-30-2013 3:58 PM
Hi Tanmay,
SE11 has a few million fields. Any thoughts on how to distinguish EDI ones?
Neal
09-30-2013 4:24 PM
Short method would be to:
Long method would be based on fact that for every idoc segment, we have a structure with same name. So write an ABAP program to get list of valid segments, and then go through structures that have same name.
10-01-2013 7:33 AM
Hi Neal,
I think your IDoc processing function module will be fully custom one and a BDC will be called inside it. So, if you know the tables where the data will be posted, please take those fields for creating the IDoc type.If there are new fields, search from SE11 with the domain type and length.It is not required that you have to take pre-existing IDoc fields only. In the BDC convert the data in output format if required.
BR,
Tanmay
09-30-2013 4:21 PM
Hi Neal,
As per my knowledge the job of interpretation of IDoc data is done by a function module. Incase of message type ORDERS (for sales order creation) function module IDOC_INPUT_ORDERS can be used. If you check this function module FORM "INTERPRET_IDOC_ORDERS" you will understand how the interpretation is done. The function module loops at data records, reads each segment based on its name and transfers the data into internal table structures such as VBAP / VBAK.
FORM INTERPRET_IDOC_ORDERS.
LOOP AT IDOC_DATA
WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
WHEN 'E1EDK01'.
So if you want SAP EDI to be able to interpret them without assistance, you will need to use same segment name also. But this will work only if there is an already existing function module and a basic type. This is not possible in your case.
Summary: I don't think reusing the field name will give you any advantage in data interpretation via SAP EDI.
br,
mrugesh.
09-30-2013 4:35 PM
Mine however must be a BDC, because no BAPI exists for the purpose that we need. So I can't look at the input method of a pre-existing module.
Any other thoughts, please let me know...
Neal
09-30-2013 4:57 PM
Hi Neal,
I think you misunderstood what i am tring to say. I think you will not get any advantage of using the same field names. With example of function module " IDOC_INPUT_ORDERS" i tried to explain, in which scenario you may get somthing out of reusing the same filed name.
But as you mentioned, yours is not a standard scenario. Hence I dont see any advantage of spending time on finding previously used fields.
But I'll be happy if i am proven wrong. I'll learn somthing new .
Message was edited by: Mrugesh Phatak
09-30-2013 5:20 PM