on 10-14-2006 12:44 PM
Hi,
I have the following requirement.
Cass shipment type (VTTK-ADD03) field needs to be required and should be automatically populated upon creation of the shipment document. The rules for populating the value (SO, ST, PO and RA) are as follows:
If any of the orders on the shipment are customer order types, then the CASS shipment type should be a SO,
If all of the orders are STO orders, then the Cass shipment type should be "ST",
If all of the orders are PO orders, then the Cass shipment type should be "PO" , and
If all of the orders are customer return orders, then the Cass shipment type should be "RA".
I have to find out proper user exit / badi to do this.I have tried with many userexit but it won't work.
Thanking in advance to give your suggestion in order to resolve it.
With regards,
Ajit.
Hi this code will enable you to find the user exit for any transaction . Just give the transaction as input
tables : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir.
tables : tstct.
data : jtab like tadir occurs 0 with header line.
data : field1(30).
data : v_devclass like tadir-devclass.
parameters : p_tcode like tstc-tcode obligatory.
select single * from tstc where tcode eq p_tcode.
if sy-subrc eq 0.
select single * from tadir where pgmid = 'R3TR'
and object = 'PROG'
and obj_name = tstc-pgmna.
move : tadir-devclass to v_devclass.
if sy-subrc ne 0.
select single * from trdir where name = tstc-pgmna.
if trdir-subc eq 'F'.
select single * from tfdir where pname = tstc-pgmna.
select single * from enlfdir where funcname =
tfdir-funcname.
select single * from tadir where pgmid = 'R3TR'
and object = 'FUGR'
and obj_name eq enlfdir-area.
move : tadir-devclass to v_devclass.
endif.
endif.
select * from tadir into table jtab
where pgmid = 'R3TR'
and object = 'SMOD'
and devclass = v_devclass.
select single * from tstct where sprsl eq sy-langu and
tcode eq p_tcode.
format color col_positive intensified off.
write:/(19) 'Transaction Code - ',
20(20) p_tcode,
45(50) tstct-ttext.
skip.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Exit Name',
21 sy-vline ,
22 'Description',
95 sy-vline.
write:/(95) sy-uline.
loop at jtab.
select single * from modsapt
where sprsl = sy-langu and
name = jtab-obj_name.
format color col_normal intensified off.
write:/1 sy-vline,
2 jtab-obj_name hotspot on,
21 sy-vline ,
22 modsapt-modtext,
95 sy-vline.
endloop.
write:/(95) sy-uline.
describe table jtab.
skip.
format color col_total intensified on.
write:/ 'No of Exits:' , sy-tfill.
else.
format color col_negative intensified on.
write:/(95) 'No User Exit exists'.
endif.
else.
format color col_negative intensified on.
write:/(95) 'Transaction Code Does Not Exist'.
endif.
at line-selection.
get cursor field field1.
check field1(4) eq 'JTAB'.
set parameter id 'MON' field sy-lisel+1(10).
call transaction 'SMOD' and skip first screen.
*---End of Program
Just for your information the User exits available for VT01n are
MV56AINI Initialization of transaction control for transportation
V56AFCCH Shipment processing: Check function code allowed
V56AGTAR User Exit for Filtering Shipping Unit Calculation
V56ARCHV Customer-spec. checks for archiving shipments
V56ATKTX Change the number of lines for text input in shipment
V56BMOD Transportation processing: Field modification
V56DISTZ Shipment Processing: Determine Distance
V56FCOPY Shipment processing: Copy delivery data
V56FSTAT Shipment processing: Activities when setting a status
V56L0001 Status of Shipments for a Delivery
V56LDELI Read Delivery Data for Shipment Processing
V56LOCID Shipment Processing: Determine Location Identification
V56MVT04 Extensions for Collective Processing of Shipments
V56SLDET Shipment processing: Leg determination
V56TDLIF Filter Delivery Items for Shipment
V56UCHCH Shipment processing: Check whether changes were made
V56UCHCO Check shipments are complete
V56UDLUP Obsolete as of 4.6C: Delivery Update on Delivery Routines
V56UNUMB Shipment number allocation
V56USTAT User-individual definition of transportation planning status
V56USVDO Update new objects for transport
V56USVDP Preparation for updating new objects for transport?
Award points if helpful..
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.