05-16-2007 11:58 AM
Hi All
i have a requirement where i have to design a screen program to provide the user with a input screen. The user will input data on this screen, after the user enters the data and clicks on execute or some button on the module screen the system must generate a IDOC in the system. This IDOC will be picked up from another program within the same system.The reason we are doing this is the other program cannot be changed and it can accept only an IDOC from the external system which we are going to eliminate.
My Questions:
1. What are the steps in this requirement
2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system)
3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database?
4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job?
please guide me with deatils on how to go about this. Thanks
~Suresh
05-16-2007 1:00 PM
Hello suresh,
suresh first thing you need to do is check if any of the existing idoc can be used. if so map the data you enter in the screen to the idoc structure, check to see if you need any madatory field to be filled like the destination system etc, you can hardcode the things you need.
Than there is function module to trigger in an inbound idoc, the program whic h you are saying will pick this idoc and do the necessary action
you need to create process code and partener profiles as said by vishal
Thanks
krishnam raju
Message was edited by:
krishnam Raju N
05-16-2007 12:29 PM
Hi Suresh,
1. What are the steps in this requirement
-> Create a module pool program, design a screen, take input into an itab call MASTER_IDOC_DISTRIBUTE passing itab to sdata.
2. Do we require the partner profile and port and logical system definition as i am going to create a IDOC in the same system.( i am not sending the IDOC out of the system) - Yes
3. Can i use the MASTER_IDOC_DISTRIBUTE FM to create a IDOC in the database? - Yes
4. Can i use IDOC_CREATE_ON_DATABASE FM to do the same job? - No, because MASTER_IDOC_DISTRIBUTE will be enough.
Regards,
Younus
<b>Reward Helpful Answers!!!</b>
05-16-2007 1:09 PM
Hi All
Thanks for your answers. Some of my questions are answered but still have some open questions.
1. Can i conclude that anytime i need to create an IDOC ( whether to be saved in the same system or whether to be send to a partner) the BASIC CONFIGURATION like
- Partner Profile
- RFC and Logical system
- Port definition
- Process code & posting program or Outbound program
must exists in the system. ???
2. Is there only one FM -MASTER_IDOC_DISTRIBUTE for creating OUTBOUND IDOC?? Can we use the same FM for inbound IDOC?
3. is there any document which specifies the basic configuration which is required for IDOC generation no matter under which scenario you are creating the IDOCs?
Thanks
~Suresh
05-16-2007 12:43 PM
1. Steps,
Please create the Idoc type / segments , create message type and link Idoc and message.
Steps to customize a new IDoc >>>
1. Define IDoc Segment (WE31)
2. Convert Segments into an IDoc type (WE30)
3. Create a Message Type (WE81)
4. Create valid Combination of Message & IDoc type(WE82)
5. Define Processing Code(WE41 for OUT / WE42 for IN)
6. Define Partner Profile(WE20)
2. Yes, you need LS & Partner profile
3. Yes use MASTER_IDOC_DISTRIBUTE
4. Can use IDOC_CREATE_ON_DATABASE instead of MASTER_IDOC_DISTRIBUTE and then process the Idoc.
Message Type :: The message type defines the semantic context of an IDoc. The message type tells the processing routines, how the message has to be interpreted. The same IDoc data can be sent with different message types.
IDoc Type :: An IDoc type defines the syntax of the IDoc data. It tells which segments are found in an Idoc and what fields the segments are made of.
Processing Code :: The processing code is a logical name that determines the processing routine. This points usually to a function module, but the processing routine can also be a workflow or an event.
The use of a logical processing code makes it easy to modify the processing routine for a series of partner profiles at once.
Partner profile :: Every sender-receiver relationship needs a profile defined. This one determines
The processing code
The processing times and conditions
In the case of outbound IDoc 1. The media port used to send the IDoc and 2. Triggers used to send the IDoc
Partner Type :: The IDoc partners are classified in logical groups. Such as : LS, KU, LI.
LS - Logical Systems : It is meant to be a different computer and was primarily introduced for use with the ALE functionality.
KU - Customer : The partner type customer is used in classical EDI transmission to designate a partner, that requires a service from your company or is in the role of a debtor with respect to your company, e.g. the payer, sold-to-party, ship-to-party.
LI - Supplier : The partner type supplier is used in classical EDI transmission to designate a partner, that delivers a service to your company.
Regards,
Vishal
05-16-2007 1:00 PM
Hello suresh,
suresh first thing you need to do is check if any of the existing idoc can be used. if so map the data you enter in the screen to the idoc structure, check to see if you need any madatory field to be filled like the destination system etc, you can hardcode the things you need.
Than there is function module to trigger in an inbound idoc, the program whic h you are saying will pick this idoc and do the necessary action
you need to create process code and partener profiles as said by vishal
Thanks
krishnam raju
Message was edited by:
krishnam Raju N
05-16-2007 1:03 PM
Hi Suresh,
First try to create a Module pool program.
Assign the tcode to the IDOC.
or else get the data into IDOC segment and try to transfer it.
Creation of IDoc
To Create Idoc we need to follow these steps:
Create Segment ( WE31)
Create Idoc Type ( WE30)
Create Message Type ( WE81)
Assign Idoc Type to Message Type ( WE82)
Creating a Segment
Go to transaction code WE31
Enter the name for your segment type and click on the Create icon
Type the short text
Enter the variable names and data elements
Save it and go back
Go to Edit -> Set Release
Follow steps to create more number of segments
Create IDOC Type
Go to transaction code WE30
Enter the Object Name, select Basic type and click Create icon
Select the create new option and enter a description for your basic IDOC type and press enter
Select the IDOC Name and click Create icon
The system prompts us to enter a segment type and its attributes
Choose the appropriate values and press Enter
The system transfers the name of the segment type to the IDOC editor.
Create IDOC Type
Follow these steps to add more number of segments to Parent or as Parent-child relation
Save it and go back
Go to Edit -> Set release
Create Message Type
Go to transaction code WE81
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter
Click New Entries to create new Message Type
Fill details
Save it and go back
Assign Message Type to IDoc Type
Go to transaction code WE82
Change the details from Display mode to Change mode
After selection, the system will give this message The table is cross-client (see Help for further info). Press Enter.
Click New Entries to create new Message Type.
Fill details
Save it and go back
u can also check all these links related to idocs
http://www.allsaplinks.com/idoc_sample.html
http://www.sappoint.com/abap.html
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEIO/BCMIDALEIO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDALEPRO/BCMIDALEPRO.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFAALEQS/CABFAALEQS.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDISC/CAEDISCAP_STC.pdf
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVEDI/CAEDI.pdf
http://help.sap.com/saphelp_erp2004/helpdata/en/dc/6b835943d711d1893e0000e8323c4f/content.htm
http://www.sapgenie.com/sapgenie/docs/ale_scenario_development_procedure.doc
http://edocs.bea.com/elink/adapter/r3/userhtm/ale.htm#1008419
http://www.netweaverguru.com/EDI/HTML/IDocBook.htm
http://www.sapgenie.com/sapedi/index.htm
http://sap.ittoolbox.com/documents/popular-q-and-a/extending-a-basic-idoc-type-2358
http://help.sap.com/saphelp_47x200/helpdata/en/dc/6b7eee43d711d1893e0000e8323c4f/frameset.htm
/thread/199996 [original link is broken]
Regards,
Priyanka.