Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to debug FB01

Former Member
0 Likes
3,794

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

1 ACCEPTED SOLUTION
Read only

ThomasZloch
Active Contributor
0 Likes
2,814

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

11 REPLIES 11
Read only

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Likes
2,814

Hi Nani.

You can use '/h' in command field before 'SAVE' which will lead to debugging mode on.

Regrads,

Ajit

Read only

tolga_polat
Active Participant
0 Likes
2,814

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.

Read only

Former Member
0 Likes
2,814

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 ?

Read only

FredericGirod
Active Contributor
0 Likes
2,814

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

Read only

Former Member
0 Likes
2,814

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.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,814

FB01 is the basic transaction, it does not call any BAPI nor create a BDC (on itself ?) and certainly not LSMW, this transaction is much older than those tools.

What do you expect/look for ?

Regards,

Raymond

Read only

ThomasZloch
Active Contributor
0 Likes
2,815

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

Read only

0 Likes
2,814

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!

Read only

0 Likes
2,814

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.

Read only

0 Likes
2,814

For more information please look out for blogs containing "ST12" by , for example:

Thomas

Read only

Former Member
0 Likes
2,814

Hi Nani,

I would just put /H in the command box before pressing Save button.

Regards,

Karthik