Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

User - Exit

Former Member
0 Likes
600

Hi all

for VA01 txn, an userexit is der for predefined sold to party.

if i give any kunnr no in userexit(include) i got that no when i am creating a Sales docuement. Itz Okey.

But now i want to the kunnr based on sales doc type(auart) and sales organization(vkorg)

in user exit function module der is import parameters for these two AUART and VKORG in structures I_VTAK& I_VTAT .

Now i wrote d code as follows

IF I_VTAK-AUART = 'OR' and I_VTAT-VKORG = '1000'.

E_KUNNR = '2929'.

ENDIF.

but i didnt get the kunnr value in VA01.

when debug it , i came to know that der is no values stored in the structures i_vtak, and i_vtat..

HOW TO DO THE ABOVE.............

thanks,

sekhar.

5 REPLIES 5
Read only

Former Member
0 Likes
565

Hi,

For populating the partner-kunnr use the form exit USEREXIT_MOVE_FIELD_TO_VBKD in the include MV45AFZZ . Use the following code: Reward points!!!!!1

data : ls_vbpa type vbpa.

read table xvpa into ls_vbpa where parvw = 'sold to party' .

If vbak-aurat = 'OR' and VbAk-VKORG = '1000'.

ls_vbpa-kunnr = '2929'.

modify xvbpa from ls_vbpa index sy-tabix

transporting kunnr.

ENDIF.

clear ls_vbpa.

Read only

0 Likes
565

Hi thanq,

where i have to write this code..

if i goto the particular include it asks KEY ---

Read only

0 Likes
565

Hi sekar,

It wont ask for a access key it just gives a warning, press enter to continue...

If it asks for a developer key, it means your username is not registered as developer, to register contact the basis Guy or ask some abaper to do this for u...

Regards

Karthik D

<b>Reward Points if this is helpful</b>

Read only

0 Likes
565

Hi Sekhar,

I have written the same code in 'ZXVVAU04' and i have got the correct result. Please check the value of sales org. and order type.

I am pasting my lines of code.

IF i_tvak-auart = 'TA' OR I_TVTA-vkorg = 'Z201'.

e_kunnr = '24789'.

ENDIF.

Reward if helpful.

Regards,

Chiranjit

Read only

0 Likes
565

Hi chiranjit, thanq, but i didnt get the value of sales organization in i_tvta-vkorg , dats y itz not working