Debugging customized function module when Idoc is triggered via ALE

Hi,
Whenever we save the billing document, an outbound idoc is triggered via ALE. The logic for the data to be included in the idoc is written in a customized function module.
However we are making some changes and would like to include some more data in the idoc. But we find that when we put a breakpoint in the function module, on saving the billing document, the flow does not stop at the break point. We are 100% sure that the code in the function module gets executed based on the data in the idoc.
How do we get into debug mode and break the flow in the function module so that we can debug in the function module?
Any help would be greatly appreciated.
Thanks in advance,
Mick

Hi Mick, this might be of some help 4 u.
ALE IDOC
Sending System(Outbound ALE Process)
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
ALE IDOC Steps
Sending System(Outbound ALE Process)
Tcode SALE ?3 for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Create Model View
Tcode BD82 - Generate partner Profiles & Create Ports
Tcode BD64 - Distribute the Model view
This is Receiving system Settings
Receiving System(Inbound ALE )
Tcode SALE - for
a) Define Logical System
b) Assign Client to Logical System
Tcode SM59-RFC Destination
Tcode BD64 - Check for Model view whether it has distributed or not
Tcode BD82 -- Generate partner Profiles & Create Ports
Tcode BD11 Getting Material Data
Tcode WE05 - Idoc List for inbound status codes
Message Type MATMAS
Tcode BD10 - Send Material Data
Tcode WE05 - Idoc List for watching any Errors
1)a Goto Tcode SALE
Click on Sending & Receiving Systems-->Select Logical Systems
Here Define Logical Systems---> Click on Execute Button
go for new entries
1) System Name : ERP000
Description : Sending System
2) System Name : ERP800
Description : Receiving System
press Enter & Save
it will ask Request
if you want new request create new Request orpress continue for transfering the objects
B) goto Tcode SALE
Select Assign Client to Logical Systems-->Execute
000--> Double click on this
Give the following Information
Client : ERP 000
City :
Logical System
Currency
Client role
Save this Data
Step 2) For RFC Creation
Goto Tcode SM59-->Select R/3 Connects
Click on Create Button
RFC Destination Name should be same as partner's logical system name and case sensitive to create the ports automatically while generating the partner profiles
give the information for required fields
RFC Destination : ERP800
Connection type: 3
Description
Target Host : ERP000
System No:000
lan : EN
Client : 800
User : Login User Name
Password:
save this & Test it & RemortLogin
3)
Goto Tcode BD64 -- click on Change mode button
click on create moduleview
short text : xxxxxxxxxxxxxx
Technical Neme : MODEL_ALV
save this & Press ok
select your just created modelview Name :'MODEL_ALV'.
goto add message type
Model Name : MODEL_ALV
sender : ERP000
Receiver : ERP800
Message type :MATMAS
save & Press Enter
4) Goto Tcode BD82
Give Model View : MODEL_ALV
Partner system : ERP800
execute this by press F8 Button
it will gives you sending system port No :A000000015(Like)
5) Goto Tcode BD64
seelct the modelview
goto >edit>modelview-->distribute
press ok & Press enter
6)goto Tcode : BD10 for Material sending
Material : mat_001
Message Type : MATMAS
Logical System : ERP800
and Execute
7)goto Tcode : BD11 for Material Receiving
Material : mat_001
Message Type : MATMAS
and Execute --> 1 request idoc created for message type Matmas
press enter
Here Master Idoc set for Messge type MATMAS-->press Enter
1 Communication Idoc generated for Message Type
this is your IDOC
Change Pointers
I know how to change the description of a material using ALE Change Pointers.
I will give the following few steps
1) Tcode BD61---> check the change pointers activated check box
save and goback.
2) Tcode BD50---> check the MATMAS check box save and comeback.
3) Tcode BD51---> goto IDOC_INPUT_MATMAS01 select the checkbox save and comeback.
4) Tcode BD52---> give message type : matmas press ok button.
select all what ever you want and delete remaining fields.
save & come back.
5) 5) go to Tcode MM02 select one material and try to change the description and save it
it will effects the target systems material desciption will also changes
6) goto Tcode SE38 give program Name is : RBDMIDOC and Execute
give Message type : MATMAS and Executte
ALE/IDOC Status Codes/Messages
01 Error --> Idoc Added
30 Error --> Idoc ready for dispatch(ALE Service)
then goto SE38 --> Execute the Program RBDMIDOC
29 Error --> ALE Service Layer
then goto SE38 --> Execute the Program RSEOUT00
03 Error --> Data Passed to Port ok
then goto SE38 --> Execute the Program RBDMOIND
12 Error --> Dispatch ok
Inbound Status Codes
50 Error --> It will go for ALE Service Layer
56 Error --> Idoc with Errors added
51 Error --> Application Document not posted
65 Error --> Error in ALE Service Layer
for 51 or 56 Errors do the following steps
goto WE19 > give the IDOC Number and Execute>
Press on Inbound function Module
for 65 Error --> goto SE38 --> Execute the Program RBDAPP01 then your getting 51 Error
cheers,
Hema.

