Debug a functional module
Hi,
Could you please tell me how to debug the function module.
Thanks,
Subha.
In SE37 while executing the FM there is an option to execute the same in Debugging mode. If you want to debug the FM as a stand alone code you can make use of this functionality. Provide the necessary input values and run the FM in debugging mode.
If you intend to debug the FM from another program wherein it is called you can always set a breakpoint inside the FM and execute the code in the calling program. The control will stop for you at the point where you have set the break point inside the FM automatically.
check this link also
http://help.sap.com/saphelp_nw04s/helpdata/en/d1/801f36454211d189710000e8322d00/content.htm
Similar Messages
-
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. HoppeThis 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? -
How to DEBUG a function module running in background mode? Please help!
Hi Experts,
I am calling a function module in my ABAP code in background module using the following syntax:
CALL FUNCTION 'YBBC2_CREATE_SNAPSHOT' IN BACKGROUND TASK
TABLES
itab_std_format_inv = itab_std_format_inv
itab_snapshot_inv = itab_snapshot_inv.
COMMIT WORK.
If I put the breakpoint in the CALL FUNCTION line and execute the program, the debugger does not take me to the valled function module. This may be because I am running the function module as background task.
I cannot comment this "IN BACKGROUND TASK" statement as well since i am debugging in Quality system where I don't have change access.
So how to DEBUG a function module running in background mode? Please help!
Thanks
GopalHi,
You could try to use the following trick:
(1) Put an endless loop into the coding of your function module where you want to start debugging, e.g.
DATA:
lx_exit_loop(1) TYPE c.
lx_exit_loop = ' '.
DO.
IF ( lx_exit_loop = 'X' ).
EXIT.
ENDIF.
ENDDO.
(2) Call your function module in background task
(3) Call transaction SM50 and search for the background process.
(3) Choose from menu Program/Mode -> Program -> Debugging
Now you the debugger should bring you right to your endless loop. Set lx_loop_exit = 'X' in the debugger and continue (F5 or F6).
<b>Reward points</b>
Regards -
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.
ThanksYes 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. -
Hw to debug outbound function module
Hi,
I know how to debug inbound idoc using WE19 can sum1 tell how can i debug outbound function module.
i want to debug to see as to why certain segments are not being updated in IDOC PORDCR1.PORDCR102.
even though i put an external break-point it does't trigger .
Regards,
Jayaram Maganti>
JAYARAM MAGANTI wrote:
> Hi,
>
> I know how to debug inbound idoc using WE19 can sum1 tell how can i debug outbound function module.
> i want to debug to see as to why certain segments are not being updated in IDOC PORDCR1.PORDCR102.
> even though i put an external break-point it does't trigger .
>
>
> Regards,
> Jayaram Maganti
Hi
See this link this is helpful for you.[debug outbound function module|Re: Cannot debug outbound queue; -
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
SachinHI,
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 debug a function module
hi,
Please Tell me how to debug an Function module
Thanks in advance
ajayHi,
In SE37 while executing the FM there is an option to execute the same in Debugging mode. If you want to debug the FM as a stand alone code you can make use of this functionality. Provide the necessary input values and run the FM in debugging mode.
If you intend to debug the FM from another program wherein it is called you can always set a breakpoint inside the FM and execute the code in the calling program. The control will stop for you at the point where you have set the break point inside the FM automatically.
Hope you have a clear picture now.
Reward if helpful. -
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,
NarenHi,
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 debug mapping function module during delta extraction?
Hi experts,
Somehow our delta is not working properly, and i would like to debug our mapping function module. How can i debug it during a delta extraction?
Some info:
Our source system is CRM and our extractor is extracting one order document (contracts in this case). I know that when we modify a contract, a bdoc is generated and then passed throught the mapping function then the extracted data to the delta queue. I just need to debug when the bdoc is being mapped to see what's wrong with the extracted data.
Thanks in advance,
VanHi,
Since you are using a Function Module for the Extraction. Edit the Function Module and give "BREAK-POINT" before the loop command. Check and activate the Function Module.
Now Extract the datasource using RSA3. Now you can debug it. After checking remove the "BREAK-POINT" from the function module. Also Check and activate the same.
Regards
Jayaram M -
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,
RaviHi 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,
RaviHi 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 -
Debugging Outbound Function module in EDI
Hello All,
I have a query regarding debugging function module which is used for creation of outbound Idoc for Purchase Order.
We have a Z process code which is assigned to a Z function module which creates an IDOC while a PO is created in the system.
But If I set break points in the Function module, the execution does stop there.
Can any one please tell me how to debug outbound processing Functioon module while PO is created.
Regards
ArindamHi,
There are 2 ways to to debug an outbound idoc triggered by an output type. One way is to set the output timing to 1, and save the purchase order and then execute RSNAST00 which will take the control to the breakpoint.
You can also debug the idoc with the output timing set as 4.
Here the idoc is triggered in update mode. Hence any breakpoints you may have set before will not reflect. Hence you need to activate update debugging.
Below are the steps for the same..
1. Add the output type in purchase order.
2. Enter '/h' to activate debugging in transaction window.
3. Save purchase order.
4. The process enters debugging mode.
5. In Settings tab, select checkbox for Update Debugging.
6. Click F8.
7. The control will appear to go out and re-enter debugging mode.
8. Now from the menu bar, in breakpoints option, choose Breakpoint At Function Module option, and give the name of the function module which is processing the idoc.
9. Once breakpoint set, click F8.
10. The control will now go to the function module. You can then debug the FM.
Hope this information is helpful. -
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,
MickHi 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. -
How to debug a function module in a user exit
Hello out there,
I am calling a function module in the updates rules of an InfoCube.
The function module "hangs" while running the InfoPackage - the Monitor
shows up with "Missung Message . Update rules finished for InfoCube ...".
How can I debug an InfoPackage or this function module run
by the InfoPackage ?
Thank You !
Martin SautterHi Martin,
well, the weblog is quite good, but for your purpose, just follow the beginning until processing stops in the code. Then, in the top menu choose Breakpoint->Breakpoint at->Function module. In the following popup enter the name of the fm close the popup and press F8. Processing will stop in the fm.
regards
Siggi
Maybe you are looking for
-
When I open Bridge in the mornings I have to set my preferences and the settings stay all day. But if I have to close Bridge or when I open Bridge the next day the preferences all not set to the way I set them the day before. What do I need to do or
-
Had an Airport Express hooked up to an ethernet connection in my basement as my base station with a second Express in my office as a relay connected to my printer as a USB peripheral. Then I went and bought an Airport Extreme in order to have a USB h
-
Is HCM Data Loader functional on fusion HCM release 8? or will it be on release 9?
I understand that the long-term plan for data loading is to provide a single tool, which is referred to as HCM Data Loader. HCM Data Loader is intended to provide the standard data-import solution and a single entry point for managing bulk data loadi
-
Annotating a PDF--My First Attempt
I have a pdf that consists of specs on a digital camera. I pulled it down from the mfger'w web site. I want to send it to someone with what I think is an annotation to draw their attention to the note. I did that in the pdf, and sent it to him, and a
-
How do i set up an airport express as an extender for my airport extreme
how do i set up an airport express as an extender for my airport extreme