segunda-feira, 20 de janeiro de 2020

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.

Nenhum comentário:

Postar um comentário