Application Development 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: 

User exit for vt02n

Former Member
0 Kudos

hi,

i want to add an user exit to the transactions vt01n / vt02n.

this user exit should give an error message when try create/save an transport

with deliveries with different ship-to-parties.

i think this should be possible in fm EXIT_SAPLV56U_005 but i don't know

how to do this. could anyone give an example code for this or give me an hint how

to do this.

TIA!

strobbel

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

I think right exit is EXIT_SAPLV56U_002.

Create a procect in cmod assigning enhancement V56UCHCO. Save your project an make forward navigation to the include ZXV56U17. Create and implement the include. Activate your project in cmod.

Within the includes make the checks you have to.

In case of error issue error message

MESSAGE Ennn ...

Regards

Michael

5 REPLIES 5

Former Member
0 Kudos

Hi,

I think right exit is EXIT_SAPLV56U_002.

Create a procect in cmod assigning enhancement V56UCHCO. Save your project an make forward navigation to the include ZXV56U17. Create and implement the include. Activate your project in cmod.

Within the includes make the checks you have to.

In case of error issue error message

MESSAGE Ennn ...

Regards

Michael

former_member203501
Active Contributor
0 Kudos

Hi,

Please find the below detailed process:

Go to tcode CMOD

give the project name starting with Z or Y

choose create

fille the short text and save

choose the enhancement assignment and fill the enhancement name save it

and come back activate it.

Then choose the components radio button and choose change then click on the right user exit

it wil takes u to the include and double click on the inclide it will takes u to the editor where we can write our code

regards,

venkat appikonda

Former Member
0 Kudos

THX for your help

Further question:

Could you give me an example code how to do such an check over the ship-to-parties?

0 Kudos

Hi ,

You have the tables in this exit function module, which contail all the data with the fields.

You can directly write your code how you write in reports as below .

select * from dbtab where field = field value from the above tables.

iif sy-subrc = 0.---> check your condition here raise messages in the next statement if required

endif.

then activate the include.

Regards,

Venkat Appikonda.

0 Kudos

Hi again,

a very simple sample:

  • INCLUDE ZXV56U17.

if I_XVTTP[] is initial.

MESSAGE E000(00) WITH 'No Deliveries assigned to Shipment'.

endif.

To check anythin else look into the tables which are transferred to the user exit. Read and checkl the partner data starting from these tables.

Regards

Michael