on 01-13-2019 11:48 AM
Hello Gurus,
Business want to update the Payment Term at item level in Sales order creation. I have implemented the user exit
USEREXIT_MOVE_FIELD_TO_VBKD in MV45AFZZ. I checked in the debug mode in exit, there is no item number exist in XVBKD and which is the reason why it is not updating Payment Term at item level. I tried in SAVE_DOCUMENT exit also. When I checked in debug only header item is showing in XVBKD. Is there any way to update the payment term at item level? Below is my code.
* To get the payment term that is to be updated
SELECT SINGLE mandt auart vkorg kondm zterm
FROM zsd_t_pay_term
INTO ls_zsd_t_pay_term
WHERE auart = vbak-auart
AND vkorg = vbak-vkorg
AND kondm = vbap-kondm.
IF sy-subrc IS INITIAL.
IF t180-trtyp = 'H'. " Create mode
READ TABLE xvbkd ASSIGNING <ls_xvbkd> WITH KEY posnr = xvbap-posnr.
IF sy-subrc IS INITIAL.
<ls_xvbkd>-zterm = ls_zsd_t_pay_term-zterm. " Payment term updated
ENDIF.
ELSEIF t180-trtyp = 'V'. " Change mode
READ TABLE xvbkd ASSIGNING <ls_xvbkd> WITH KEY vbeln = xvbap-vbeln
posnr = xvbap-posnr.
IF sy-subrc IS INITIAL.
<ls_xvbkd>-zterm = ls_zsd_t_pay_term-zterm.
ENDIF.
ENDIF.
ENDIF.
Please help me here.
Thanks and Regards,
Muralikrishna Peravali
Hi All,
I have implemented this by taking Update indicator and it is working fine,
Thanks and Regards,
Muralikrishna Peravali.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
99 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.