Skip to Content
Author's profile photo Ricardo Romero Mata

Table extensions in SRM documents

In this document we will see how to create a table extension in SRM documents. This example is for PO Header but the same process can be applied to other documents.

Go to SPRO to the following path:

SAP Supplier Relationship Management -> SRM Server ->Cross-Application Basic Settings -> Extensions and Field Control (Personalization) -> Create Table Extensions and Supply with Data -> Define Customer Table Extensions on Header Level


And create an append estructure on header on Database and also on PO header:

–      –    Define Append for Fields of Customer Table on Header on Database

–      –    Define Append for Fields of Customer Table on PO Header


In this example we’re going to create a table with the fields ‘User’ and ‘Name’:



Active both structures.

Return to SPRO and go to:

Control Table Extensions and Their Fields and Actions -> Set Visibility of Table Extensions -> Configure Visibility of Table-Like Header Enhancements.


And add a new entry for Customer Table Ext. Header (THCUS) and PO (BUS2201).


Then go to:

Configure Control of Fields of Table Extensions -> Customer metadata for substructure fields in normal entries

And add one entry for each field, set the field as Visible and Enabled.


At this point you can assign a dynamic class and method for change the visualization of the fields in run time.

You need to add also the lines in “Default customer metadata for set fields in initial entries” if you want to be allowed to edit the lines:


Now, if you go to the portal or NWBC and create a new PO, you can see a subtab called “Table Extension” within the PO header. Click there and you can see the table with the two fields we’ve added:


As you can see the buttons for add or delete lines are disabled. For active these buttons we need to do the following. Go to “Configure Control of Actions”:


And a line for each button:



Then you can see the buttons enabled and you can add or delete lines:


Change the place where the table is displayed

If you want to change the place where the table is displayed, for example adding a new header tab, you can do the following:

Goto to the PO and with the right button of the mouse choose “More field help” :


Here we can see the Component name and the Configuration ID:


Go to se80 to the component FPM_OIF_COMPONENT and find the Configuration ID /SAPSRM/WDCC_FPM_OIF_PO_PURCH, the push the button “Start Configurator”:


A new internet explorer browser will be opened. Choose “Change”.


If you go to the Header tab and do click in the table extension subtab you can see the view is been used is IV_L_FPC_CA_DETAILS of component /SAPSRM/WDC_DODC_CT. Save somewhere this names we’ll need it later.


We’re going to create a new header tab, so use the button “Add Main View”:


A new tab will be added, change the description of that tab.


Then expand the node of this new tab and set the view wich we want to be displayed, adding the Component /SAPSRM/WDC_DODC_CT the view IV_L_FPC_CA_DETAILS and the Component configuration name.


Save the changes and go to the portal to create a new PO:


–          Using badi BBP_DOC_CHANGE_BADI for add or modify the table.

Go to se18 and create a new implementation for badi BBP_DOC_CHANGE_BADI.


Add a filter for object type BUS2201 and go to the method BBP_PO_CHANGE. We have a parameter called IT_HCF “Tabular Customer and Solution Fields on PO Header” in wich we have the data of our table.

With the following sample code you can add some initial lines to the table:

DATA: ls_i_item    LIKE LINE OF it_item,
        ls_e_item    LIKE LINE OF et_item,
        ls_i_acc     LIKE LINE OF it_acc,
        ls_e_acc     LIKE LINE OF et_acc,
        ls_hcf       LIKE LINE OF it_hcf.
* Move data from import parameter to export parameters:
  MOVE-CORRESPONDING is_header TO es_header.
  LOOP AT it_item INTO ls_i_item.
    MOVE-CORRESPONDING ls_i_item TO ls_e_item.
    APPEND ls_e_item TO et_item.
  LOOP AT it_acc INTO ls_i_acc.
    MOVE-CORRESPONDING ls_i_acc TO ls_e_acc.
    APPEND ls_e_acc TO et_acc. CLEAR ls_e_acc.
  et_partner[] =  it_partner[].
  et_orgdata[] = it_orgdata[].
  et_hcf[] = it_hcf[].
* Add some initial lines to the custom table:
  IF iv_mode EQ 'C'. "Creation mode
        e_guid = ls_hcf-guid.
    ls_hcf-p_guid = is_header-guid.   
    ls_hcf-zz_user = '0000012345'.
    ls_hcf-zz_name = 'My name'.
    APPEND ls_hcf TO et_hcf.

Related content:

Special Thanks to Hilario Mata for investigate with me how to do it.


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Vinay Yeole
      Vinay Yeole


      Awesome! Keep it up.


      Author's profile photo Former Member
      Former Member

      Great work. Thank you for the step by step instructions and the explanations, I was able to implement my custom table extension.

      Author's profile photo Gaurav Gautam
      Gaurav Gautam

      Hello Ricardo,

      This was indeed a good step by step document!!!

      Is it possible to have more than one custom tab created using the SPRO extension option.



      Author's profile photo Mehuk Mori
      Mehuk Mori

      Did you find any way to have multiple custom tables created ??

      Author's profile photo Konstantin Anikeev
      Konstantin Anikeev

      Thx for sharing... Haven't seen it before!

      Author's profile photo Former Member
      Former Member

      Excellent post!! Regards

      Author's profile photo Mohammed sajid
      Mohammed sajid


      I Have added the custom extention table in RFx  while creating Rfx responce we are getting below dum. Im following the same above steps. kindly help on this issue

      Author's profile photo Mehuk Mori
      Mehuk Mori

      How can we replicate this table data while PO is replicated to ECC. On ECC side, I have same custom table and I want to transfer records from SRM table extension to custom table in ECC.


      Author's profile photo Nilanchal Behera
      Nilanchal Behera

      Hello Ricardo,


      i need to add a custom tab in SRM Shopping cart item, I tried to follow the same approach, hwoever i dont see the Table extension tab. Is there some other settings that is to be done to achive the same.


      Thank You!