How to add a created Z function module to the existing list in WE21

Hi all,
There is some existing function modules ( like EDI_PATH_CREATE_CLIENT_DOCNUM ) in WE21 in the function module field.
here, i need to create one Z function module as per user requirement & want to add to that list.  is it possible???
actually, i want the file name format is like
   " Document Number_YYYYMMDDHHMMSS.xml  ". but existing function modules are not giving this format.do anybody give any idea.
correct answers will be rewarded.
Thanks & Regards

HI Pabitra,
   Yes, can always change the existing fm and add it with message type as follows pls note step 7 and step 8. (for inbound it is we42 and for outbound it is we41 )
Basic IDOCs have supplied by SAP with standard structure. (Segments). You can extend them with your own segments.
IDOCs does have unique number. They contain control, data, and status records.
Useful Transaction Codes:
WEDI : IDoc Menu
WE02 : IDoc List (can enter IDoc number to select on)
WE05 : IDoc List
WE19 : Transaction WE19 can be used to test the IDoc
WE30 : IDoc Type Development: Initial Screen
WE31: Development Segments: Initial Screen
WE60 : Documentation for IDoc Types. This allows you to view the IDoc you have created.
WE81 : Display View ‘EDI: Logical Message Types’: Overview
WE82: Display View ‘Message Types and Assignment to IDoc Types’: Overview
WE21 - Creation of POrt
WE20 - Partner Profile creation
SALE - ALE (Application Linking and Enabling) settings
For Outbound ALE Configurations: (Example)
IDoc definitions and necessary ALE configurations settings for the outbound .
Create Idoc segments – Transaction WE31.
Create Idoc type – Transaction WE30.
Create Message Type – Transaction WE81.
Assign Message Type to Idoc type – Transaction WE82.
Create a distribution Model - Transaction BD64
An IDoc is simply a data container that is used to exchange information between any two processes that can understand the syntax and semantics of the data...
1.IDOCs are stored in the database. In the SAP system, IDOCs are stored in database tables.
2.IDOCs are independent of the sending and receiving systems.
3.IDOCs are independent of the direction of data exchange.
The two available process for IDOCs are
Outbound Process
Inbound Process
AND There are basically two types of IDOCs.
Basic IDOCs
Basic IDOC type defines the structure and format of the business document that is to be exchanged between two systems.
Extended IDOCs
Extending the functionality by adding more segments to existing Basic IDOCs.
for creating a IDOC
see the below steps for outbound processing IDOCS..
2.1 Outbound Interface
PROCESS DIAGRAM
Outbound Interface
1. Analyse Hierarchy Levels
2. Create New segment
3. Create New IDoc Type
4. Create New Message Type
5. Link Message with IDoc Type
6. Create an entry in EDP13 via transactions WE20 and BD64
7. Populate the Custom IDoc via ABAP Program
7b Error Handling
7c. Send Status Email
8. Test the Population of the Custom IDoc
Step 1 – Analyse Hierarchy Levels:
Analyse the data relationships being processed in the interface. Define the appropriate hierarchical Parent-to-Child relationships.
Navigate to transaction code WEDI
Transaction WEDI displays the IDOC main menu. This allows navigation around the various development and control areas to create a customised IDOC.
Step 2 – Create a new segment:
via wedi : Development - IDOC Segments or Transaction code WE31.
• Enter segment name and click on Create.
The? name of the segment type must start with Z1 , and have a maximum of eight characters.
• Enter description and enter the relevant field names and data elements.
The segment should represent a structure in the program so for? each field in the segment a field name and a data element must be defined.
• Save the segment and enter Person Responsible and Processing Person .
• Go to Edit and Set Release.
• Repeat this procedure for each new Segment in the IDOC.
Step 3 – Create a new IDOC Type
via wedi Development - IDOC Types or Transaction WE30.
• Enter segment name (starting with Z), click on Basic Type and then Create.
• Create as new, enter Person Responsible and Processing Person and enter description.
• On ‘Create Basic Type’ screen decide where segments should be inserted and go to Edit/Create Segment.
• Complete relevant fields in the Maintain Attributes screen:
• From the relevant segments created in Step 2 enter the Segment type and if mandatory segment.
• The Minimum and Maximum number of segments to be allowed in the sequence. (One minimum and one maximum if segment is mandatory).
• The Parent Segment and Hierarchy Level will be automatically created depending on where in the IDOC tree you decided to create that particular segment.
• Repeat this process for each segment needed in the IDOC type, deciding whether to add the next segments at the same level or as a ‘Child’.
• When IDOC created return to initial screen. Go to Edit and Set Release.
• Go to Transaction WE60 to view the IDoc Type you have created.
Step 4 – Create new Message Type
via wedi Development - Message Types or Transaction WE81.
• Display/Change and click on New Entries
• Create a new Message Type and Save.
Step 5 – Link Message Type to IDOC Type
via wedi Development - IDOC Type/Message or Transaction WE82.
• Display/Change and then click on New Entries.
• Enter Message Type, Basic Type (IDOC Type) and Release (46C) and Save.
Step 6 – Create an entry in EDP13 via transactions WE20 and BD64.
The partner profile for the Idoc must be set up and generated in the transaction BD64 and transaction WE20.
• WE20 – Add Message Type to appropriate Partner Type, Enter Message Type, Receiver Port and Idoc Type and Save.
• BD64 – Create a Model View, Enter Sender and Receiver Ports, Attach Message Type. Go to ‘Environment’ on Menu and click on Generate Partner Profiles and generate (not save) profile.
Step 7 – Populate the custom IDOC via ABAP Program
See Test Program ZOUTBD_IDOC_TEMPLATE, Appendix IV.
• Create an Internal Table for each segment type, this should be exactly the same structure as the segment type.
• The control record is filled into a structure like EDIDC. The message type and the Idoc type for the Idoc must be populated into the eddic structure.
- PERFORM populate_Control_structure USING c_mestyp
c_SEGMENT_type1.
• The data segments are filled into a structure like edidd-sdata; sdata and the segment name are populated into the edidd structure.
- PERFORM transfer_Parent_data_to_seg.
• The standard SAP function module MASTER_IDOC_DISTRIBUTE is called to pass the populated IDOC to the ALE Layer.
- PERFORM master_idoc_distribute.
• NOTE: This function module is only called for stand alone programs and Shared Master Data programs (SMD). It is not called when using extensions or output determination.
• The ALE Layer handles the sending of the IDOC to the receiving system.
• Error Handling (see Step 7b).
• Commit work.
Project SpecificStep 7b – Error Handling
• Analyse which fields in the interface are mandatory for the receiving system and who needs to receive error notification.
• Declare a structure of type ‘MCMAILOBJ’ for sending instructions.
• Enter values for the internal table based on structure ‘MCMAILOBJ’
• For selection processes, on SY-SUBRC checks and where fields are mandatory for the receiving system; insert Function Module ‘MC_SEND_MAIL’.
• Enter values in the following parameters: -
MS_MAIL_SENDMODE = ‘B’ (Batch Mode)
MS_MAIL_TITLE = 'Mail Title'
MS_MAIL_DESCRIPTION = ‘Error description’ (e.g. MATNR not given)
MS_MAIL_RECEIVER = ‘Name of Receiver’ (To be determined)
MS_MAIL_EXPRESS = ‘E’ (Express Delivery)
MS_MAIL_DLINAME = Leave Blank
MS_MAIL_LANGU = 'E' (Language)
MS_MAIL_FUNKOBJ_NAME = Leave Blank
TABLES
MS_MAIL_CONT = I_MCMAILOBJ
Note:
It has to be determined separately for each interface how these errors and mail notifications are to be grouped – dependant upon the number of errors that are potentially likely. One possible approach is to send an email for each reason for rejection and include all the records that failed for that reason in the mail notification. Another possible approach is to send an email for every failure.
When error checking for mandatory fields it is common SAP practice to reject a record on its first failure (irrespective of subsequent errors in that record)
<b>Step 7
(Transaction WE57)
Assign the custom function module to the IDoc type and the message type.
Set function module to type ‘F’ and direction ‘2’ for inbound.
Step 8
(Transaction WE42)
Create a new process code and assign it to the function module. The process code determines how the incoming IDoc is to be processed in SAP.</b>
Step 9
(Transaction BD67)
Assign the function module to the process code created above. Got to ‘New Entries’ and enter the process code and the function module name.
Step 10
(Transaction WE20 and Transaction BD64)
Create a partner profile for your message and ensure that in transaction WE20 the process code is the one that points to your function module. (See step 6 of creating Outbound Idocs).
Step 11
Ensure that error handling functionality is present.
If u still have doubt, i can send u the print screen doc -  hope this helps u
<b>Reward pts if found usefull :)</b>
regards
Sathish

