‎2013 May 14 6:45 PM
Hi Experts,
I am trying to post an FI document manually through FB01 and when I put a break point at FM BAPI_ACC_DOCUMENT_POST, it didn't stop. I am thinking that FB01 might be using BDC or LSMW when "SAVE". Do not know how to figure out which one it is using. Appreciate if anybody could guide me how to fins what FB01 is using at background to post a document when "SAVE".
Thanks,
Nani
‎2013 May 15 8:18 AM
A convenient way to find out yourself what's going on behind the scenes is doing an ABAP trace. I prefer ST12 in another session, start the trace for own user ID, click SAVE in the FB01 session, then return to ST12 and stop the trace. Then look at the resulting ABAP trace, you can for example filter only function module calls, drill down into the ABAP code etc.
I am also wondering why you need to find out, for external/automatic posting use the BAPI, for manual posting FB01, what else could be relevant?
Thomas
‎2013 May 15 6:35 AM
Hi Nani.
You can use '/h' in command field before 'SAVE' which will lead to debugging mode on.
Regrads,
Ajit
‎2013 May 15 7:08 AM
Hi,
If you ask why FB01 isnt stop in BAPI function first you need to know what is BAPI here is the link : http://help.sap.com/saphelp_46c/helpdata/en/a5/3ec8464ac011d1894e0000e829fbbd/content.htm
When user click any button system field sy-ucomm has the value of button function code, usualy screen has variable for sy-ucomm you can track with it. for FB01 there is a ok-code variable for sy-ucomm and in include MF05AFF0_FCODE_BEARBEITUNG / FORM FCODE_BEARBEITUNG you can find code for BU.
Regards.
‎2013 May 15 7:11 AM
Hi Nani,
Here directly accounting tables gets updated ( like BSEG, BKPF etc) after the screen input validation at PAI. Neither BDC nor LSMW . Not sure about your requirement.Can you please elaborate ?
‎2013 May 15 7:12 AM
Hi,
maybe this part of the code is in background processing.
Try in standard debugger mode, to press the SETTING button, check System debugging & Update debugging. Save it (F11) execute (F8)
If a new window is open, then you are in update mode, you will need to ask again SAP to stop at function module ....
(keep a free mode for the update mode)
Regards
Fred
‎2013 May 15 7:13 AM
Hi,
Put a break point at desired place. do '/H' before you save in FB01.
Once the control goes inside the debugging screen, ON the system debugging.
‎2013 May 15 7:22 AM
‎2013 May 15 8:18 AM
A convenient way to find out yourself what's going on behind the scenes is doing an ABAP trace. I prefer ST12 in another session, start the trace for own user ID, click SAVE in the FB01 session, then return to ST12 and stop the trace. Then look at the resulting ABAP trace, you can for example filter only function module calls, drill down into the ABAP code etc.
I am also wondering why you need to find out, for external/automatic posting use the BAPI, for manual posting FB01, what else could be relevant?
Thomas
‎2013 May 15 4:26 PM
Thanks for this tip Thomas - I don't think I'd never heard of ST12 before.
I knew of ST05 and even SE30 but I found them of limited use.
I still find SAP programs difficult to debug and understand, perhaps ST12 was the key that I was missing...
Or are there any other tips that you could share?
Thanks again!
‎2013 May 16 9:15 AM
ST12 is basically groping of ABAP trace, performance & SQL trace at one place. There you can do the tracing either giving program details or by running work process also (server wise). Basically its very useful when you can see a job is running for long time and you have find what's going on then we do the workprocess trace by st12. There are more tracing options available like by user name/ taks etc and scheduling for future job run time.
‎2013 May 16 11:58 AM
‎2013 May 16 5:55 PM
Hi Nani,
I would just put /H in the command box before pressing Save button.
Regards,
Karthik