Application Development 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: 

BTE or any Enhance for FI park document (F-63)

Former Member
0 Kudos

Hi All,

I've a requirement to print out a form after FI document is parked (inserted already into BKPF, BSEG)

I tried using BTE with details as below :

- event = 2218

- function module = ZFI_INTERFACE_00002218 (copied from SAMPLE_INTERFACE_00002218)

In this function module, I wrote my code to submit an add-on program (to print out form) as below:

      SUBMIT ZPGXXXX

             WITH P_BUKRS      =   L_WA_FVBKPF-BUKRS

             WITH SELECTION-TABLE  L_IT_BELNR

             WITH P_GJAHR      =   L_WA_FVBKPF-GJAHR

But at the real time, the data is not exactly inserted into database, so the add-on program cannot extract data and print out the form.

Please help to suggest another BTE events or enhancement

Regards,

Bang

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

I've a requirement to print out a form after FI document is parked (inserted already into BKPF, BSEG)

Look at current content of tables VBKPF, VBSEGK, VBSEGA, VBSEGD, and VBSEGS.

Hint : You could/should also wrap you report in a RFC enabled FM, and call this one IN BACKGROUND TASL, so after database is updated.

Regards,

Raymond

6 REPLIES 6

suresh_kutam
Participant
0 Kudos

Hello Bang,

Please check any of the below BADIs will help you.

FI_LIMIT_PROCESS

FAGL_SEGMENT_BS_ACC

FAGL_SET_SEGMENT

SMOD_SAPLFMRI

BADI_PRKNG_NO_UPDATE

GLT0_REPLACE_ASGMT

GLT0_COMPRESS_ITEM

FYU... Till the T-code is complete SAVE - you cannot READ data from respective DB tables.

Either you need to create a FM as update one call it during commit.

Other option is  - If the above option is not solved.

Create new table - Write the document number,comp code,fiscal year either in ur current BTE or in the above BADIs as a entry in this new table.

Use another back ground program to run all the documents saved in this table.

Thanks,

SK

0 Kudos

Thanks for your sharing S K,

I checked your BADIs, but it did not work. I checked by debugging each BADIs and saw input parameters of for each one. It did not meet the my requirement.

For your other options, create a new add-on table with a new entry in the BTE. It might work fine, but my situation that wants to pop up immediately after the document is parked

And the program I want to submit is an add-on program that developed by other abaper. So no need to create another background program to run all the documents saved in this table.

Do you know other enhancements where park document is exactly inserted into the database ?

Thank you very much!

raymond_giuseppi
Active Contributor
0 Kudos

I've a requirement to print out a form after FI document is parked (inserted already into BKPF, BSEG)

Look at current content of tables VBKPF, VBSEGK, VBSEGA, VBSEGD, and VBSEGS.

Hint : You could/should also wrap you report in a RFC enabled FM, and call this one IN BACKGROUND TASL, so after database is updated.

Regards,

Raymond

0 Kudos

Thanks for sharing Raymond,

I checked again, that current park document is inserted into tables VBKPF, VBSEGK, VBSEGA, VBSEGD, and VBSEGS. Many thanks

But in the time that I check, It's not already in the above tables. so the add-on program cannot display a report at the time I submitted

About your hint, Could you explain in detail?

Regards,

Bang

0 Kudos

Perform a where-used search on the driver FM of this FM (OPEN_FI_PERFORM_00002218_E, or search FM *00002218*) you will find it is called between some CALL fucntions IN UPDATE TASK FM, so yes before database update, if you actually have not enough information in the received parameter and truly require to read from database you have to "register" your call.

As already suggested, replace the SUBMIT REPORT  with a CALL FUNCTION IN BACKGROUND TASK (RFC enabled FM) technically you can also create a V2 update function and call it IN UPDATE TASK but with restriction in coding.

Regards,

Raymond

Former Member
0 Kudos

Raymons is right.

if still need check 1120 or 1020.