cancel
Showing results for 
Search instead for 
Did you mean: 

SRM : Custom Tab in RFx Item Details

Former Member
0 Kudos

Hi ,

I have a requirement to add a custom tab to the Item Details Tab of the RFx which has some custom Input fields and Checkboxes.

For this i have created a Custom Tab in component /sapsrm/wdc_dofc_rfq_i_d1 through enhancement and used a separate z component to display the fields in custom tab. (declared zcomponent as used component in /sapsrm/wdc_dofc_rfq_i_d1).

I have instantiated my component usage in different methods of main component where other standard tabs were instantiated.

As per the settings I am able to display the custom tab when i run the application but when i toggle the tabs it is giving some errors.

Can anybody pls let me know some of the key points which I need to take care while adding the custom tab. How can I handle the standard SAVE and Edit Buttons in my components and also the processes which occur when I navigate from one tab to another???

Accepted Solutions (1)

Accepted Solutions (1)

RicardoRomero_1
Active Contributor
0 Kudos

Hi,

I added a custom tab in CTR and SC item details. I had the same problem when I toggle from custom tab to a standard one. What i did for solve it (although I think is not a good solution) is create an over-write exit for the method ONACTIONSELECT_TAB. I copied the standard code and i added my code. For avoid the error what i did is add some code for delete the parameter OLD_TAB from wd_event when i detected that is my custom tab with the following code:


     CONSTANTS: c_MY_CUSTOM_TAB TYPE STRING VALUE 'ZZ_YOUR_CUSTOM_TAB'.
     FIELD-SYMBOLS: <ls_parameters> TYPE WDR_EVENT_PARAMETER,
                   <value> TYPE ANY.
    READ TABLE wdevent->PARAMETERS ASSIGNING <ls_parameters> WITH KEY name = 'OLD_TAB'.
    ASSIGN <ls_parameters>-value->* TO <value>.
    IF <value> EQ c_MY_CUSTOM_TAB.
       CLEAR: <value>.
    ENDIF.

Former Member
0 Kudos

Hi Ricardo,

Thanks for your reply. It would be of good help.

As you have added the custom tab in Contract and SC; can you pls let me know how you had added the functionality for SAVE.

Secondly I have a doubt that when we toggle the tab from custom to standard one; generaly data gets stored in the buffer and after filling all the tabs and pressing SAVE, it actualy update to the database.

I am still not able to sort out the logic for custom data updation.

Your help is realy appreciable.

RicardoRomero_1
Active Contributor
0 Kudos

Hi Kartic,

My requirements was a little bit different from yours...

For CTR my Z component is only for display data, so its not necessary to save any data.

For SC I had a table with some data and when I select a line is necessary to push a button to assign some values to the fields price, quantity, etc (standard fields)

The solution for the SC was a bit difficult. I haven't access to that system now and i don't remember all the details.

I'll try to explain to you what I did:

- Create an event as interface in your Z component, this event should be triggered when the user push somo button in your view.

- Create a method as event handler for this event in the standard component

- For update the standard fields you need to use the method:

wd_this->MO_DODM_RFQ_I_D1->/SAPSRM/IF_CLL_MAPPER~UPDATE( ).

- I needed to add an enhancement point in that method and pass the data with IMPORT/EXPORT TO/FROM MEMORY.

- For save the data I used the methods get_item_detail and update_item for the class /SAPSRM/IF_PDO_BO_* and the method submit_update for the class /SAPSRM/IF_PDO_BASE.

You need to investigate these classes, you can copy and use some standard code to do it.

I don't know if this help you and if exits other easiest way to do it. sorry.

Best Regards,

Answers (0)