‎2007 Dec 13 7:29 AM
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.
‎2007 Dec 13 7:42 AM
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.
‎2007 Dec 13 8:02 AM
Hi thanq,
where i have to write this code..
if i goto the particular include it asks KEY ---
‎2007 Dec 13 9:15 AM
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>
‎2007 Dec 13 7:52 AM
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
‎2007 Dec 13 8:01 AM
Hi chiranjit, thanq, but i didnt get the value of sales organization in i_tvta-vkorg , dats y itz not working