Want address pick list
hi can u pls help me with this issue
In sales order there is a ship to sold to party entered manually by the sales order clerk, however this is not reflected in the PICKING SLIP OR PICK LIST. The customer WANTS the ship to party to be printed out in the picking list.
IN the delivery note the "ship to" is printed! The problem is that the warehouse guys want the ship to on the picking slip as well...
with regards
siddhartha
Dear Manish Chaturvedi,
The rows of the pick list show the sales orders. Therefore you have to query the RDR1. In order to know which document is in the pick lists use the pickidno in RDR1 that is the number of the pick list.
If it is NULL it means that the sales order is not in any Pick list.
Regards,
Marcella Rivi
SAP Business One Forums Team
Similar Messages
-
Hi,
for the print of a picking list, the email option is customized (type 5). At some point the real mail sending is done by function module SO_OBJECT_SEND with recipient a string like '&ADU0010200041638INT 001' (determined by function module CONVERT_COMM_TYPE_DATA). In the end the email is sent to a certain person, but where can i find the link between the string and the email adres ? In the ADRC table i cannot find a addressnumber 200041638.
regards,
HansSolved it by my own !
-
Saved data in pick list for parameter
Hi all,
I have a scheduled report that I want to use parameters in. But the trick is that I want the pick list for the parameter to be fetched from the saved data for a specific field in the report.
Any ideas? I am thinking of a dynamic parameter but then how do I only get to choose from actual data in the report?
I am using CR2008 and running the reports on BO XI 3.1
Thanks,
Magnusstore in excel file and use that to pull the values through.
there should be a white paper on this site on how to do that. -
Print Delivery Pick list.
Hello,
As per my business process, I would like to print delivery pick list by transaction VL70. We did created new output type YM00 same as EK00, and assigned YM00 to form (New pick list program).
As of now, we do not have TO created. We just have open Delivery ready for picking. Now i do want to print delivery pick list, so based on Pick list i can start my picking and create a TO, with reference to what i have picked.
Issue - I do not know configuration setup from WM side. What needs to be configured and how to print pick list. I do want my pick list to be printed at storage type level.
I have done setup with NACE in past, But i guess as of now we can not do setup in NACE dues to SAP upgrade. (As i was told)
Can any one help me?
Smit.Hi Smit
if you want setting for EK00 then please follow the below mentioned steps
However looking at your thread it seems you want a picklist which should have the storage type / storage bin detail from where you can pick the stock.if my understanding is correct then you have to create Transfer order against the deliver and look to print the Transfer order detail using T-code LT31
Necessary configuration detail for the same is under node
T-Code : LT31, enter the warehouse, TO number , Print code, Printer and Put a check mark on TO document and press Print button from menu bar (Transfer order option) this will give you the detail of Transfer order (storage type , bin material qty based on which you can do the physical picking from the warehouse) if standard SAP form is not meeting your requirement you can always look for custom form and assign to the above print code -
Restricting Variable Pick List
We have a requirement to restrict the pick list on a hierarchy variable. We currently have 6 hierarchies to choose from (A, B, C, D, E, F). Our requirement is to only display 3 of the hierarchies (A, B, C) in the drop down pick list on selection criteria screen. Is there any way to do this? We do not want to use security to restrict due to the characteristic being used in many other places that would have other security values. We are on BW 70.
I don't see the ability to use a replacement path on a hierarchy variable. I believe I can on the nodes, but I want to limit which hierarchy the user can select. If there are 6 hierarchies on Cost Center (A, B, C, D, E, F) I want the pick list on the selection screen to only display A, B, and C.
Also, how would I create a query to list out the available hierarchies? I think I can only pick one hierarchy to restict a characteristic on, even then I cannot drill down to display it (that I know of). -
Hello Experts,
In our plant we release the Production order even though there is missing part. The pick list contains all the components.
Is there a way to indicate in the pick list if the part is missing?
Regards
TomI am sorry if I was not clear.
I want the pick list to be generated even though there is missing part. But in the pick list that is getting printed, I want the missing part to be mentioned as missing part.
Regards
Tom -
When I use my iPhone Siri for dialing, it is better to have the names in the address book listed singularly. But when I want to print envelopes from the address book in a formal manner - "Mr. & Mrs. Smith". Is there any way to have both options?
Only way I can figure is having double entries one with singular + some unique field, (maybe called Siri), then making a Smart group for one or both.
-
Hi,
Someone knows smartforms and its program for picking list?.
I don't want to use sapscript SD_PICK_COLL and its program RVADSK01.
Thanks very much.
Matteo Vernile.hi,
go through this code.
Program Description: *
A packing list is printed for each outbound delivery. *
Before the delivery is made to a customer the goods are *
packed in a box or any other container and to have a *
list of products put in the package packing list is *
required. This packing list will be printed upon pick *
confirmation or at a time the delivery note is created. *
REPORT z_sd_rep_000002 MESSAGE-ID zdevmsg.
********************TABLES USED***************************************
TABLES: likp, "SD Document: Delivery Header Data
lips, "SD document: Delivery: Item data
vbak, "Sales Document: Header Data
vbpa, "Sales Document: Partner
vbuk, "Sales Document: Header Status and Admin Data
vttp, "Shipment Item
vttk, "Shipment Header,
adrc, "Addresses (Business Address Services)
tvst, "Organizational Unit: Shipping Points
vbfa, "Sales Document Flow
kna1, "General Data in Customer Master
vepo, "Packing: Handling Unit Item (Contents)
vekp. "Handling Unit - Header Table
INCLUDE rvadtabl.
********************WORK AREA*****************************************
DATA : wa_zpacklist TYPE zpacklist, "structure to hold all the data
"that has to be passed to the
"smart form
wa_item TYPE LINE OF zitempack."workarea of main item struct
DATA : wa_item_lips TYPE LINE OF zitempack."wrkarea for data selected
"from LIPS table
********************INTERNAL TABLE************************************
DATA : i_item_lips TYPE zitempack, "Internal table for data
"selected from LIPS table
i_item TYPE zitempack. "main internal table for
"items data.
*****************************CONSTANTS********************************
CONSTANTS : c_posnn(1) TYPE c VALUE 'J',
YATHAM6 Insert Begin
c_vbtyp_v(1) type c VALUE 'C',
YATHAM6 Insert End
c_parvw_stp TYPE vbpa-parvw VALUE 'AG',
c_parvw_shp TYPE vbpa-parvw VALUE 'WE',
c_formname TYPE tdsfname VALUE 'Z_PACKINGLIST',
c_zdevmsg TYPE SY-MSGID value 'ZDEVMSG',
c_e TYPE SY-MSGTY VALUE 'E',
c_000 TYPE SY-MSGNO VALUE '000',
c_X(1) TYPE c VALUE 'X',
c_fully_picked(1) TYPE c VALUE 'C'.
***************************GLOBAL VARIABLE****************************
DATA : v_objnm LIKE thead-tdname,
v_tknum_tmp LIKE vttp-tknum,
v_formname TYPE rs38l_fnam,
v_venum TYPE vekp-venum,
v_screen, "Output on printer or screen
v_picked(1).
************************MAIN PROGRAM ***********************************
FORM entry USING return_code us_screen.
DATA: v_retcode TYPE sy-subrc.
CLEAR v_retcode.
Clear any previous data.
CLEAR wa_zpacklist.
v_screen = us_screen.
Check whether the Delivery number is already been picked.If it is
picked the set the print parameters
PERFORM processing USING us_screen
CHANGING v_retcode.
IF v_retcode NE 0.
return_code = 1.
ELSE.
return_code = 0.
ENDIF.
ENDFORM. "ENTRY
*& Form PROCESSING
Check whether the Delivery number is already been picked.If it is
picked the set the print parameters
FORM processing USING us_screen
CHANGING v_retcode.
DATA: v_fm_name TYPE rs38l_fnam.
DATA: v_control_param TYPE ssfctrlop.
DATA: v_composer_param TYPE ssfcompop.
DATA: v_recipient TYPE swotobjid.
DATA: v_sender TYPE swotobjid.
DATA: v_formname TYPE tdsfname .
get SmartForm from customizing table TNAPR
v_formname = tnapr-sform.
Check whether the delivery number has been picked.If it is picked
select the relevant data for that delivery number
PERFORM get_data CHANGING v_retcode.
CHECK v_retcode EQ 0.
Set the print parameters for Smartform
PERFORM set_print_param CHANGING v_control_param
v_composer_param
v_recipient
v_sender
v_retcode.
Check whether the Smart form exists.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = c_formname
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
fm_name = v_formname
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
IF sy-subrc <> 0.
v_retcode = sy-subrc.
PERFORM protocol_update.
ENDIF.
Check the structure wa_zpacklist for data.
IF NOT wa_zpacklist IS INITIAL.
CALL FUNCTION v_formname
EXPORTING
archive_index = toa_dara
archive_parameters = arc_params
control_parameters = v_control_param
mail_recipient = v_recipient
mail_sender = v_sender
output_options = v_composer_param
user_settings = ' '
wa_zpacklist = wa_zpacklist
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5. .
IF sy-subrc <> 0.
error handling
v_retcode = sy-subrc.
PERFORM protocol_update.
ENDIF.
ELSE.
IF v_screen = space.
CALL FUNCTION 'NAST_PROTOCOL_INIT_AND_LOAD'
EXPORTING
cps_nast = nast.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = c_ZDEVMSG
msg_nr = c_000
msg_ty = c_E
msg_v1 = syst-msgv1
msg_v2 = syst-msgv2
msg_v3 = syst-msgv3
msg_v4 = syst-msgv4
EXCEPTIONS
OTHERS = 1.
ELSE.
MESSAGE e000 WITH 'No Data Exists, to Display Output'(002).
ENDIF. " IF v_screen = space.
ENDIF. " if not wa_zpacklist[] is initial
ENDFORM. " PROCESSING
*& Form get_data
Check whether the delivery number has been picked.If it is picked
select the relevant data for that delivery number
FORM get_data CHANGING v_retcode.
This is the Input obtained from the NAST entry, Delivery Number
wa_zpacklist-vbeln = nast-objky.
CLEAR v_picked.
Check if the Delivery has Not been Picked, if not then Do Not Display
the Layout and display an Error Message
CLEAR vbuk.
SELECT SINGLE kostk
FROM vbuk
INTO vbuk-kostk
WHERE vbeln EQ wa_zpacklist-vbeln.
The Picking should Not be Processed, Else Display a Msg
IF vbuk-kostk NE c_fully_picked AND vbuk-kostk NE space.
v_picked = c_X.
v_retcode = 1.
IF v_screen = space.
CALL FUNCTION 'NAST_PROTOCOL_INIT_AND_LOAD'
EXPORTING
cps_nast = nast.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = c_ZDEVMSG
msg_nr = c_000
msg_ty = c_E
msg_v1 = syst-msgv1
msg_v2 = syst-msgv2
msg_v3 = syst-msgv3
msg_v4 = syst-msgv4
EXCEPTIONS
OTHERS = 1.
ELSE.
MESSAGE e000 WITH
'Delivery has not been Picked-Please Check'(001).
ENDIF.
ENDIF.
CHECK v_retcode = 0.
get all the header related data from LIKP,VBAK,VBFA,VTTP,VTTK
PERFORM get_header_data.
get the address numbers for shipping point ,ship-to-party and
sold-to-party from VBFA,TVST tables
PERFORM get_addr_no.
get all the item details from VBAP ,LIPS
PERFORM get_item_data.
ENDFORM. " get_data
*& Form get_header_data
Get all the header related data from LIKP,VBAK,VBFA,VTTP,VTTK
FORM get_header_data.
select the header data from LIKP based on Delivery number.
select the following fields and put it into workarea wa_zpacklist.
SELECT SINGLE vbeln "Delivery number
kunnr "Sold to party
kunag "Shipt to party
inco1 "Inco term
inco2 "Inco term 2
btgew "Total Weight
gewei "Net weight
anzpk "Total noumber of packages in delivery
vkorg "Sales Organization
vstel "Shipping Point/Receiving Point
bldat "Date on which the Docu. was created
FROM likp
INTO CORRESPONDING FIELDS OF wa_zpacklist
WHERE vbeln = wa_zpacklist-vbeln.
to get Purchase order number (BSTNK),
Sales order number (VBELV),
Contract number (VBELN_GRP),
Customer order date first get the Sales document from VBFA
using Delivery number (LIKP-VBELN) and VBTYP_N in the where clause.
YATHAM6 Del Begin - D47K910351 05/12/2004
SELECT SINGLE vbelv "Sales Document
INTO wa_zpacklist-vbelv
FROM vbfa
WHERE vbeln = wa_zpacklist-vbeln
AND vbtyp_n = c_posnn
YATHAM6 Insert Begin - 04/15/2004
Preceding Document category only Order need to be selected
Without this it is selecting Quote and/or Inquiry because of
Select single (Which would select the first entry)
AND vbtyp_v = c_vbtyp_v.
YATHAM6 Insert End - 04/15/2004
YATHAM6 Del End - D47K910351 05/12/2004
YATHAM6 Insert Begin - D47K910351 05/12/2004
When a Sales order is created with reference to another sales order
two precding document categorys will be available for a delivery.
Example: Order with subsequent delivery free of charge
Need to get latest preceding document. This change was made to pull
correct preceding document which will be on delivery line item.
All delivery items will have the same preceding document number.
select single vgbel from lips into wa_zpacklist-vbelv
where vbeln = wa_zpacklist-vbeln.
YATHAM6 Insert End - D47K910351 05/12/2004
SELECT SINGLE bstnk "Customer purchase order number
vbeln_grp "Master Contract NUmber
bstdk "Customer Order date
INTO (wa_zpacklist-bstnk,
wa_zpacklist-vbeln_grp,
wa_zpacklist-bstdk)
FROM vbak
WHERE vbeln = wa_zpacklist-vbelv.
select shipment number from VTTP table using wa_zpaclist-vbeln in the
where clause.
SELECT tknum "Shipment Number
FROM vttp
UP TO 1 ROWS
INTO wa_zpacklist-tknum_tmp
WHERE vbeln = wa_zpacklist-vbeln.
ENDSELECT.
for this value of wa_zpacklist-tknum_tmp select
External identification 2
Shipping type
Number of forwarding agent
from VTTK
SELECT SINGLE exti2 "External identification 2
vsart "Shipping type
tdlnr "Number of forwarding agent
INTO (wa_zpacklist-exti2,
wa_zpacklist-vsart,
wa_zpacklist-tdlnr)
FROM vttk
WHERE tknum = wa_zpacklist-tknum_tmp.
get the packing date from VEkP table for which Internal Handling
Unit Number(VENUM) is required from VEPO table.
get the value from VEPO table for the delivery number.
SELECT venum
UP TO 1 ROWS
FROM vepo
INTO v_venum
WHERE vbeln = wa_zpacklist-vbeln.
EXIT.
ENDSELECT.
CHECK sy-subrc = 0.
SELECT SINGLE erdat
FROM vekp
INTO wa_zpacklist-erdat
WHERE venum = v_venum.
ENDFORM. " get_header
*& Form get_item
Get all the item details from VBAP ,LIPS
FORM get_item_data.
refresh the internal tables of item data.
data: v_tabix like sy-tabix. "YATHAM6 Insert 03/31/2004
REFRESH : i_item,
i_item_lips.
get the item details from VBAP table based on the sales document
number(VBELV) and store the data in i_item
SELECT posnr "Sales Document Item
posex "Item Number of the Underlying Purchase
"Order
kwmeng "Quantity Ordered
kdmat "Customer Item Number
INTO CORRESPONDING FIELDS OF
TABLE i_item
FROM vbap
WHERE vbeln EQ wa_zpacklist-vbelv.
get the item details from LIPS based on Delivery number and
ZZCATNO(Catalog numer)from mara using an inner join between LIPS and
MARA using matnr as key
*Begin of GONAGUNTLA2 - @0001 02/11/2004 D47K906487
SELECT a~vbeln "Delivery Number
a~vtweg "Distribution Channel
a~posnr "Delivery item
a~lfimg "Actual quantity delivered (in sales units)
a~matnr "Material Number
b~zzcatno "Catlog Number for each material
FROM lips AS a
INNER JOIN
mara AS b
ON amatnr = bmatnr
INTO CORRESPONDING FIELDS OF
TABLE i_item_lips
WHERE a~vbeln = wa_zpacklist-vbeln.
SELECT a~vbeln "Delivery Number
a~vtweg "Distribution Channel
a~posnr "Delivery item
a~pstyv "Delivery item category
a~lfimg
"Actual quantity delivered (in sales units)
a~matnr "Material Number
a~uepos
"Higher-level item in bill of material structures
a~vgpos "Sales order line item
b~zzcatno "Catlog Number for each material
FROM lips AS a
INNER JOIN
mara AS b
ON amatnr = bmatnr
INTO CORRESPONDING FIELDS OF
TABLE i_item_lips
WHERE a~vbeln = wa_zpacklist-vbeln.
*End of GONAGUNTLA2 - @0001 02/11/2004 D47K906487
clear the workareas
CLEAR : wa_item,
wa_item_lips.
loop at the main internal table which contains the item data.
so that the data in the internal table i_item_lips is passed in the
i_item table
LOOP AT i_item INTO wa_item.
v_tabix = sy-tabix. "YATHAM6 Insert 03/31/2004
read the internal table i_item_lips for key Item Number(POSNR)
because the only link between the LIPS table and VBAP table is
(POSNR) for the same delivery number.
*Begin of GONAGUNTLA2 - @0001 02/12/2004
READ TABLE i_item_lips
INTO wa_item_lips
WITH KEY posnr = wa_item-posnr.
READ TABLE i_item_lips
INTO wa_item_lips
WITH KEY vgpos = wa_item-posnr.
*End of GONAGUNTLA2 - @0001 02/12/2004
check whether the same POSNR value is there in the I_item_lips table
IF sy-subrc = 0.
*Begin of GONAGUNTLA2 - @0001 02/12/2004
perform get_previous_del_qty using wa_zpacklist-vbelv
wa_item_lips-vgpos
wa_item_lips-vbeln
wa_item_lips-posnr
wa_item-kwmeng.
move wa_item-kwmeng to wa_item_lips-kwmeng.
*End of GONAGUNTLA2 - @0001 02/12/2004
to find out the Back Orders subtract Ordered Qty (KWMENG)
with Actual Qty (LFIMG)
wa_item_lips-zbkord = wa_item-kwmeng - wa_item_lips-lfimg.
Begin of Modifications - YATHAM6 12/15/2003
if wa_item-posex is not blank the repace wa_item-posnr with it.If *
it is not blank then don't do anything.
IF NOT wa_item-posex IS INITIAL.
MOVE wa_item-posex TO wa_item_lips-posnr .
ENDIF. "if not wa_item-posex is initial.
If wa_item-posex is initial.
Begin of GONAGUNTLA2 - @0001 02/12/2004
move wa_item-posnr to wa_item_lips-posex.
move wa_item_lips-posnr to wa_item_lips-posex.
*End of GONAGUNTLA2 - @0001 02/12/2004
else.
move wa_item-posex to wa_item_lips-posex.
endif.
End of Modifications - YATHAM6 12/15/2003
modify the internal table i_item by transporting VBELN LFIMG ZCALC.
*Begin of GONAGUNTLA2 - @0001 02/11/2004 D47K906487
MODIFY i_item FROM wa_item_lips
TRANSPORTING vbeln "Delivery Number
posnr "Delivery item
posex " YATHAM6 Insert
*lfimg "Actual Quantity Delivered
zbkord "Back Order
zzcatno "Catlog Number
matnr "Material Number
vtweg
WHERE posnr = wa_item-posnr.
MODIFY i_item FROM wa_item_lips "YATHAM6 Del 03/31/2004
MODIFY i_item FROM wa_item_lips index v_tabix
TRANSPORTING vbeln "Delivery Number
posnr "Delivery item
posex " YATHAM6 Insert
KWMENG
" gonaguntla2 Insert
lfimg
"Actual Quantity Delivered
zbkord "Back Order
zzcatno "Catlog Number
matnr "Material Number
vtweg
uepos
pstyv.
*Table i_item should be updated with the corresponding entry not with
*the
item number.
WHERE posnr = wa_item-posnr. "YATHAM6 Del
else.
YATHAM6 Mod Begin - 04/22/2004
Delete the Current row instead of item. Because the Delivery item
sequence could be different than that of the Sales Order item #.
delete i_item where posnr = wa_item-posnr.
delete i_item index v_tabix.
YATHAM6 Mod End - 04/22/2004
*End of GONAGUNTLA2 - @0001 02/11/2004 D47K906487
ENDIF. " if sy-subrc = 0.
ENDLOOP. "loop at i_item
now once the i_item internal table is full
check it.
IF NOT i_item[] IS INITIAL.
sort i_item[] by vbeln descending posex. "YATHAM6 Insert
move the data from i_item into the structure wa_zpacklist.
wa_zpacklist-zitempack_tb[] = i_item[].
ENDIF. "if not i_item[] is initial.
ENDFORM. " get_item
*& Form get_addr
text
Get the address numbers for shipping point ,ship-to-party and
sold-to-party from VBFA,TVST tables
FORM get_addr_no .
To find out the addresses of sold-to-party, goto table VBPA select
the address number ADRNR
SELECT SINGLE adrnr "Address Number
INTO wa_zpacklist-adrnrstp
FROM vbpa
YATHAM6 Mod Begin - 04/15/2004
Get the address numbers for the Delivery instead of Sales order
WHERE vbeln = wa_zpacklist-vbelv
WHERE vbeln = wa_zpacklist-vbeln
YATHAM6 Mod End - 04/15/2004
AND parvw = c_parvw_stp.
To find out the addresses of ship-to-party, goto table VBPA select
the address number ADRNR
SELECT SINGLE adrnr "Address Number
INTO wa_zpacklist-adrnrshp
FROM vbpa
YATHAM6 Mod Begin - 04/15/2004
Get the address numbers for the Delivery instead of Sales order
WHERE vbeln = wa_zpacklist-vbelv
WHERE vbeln = wa_zpacklist-vbeln
YATHAM6 Mod End - 04/15/2004
AND parvw = c_parvw_shp.
To select the addresses for Shipping point find out the address *
number from TVST table .
SELECT SINGLE adrnr "Address Number
INTO wa_zpacklist-adrnr
FROM tvst
WHERE vstel = wa_zpacklist-vstel.
ENDFORM. " get_addr
*& Form set_print_param
Set the print paramters for the smartform
FORM set_print_param CHANGING v_control_param TYPE ssfctrlop
v_composer_param TYPE ssfcompop
v_recipient TYPE swotobjid
v_sender TYPE swotobjid
v_retcode TYPE sy-subrc.
DATA: v_itcpo TYPE itcpo.
DATA: v_repid TYPE sy-repid.
DATA: v_device TYPE tddevice.
v_repid = sy-repid.
CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'
EXPORTING
pi_nast = nast
pi_repid = v_repid
IMPORTING
pe_returncode = v_retcode
pe_itcpo = v_itcpo
pe_device = v_device
pe_recipient = v_recipient
pe_sender = v_sender.
IF v_retcode = 0.
MOVE-CORRESPONDING v_itcpo TO v_composer_param.
v_control_param-device = v_device.
v_control_param-no_dialog = c_X.
v_control_param-preview = v_screen.
v_control_param-getotf = v_itcpo-tdgetotf.
v_control_param-langu = nast-spras.
ENDIF.
ENDFORM. " set_print_param
*& Form protocol_update
text
Error Handling
FORM protocol_update .
CHECK v_screen = space.
CALL FUNCTION 'NAST_PROTOCOL_UPDATE'
EXPORTING
msg_arbgb = syst-msgid
msg_nr = syst-msgno
msg_ty = syst-msgty
msg_v1 = syst-msgv1
msg_v2 = syst-msgv2
msg_v3 = syst-msgv3
msg_v4 = syst-msgv4
EXCEPTIONS
OTHERS = 1.
ENDFORM. " protocol_update
*& Form get_previous_del_qty
text
--> p1 text
<-- p2 text
FORM get_previous_del_qty using f_so
f_so_item
f_del
f_del_item
f_so_qty.
data: begin of i_vbfa_tab occurs 0,
vbeln like vbfa-vbeln,
posnn like vbfa-posnn,
end of i_vbfa_tab.
data: fv_lfimg like lips-lfimg.
select vbeln posnn into table i_vbfa_tab from vbfa
where vbelv eq f_so
and posnv eq f_so_item
and vbtyp_n eq 'J'.
loop at i_vbfa_tab.
if i_vbfa_tab-vbeln ne f_del.
clear fv_lfimg.
select single lfimg into fv_lfimg
from lips
where vbeln eq i_vbfa_tab-vbeln
and posnr eq i_vbfa_tab-posnn.
f_so_qty = f_so_qty - fv_lfimg.
endif.
endloop.
ENDFORM. " get_previous_del_qty -
Delivery Notes Generation Via Pick List
Am trying to generate delivery notes off pick tickets and i can't find any code example. I now came up with the following code but am having issues when items are in multiple Bin Locations.
Public Sub Sales2Delivery() '(ByVal OrderID As String)
Dim OrderID As String = ""
Try
Using connection As New SqlConnection(StaginConn)
'Dim command As New SqlCommand("SELECT DocEntry from ORDR with (nolock) WHERE NumAtCard = '" & OrderID & "'", connection)
Dim command As New SqlCommand("SET DATEFORMAT DMY; select distinct top 5 o.DocEntry, o.NumAtCard from ordr O with (nolock) join RDR1 R with (nolock) on R.DocEntry = O.DocEntry join OPKL P with (nolock) on P.AbsEntry = R.PickIdNo where u_shipstate = 'Delivered' and CAST(O.docdate as date) >= '30/04/2014' and P.Status = 'Y';", connection)
connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader()
' Call Read before accessing data.
While reader.Read()
Dim BusinessOrders As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oOrders), Documents)
Dim BusinessDelivery As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oDeliveryNotes), Documents)
Dim orders As Documents = BusinessOrders
orders.GetByKey(Convert.ToInt32(reader(0)))
OrderID = Convert.ToString(reader(1))
Dim Delivery As Documents = BusinessDelivery
Delivery.CardCode = orders.CardCode
Delivery.CardName = orders.CardName
Delivery.NumAtCard = orders.NumAtCard
'Delivery.DocNum = orders.DocNum
Delivery.HandWritten = BoYesNoEnum.tNO
Delivery.Series = 8
Delivery.DocDate = DateTime.Today
Delivery.DocDueDate = DateTime.Today
Delivery.TaxDate = DateTime.Today
Delivery.Address = orders.Address
Delivery.Address2 = orders.Address2
Delivery.Comments = "Based on Sales Order #" + orders.NumAtCard & "."
Delivery.DocCurrency = orders.DocCurrency
Delivery.DocDueDate = orders.DocDueDate
Delivery.DocObjectCode = SAPbobsCOM.BoObjectTypes.oDeliveryNotes
Delivery.ShipToCode = orders.ShipToCode
Dim lines As Document_Lines = orders.Lines
'If (count > 0) Then
' lines.Add()
' lines.SetCurrentLine((lines.Count - 1))
'End If
Dim oPickList As PickLists = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oPickLists), PickLists)
oPickList.GetByKey(orders.Lines.PickListIdNumber)
For i As Int32 = 0 To (lines.Count - 1)
If i > 0 Then
Delivery.Lines.Add()
Delivery.Lines.SetCurrentLine(i)
End If
' Set the Current Lines on the order
orders.Lines.SetCurrentLine(i)
Try
oPickList.Lines.SetCurrentLine(i)
Delivery.Lines.BaseEntry = oPickList.Lines.OrderEntry
Delivery.Lines.BaseLine = oPickList.Lines.OrderRowID
Delivery.Lines.Quantity = oPickList.Lines.PickedQuantity
Delivery.Lines.BaseType = DirectCast(SAPbobsCOM.BoObjectTypes.oOrders, Integer)
Delivery.Lines.BinAllocations.BinAbsEntry = oPickList.Lines.BinAllocations.BinAbsEntry
Dim rs As SAPbobsCOM.Recordset = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
rs.DoQuery("select itemcode, price, dscription from RDR1 R where R.LineNum = " & oPickList.Lines.OrderRowID & " and R.PickIdNo = " & oPickList.Lines.AbsoluteEntry)
While (rs.EoF <> True)
Delivery.Lines.ItemCode = rs.Fields.Item(0).Value.ToString 'orders.Lines.ItemCode
Delivery.Lines.UnitPrice = CType(rs.Fields.Item(1).Value.ToString, Double) 'orders.Lines.UnitPrice
Delivery.Lines.ItemDescription = rs.Fields.Item(2).Value.ToString 'orders.Lines.ItemDescription
rs.MoveNext()
End While
rs = Nothing
Catch ex As Exception
Continue For
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
End Try
Next
If Delivery.Add() <> 0 Then
ErrDetails.AppendLine(" Unable to create Delivery note for Order: " & OrderID & " <br /> " & vCompany.GetLastErrorCode() & ":" & vCompany.GetLastErrorDescription())
Else
ErrDetails.AppendLine("Successfully created Delivery note for Order:" & OrderID) ' & " as requested by " & UserEmail & ".")
End If
orders = Nothing
Delivery = Nothing
BusinessOrders = Nothing
BusinessDelivery = Nothing
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
End While
'orders = Nothing
'BusinessOrders = Nothing
End Using
Catch ex As Exception
ErrDetails.AppendLine(" Error generating Delivery note for Order: " & OrderID & " <br /> " & ex.ToString())
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
Finally
If Not String.IsNullOrWhiteSpace(ErrDetails.ToString) Then
My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Errors encountered while registering data on " & System.DateTime.Now.ToString("F") & ".Errors:" & ChrW(13) & ChrW(10) & Me.ErrDetails.ToString), True)
Else
My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Application Ran successfully on " & System.DateTime.Now.ToString("F") & "."), True)
End If
End Try
End Sub
The Error message am getting is 1470000368 - The quantity allocated to bin locations must be positive.Am getting this error now is
"1470000341 - Fully allocate item "1017494" to bin locations in warehouse "Isolo". Issue is we have items in multiple Bin locations and the items have been picked via the pick ticket. Is it also possible to generate the delivery note off the Pick List.
The new code am using is
Public Sub Sales2Delivery() '(ByVal OrderID As String)
Dim OrderID As String = ""
Try
Using connection As New SqlConnection(StaginConn)
'Dim command As New SqlCommand("SELECT DocEntry from ORDR with (nolock) WHERE NumAtCard = '" & OrderID & "'", connection)
Dim command As New SqlCommand("SET DATEFORMAT DMY; select distinct top 5 o.DocEntry, o.NumAtCard from ordr O with (nolock) join RDR1 R with (nolock) on R.DocEntry = O.DocEntry join OPKL P with (nolock) on P.AbsEntry = R.PickIdNo where u_shipstate = 'Delivered' and CAST(O.docdate as date) >= '30/04/2014' and P.Status = 'Y' and o.DocStatus = 'O';", connection)
connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader()
' Call Read before accessing data.
While reader.Read()
Dim BusinessOrders As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oOrders), Documents)
Dim BusinessDelivery As Documents = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oDeliveryNotes), Documents)
Dim orders As Documents = BusinessOrders
orders.GetByKey(Convert.ToInt32(reader(0)))
OrderID = Convert.ToString(reader(1))
Dim Delivery As Documents = BusinessDelivery
Delivery.CardCode = orders.CardCode
Delivery.CardName = orders.CardName
Delivery.NumAtCard = orders.NumAtCard
'Delivery.DocNum = orders.DocNum
Delivery.HandWritten = BoYesNoEnum.tNO
'Delivery.Series = 8
Delivery.DocDate = DateTime.Today
Delivery.DocDueDate = DateTime.Today
Delivery.TaxDate = DateTime.Today
Delivery.Address = orders.Address
Delivery.Address2 = orders.Address2
Delivery.Comments = "Based on Sales Order #" + orders.NumAtCard & "."
Delivery.DocCurrency = orders.DocCurrency
Delivery.DocDueDate = orders.DocDueDate
Delivery.DocObjectCode = SAPbobsCOM.BoObjectTypes.oDeliveryNotes
Delivery.ShipToCode = orders.ShipToCode
Dim lines As Document_Lines = orders.Lines
'If (count > 0) Then
' lines.Add()
' lines.SetCurrentLine((lines.Count - 1))
'End If
Dim oPickList As PickLists = DirectCast(vCompany.GetBusinessObject(BoObjectTypes.oPickLists), PickLists)
oPickList.GetByKey(orders.Lines.PickListIdNumber)
For i As Int32 = 0 To (lines.Count - 1)
If i > 0 Then
Delivery.Lines.Add()
Delivery.Lines.SetCurrentLine(i)
End If
' Set the Current Lines on the order
orders.Lines.SetCurrentLine(i)
Try
oPickList.Lines.SetCurrentLine(i)
Delivery.Lines.BaseEntry = oPickList.Lines.OrderEntry
Delivery.Lines.BaseLine = oPickList.Lines.OrderRowID
Delivery.Lines.Quantity = oPickList.Lines.PickedQuantity
Delivery.Lines.BaseType = DirectCast(SAPbobsCOM.BoObjectTypes.oOrders, Integer)
'Dim rs As SAPbobsCOM.Recordset = vCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
'rs.DoQuery("select itemcode, price, dscription from RDR1 R where R.LineNum = " & oPickList.Lines.OrderRowID & " and R.PickIdNo = " & oPickList.Lines.AbsoluteEntry)
'While (rs.EoF <> True)
Delivery.Lines.ItemCode = orders.Lines.ItemCode
Delivery.Lines.UnitPrice = orders.Lines.UnitPrice
Delivery.Lines.ItemDescription = orders.Lines.ItemDescription
' rs.MoveNext()
' End While
'rs = Nothing
Catch ex As Exception
Continue For
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
End Try
Next
If Delivery.Add() <> 0 Then
ErrDetails.AppendLine(" Unable to create Delivery note for Order: " & OrderID & " <br /> " & vCompany.GetLastErrorCode() & ":" & vCompany.GetLastErrorDescription())
Else
ErrDetails.AppendLine("Successfully created Delivery note for Order:" & OrderID) ' & " as requested by " & UserEmail & ".")
End If
orders = Nothing
Delivery = Nothing
BusinessOrders = Nothing
BusinessDelivery = Nothing
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
End While
'orders = Nothing
'BusinessOrders = Nothing
End Using
Catch ex As Exception
ErrDetails.AppendLine(" Error generating Delivery note for Order: " & OrderID & " <br /> " & ex.ToString())
My.Computer.FileSystem.WriteAllText(_LogPath, ErrDetails.ToString, True)
Finally
If Not String.IsNullOrWhiteSpace(ErrDetails.ToString) Then
My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Errors encountered while registering data on " & System.DateTime.Now.ToString("F") & ".Errors:" & ChrW(13) & ChrW(10) & Me.ErrDetails.ToString), True)
Else
My.Computer.FileSystem.WriteAllText(_LogPath, (ChrW(13) & ChrW(10) & ChrW(13) & ChrW(10) & "Application Ran successfully on " & System.DateTime.Now.ToString("F") & "."), True)
End If
End Try
End Sub -
BW Hierarchies sometimes not showing as pick list
Hi,
we have created a Crystal Report that uses a parameter that should be picked from a BW hierarchy (a cost center group). We created the report and published it via the BW publisher to BO and then included it with an iView in the BW Portal.
Now when I log on to the portal and call the report, I'm presented with the static pick list (top 200 values) most of the time instead of the hierarchy view (as described in http://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsandBWquery+elements in the lower part of the article)
When I then log on to the CMC and call the report there, I first get the flat list, too, but when I call the report 2 or 3 times, I get the hierarchy view. When I now go back to the BW Portal, I get thet hierarchy view there as well...
any idea what causes this issue? How can I influence which selection screen is being displayed? (particularly as I don't want everyone to have to log on to CMC first...)
Thanks...Hi Duncan,
thank you for your reply. It's really sort of tricky.
After the pick list is up and ready once, It'll be shown fine from that point on until, I assume, my CMC login expires.
So maybe it's some permission problem?
I just tested the following:
<ul>
<li>log into portal, call report -> flat list
<li>log into CMC -> call report (does not have to be the same, just has to have a hierarchy pick list, a simple report does not do the trick) -> check that it has the hierarchy pick list
<li>go back to the portal, call the report again -> hierarchy pick list comes up ok
<li>log off from CMC
<li>go back to the portal, call the report again -> flat list again...
</ul>
the whole thing works the same when I replace CMC by InfoView. The strange thing is that I have to log in to Infoview the first time I call the report from the portal (even though we have SAP credentials in BO), but this does not seem to be sufficient. I have to call one of the reports in Infoview or CMC first to make it work from the portal.
Concerning the trace, I'll have to look into this together with our sysadmins, but I'll see what I can get.
Thanks again for your ideas,
cheers
MU -
Problem in generation of Picking list
Hi friends,
The scenario: Picking list is printed as soon as the delivery is saved. The program and layout are working fine.
Example: let a delivery is being saved with reference to a sales order with only one line item ( for simplicity), and let the quantity to be delivered that is delivery quantity (LIPSD-G_LFIMG, on screen) be 2, now there are three cases:
1. before saving the delivery if NO Picking quantity (LIPSD-PIKMG, on screen) is entered, The picking list is printed, here the field VBUP-KOSTA (picking status field) is having value 'A', and field VBUK-KOSTK(Overall Picking status)is also having value 'A', and the picking list is printed.
2. before saving the delivery if Picking quantity (LIPSD-PIKMG, on screen) is entered as 1, the field VBUP-KOSTA (picking status field) is having value 'B', and field VBUK-KOSTK( Overall Picking status) is also having value 'B', and the picking list is printed.
3. before saving the delivery if Picking quantity (LIPSD-PIKMG, on screen) is entered as 2, the field VBUP-KOSTA (picking status field) is having value 'C', and field VBUK-KOSTK( Overall Picking status) is also having value 'C', and the picking list is NOT printed.
I think the check is only done on VBUK-KOSTK for the picking list print, as in case 3, i changed the value of VBUK-KOSTK back to 'A' by using the user exit USEREXIT_SET_STATUS_VBUK in include LV45P079 as a result of which the picking list was printed, but it also stored the VBUK-KOSTK value as 'A' in the database table which is undesirable, as it should be saved with its earlier value, before it was explicitly made 'A'.
So, my requirement is to Print the picking list, even if the delivery quantity and picking quantity is same for any number of line items.
How can i solve this problem?? Speedy help requested.
thanks,
Sharon.Hi Sharon,
Looks like you need this pick list no matter what the status of the document is and what the picking relevancy is. Why don't you create an output type that is assigned to the document all the time and then create this form as it is. If you are trying to use the standard output type and standard form and standard routine, then system is going to behave the standard way, that is to create a pick list when it is relevant for picking and only if the status is not complete. The system logic is that a pick list is supposed to tell your warehouse as to what needs to be picked and if there is nothing to be picked or if the item not relevant for the picking then it doesn't need to be there on this list.
So if you want a list similar to the pick list, have the logic replicated minus the pre-conditions about picking status etc, have the form copied and then create and assign it to a new output type.
Regards,
Srinivas -
Picking list grouping issue.
When we print a picking list for deliveries we get the list grouped by material. So for example, if the delivery item 10 and 40 both have the same material then item 10 and 40 will be printed one after the other. So far all is okay, except that when the materials are the same the material details are not printed for the second line item. I think this is controlled by the SAP print program that probably is not calling the 'MAT_LINE' process.
Now there is a sneaky way around this, by maybe adding the MAT_LINE details into the POS_LINE process so that when the process for POS_LINE is called, which it is in all events, then the material and pos details are printed. However, I should not have to do this.
I was wondering if there was anyway to control the grouping. I still want the materials to be grouped, as that makes sense for the pickers, but I want to see the material details on the list and not have them supressed because it's the same as the material above.
JasonMoved element Item_line content into the POS_line element and remarked out the item_line element. All now works.
-
Infoview pick list values and CR parameter values are not the same
Hello All
We have created created Crystal Reports based upon BW Query using Static Parameters as recomended by SAP. When we run the query in InfoView the Pick List is dynamically updated and returns the correct data for selection. When The Crystal Report opens and you wish to navigate through the report using the parameter selection the selection criteria has not been maintained by BW and does not match the Pick List.
Can you please advise if there is any way to make this work?
We ar using Crystal Reports 2008 version 12.3.1.684
on BOBJ XI 3.1
Any help would be appreciated,
PhillipHello Ingo
What is strange that in InfoView the pick list is only dynamic the Parameters when the document is open (in InfoView) are not dynamic. An example would be Searching on Material. In Info view the pick list provides all the materials to select from. Once though the report is open the parameter list on the left hand side could be seen as blank as it refers to the static list that is not manually maintained within Crystal Reports or provide a list of details that has no reference to the dynamic selection as returned from BW as it is a static list that was loaded with Crystal Reports Designer on creation.
What we are wanting to achieve is that Info View Pick List is Dynamic and the Parameter list that can be used to navigate within the document once opened is dynamically refreshed to be the same as the Pick List provided by BW and InfoView.
Is this possible?
With CR Designer if we use Do Not Show, Info View no longer provides this parameter on the left hand side.
If we use Editable the list provided in InfoView is equal to the static list as maintained within CR Designer.
We have not tested Read Only Yet so I am not sure if this could be the solution or not.
Any ideas would be of great benefit
Phillip
Edited by: Phillip L on Nov 26, 2010 5:22 PM
Edited by: Phillip L on Nov 26, 2010 5:23 PM -
I do not want BCC names listed when I send an email
I do not want BCC names listed when I send an email.
Bcc: means BLIND Carbon Copy. These Addressees will receive a copy of the email, but other recipients will not see their names.
Try sending the email to your own Address to see exactly what it will look like.
If it is not satisfactory, you may have to BBC to a LIST. -
Printing problem for picking list
Hi friends,
Whenever we print the picking list of material with batch number. the printing job will bring a extra page with basic form information . it's kind of wasting the paper since the extra page doen not contain any specific picking informations. This issue only happen to picking list with batch number applied material . The extra page won't be printed out once the material is not subjected to batch management.The form style should be script form.
Please kindly advise if you have any suggestions.
Thanks,
LGHi,
Assuming printing job is batch job. Normally batch job executes a program (you assign program to the batch job when you configure it) while you create batch jobwhile it is running. If you want the system to check the particular information (take the information if the so and so prerequisits matches if not ignore kind of) during the program execution you can do it with the hlep of a deverloper.
If you want to avoid unnecessary basic ifnormation it can very well be done with the layout changes in SAP script form and the program if necessary. Make sure you dont need those information as some times it is like a legal information like we see in the company signatures which seems like basic information.
Maybe you are looking for
-
HP Printing Engineers Mobilize: Expert Day War Room
During November and December of 2009, HP has mobilized a specialized group of engineers to provide answers and responses to customer questions during our Expert Day events. In both San Diego CA and Boise ID, there are conference rooms that transform
-
Problems in JNLP only in jre1.6
I am having a JNLP application. It works fine in 1.4 and 1.5 versions. But i had a problem in 1.6 versions. some jars is missing error is occurring. For the first time its working fine in 1.6. If i again open the application its throws the NoClassfou
-
Has anyone else been unable to download app updates since changing their apple id?
I've been trying to download my app updates on my phone since changing my id (as itunes apparently required) and to no avail. I have restored my phone, changed the id on my itunes store settings and still nothing but a message saying that "and apple
-
When I place a jpeg into Indesign, it can often become very pixellated. I have tried saving the jpeg as a pdf and it still comes in pixellated. The jpeg is very clear when I look at it in other applications. I have tried changing the screen resolutio
-
Session control with multiple web servers in IE
to understand my problem do the following: make a page with this code: <% out.println("sessionID = "+session.getId()); %> Run two (2) instance of web servers (can be a tomcat) in different ports... open IE and access the URL: http://localhost:8080/te