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: 

BADI/Exit help for FI-CFM

Former Member
0 Kudos

Hello Everyone,

How r u guys? I need some help in BADI/User Exit. I am working on FI - CFM. There is a transaction with TCode- TS01 (Create Securities) / TS04 (settle securities).

I need a BADI/Exit which gets activated when the user clicks on the save button. I tried to locate them but couldnt find anything suitable. I emailed sap and they told me that there is a BADI - FTR_CUSTOMER_EXTENT which I

could use to solve my problem. I did try that and wrote a code in that badi;s EVT_TRANSACTION_SAVE_CHECK method.

But unfortunately when i clicked on save button the badi didnt run. I am in a fix as to what do I do ? The system I am working on is a bit old its SAP R3 4.7C. In that I created a Z badi implementation and embeded the original

badi definition and wrote code and activated everything.

Either the badi I am using (which sap guys told) isnt correct or something. Can anyone guide me as to whats the next step.

Thanks,

JG

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hi

Following exits are available for TS01.

Transaction Code - TS01 Create Securities Transaction

Exit Name Description

F64O0001 Enhancement for Treasury/Securities/Order management

FV970001 Enhancement for Treasury/Securities/Cash flow calculator

FVVW0110 ISIS Securities - sec.account transfer - create other flows

FVVWCF02 ISIS Securities - CASH_FLOW_CONSTRUCT_SECURITY

FWF1001 Treasury Securities: Posting Interface

No of Exits: 5

To search for a badi, go to se 24 display class cl_exithandler. double click on method get_instance, get a break point on case statement. execute and start the required transaction in new session. look for variable exit_name. It would show the available badi's.

<b>Please do reward if useful</b>

Regards

Dinesh

11 REPLIES 11

Former Member
0 Kudos

hi

Following exits are available for TS01.

Transaction Code - TS01 Create Securities Transaction

Exit Name Description

F64O0001 Enhancement for Treasury/Securities/Order management

FV970001 Enhancement for Treasury/Securities/Cash flow calculator

FVVW0110 ISIS Securities - sec.account transfer - create other flows

FVVWCF02 ISIS Securities - CASH_FLOW_CONSTRUCT_SECURITY

FWF1001 Treasury Securities: Posting Interface

No of Exits: 5

To search for a badi, go to se 24 display class cl_exithandler. double click on method get_instance, get a break point on case statement. execute and start the required transaction in new session. look for variable exit_name. It would show the available badi's.

<b>Please do reward if useful</b>

Regards

Dinesh

0 Kudos

Hi dinesh ,

Thanks for giving list of badis/exits. I also have the same program which gives a list of exits / badis for a particular T Code.

Unfortunately I wanted an exit or badi to get activated if I click on the save button of T Code TS01/TS04.

Your way of getting a list of BADIs by going into class cl_badi_flt_data_trans_and_db and putting up a break point was a <b>great idea</b> and something new for me. Though I am trying out badi it is giving me, I have not had any success so far. I am begining to feel there may not be any relevant exit/badi for it.

Is there a similar way to locate an exit like there is for badi as you mentioned.

Still trying to solve.

Cheers,

JG

Former Member
0 Kudos

Hi,

To add a new custom tab in TM_XX transactions you have to follow these steps:

1. (SE80) Create a dynpro as SUBSCREEN, with the structure (fields, tablecontrols...) you want in the new tab, located in a modul-pool.

Example: Program: ZCFM001

Dynpro: 1010

2. (SE18) Create your custom implementation of BADI FTR_CUSTOMER_EXTENT. This will create a Z class where you can program the new tab management.

Example: Implementation: ZAMPLIACIOTM001

Class: ZCL_IM_AMPLIACIOTM001

3. (SE24) Implement method EVT_APPLICATION_START of your new class. This method is called when the transaction is going to be painted, and manages (among other things) which tabs need to be shown. In general terms, you will have to assign your dynpro to a function code.

This BADI offers you 2 custom function codes, and so, the ability to add two custom tabs. These function codes are OPEN_TRTM_CUST_01 and OPEN_TRTM_CUST_02.

To add your dynpro to a function code, you have to identify this relationship in the internal table (parameter) PC_TAB_BADI_TABS. This is the table that contains the custom tabs to be added.

