Skip to Content

In this document you would be knowing about how to add a custom tab at item level in purchase order transactions.

For adding a custom tab to the purchase order transactions we have to implement the enhancement MM06E005.

First we have to create a project for this enhancement using transaction CMOD.

In this project after enhancement assignment to MM06E005.

In SMOD transaction we can see the documentation of this enhancement.

In the documentation you can find

Program name  Screen  Subscreen used for

SAPLXM06    0101   Subscreen header purchase order

SAPLXM06    0111   Subscreen item purchase order

Based on the requirement of whether adding a subscreen tab at the header or item level we can select the screen number from above.

We can navigate to the required screen layout in the SAPLXM06 program and create our own screen layout.

/wp-content/uploads/2012/04/sap1_96898.png

From the SMOD enhancement documentation screenshot below we can choose the EXIT in which we need to implement our logic based on the requirement.

/wp-content/uploads/2012/04/sap1_96898.png

Since I had to display some fields on an item screen tab I used EXIT_SAPMM06E_016.

Under the exit all we have to do is just add the ABAP code.

For having the custom name to the tab, please create text symbol with the screen number you are using and the text as required.

Below is what I have used.

/wp-content/uploads/2012/04/sap1_96898.png

Once this is done and activated, we can see the additional tab on purchase order.

Capture.JPG

That is it! The customer tab is added at your item level.


To report this post you need to login first.

9 Comments

You must be Logged on to comment or reply to a post.

    1. Sandeep Kumar Post author

      Thanks Madhu.

      The code according the above requirement is quite simple. Just fetch the data from i_ekpo structure which is already an importing parameter for this exit. From this structure we can get material number of that particular item and then write a simple select statement for MARA table to fetch the required details.

      TYPES: BEGIN OF ty_s_mfr,

               mfrpn TYPE ekpo-mfrpn,

               mfrnr TYPE ekpo-mfrnr,

         END OF ty_s_mfr.

      DATA: wa_mfr TYPE ty_s_mfr.

      gv_ematn = i_ekpo-ematn.

      SELECT SINGLE mfrpn mfrnr FROM mara INTO wa_mfr WHERE matnr EQ gv_ematn.

         IF sy-subrc EQ ‘0’.

           gv_mfrpn = wa_mfr-mfrpn.

           gv_mfrnr = wa_mfr-mfrnr.

         ENDIF.

      gv_ematn, gv_mfrpn and gv_mfrnr are the screen fields for material number, manufacturer part number and Manufacturer.

      Thanks,

      -Sandeep

      (0) 
      1. Rakesh MV

        Hi Sandeep,

        As per your logic, values will not be stored in database right, they will be displayed everytime, based on the logic you added.  Please let me know, if there are any function modules to store the values of custom fields added.

        Rakesh

        (0) 
        1. Sandeep Kumar Post author

          Hi Rakesh,

          If you check the EXIT which I have used (EXIT_SAPMM06E_016), it is used only to get data to the customer tab screen. So only display is possible.

          In case if you want the data to be updated in the database tables, use the EXIT (EXIT_SAPMM06E_018) which imports data from customer sub screen. Put a breakpoint in the EXIT after activating and check the structure which is having other item details, and update that particular structure with your screen fields data.

          Please let me know if any help required.

          Regards,

          Sandeep

          (0) 
          1. Subeesh Kannottil

            Hi  Sandeep ,

            This is really helpful .Kindly let me know the step by  step procedure to add custom screen in the Purchase requisition using badi or exits

            Thanks and regards,

            Subeesh Kannottil

            (0) 
  1. Akash S

    hi, Now the problem i am facing is that even though the fields are added in structure CI_EKKODB and Screen has been updated with the required fields in screen 101 ( Header level) of  exit SAPLXM06.

    Added Fileds not display on screen in that Customer data tab.

    2Error.png

    (0) 

Leave a Reply