2009 Apr 07 8:52 AM
Hi SAPGurus,
I am attempting to add a verification to the user-exit MV45AFZZ that, accorting to parameters it will clear the field VBAP-PS_PSP_PNR. I am not sure how to do this as there are various tables, xvbap, yvbap for example. I have tried modifying all of them with no luck, is there a flag that has to be marked to carry out the update?
Regards,
Simon
2009 Apr 07 9:36 AM
Hi Simon,
In the Include, MV45AFZZ go to
FORM USEREXIT_MOVE_FIELD_TO_VBAK.
and put a break point,,
then check XVBAK[] & XVBAP[]
it got the values of PS_PSP_PNR what you want to do with,,
change here, every thing will change as you required,,
do like this,,
loop at xvbap.
xvbap-PS_PSP_PNR = (modifications.)
modify XVBAP.
endloop.
Thanks & regards,
Dileep .C
Hi Simon,
In the Include, MV45AFZZ go to
FORM USEREXIT_MOVE_FIELD_TO_VBAK.
and put a break point,,
then check XVBAK[] & XVBAP[]
it got the values of PS_PSP_PNR what you want to do with,,
change here, every thing will change as you required,,
do like this,,
loop at xvbap.
xvbap-PS_PSP_PNR = (modifications.)
modify XVBAP.
endloop.
Thanks & regards,
Dileep .C
2009 Apr 07 8:55 AM
You cant modify xvbap,yvabp... for that u just create a internal table accoring to ur requirement filed and check this with the condition and transfer this to ur table.
2009 Apr 07 9:10 AM
Hi sridhar reddy,
I'm not really sure what you're talking about, could you explain yourself?
2009 Apr 07 9:23 AM
2009 Apr 07 9:55 AM
>
> Hi ,
>
> What is verfication you need to add ??
>
> Regards,
> Suneel G
This is what I have now;
IF vbak-faksk EQ 'ZC'.
loop at xvbap.
clear xvbap-ps_psp_pnr.
modify xvbap.
endloop.
ENDIF. I had it in the FORM USEREXIT_PRICING_PREPARE_TKOMP also I tried in USEREXIT_SAVE_DOCUMENT and USEREXIT_SAVE_DOCUMENT_PREPARE.
2009 Apr 07 10:51 AM
Hi Simon,
Try in USEREXIT_MOVE_FIELD_TO_VBAK & USEREXIT_MOVE_FIELD_TO_VBAK.
Thanks & regards,
Dileep .C
2009 Apr 07 10:59 AM
Did you try userexit_move_field_to_vbap as I mentioned in my reply ?
regards,
Advait
2009 Apr 07 10:59 AM
Problem solved. Well it doesn't seem to be perfect, when I hit the enter key it doesn't change the values on the dynpro the first time but the second time it does and when I save the order it saves correctly.
My code is as follows;
FORM userexit_move_field_to_vbak.
*Si el bloqueo está 'ZC' se modifica el campo PS_PSP_PNR
IF vbak-faksk EQ 'ZC'.
loop at xvbap where ps_psp_pnr is not INITIAL.
clear xvbap-ps_psp_pnr.
modify xvbap.
endloop.
ENDIF.
* vbak-zzfield = xxxx-zzfield2.
ENDFORM. "USEREXIT_MOVE_FIELD_TO_VBAK
2009 Apr 07 9:36 AM
Hi Simon,
In the Include, MV45AFZZ go to
FORM USEREXIT_MOVE_FIELD_TO_VBAK.
and put a break point,,
then check XVBAK[] & XVBAP[]
it got the values of PS_PSP_PNR what you want to do with,,
change here, every thing will change as you required,,
do like this,,
loop at xvbap.
xvbap-PS_PSP_PNR = (modifications.)
modify XVBAP.
endloop.
Thanks & regards,
Dileep .C
2009 Apr 07 9:42 AM
Hi,
You can use the user exit FORM userexit_move_field_to_vbap. This is called for each item, so you ca directly use vbap structure to update any field.
If you want to save anything just before the document is saved, then use the xvbap table, which will have all the items and use the FORM userexit_save_document_prepare.
regards,
Advait
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |