2011 Dec 21 10:44 AM
Hi Gurus,
My Query is:
When I enter the contract start and end date at header level (transaction code VA41), it automatically gets populated at the item level.
I want to delay the date at item level by one month.
Please help me to achieve the functionality.
Thanks & Regards
Dheeraj
Edited by: DheerAcc on Dec 21, 2011 11:45 AM
Edited by: DheerAcc on Dec 21, 2011 11:48 AM
2011 Dec 21 10:57 AM
You can use userexit_move_field_to_vbap in MV45AFZZ to manipulate VEDA-VBEGDAT / VENDDAT as they default from header.
2011 Dec 21 10:57 AM
You can use userexit_move_field_to_vbap in MV45AFZZ to manipulate VEDA-VBEGDAT / VENDDAT as they default from header.
2011 Dec 21 12:29 PM
Hi Vishnu,
Thanks for your reply.
I have tried using the exit, but in the further processing the data again gets replaced in MODULE VBAP_BEARBEITEN_ENDE ON CHAIN-REQUEST with the data in the header values.
Kindly suggest if any possibility.
Regards
Dheeraj
2011 Dec 23 3:53 AM
2011 Dec 23 9:33 AM
I just checked this module you can implement enhancment spot ES_SAPFV45P to infoluence the dates and it will work
Nabheet
2011 Dec 26 11:12 AM
Hi All..
Thanks for your inputs..
The query was solved by using the Implicit enhancement in the Include LV45WF0C.
The code is as below:
data: lv_posnr type veda-vposn,
lv_vari type c length 14 value '(SAPMV45A)VBAK'.
data: lv_date like vbak-guebg,
lv_kunnr like vbak-kunnr.
data: lv_zactive like zscope_sd_datdel-zactive.
data: lv_vbund like KNA1-vbund.
FIELD-SYMBOLS: <ls_vbak> type vbak.
ASSIGN (lv_vari) to <ls_vbak>.
select trading partner w.r.t customer
select single vbund from kna1 into lv_vbund
where kunnr = <ls_vbak>-kunnr.
Set flag for date delay using the entries maintained in the custom table maintained
select single zactive from zscope_sd_datdel into lv_zactive
where vkorg = <ls_vbak>-vkorg and
auart = <ls_vbak>-auart and
kunnr = <ls_vbak>-kunnr and
vbund = lv_vbund.
if lv_zactive = 'X'.
LOOP at screen.
if screen-name = 'VEDA-VBEGDAT'
or screen-name = 'VEDA-VENDDAT'.
screen-input = 0.
MODIFY SCREEN.
endif.
endloop.
lv_date = <ls_vbak>-guebg + 0100.
if veda-vposn <> '000000' and veda-vbegdat <> lv_date.
CALL FUNCTION 'BKK_ADD_MONTH_TO_DATE'
EXPORTING
months = 01
olddate = <ls_vbak>-guebg
IMPORTING
NEWDATE = veda-vbegdat.
CALL FUNCTION 'BKK_ADD_MONTH_TO_DATE'
EXPORTING
months = 01
olddate = <ls_vbak>-gueen
IMPORTING
NEWDATE = veda-venddat.
gv_posnr = veda-vposn.
endif.
endif.
ENDENHANCEMENT.
Thanks & Regards
Dheeraj.
Rewards points expected if thread seems useful...
Edited by: DheerAcc on Dec 26, 2011 12:13 PM