Similar Messages

  • How to add Image in "SX_OBJECT_CONVERT_OTF_PDF" Function module

    Hi,
    We have scenario to add a BMP image from report to PDF format ,they are  using the SX_OBJECT_CONVERT_OTF_PDF function module to generate the report in PDF ,so we want to know how to add a image(BMP) for this function module or is there any other function module to get the image in PDF format.
    Replies would be appreciated.
    Regards
    Raghava

    Hi Brad Bohn ,
    We have the scenario were in we have two tabs (If click first tab output is displayed in excel with image using OLE functionality) for second tab output is displayed in PDF by using SX_OBJECT_CONVERT_OTF_PDF-Function module without the image(*.bmp).
    Our requirement is to get image in PDF.
    Please let us know which is the way to approach this scenario.
    Regards,
    Raghava

  • How do I "see" a check function module in the debugger?

    I am correctly starting a custom workflow based on an event raised by standard SAP code in transaciton QE51N.
    I have to write a check function module to interrogate the event and start/not start
    the workflow because the same event is raised by SAP code in transaction QA02, and I have to be sure to start the workflow only if the event is raised in QE51N, not QA02.  (I also have to check some other properties of the QALS row for the inspection lot.)
    I know how to code the check function module, but if I need to debug it, how do I "set-up" for seeing the check function module in the debugger?
    I'm sure this is an obvious question and that I'm missing something simple.
    So thanks in advance for the answer.
    djh

    Dear DJH,
    Put a break-point in the function module and process the transaction. It will stop at runtime.
    Hope this will help.
    Regards,
    Naveen.

  • Unable to find the RFC function module in the impoting list in IR

    HI
    I am trying to import a RFC function module from the R/3 system.
    I am not able to find the RFC in the list that comes for the RFC  function modules that can be imported.
    The RFC is present in the destination system and is actiated too
    If anyone has and idea why is such a thing happning
    Regards
    Nikhil

    Hi Nikhil,
    The Checklist,
    1. Check the connection parameter at XI
    2. Make sure ur function module is remote enabled
    3. Make sure ur RFC exists for the same user, client credentials
    Regards,
    Prateek

  • How to add push button in function module

    I want to add Push button( yes/no) in same screen. I used POPUP_TO_CONFIRM,
    but this popup is coming on next screen when I click on cancel button.

    There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.

  • How to call more then one Function modules at the same time

    HI ,
    How to call more then one FM at the same time .
    Modertor Message: Interview-type Questions are not allowed.
    Edited by: kishan P on Jan 2, 2012 2:22 PM

    They are a few different models of the MacBook Pro ranging from 15.4" i7's to 17" i7's. I would use the same models together though when imaging them just like I do with PC's. For example I would Ghost 5 Lenovo T420 Thinkpads at the same time which all share the same exact specs and config. Looking to do the same with the MBP. I have .dmg image of OSX 10.8.1 on a firewire drive which I'm using. I image all my MBP's with this drive, the only downside is I have to do each MBP one at a time.
    Thanks

  • Is it possible to create a Functional module dynamically?

    Hello All,
    Does any one know whether is it possible to create a FM dynamically and write some code in it?
    Regards,
    Lisa.

    Hi,
    Yes it is possible.
    Use this FM to create a function module on the fly programatically.
    RS_FUNCTIONMODULE_INSERT.
    Here is an example
    Here an example how to call it:
    call function 'RS_FUNCTIONMODULE_INSERT'                                                   
      exporting                                                                               
    funcname                      = '/TEST40P/FB_TEST_EVE99'                               
        function_pool                 = 'CRAS1'                                                
    *   INTERFACE_GLOBAL              = ' '                                                    
    *   REMOTE_CALL                   = ' '                                                    
        short_text                    = 'TEST Anlage FB'                                       
       suppress_corr_check           = ' '                -----------------> means with transport popup                                                 
       update_task                   = '1'                                                     
    *   corrnum                       = 'B20K8A0V3F'                                           
       namespace                     = '/TEST40P/'                                             
    *   suppress_language_check       = 'X'                                                    
    *   AUTHORITY_CHECK               = 'X'                                                    
    *    save_active                   = ' '                                                   
        new_source                    = it_report[]                                            
    * IMPORTING                                                                               
    *   FUNCTION_INCLUDE              =                                                        
    *   CORRNUM_E                     =                                                        
    tables                                                                               
    import_parameter              = if_import                                               
       export_parameter              = if_export                                               
       tables_parameter              = if_tables                                               
       changing_parameter            = if_change                                               
       exception_list                = if_except                                               
       parameter_docu                = if_docu_tab                                             
    *   SOURCE                        =                                                        
    exceptions                                                                               
    double_task                   = 1                                                       
       error_message                 = 2                                                       
       function_already_exists       = 3                                                       
       invalid_function_pool         = 4                                                       
       invalid_name                  = 5                                                       
       too_many_functions            = 6                                                       
       no_modify_permission          = 7                                                       
       no_show_permission            = 8                                                       
       enqueue_system_failure        = 9                                                       
       canceled_in_corr              = 10                                                      
       others                        = 11.
    Regards,
    Sesh

  • How could we assign customized function module to the object

    Hi Experts,
    How could we assign z made function module to the object type.
    for instance, i have prepared one z function module and want to assign segment builder.
    Please help in this regard
    Thanks
    Mahesh Babu

    Hi Thiru,
    Standard Transaction Codes, have their own Function Modules for generating Outbound/Indbound Idocs. Where these Function Modules will be configured to a particular Process Codes.
    For E.g for PO's
    Process code : ME10 - IDOC_OUTPUT_ORDERS - for creation
    In case if its a Z Function Module, It depends on the case how you use IDOC types. either directly through Z Program or through Inbound/Outbound Process  codes with respective Function modules.
    Regards,
    Anbalagan

  • How to create a custom function module with the records in SAP R/3?

    Hi All,
    How to create a custom function module with the records in SAP R/3? Using RFC Adapter I have to fetch the custom function module records.
    Regards
    Sara

    Hi
    goto se37...here u need to create a function group... then u need to create a function module. inside assign import/export parameters. assign tables/exceptions. activate the same. now write ur code within the function module
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm
    Look at the below SAP HELP links, These links will show you the way to create a Function Module
    http://help.sap.com/saphelp_nw04/helpdata/en/26/64f623fa8911d386e70000e82011b8/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/content.htm

  • I'm very new tp SAP ABAP, how to create a function module..V.URGENT

    hi folks,
    I'm very new to sap abap.
    I want to create a function module.
    the following is my requirement.
    by passing(eporting parameters to funtion module from pgm point of view) a field, i want to get(importing parameters from the funtion module, from pgm point of view) some 7 fields(of various tables).
    please also tell me how can code an inner join for tables 5 tables(a,b,c,d,e). i'm joining a on b, b on c, c on d,the problem here is that i can not join d on e as there are no common fields in d and e.
    can i join e and c or b, there are no common fields even in a and e.
    please tell me the solution as soon as possible, this very important and urgent deliverable.
    thanks in advance

    Here is link for creating function modules
    <a href="http://help.sap.com/saphelp_47x200/helpdata/en/9f/db98fc35c111d1829f0000e829fbfe/frameset.htm">Creating Function Modules</a>
    Regds
    Manohar

  • How to Create a Function module z_create and to track the error records?

    I want to create a function module z_create which will insert the data from the internal tables gt_model_master and gt_model  into the corresponding database custom tables y_model_master.
    Secondly if any error is encountered during the above updation, then how to track those error records ?

    HI,
    check the sy-subrc ,if it is zero the insertion is success,otherwise use 
    message class.
    if sy-subrc ne 0.
    message e052(zmessage).
    endif.
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM
    Edited by: rakesh dhudipala on Feb 12, 2008 2:33 PM

  • How to create RFC function module and how to call this function module

    Hi,
    i want to know step for creating RFC function module and then How to  use this function module from some other sap system.
    Thnaks,
    jigar

    Jigar,
    To implement a remote function module in ABAP, perform the following steps:
    Register the module as remotely callable in the RFC server system.
    In the function module Administration screen (transaction code SE37), set the field Can be called via REMOTE CALL. Registering a module as remote causes an RFC stub to be generated for it.
    Write the code for the function module.
    Create the destinations.....................
    Displaying, Maintaining and Testing Destinations
    To display, create or modify destinations, choose Tools ® Administration ® Administration ® Network ® RFC destinations or enter transaction code SM59.
    Remote Destinations are stored in table RFCDES. The RFCDES table describes logical destinations for remote function calls.
    It is not possible to maintain the RFCDES table directly.
    You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® AcceleratedSAP ® Customizing ® Execute Project ® SAP Reference IMG.
    In the Implementation Guide, expand the following hierarchy structure:
    Basis
    Application Link Enabling (ALE)
    Sending and Receiving Systems
    Systems in Network
    Define Target Systems for RFC Calls
    Displaying Destinations
    The initial screen for this transaction displays a tree:
    Different connection types (i.e. partner systems or programs) are possible. For further information, see Types of Destinations.
    To display all information for a given destination, double-click it, or place the cursor on it and press F2 .
    To search for a destination, press the Find button and specify your selection. You get a list of all entries matching your selection. Place the cursor on the one you want, and press F2 or simply double-click the destination. All information for the given entry appears.
    Creating Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    All available connection types are explained in Types of Destinations.
    To create a new RFC destination, press the Create button. A new screen is displayed with empty fields for you to fill in.
    If you want to create a new destination
    As you create a remote destination, you can specify a particular application server or a group of servers for a balanced distribution of system load.
    For details of the destination parameters, see Entering Destination Parameters.
    Changing Existing Destinations
    On the destinations overview screen (transaction code SM59), the connection types and all existing destinations are displayed in a tree structure.
    You can display all information for a given destination by double-clicking it or pressing F2 on it.
    To change an existing destination, double-click it, or place the cursor on it and press the Change button.
    For details of the destination parameters, see Entering Destination Parameters.
    Testing Destinations
    To test a destination, choose the appropriate function from the Test menu.
    Connection (also available via the Test connection pushbutton)
    Authorization (checks logon data)
    Local network (provides a list of application servers)
    You can use the CALL FUNCTION statement to call remote functions, just as you would call local function modules. However, you must include an additional DESTINATION clause to define where the function should run:
    CALL FUNCTION RemoteFunction
    DESTINATION Dest
    EXPORTING
    f1 =...
    f2 =...
    IMPORTING
    f3 =...
    TABLES
    t1 =...
    EXCEPTIONS......
    The field Dest can be either a literal or a variable: its value is a logical destination (for example, "hw1071_53") known to the local SAP System. Logical destinations are defined in the RFCDES table (or the TRFCD table in R/2 Systems) via transaction sm59 or the following menu path: Tools ® Administration, Administration ® Network ® RFC destinations. You can also access logical destinations via the Implementation Guide (IMG) by choosing Tools ® Customizing ® Enterprise IMG. In the Implementation Guide, you can then choose Cross-application components ® ALE ® Communication ® Define RFC destination.
    The remote function call concept, for example, allows you to access a function module in an R/2 System from an ABAP program in an R/3 System. If you want to read a customer record from your R/2 System’s database, create a remotely callable function module in the R/2 environment which retrieves customer records. Call this function from your R/3 System using a remote function call and listing the destination for the target R/2 System:
    Pls. reward if useful

  • How to create ENQUEUE function module for s567 table

    Hi Experts,
    Anyone Plz tell the steps how to create a ENQUEUE function module for the table s567.
    Its somewht urgent, plz help me.
    <REMOVED BY MODERATOR>
    Mohana
    Edited by: Alvaro Tejada Galindo on Mar 10, 2008 4:21 PM

    Hi,
    You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
    Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
    Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
    Technicaly:
    When you create a lock object System automatically creat two function module.
    1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
    2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
    You have to use these function module in your program.
    Hope this will give a basic idea.
    Regards
    Sudheer

  • How to create a Function Module

    Hi
    Please tell me the procedure to create a function module.
    Thanks in advance,
    Priya

    Hi Srinivas,
    In order to create a function module firstly you need to assign it to a function group.
    In order to create function group goto t-code se37.
    Choose Goto->Function groups-> Create group .
    Give the function group name.
    Then come back to se37 type in the name of your FM and then press <b>CREATE</b> button.

  • How can create a function module for currency and quantity fields

    hi,
    i want to create a function module with some fields.when i activated it give some errors for 
    netpr,menge,wemng  fields(currency, quantity fields).error is it asks for reference fields. 
    please send me solution for it.
    sreenu.

    Hi Sreenu,
    While creating CURRENCY/QUANTITY fields in the DataBase Table, you have to enter a REFERENCE TABLE and a REFERENCE FIELD to the field.
    For that, after entering the field name and the data type in the correcponding columns, you have to place the cursor on the data type of the required field and click the CURRENCY/QUANTITY FIELDS tab. You will find two columns called REFERENCE TABLE and a REFERENCE FIELD.
    you have to enter a reference table in which a currency/quantity field is used and a reference field which is a currency/quantity field in that table.
    For Example, below is the table details.
    FIELD DATATYPE LENGTH DEC.PLACES REF.TABLE REF.FIELD
    1.SNO     CHAR 5
    2.AMOUNT  CURR 10     2          T001      WAERS
    3.NOS     QUAN 5                 KNA1      /VSO/R_PAL_UL
    Here Field 2(AMOUNT) is a CURR field whose Ref. Table is T001 and Ref. Field is WAERS and Field 3(NOS) is a QUAN field whose Ref. Table is KNA1 and Ref. Field is /VSO/R_PAL_UL.
    Hope this will help you.
    Regards,
    Vaitheeswaran

