Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

USER EXIT OF VA01

Hi,

This is very urgent to me.Pls help in this user exit coding i.e. the requirement is like this?

Exit is V09A0004.

After entering the sold to party in VA01, one pop up comes when we press enter.

In that pop up we can see SH,BP,PY.From that if we select SH and if that SH is having account group 'zjst' then that default values of BP, PY should be override with that SH partner selected.

( All those values should be )

And also user not is able to enter any values in that BP, PY after overriding.

Do we need to modify userexit_save_document_prepare .If how we can do that whole thing.

Pls help me in this.

This is the code I written.

Data GVS_TC_DATA_REC like FRT_DETERMINATED_PARTNERS.

Read table FRT_DETERMINATED_PARTNERS index 1.

Select KUNN2 kunnr vkorg vtweg spat parvw from KNVP into corresponding fields of table t_knvp where kunnr = FRT_DETERMINATED_PARTNERS-kunnr and vkorg = FRT_DETERMINATED_PARTNERS-vkorg and VTWEG = FRT_DETERMINATED_PARTNERS-vtweg and SPART = FRT_DETERMINATED_PARTNERS-spart and PARVW in ('RE','RG').

If sy-subrc = 0.

Sort t_knvp by kunnr vkorg VTWEG SPART.

Endif.

Loop at FRT_DETERMINATED_PARTNERS where KtokD = 'DEBI'.

Clear t_knvp.

Read table t_knvp with key kunnr = FRT_DETERMINATED_PARTNERS-kunnr

Vkorg = FRT_DETERMINATED_PARTNERS-vkorg

VTWEG = FRT_DETERMINATED_PARTNERS-vtweg

SPART = FRT_DETERMINATED_PARTNERS-spart

Binary search.

GVS_TC_DATA_REC-kunn2 = t_knvp-kunn2.

Endloop.

Former Member
Not what you were looking for? View more on this topic or Ask a question