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

Debug Logical Database DDF through F104 transaction

Former Member
0 Likes
2,339

Hi All,

I would like to know how  to debug the logical database (i.e. DDF) program  used in transaction F104 through F104.

Actually, we have custom tcode created which is copy of F104 transaction. But Zcode is returning message 'Document header for company code <xxxx> Doc. Number <xxxxxxxxxx>not found' from LDB program SAPDBDDF from sub routine PUT_BKPF. But same is not applicable from standard tcode F104.

Kindly suggest ASAP.

Thanks in advance.

Regards,

Ashwini

Check B0SG fields. As per documentation of logical database, they can influence on the data readed from the database

Table selection

In order to improve performance, individual tables can be excluded from selection. The following tables can be set in the application report AT THE TIME OF INITIALIZATION or AT THE START OF SELECTION:

  • B0SG-XAGSL (blank as a default): if an 'X' is entered in this field, then only A and B segments are read; in this case, only A segments for which there are no B segments are selected - this is normally not the case.
  • B0SG-XBNKL ('X' as a default): if this field is left blank, then the bank data is not read.
  • B0SG-XSTDL ('X' as a default): if this field is left blank, then the tax data is not read.
  • B0SG-XMNDL ('X' as a default): if this field is left blank, then the dunning data is not read.
  • B0SG-XKKDL ('X' as a default): if this field is left blank, then the customer credit data is not read.

Also make sure your program does a GET BSID before GET BKPF . The document number is readed in PUT_BSID form

    SAVE_BELNR = BSID-BELNR.
    SAVE_BUZEI = BSID-BUZEI.
    SAVE_GSBER = BSID-GSBER.
    SAVE_GJAHR = BSID-GJAHR.
6 REPLIES 6
Read only

former_member188827
Active Contributor
0 Likes
1,712
  • Go to SE36, give logical database name,choose radiobutton "Database Program".
  • Program "SAPDBDDF" would be opened.(You can open this program directly from SE38 as well).
  • Find "PUT_BKPF" in source code and put a break point there.

Regards

Read only

0 Likes
1,712

I tried this already. It will not trigger when we execute the transaction.

Regards,

Ashwini

Read only

alejandro_mejias
Active Participant
0 Likes
1,712

Check B0SG fields. As per documentation of logical database, they can influence on the data readed from the database

Table selection

In order to improve performance, individual tables can be excluded from selection. The following tables can be set in the application report AT THE TIME OF INITIALIZATION or AT THE START OF SELECTION:

  • B0SG-XAGSL (blank as a default): if an 'X' is entered in this field, then only A and B segments are read; in this case, only A segments for which there are no B segments are selected - this is normally not the case.
  • B0SG-XBNKL ('X' as a default): if this field is left blank, then the bank data is not read.
  • B0SG-XSTDL ('X' as a default): if this field is left blank, then the tax data is not read.
  • B0SG-XMNDL ('X' as a default): if this field is left blank, then the dunning data is not read.
  • B0SG-XKKDL ('X' as a default): if this field is left blank, then the customer credit data is not read.

Also make sure your program does a GET BSID before GET BKPF . The document number is readed in PUT_BSID form

    SAVE_BELNR = BSID-BELNR.
    SAVE_BUZEI = BSID-BUZEI.
    SAVE_GSBER = BSID-GSBER.
    SAVE_GJAHR = BSID-GJAHR.
Read only

0 Likes
1,712

Hi Alejandro,

Sorry I could not get how mentioned paraameters helps debugging the LDB through transaction specified.?

Kinldy clarify.

Regards,

Ashwini

Read only

0 Likes
1,712

Excuse me,  I'm not correctly read the message. I only provide some information to solve the issue, as per previous experiences, but not to help you debug.

Debugging a logical database program is not easy as far as some short dumps may occur if a commit work is raised in a SELECT-ENDSELECT statement.

Maybe identifying database logic you will find better the error.

Read only

0 Likes
1,712

I'll try to give you some ideas for debugging.

For every GET table in the logical database ,the form PUT_table is executed.

For instance, if your program contains somthing like

GET BKPF.

   write: / BKPF-BELNR.

The form put_bkpf from SAPDBDDF will be called for each row. If you look at this form there are some put BKPF statements. After this statetemt, your code will receive the control and

write: / BKPF-BELNR

.

If you put a break-point, at the beginning of this form, you could be able to debug after each GET.

If your program doesn't stop, is beacuse some condition or a previous selection is not correct.

In this case, try to put a break-point in a previous table in the logical database structure , in put_bsid form, for instance, or even in put_KNB1