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 implement BTE1640?

Former Member
0 Likes
3,053

Dear all,

I want to post those entries which are generated from Automatic Payment Transaction(F111) to corresponding Profit Centers.Actually the system is not deriving the profit center automatically (product error) and there is no provision to enter profit center manually in F111.

SAP has provided BTE1640 for the purpose of routing the postings to corresponding profit centers.

But, I have the following queries:-

1)Which BTE should I select for 1640,either P/S or process?Actually we have tried both and given the break point,but system is not triggering while executing F111.What may be the reason?

2)Eventhough SAP has asked us to use BTE1640,we could not find profit center field in the function module SAMPLE_INTERFACE_00001640.

Please advise.

Thanks & Regards

Ramesh Nair

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,929

Hi Ramesh,

Use the process BTE to implement program that differs from standard functionality.

Use the publish and subscribe BTE to implement additional functionality not delivered by SAP.

Try setting break-point in the 'OPEN_...00001640...' function module corresponding to your BTEs and run the transaction F111.

In case of transaction F111, the 'OPEN_....._00001640_P' BTE is called, so try setting break point in here. To implement the BTE copy the corresponding 'SAMPLE...00001640' function module and implement your code and maintain this in the t-code FIBF.

In order to determine profit center try to get the information using some logic.

Regards,

George

3 REPLIES 3
Read only

Former Member
0 Likes
1,930

Hi Ramesh,

Use the process BTE to implement program that differs from standard functionality.

Use the publish and subscribe BTE to implement additional functionality not delivered by SAP.

Try setting break-point in the 'OPEN_...00001640...' function module corresponding to your BTEs and run the transaction F111.

In case of transaction F111, the 'OPEN_....._00001640_P' BTE is called, so try setting break point in here. To implement the BTE copy the corresponding 'SAMPLE...00001640' function module and implement your code and maintain this in the t-code FIBF.

In order to determine profit center try to get the information using some logic.

Regards,

George

Read only

Former Member
0 Likes
1,929

hi,

Below is an example.

go to transaction code FIBF.

Click on Environmenr --> infoSytem (P/S). Select attribute type as 'A' and execute. Select the BTE you want and click sample function module.

For example say 00001030. Double Click on sample function module. Now copy this function module as Z func module & save it in a Z package.

in that Z func module write the following code.

DATA : AC_CONTAINER LIKE SWR_CONT OCCURS 0 WITH HEADER LINE.

DATA: BEGIN OF objkey.

DATA: bukrs LIKE bkpf-bukrs.

DATA: belnr LIKE bkpf-belnr.

DATA: gjahr LIKE bkpf-gjahr.

DATA: END OF objkey.

DATA: swe_objkey LIKE sweinstcou-objkey.

DATA: card TYPE p.

DESCRIBE TABLE t_bkpf LINES card.

IF card <= 0.

EXIT.

ENDIF.

READ TABLE t_bkpf INDEX 1.

MOVE-CORRESPONDING t_bkpf TO objkey.

MOVE objkey TO swe_objkey.

IF t_bkpf-tcode = 'F-47' OR t_bkpf-tcode = 'FBA6' OR t_bkpf-tcode = 'FB05'.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'BKPF'

objkey = swe_objkey

event = 'CREATED'

  • CREATOR = ' '

  • TAKE_WORKITEM_REQUESTER = ' '

  • START_WITH_DELAY = ' '

  • START_RECFB_SYNCHRON = ' '

  • IMPORTING

  • EVENT_ID =

  • TABLES

  • EVENT_CONTAINER =

EXCEPTIONS

objtype_not_found = 1

OTHERS = 2.

ENDIF.

ENDFUNCTION.

Now again come back to FIBF main screen.

Click on Settings --> Products --> Of a customer. Enter any product name starting with letter Z. give some text description. Do not activate it now.

Come back to FIBF main screen.

Click on settings --> P/S modules --> Of a customer.

Enter Event as 00001030, product which you defined earlier, and enter your Z func module name.

Save this entry.

Now again come back to FIBF main screen.

Click on Settings --> Products --> Of a customer and activate your entry by selecting the last checkbox.

Let me know if you have any queries.

Regards,

Raj

Read only

0 Likes
1,929

Hi Raj,

I will just explain from functional point of view:-

In SAP Treasury Module there is no provision to enter profit center while posting a document.So as a workaround I'm using a field RDEALER in VTBFHAPO table to store the profit center and through a BAdi,I'm deriving the profit center in Treasury postings.

So,inorder to clear the document which is posted in Treasury,I'm using F111.Ideally profit center has to be picked up automatically from the treasury posting whoich is already made.But,in F111 system is not picking profit center and it is not providing any field to enter profit center manually.SAP has confirmed that it is a product error,and they have advised us to use either FI substitution or BTE 1640 to derive the profit center in F111.

The logic is that:-

Contract number is the key field,and its stored in Treasury Table VTBFHAZU & FI table BSEG

So compare the contract number VTBFHAZU-RFHA = BSEG-VERTN

Check the value in RDEALER in VTBFHAZU

Default the same value in PCTR-BSEG for all line items

Thanks & Regards

Ramesh Nair