2015 Jul 08 4:27 PM
Hi,
I am trying to add a new partner function at the header level through user exit provided in MV45AFZZ Include in subroutine USEREXIT_MOVE_FIELD_TO_VBAK . The code works perfectly for VA01. But it doesn't work for VA02.
Same logic gets triggered for both the t-codes.
In VA02 I can see the newly added partner on the screen, but when I click on save system gives message "No data was changed" and its not updated at database level either.
See screenshots below:
Partner tab in display mode of the order:
Opening the same tab in change mode using VA02
The one highlighted in yellow is the one added through the code written in user-exit.
After pressing save I get below message:
Once I go back in order I can't see the new partner function. I tried using UPD_VBAK = 'U'. But that didn't work either.
Please help if you have any solution for this. Correct answer or any kind of help will be definitely rewarded.
Thanks,
Aditya.
2015 Jul 08 4:49 PM
To force a save, you need to set R185D-DATALOSS = 'X'.
Thanks,
Juwin
2015 Jul 08 4:49 PM
To force a save, you need to set R185D-DATALOSS = 'X'.
Thanks,
Juwin
2015 Jul 08 4:53 PM
Hi Aditya,
Try setting r185d-dataloss to 'X' in the user exit also along with your logic.
R
2015 Jul 09 7:02 AM
You are both correct, it worked like a charm. Thank you very much to both of you.
Regards,
Aditya.
2022 Dec 13 10:43 AM
2022 Dec 13 1:46 PM
I solved with this function, there is no need r185d-dataloss attribute.
CALL FUNCTION 'SD_PARTNER_SINGLE_MODIFY'
EXPORTING
fic_objecttype = pi_objecttype
fic_objectkey = pi_objectkey
fis_sdorgdata = pis_sdorgdata
fif_pargr = lv_paproc
fif_parvw = lv_role
fif_posnr = pi_pos
fif_kunnr_old = lv_old_partner
fif_kunnr_new = lv_new_partner
fif_dialog = 'X'
fif_initial_value = lv_initial_value
fif_knref_parnr = pi_knref_parnr
fif_vkorg = gvs_tc_parameters-sdorgdata-vkorg
EXCEPTIONS
parameter_incomplete = 1
object_not_found = 2
check_error = 3
numbers_not_ok = 4
OTHERS = 9.
Erol
a month ago
Hello, could you please advise how did you manage it? I am having problem at "get data from memory" and it ends there for me, in this FM