08-26-2010 3:39 PM
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
08-27-2010 8:05 AM
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
08-27-2010 8:05 AM
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
08-27-2010 12:03 PM
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
08-27-2010 12:07 PM
THX for your help
Further question:
Could you give me an example code how to do such an check over the ship-to-parties?
08-27-2010 12:41 PM
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.
08-27-2010 12:44 PM
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