on 07-24-2013 11:03 AM
Hello,
I'm trying to configure a VT04 variant so that my deliveries are sorted by itinerary in a shipment.
I have defined itinerary in VL51 transaction code, and by that itinerary, I need to sort the deliveries
in a shipment during creation in VT04.
I also need them to show in that order in VT02 t-code.
The problem is that I can't see the itinerary in the sort fields to be chosen in VT04.
I can choose Route Schedule field for the sorting, but it doesn't work like the itinerary.
VL52 - screen:
VT04 variant:
Grouping and sorting:
Data and Options:
Please advise how to accomplish the required sorting option,
if there's no standard way to sort by itinerary then maybe through a user exit...?
Thanks you and regards.
I have found a user exit EXIT_SAPLV56M_002, and include ZXV56U27, which can be used to write code
to populate i_vtrlk structure. This structure later gets copied into vtrlk, and then you can use it in VT04
for custom sorting.
If someone's interested in code here goes:
if sy-tcode EQ 'VT04'.
tables: vark, valw, vawk.
data: zitin like vark-ausl_reih.
data: zwa_i_vtrlk like line of i_vtrlk.
loop at i_vtrlk into zwa_i_vtrlk.
select single ausl_reih from vark into zitin where vark~kunwe EQ zwa_i_vtrlk-kunnr and vark~vstel EQ zwa_i_vtrlk-vstel and vark~aulwe EQ zwa_i_vtrlk-aulwe.
zwa_i_vtrlk-usr01_vblb = zitin.
modify i_vtrlk from zwa_i_vtrlk transporting usr01_vblb.
endloop.
sort i_vtrlk by usr01_vblb ascending.
endif.
I fill the Data1 field, vtrlk-usr01_vblb with itinerary and use it to sort the deliveries in shipment.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
104 | |
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.