cancel
Showing results for 
Search instead for 
Did you mean: 

update field VBAP-KZVBR in MV45AFZZ (USEREXIT_SAVE_DOCUMENT_PREPARE) via SPROXY

former_member445510
Active Participant
0 Kudos

Hallo,

I can't update de field VBAP-KZVBR when I do the following abap code in the user Exit MV45AFZZ (USEREXIT_SAVE_DOCUMENT_PREPARE) BUT called by SPROXY transaction:

LOOP AT xvbap ASSIGNING <lfs_xvbap>
WHERE posnr = xvbep-posnr.
IF <LFS_XVBAP>-BEDAE = 'blabla'.
CLEAR <LFS_XVBAP>-KZVBR.
<lfs_xvbap>-updkz = 'U'.
ENDIF.
ENDLOOP.
yvbap[] = xvbap[].

in the SPROXY I use the "BAPI_SALESORDER_CREATEFROMDAT2 "

When I use the tcode VA01 the field VBAP-KZVBR is well updated! but not via SPROXY.

Any help please?

OR.

Accepted Solutions (1)

Accepted Solutions (1)

former_member445510
Active Participant
0 Kudos

Thanks to both of you. I should do the enhancement in in the interface if_ex_badi_sd_sales_item.

Answers (2)

Answers (2)

Lakshmipathi
Active Contributor
0 Kudos
When I use the tcode VA01 the field VBAP-KZVBR is well updated

Can you please let me know what value is filled there? For information, the control is based on the item category where there is a field "Special Stock". This you can check in vov7. Meanwhile, have a look at OSS note 1172030

raymond_giuseppi
Active Contributor
0 Kudos

Did you set the TESTRUN flag in the BAPI call, in this case the exit will not be called.

Else did you look for OSS notes and did you consider reporting an incident?

former_member445510
Active Participant
0 Kudos

Thanks, Raymond.

the testrun is not Set.

do you know which OSS notes ?

Lakshmipathi
Active Contributor
0 Kudos

Whenever you add any text to your post, please do so under "Comment" and not under "Answer", as you were not answering to a query but only providing additional information as required by the members. By adding text under Comments, a mail will be triggered to the person to whom, you respond but not for Answer. Meanwhile, I have converted your above Answer to Comment

raymond_giuseppi
Active Contributor

Better search yourself with your exact version of SAP.

(e.g. look for OSS notes with keywords "BAPI" and "USEREXIT_SAVE_DOCUMENT_PREPARE" to find notes such as 2925296 or 2412938 for example)