This website is not affiliated with, sponsored by, or approved by SAP AG.

Customer Master user exit

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: thx4allthefish, Snowy, Gothmog, YuriT

Customer Master user exit

Postby Guest » Tue Feb 25, 2003 3:16 pm

I need to copy KNVV-VKGRP to KNA1-KONZS when creating a customer.

Customer Function '001' in SAPMF02D will not work since you can not manipulate the data in KNA1(just pass the data).

How else could this be done?

Thanks

Guest
 

Postby John A. Jarboe » Tue Feb 25, 2003 5:04 pm

There are two ways to do this. In the User exit you can use the assign command to reset the values in the source program. The Function call only exports the KNVV and KNA1 and does not import them then changing the values imported in the customer exit will not work .

THe commands willbe LIKE

FIELD-SYMBOLS: <K1> like KNA1, <k2> like KNVV.
Assign('(SAPMF02D)KNA1') to <k1>.
Assign('(SAPMF02D)KNVV') to <k2>.
<k1>-KONZS = <k2>-VKGRP.

...

You can also activate the business partner function 00001321, 1320
and change the KNA1 record using a function module you write that is RFC enabled and calling it with the option IN UPDATE TASK. The functionmodule will run when the transactionyou are using hits a commit work in the order they were created. the functionmodule would then have to retreive the KNA1 record Change the value and then save the record.
John A. Jarboe
 

Re: Customer Master user exit

Postby mindsumo » Sun Jul 01, 2012 10:08 am

Thanks for sharing that great tip with the field symbols! It's amazing and saves me a lot of troubles.

Phil
mindsumo
 
Posts: 1
Joined: Sun Jul 01, 2012 10:06 am

Re: Customer Master user exit

Postby Gothmog » Mon Jul 02, 2012 2:47 am

It's also quite dangerous, as you can really mess up the data if you're not careful, so use it if you really can't achieve your goal any other way.
Anyway, please avoid raising odl topics from their grave - locked.
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1457
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home


Return to ABAP

Who is online

Users browsing this forum: No registered users and 3 guests




This website is not affiliated with, sponsored by, or approved by SAP AG.