Similar Messages

  • Inconsistent Errors when processing  IDocs using custom Function Module

    I am encountering a most perplexing error. Here is the situation.
    We have a custom function module to update data in the EH&S system. We are having a bizarre error occurring. This is the basic processing of the function module:
    1. IDoc data is read and loaded into an internal table.
    2. Data is run through a series of checks to determine if the data is valid for entry into the system.
    3. After validation we use function module  C1F2_SUBSTANCES_READ_WITH_REF to read  characteristic data for the  substance. This data is used to validate whether current data exists to allow for loading of the IDoc data. (This is the step where the IDoc is receiving an error even if the data is valid. This only occurs if we are processing a large amount of Idocs and one IDoc contains valid data and another invalid data for the same substance. It occurs even if the Idocs are not processed in sequence.  If individually processed or reprocessed after initial failure they pass. This is what is so confusing!) If it exists, a flag is set and  the data is loaded using function module BAPI_BUS1077_CHANGE to modify the data.
    4. If the flag is set to allow further processing, the function module C1F2_SUBSTANCES_READ_WITH_REF is used again to select different characteristic data for the substance. A similar validation process occurs and if it passes, data is loaded using BAPI_BUS1077_CHANGE to update and BAPI_BUS1077_CREATE to create new data.
    Here is the situation:
    When processing one valid record for one substance, the record loads successfully.  When processing multiple valid records (all are valid) for one substance, they all load successfully.  The problem occurs when attempting to load valid and invalid records for the same substance.  Some times the program successfully loads the valid data (as expected).  Other times, it will not load any records.  It is not consistent!
    The order of IDoc processing does not have an impact on the success of the load.  Whether the valid or invalid record processes first does not have an impact on the success of the valid substance load.
    Does anyone have ANY Idea of what is going on? I am clearing all fields in the function module before processing occurs. I cannot find what is causing the error to occur.
    HELP!
    Jim Hardy

    I have some further information. It seems that if data for a substance is sent in two separate Idocs, one with valid and one with invalid data, As long as the two IDocs are processed consecutively, they process correctly. If they are separated by IDocs containing other substance information, they fail.
    thanks
    Jim

  • Debugging RFC function module from ECC to CRM

    Hi All,
    My requirement is to debug an RFC function module present in CRM(7.0) system from ECC(6.0) system. A report program in ECC will call CRM custom FM. I found many posts in SDN with the same issue and tried to implement suggestions provided there. But I couldn't succeed. The approach I followed is:
    I logged in to ECC report program and kept an external breakpoint just before the function module call.
    I logged in to CRM system, opened the function module and kept an external breakpoint there.
    In both the systems I provided the dialogue userid( id through which I log in to SAPGUI) in the system->settings->debugging option.
    In CRM I activated the external break point in  transaction SRDEBUG.
    Now when I execute the report program in ECC, control stops at the breakpoint. If I press F5 at the function call, control is not going to the external break point set in the CRM FM. I am getting output of FM directly.
    I tried with different settings like turning on the check box for IP matching and session breakpoint active immediate, switching to classic debugger etc. I also tried to provide the RFC user id instead of dialogue user but system throws exception saying only dialogue userids are allowed. I found that by inserting an infinite loop statement, control goes inside the RFC CRM FM but I prefer not to change the code.
    Please let me know if I missed anything.
    Thanks and Regards,
    Naren

    Hi,
    Debug RFC calls
    When an RFC function module is called it is usually not possible to debug the call, using the below techniques we can achieve the same. For this example we are calling an RFC enabled FM in ECC system from CRM system.
    Scenario 1: Calling a custom RFC FM
    STEP 1: Add an infinite loop in the remote custom Function Module (adding a u201CDO. ENDDO.u201D statement at the start of the FM would be enough).
    STEP 2: Execute your program in the CRM system. The execution stops at the RFC call, because of the infinite loop.
    STEP 3: Now login to the ECC system and go to transaction SM51 select the process which is executing the RFC and navigate to the menu: u201CProgram/Session->Program->Debuggingu201D this triggers the debugger session in a separate window.
    Scenario 2: Calling a Standard RFC FM
    When we are debugging a standard program we cannot add the infinite loop, hence we cannot go to SM51 and debug the work process. The RFC destination for the ECC system has a User specified, the RFC function module gets executed using this users credentials. Usually the basis team set up the RFC user as non Dialog user, this does not allow debugging. Contact your Basis team and get this changed to a dialog user enabling you to debug RFC function calls via the normal debugger.
    Note: User name configured in the RFC destination (transaction SM59) 
    Note: User type for the RFC User (transaction SU01D)
    Hope this will be helpful..

  • How to trigger inbound custom function module?

    Hello Experts,
    Could someone help me with my dilemma?
    I have created a custom process code which is linked to a custom function module for processing inbound IDocs. I have tested the function module successfully and I have set up the partner profile accordingly. The IDocs are coming in but get stuck at status "64". My function module never gets triggered even though in the partner profile it is set up to be triggered immediately. Any idea what I am missing?
    Thanks,
    Marlin

    Hi marlin ,
    just go for these checks and let us know the status ..
    1.Check here .
    Bd51 – assignment of Inbound function module. Present or not
    Check here .
    2.Bd67 –assignment of process code to inbound function module /present or not.
    3.
    Check here.
    In the object for the message type u need to give the BUS object as the application object.
    like bus2032
    4.
    Now place a break-point in ur function module and run it in debugging mode ..
    Now check whether this one is getting  into ur function module , next check the status record of the document number .
    regards,
    vijay.
    take an idoc , populate it from we19 and then there call the function module in debugging mode in back ground ..
    we'll see if this is actually picking the Fm or not.
    Message was edited by: Vijay

  • How to debug a function module using in the generic datasource?

    Hi all,
    We have created a generic data source using function modulle and have been extracting the data for a single customer it contains single records but it has pulled out more than 10,000 records. how to debug the function module used in the data source.
    since we schedule for extraction in bi and back ground job gets triggered in ecc for extraction,
    i know in se37 we can select the function module name and then debug but still need to check while the bacground job is trigered through bi.
    Thanks

    Yes you can debug the Function Module.
    Open the function module in SE37 and put a break point in the code where you want to check from, then come to RSA3 and give the datasource name and check the Debug check box on this screen, once you click on the start button it will take you the place where you have placed the break point in the FM, by pressing F5 you can see the flow of the FM.
    Let me know whether this solves your issue.

  • Debugging outbound function module

    Hi,
        I am trying to create or save sales order(va01). I am using ZWIP as the output type and transmitting the details to 3rd party system using idoc. Now Once I save, I could see the out bound idoc being generated. But when I put the break-point in the underlying function module, the process is not stopping there. I want to debug that function module. But all the time the idoc has been generated without stopping at the break-point.
    How do I debug the function module for the outbound idoc?
    Any ideas would be appreciated.
    Thanks
    Sachin

    HI,
    Before saving, put '\h' incommand line and press enter, it will go into debugging then goto settings then update debugging. Then you can press F8 to go the break-point you have create before FM.
    Reg,
    Sachin

  • How to debug a function module that is written to extend a datasource

    Hi all -
    this is BW related question.
    I have a datasource that I extended but instead of writing the code in the user exit, I created a function group and a function module to populate the custom fields. My problem is  - I want to debug the function module and when I do that, I have to give datasource, infosource and update mode as input parameters.  There is no data in the internal table C_T_DATA, how can I debug to get data into this table. 
    please let me know.
    thanks,
    Sabrina.

    Keep the Break point Before Updating.
    just click on the table c_t_data .or choose the internal table and say CTRL+F4, you can internal table content
    you can find change, append ,delete options.
    just select the row and click append they one blank row will appear. just add entries to that , and enter
    the record will be appended, do in the same way if you need more records to add...
    regards
    vijay

  • How to bring the custom function module in WE42?

    Hi,
    I have created a custom function module to post a custom idoc.
    Process code has been created thro WE42 and WE57 is done.
    Still I am not able to see the custom function module in the list (WE42) in order to assign it to process code.
    May i know the reason for this?
    Thanks.
    Thiyagu

    What makes you think that it should be visible in WE42? There is no F4-value help for this and you haven't added it manually yet, right.
    In WE42 you can manually add entries, so that's what I would do.

  • How can I debug a Function Module used by smartforms

    Hello everyone,
    i have a problem with the function module /1BCDWB/SF00000040.
    It's a module executed from a smartforms form. I need to debug this
    function module while printing an invoice. While printing it should jump
    to the place of the function module.
    Would be grateful if someone could help me.
    Best regards
    F. Hoppe

    This is exactly what i have done last time.
    The problem is that the breakpoint does not stay at the same place
    when i activate it in the module itself.
    Isn't there a transaction you can put breakpoints specific to a FM?

  • Error in Custom Function Module

    Hi,
    I am working on implementing General Ledger Business content in financial Accounting.
    We had a requirement of creating a Custom Virtual cube similar to 0FIGL_V10. Hence, we had copied the standard function module RS_BCT_FIGL_DATA_GET_VC10 and created a custom function module. Before doing that, we had copied the function group RS_BCT_FIGL and created a custom function group for the custom function module.Both were activated subsequently. Then, we had created a custom virtual cube (ZFIGL_V10) using the custom function module.
    The queries on the Standard virtual cube were migrated to ZFIGL_V10 using the RSZC transaction code. when the queries are executed in RSRT, we get an error message "**An exception with the type CX_SY_DYN_CALL_ILLEGAL_FUNC occurred" and the ABAP debugger is started post that error.
    Has anyone faced this problem before?could any of you provide some pointers to it.
    Regards,
    Sainath

    You cannot use the standard function module which is used for standard cube for another cube.
    You should not change the function module.
    Instead you can make a copy of the function module you are using aand use this copy in ur virtual cube which will work in the same way the actual Fm used to work and it will make you perfrom the changes.
    Follow the below steps:
    1) Goto SE37 and In the top tool bar click on the copy button which is on right side of delete button.
    2) in fr FM give the name of the actual FM and in to Fm give the name of the function module you want to copy.
    3) Then click on copy.
    4) Now open this new function in edit mode and goto the import/export parameters and check. it will have all the same parameters as the actual FM. Here you can make the changes you want.
    5) Now use this FM in your virtual cube and it will be working as per your requirement
    https://forums.sdn.sap.com/click.jspa?searchID=9605118&messageID=4999763
    Hope it Helps
    Chetan
    @CP..

  • Update the custom table by using Custom Function module.

    Hi Experts,
            My requirement is ,
    1) To create the Custom Z table with fields
               vbak-vbeln
               likp-vbeln
               vbuk-vbeln
      After creating this Z table.
    2) I have to create one custom function module.
        Based on this function module i have to update that Z table.
    3) Before these steps i have to write down an ALV report based on the tables vbak and vbeln, in that table i have to print vbak-vbeln. and also in report i generated check box and one custom button in application toolbar. after the report will displayed , when ever i click the button in application tollbar , this function module will executed and the table will be updated.
        But I developed the ALV report with custom button and check box successfully.
      My doubt is how to write the function module and based on that function module how to update the table.
          Please suggest me on this requirement.
        Thanks in Advance.
    Thanks and Regards
    Srihari.

    HI ,
         Can any one help me out on my above requiremnet..
    Thanks and Regards
    Srihari.

  • How to debug LAE function modules in ECC

    Hi,
    I've been trying to debug sequence of FMs called by LAE during asset creation in ECC. The asset is created for every service contract created in SAP CRM and then replicated to ECC system. While debugging the flow from CRM, I could debug upto ECC and then put external breakpoing in LAE FMs mentioned above but those FMs were not hit. 
    LAFA_ASSETS_CREATE_ON_LEASE
    LAFA_ASSETS_CREATE
    LAFA_ASSET_CREATE
    LAFA_ASSETS_RETIRED_GET
    Could anybody help me debugging these FMs?
    Regards,
    Ravi

    Hi Ravi,
    this process works asynchonous. This means from CRM some entries are stored in LAE_CRM* tables with function module FILA_BUS_TRANSACTION_RECEVIE. A triggered function picks up the entreis and process them. This function runs through your mentioned function modules.
    In a test system, you can call transaction FILATEST and copy the contract sent from CRM and using the simulation or execution function. This will bring you to these function modules.
    Kind regards,
    Steve
    Edited by: Steve Trester on Mar 1, 2011 8:13 AM

  • How to debug LAE function modules

    Hi FI Expert,
    I've been trying to debug sequence of FMs called by LAE during asset creation.
    LAFA_ASSETS_CREATE_ON_LEASE
    LAFA_ASSETS_CREATE
    LAFA_ASSET_CREATE
    LAFA_ASSETS_RETIRED_GET
    The asset is created for every service contract created in SAP CRM and then replicated to ECC system . While debugging the flow, I could debug upto ECC and then put external breakpoing in LAE FMs mentioned above but those FMs were not hit.
    Could anybody help me debugging these FMs?
    Regards,
    Ravi

    Hi Ravi,
    this process works asynchonous. This means from CRM some entries are stored in LAE_CRM* tables with function module FILA_BUS_TRANSACTION_RECEVIE. A triggered function picks up the entreis and process them. This function runs through your mentioned function modules.
    In a test system, you can call transaction FILATEST and copy the contract sent from CRM and using the simulation or execution function. This will bring you to these function modules.
    Kind regards,
    Steve

  • Problem to trigger breakpoint in function module of idoc

    Hi,
    We have requirement to write the additional code in function module in IDOC to fulfill the one of business requirement.  To write the code in the function module we put the breakpoint in function module but the function module is not triggering the breakpoint after saving the billing document.
    IDOC we are using is INVOIC02
    Function Module we are using is IDOC_OUTPUT_INVOIC
    i found the relevant for answer for my question in above link -
    [[http://blog.csdn.net/xyfchris/archive/2007/10/04/1811389.aspx]e]
    I process the same way as explained in the above link, but still the function module is not triggering the breakpoint and showing the information message as -
    0 number of outputs were processed in total  and zero are successfully, zero are incorrectly
    Please help in this
    Regards
    Goutham
    Edited by: goutham p on Dec 30, 2008 8:00 AM

    Hi,
    Please ask the ABAPer to just use P0105-PERNR within Z-report.
    It should work.
    Please refer to the following WIKI page for reference:
    http://wiki.sdn.sap.com/wiki/display/ERPHCM/HowtoCreateaDynamic+action
    Regards,
    Dilek

  • ALE custom function module for IDOC_INPUT_COSTCENTER

    We are setting up an ALE to update cost centers in our HCM system from our ECC system.  In conjunction with the cost center update I need to convert the company code (it's not straight-forward enough to use a conversion rule) so I have created a custom copy of IDOC_INPUT_COSTCENTER and included my conversion logic there. 
    I have done all of the necessary configuration steps associated with the custom function module; created message type ZCOSMAS, process code ZCOSM, etc.  When I execute BD16 it is passing the correct message type and process code to the HCM system but I am getting a status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
    I must be missing some piece of configuration in my HCM system that should trigger Z_IDOC_INPUT_COSTCENTER rather than IDOC_INPUT_COSTCENTER.  Can anyone tell me what I have missed?
    Thanks in advance for any assistance you can provide.
    Regards,
    Pat
    Edited by: Patricia Holland on Dec 22, 2011 2:38 PM

    I thought that I had found found my problem in the model view but I was mistaken.  I am still getting status 51 'Function module not allowed: IDOC_INPUT_COSTCENTER'.
    It should be using Z_IDOC_INPUT_COSTCENTER.
    Edited by: Patricia Holland on Dec 22, 2011 3:00 PM

Maybe you are looking for

  • Using an IF Statement in Numbers on Entire Column for Each Value that is True

    Hi, I am trying to create a formula to help calculate a chart chart. I need to gather the SUM of Column A for Each instance that Column B of the same row is =TRUE. I need to do it in the most general way possible as this formula will be gathering inf

  • Working with JUCtrlActionBinding

    Where can I go to find more information about working with the oracle.jbo.uicli.binding.JUCtrlActionBinding class and it's DCControlBinding superclass? I am working with a managed bean (called by a button) that needs to access an instance of this cla

  • Search based on grandchild attribute not working

    Hi, In the model side, I've parentVO - childVO - grandchildVO & at the page level, I've a search region & the result tree table. In the search criteria (@ parentVO) I've search attributes from all three levels. When I search on attributes from parent

  • Itunes keeps getting the error report

    when i try to open itunes, that annoying error report comes up saying "itunes has encountered a problem and needs to close. we are sorry for the inconvienence"... and it happens everytime. i try to reseach about this problem, and i've called windows

  • Java Proxy Exception

    Hi all, We are implementing a Inbound syncronous  java proxy in our scenario. We were able to create and deploy the EJB successfully in the J2EE engine. The adpater configuration is also working fine. When we fire the message we are getting an except