Skip to Content
Technical Articles

Add Additional Tab on Sales Order Header VA01, VA02, VA03 S/4 HANA 1709

There is often requirement from client to have additional data placed on Sales order either on Header level or item level. This requirement was achieved through implementing BADI BADI_SD_SALES_BASIC.

Add below code to BADI Method:

IF_EX_SLS_HEAD_SCR_CUS~ACTIVATE_TAB_PAGE

 

data wa_head_tab type SALES_CUST_TAB_PAGE.

if sytcode eq ‘VA01’ or sytcode eq ‘VA02’ or sytcode eq ‘VA03’.
wa_head_Tabhead_caption ‘Additional Address Data’.
wa_head_Tabhead_program ‘SAPLZSD_ADDR’.
wa_head_Tabhead_dynpro  ‘9009’.

append wa_head_tab to ct_cus_head_tab.

endif.

 

While ZSD_ADDR is the function group and 9009 is a sub screen created in that function group.

 

These three fields are added using append structure in sales order header table VBAK.

These fields are defined using custom data elements with check table of relevant data in system.

 

ZZPRKEY is determined from custom Ztable for provinces, while ZZDSKEY is determined from custom Z Table for Division and another z table determines values for district.

Each of these tables have primary foreign key relationship by which it is easier to determine province wise division wise districts in system.

 

Happy New Year and stay blessed.

 

 

7 Comments
You must be Logged on to comment or reply to a post.
    • Not OP but I used this BADI before in ECC 6 (this is not something HANA specific, the title is misleading) and the main reasons are: (a) it’s not a modification; (b) the tab can have any name that users prefer; (c) believe it or not but some companies are running out of space on Additional Data B screen. 🙂

      The main disadvantage I discovered: the users can’t navigate to this tab directly from the main screen using the menu Goto -> Item, which is possible for Additional Data B.

    1. This is not specific to S/4HANA 1709. As noted in the blog linked by Sandra, this functionality existed since ECC EHP6.
    2. This is not limited to the transactions listed. The same old blog had a more accurate title mentioning VAxx transactions. The same user exits and BADIs apply to all the sales document transactions, including VA01-03, VA21-23, etc.

    Sorry but I feel this blog post just doesn’t add much value for the readers. The code example is not good either. We must never use transaction codes (sy-tcode). Instead, we use the document type (VBTYP) if the functionality must be limited to specific types, or transaction type to limit something to create/change/display transaction.

    Please search for existing blogs, going forward, and make sure that the examples follow best practice.

    Even if this post was well intended we need to make sure not to misinform the readers on SCN and everyone should strive to provide best possible guidance to the community. I feel there is a lot of room for improvement here in that area.

    • Yup Jelena,

      You are right tht this way of enhancing SD orders screens is there in ECC as well, but does that make any difference.

      Secondly my objective of sharing blog posts is to give guidance to consulting workforce that before they say no client they must check and do some research on the web.

      Keep sharing and keep learning.

      Regards,

      Atif Mukhtar

      • You are right tht this way of enhancing SD orders screens is there in ECC as well, but does that make any difference.

        The title of this blog post says “Add … S/4 HANA 1709”. This implies that the content of the blog would be specific to the stated S/4 HANA 1709 version. But it’s not. This is misleading.

        Secondly my objective of sharing blog posts is to give guidance to consulting workforce that before they say no client they must check and do some research on the web.

        If the “consulting workforce” used Google they could’ve easily found the existing blog on this subject. Basically this blog could’ve just said “hey, this BADI <blog link> also works in S/4 HANA, thanks, bye”.

        While your intentions are commendable, when sharing on SCN it’s important to ensure the content quality. I’m sure you can do much better than this blog.

        • Thanks Jelena,

          Writing content is another skill or art that all doesn’t have, but for me intention in more important then hand holding.

          My intention is to write blogs for consulting workforce who can read and implement the solution as per their business needs.

          You sure are right if this blog was intended for early birds which was not the case so from your comments I would suggest there is a room of marking a blogpost intended audience which could be added to blogs in reference so that people can easily filter out blogs based on target audience.

          I am sure experts would easily grasp the knowledge presented in the blog.

          Thanks for commenting.

          Regards,

          Atif Mukhtar