Skip to Content
author's profile photo
Former Member

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.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Oct 11, 2007 at 05:16 PM

    Hi sridhar,

    Pls dont get sad or dont mistake me for asking this....

    im not here to help u for the above msg.....actualy im a beginner in SAP,

    i also facing a problem in User Exit for VA01....

    But my client req'nt is to restrict the line items upto 4 (posnr) as the maximum level....and it has to throw an error while entering 5th item...saying not doable...can creat only 4 item....as a msg....

    Really i dont know the predefined enhancement/or exit.......to declare code in the include program...

    If u know abt this....could u pls reply me the exact one....here,if u feel ok or reply to my email-id sankar1781@gmail.com...

    Pls..Pls...dont mind of asking u this....it;s a critical one for me...

    Hope....u do reply

    thanks & regards

    sankar

    Add comment
    10|10000 characters needed characters exceeded