BADI : BADI_SLS_HEAD_SCR_CUS
Add field in
following Table : VBAK
Add field in
following structures : (used
for extension and Communication structure)
BAPE_VBAK, BAPE_VBAKX, VBAKKOZ, VBAKKOZX
VBAK:
BADI Implementation:
T-Code : SE18
Enter the BADI name
and click display
Expand BADI_SLS_HEAD_SCR_CUS
Right
Click implementation
Below popup will be appeared and click create
button.
Enter the enhancement
name, description and press enter .
Enter the package name and create the Transport
request.
Double click on your enhancement
name, below screen will be appeared. Enter the implementation name ,
description and class name, then press enter or click tick mark.
Below Screen will be appeared
Expand BADI
implementation and double click on implementation class which one highlighted
on below screen short.
Double click on
methods and start writing on code like below.
method if_ex_sls_head_scr_cus~activate_tab_page.
data:ls_head_tab like line of ct_cus_head_tab.
ls_head_tab-head_caption = 'DPL Custom Fields'. “Tab Description
ls_head_tab-head_program = 'ZDPL_CUS_TAB_SALES_ORDER'. “Program name
ls_head_tab-head_dynpro = '9000'. “Sub Screen Name
append ls_head_tab to ct_cus_head_tab.
endmethod.
data:ls_head_tab like line of ct_cus_head_tab.
ls_head_tab-head_caption = 'DPL Custom Fields'. “Tab Description
ls_head_tab-head_program = 'ZDPL_CUS_TAB_SALES_ORDER'. “Program name
ls_head_tab-head_dynpro = '9000'. “Sub Screen Name
append ls_head_tab to ct_cus_head_tab.
endmethod.
Note: 1. No need to write any code for data transfer.
Result:
Using BAPI to Update the filed:
BAPE_VBAK:
VBAKKOZ:
BAPE_VBAKX:
Note: Use data element as CHAR1 , don’t use BAPIUPDATE .
VBAKKOZX:
Note: Use data element as CHAR1 , don’t use BAPIUPDATE .
Extension Structure Code:
While updating custom fields through
BAPI, need to use below code.
data: bape_vbak type bape_vbak ,
bape_vbakx type bape_vbakx .
bape_vbakx type bape_vbakx .
data: extensionin type table of bapiparex
with header line.
bape_vbak-vbeln = vbeln. “For creation make
it blank (vbeln)
bape_vbak-posnr = posnr .
bape_vbak-zzpo_number = ponum .
bape_vbak-zzgrpid = grpid .
bape_vbakx-vbeln = vbeln. “For creation make it blank (vbeln)
bape_vbakx-posnr = posnr.
bape_vbakx-zzpo_number = 'X' .
bape_vbakx-zzgrpid = 'X' .
move 'BAPE_VBAK' to extensionin-structure.
call method cl_abap_container_utilities=>fill_container_c
exporting
im_value = i_bape_vbak
importing
ex_container = extensionin-valuepart1.
append extensionin to extensionin.
bape_vbak-posnr = posnr .
bape_vbak-zzpo_number = ponum .
bape_vbak-zzgrpid = grpid .
bape_vbakx-vbeln = vbeln. “For creation make it blank (vbeln)
bape_vbakx-posnr = posnr.
bape_vbakx-zzpo_number = 'X' .
bape_vbakx-zzgrpid = 'X' .
move 'BAPE_VBAK' to extensionin-structure.
call method cl_abap_container_utilities=>fill_container_c
exporting
im_value = i_bape_vbak
importing
ex_container = extensionin-valuepart1.
append extensionin to extensionin.
move 'BAPE_VBAKX' to extensionin-structure.
move bape_vbakx to extensionin-valuepart1.
append extensionin to extensionin .
move bape_vbakx to extensionin-valuepart1.
append extensionin to extensionin .
Thank you ! nice post. is this BADI is available in release 710 and EHP level is 3.0..
ReplyDeleteThnks
sandeep
I've a question. How do you show your new tabstrip from main window in VA01/VA02 -> GoTo>Header>Other Functions?? Is it possible?
ReplyDeleteThis badi is not available in my system, Can I add additional field use of customer exit in CMOD, means not additional tab will come but if i will enter sold to party then that custom screen field popup window should be come automitacaly, is this possible ? or any exits are there in SAP for that
ReplyDeletesir how to create subscreen 9000? i cant able to navigate if i double click on th
ReplyDeleteHi Raja,
ReplyDeleteWith this approach, incompletion log is not working as expected when the Z fields are configured in OVA2. Can you please suggest
Where we need to write the VBAK table update logic. (enahncement or module pool program or in custom badi)
ReplyDeleteHi Raja,
ReplyDeleteIs it possible for adding extra column/field for existing tab(Ex: VA01 Header's partners tab, add PAN number or Aadhar number).
Please let me know, if its possible without access key or not.
Thanks,
Syed Abbas.
sir kindly explain how to create sub screen 9000.
ReplyDeletei have done same steps for header tab and item tab as well. all works absolutely fine in manual creation from VA01/02/03. thanks for this .
ReplyDeletebut when i use bapi BAPI_SALESORDER_CREATEFROMDAT2 exception is raised.
CX_SY_RANGE_OUT_OF_BOUNDS occurred.
Any thing i need to do for BAPI ?
i have done same steps for header tab and item tab as well. all works absolutely fine in manual creation from VA01/02/03. thanks for this .
ReplyDeletebut when i use bapi BAPI_SALESORDER_CREATEFROMDAT2 exception is raised.
CX_SY_RANGE_OUT_OF_BOUNDS occurred.
Any thing i need to do for BAPI ?
Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts Call Paging System | Customer Call Paging Systems | Customer Order Display
ReplyDeleteThis is the best article for SAP which I have seen and it's absolutely great stuff on SAP. Thanks for such a cool article about SAP topics. Very good explanation on SAP concepts we do SAP Training in Chennai for all SAP Modules.
ReplyDeleteRegards,
SAP Training Institutes in Chennai | Best SAP Training in Chennai
Thanks for sharing this Information. SAP Dynpro Training in Gurgaon
ReplyDeleteperde modelleri
ReplyDeletesms onay
Türk telekom mobil ödeme bozdurma
Nftnasilalinir
Ankara Evden Eve Nakliyat
trafik sigortasi
dedektör
Kurma Web Sitesi
aşk kitapları
smm panel
ReplyDeletesmm panel
iş ilanları
İnstagram Takipçi Satın Al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
servis
tiktok jeton hilesi
tuzla alarko carrier klima servisi
ReplyDeletekartal beko klima servisi
pendik bosch klima servisi
kadıköy samsung klima servisi
maltepe mitsubishi klima servisi
üsküdar beko klima servisi
ataşehir alarko carrier klima servisi
çekmeköy daikin klima servisi
tuzla arçelik klima servisi