Maybe you are looking for

  • Color assistance needed for commercial printer

    Hi there, We're a board game publisher about to send our first game to an overseas manufacturer. The game is composed of hundreds of cards with detailed, fantasy art, and we're excited to get this game finally out the door. We sent the raw, packaged

  • The secret to HDTV using a VGA connection

    Took some trial and error, but I discovered how to get HDTV on my Toshiba 40" LCD TV using the VGA port.  I thought I post here to save somebody else the trouble.  Here's all you need to do: 1)  Set your computer to drive the external monitor at 1280

  • Problems creating a db in 11g with Sample Schemas

    For a demo I'm doing I need the sample schemas. I have tried to add it to my existing database using dbca, as well as creating a new database with the sample schemas. In both cases I run into a problem with insuficient priveleges. If I do not include

  • Hyperlink Option in Workflow Notification

    Hi All, I want to put a Hyperlink in Workflow (AR Workflow) notification mail. When the mail will be sent, it should contain the hyperlink of SAP. If enduser will click this hyperlink, it will go to SAP. Regards, Manoj

  • Accessors exposed in entity object

    Hi, I came from JPA world and I am suited to use relathionship field (old CMR ) in entity class. Now I am working with ADF EntityObject (EO) and I found equivalent concept as Accessors in Association component. Then ,starting from my EntityOne I crea