To do this, you have to add the following piece of code:

DATA: LS_BADI_TABS TYPE FTROP_BADI_SUBSCREEN.

  • 4.1. Modify the tab structure.

LS_BADI_TABS-REPID = ZCFM001. "Report

LS_BADI_TABS-TEXT_TAB = 'New Tab'. "Text (max. 30 CHAR) to display

LS_BADI_TABS-DYNNR = '1010'. "Subscreen

  • 4.2. Add the new tab.

MODIFY PC_TAB_BADI_TABS

FROM LS_BADI_TABS

TRANSPORTING REPID DYNNR TEXT_TAB

WHERE FCODE = 'OPEN_TRTM_CUST_01'.

And that's it! Now you will be able to see you new tab in these transactions.

I hope this helps you.

<b>Reward points</b>

Regards

0 Kudos

Hi dude,

Thanks for your advice. But I think we are going the other direction. I just want an exit or badi that gets activated the moment i click the save button for transaction TS01/TS04. I do not want to add any custom functionality in the screen. Module is FI - CFM.

I tried a few BADI's but they didnt work. I am thus stuck up.

Cheers,

JG

0 Kudos

Hi,

apart from that 5 user exits you can check the following

Choose the one suits your needs from following enhancements:

FVVW0105 ISIS Securities - sec.account transfer - subscreen

FVVW0200 ISIS Securities - Maintain sec.account master data

<b>Reward points</b>

Regards

0 Kudos

Hi Skk,

The user exits you mentioned could not be found in the system. However i found one with name - FVVW0110 and it didnt work.

Cheers,

JG

0 Kudos

Hi Jack,

I guess you get the wrong BAdI from SAP. The FTR_CUSTOMER_EXTENT is for the Open-TRTM architecture. Which means that you can use up to 2 user-specific dynpros in your TR-transactions. But you want to execute a statement if the SAVE-button is pressed. Therefore you should use the BAdI FTR_TR_GENERIC. It is in the same way built up as the other one. So if you would like to react on the SAVE-button then implement your statement in the method EVT_TRANSACTION_SAVE_CHECK (before you want to save the data on the database) or EVT_TRANSACTION_SAVE_READY if all checks are OK.

I hope this will help you.

Regards

Robert

0 Kudos

Hi Robert,

Thanks for your reply. Though I have solved the problem by inserting few lines in the standard code, I still tried the badi you had mentioned.The BADI did work but the problem is it does not give me the data that is in that transaction. Thus without that data I cannot do any processing. So I guess the problem still remains and I dont there is any badi that also gives data for it.

Thanks anyways,

Cheers,

JG

0 Kudos

Hi Jack,

you can get the transaction using the variable pi_proxy_transaction. Here is a short example of a test implementation to make it a little bit clearer:

IF sy-tcode = 'TS02'.

IF pi_proxy_transaction->a_activity-gsppart = ' '.

  • Check the partner

CALL METHOD pi_proxy_messages->set_message

EXPORTING

pi_message_id = 'T0'

pi_message_number = '101'

pi_message_severity = 'E'

pi_message_var1 = 'Please maintain a partner name'

EXCEPTIONS

OTHERS = 4.

ENDIF.

ENDIF.

ENDMETHOD.

With this attribute pi_proxy_transaction you can check flow data, contract data and so on. It is also possible to send messages via the OPEN-TR-TM container to the message handler (as I did it above).

Best regards

Robert

0 Kudos

Hi Robert,

Thanks for your help. We it gets a bit complex now , doesnt it. Though I have already achieved the result by modifying the standard code but I will see if I can also get around by trying what you have mentioned.

Thanks man,

JG

Former Member
0 Kudos

Hi,

I am not getting the data what i entered in the customer screen in badi events. How to get the customer fields data in my badi?

In BADI Check one parameter is there PI_CUST_TRANSACTION. This is linked to interface.

I feel i have to update the set_data method of the interface in the customer screen. and i need to use get_data in check method of badi. For that what i have to do?

I have only one field in the customer screen. Based on that i need to validate the data in my check method.

How can i do that?

Thanks&Regards,

Sayanna Damerla