Function Module for UNPACKING Handling Unit from Inbound Delivery
Hello Experts,
I am working on a RFID program to Receive goods from vendor...
One of the steps of the program should CHANGE the quantity inside a received batch.
To do so, I need to UNPACK the Handling Unit first... then change the quantity.
I am using the following Function Modules to do so:
- 'HU_GET_HUS'
- 'V51P_FILL_GT'
- 'HU_PACKING_AND_UNPACKING'
- 'HU_POST'
First 2 FM works fine...
But when I get to the 3rd one, I keep getting "NOT_POSSIBLE" error...
Have anyone done this before??
Here's the code I've done to do some testing before putting it into my code...
PLEEEEEEEEEEEASE HELP.
TYPE-POOLS: vsep. PARAMETERS: p_venum LIKE vekp-venum.
DATA: wa_object LIKE hum_object,
it_object TYPE TABLE OF hum_object.
DATA: wa_v51vp LIKE v51vp,
it_v51vp TYPE TABLE OF v51vp.
DATA: flag LIKE v51p_select_flags.
DATA: it_venum TYPE STANDARD TABLE OF hum_venum,
ef_rcode LIKE sy-subrc,
et_vekp TYPE STANDARD TABLE OF vsep_s_vekp,
et_vepo TYPE STANDARD TABLE OF vsep_s_vepo,
et_vevw TYPE vsep_t_vevw,
et_highest_level TYPE vsep_t_venum,
et_messages TYPE huitem_messages_t,
is_packing_request TYPE vsep_s_pithu,
es_p_request TYPE vsep_s_pithu,
es_item LIKE vepovb,
cs_header LIKE vekpvb,
ef_number TYPE vpobjkey,
et_header TYPE STANDARD TABLE OF vekpvb,
et_items TYPE STANDARD TABLE OF vepovb,
et_item_serialno TYPE vsep_t_rserob,
et_history TYPE hum_history_t,
et_highest_levels TYPE hum_venum_t.
DATA: wa_venum LIKE hum_venum,
wa_vepo TYPE vsep_s_vepo,
wa_vekp TYPE vsep_s_vekp,
wa_items TYPE vepovb,
wa_header TYPE vekpvb.
START-OF-SELECTION.
wa_venum-venum = p_venum.
APPEND wa_venum TO it_venum.
CALL FUNCTION 'HU_GET_HUS'
EXPORTING
it_venum = it_venum
IMPORTING
et_header = et_header
et_items = et_items
et_item_serialno = et_item_serialno
et_history = et_history
et_highest_levels = et_highest_levels
et_messages = et_messages
EXCEPTIONS
hus_locked = 1
no_hu_found = 2
fatal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE et_header INDEX 1 INTO wa_header.
CALL FUNCTION 'V51P_FILL_GT'
EXPORTING
it_venum = it_venum
IMPORTING
ef_rcode = ef_rcode
et_vekp = et_vekp
et_vepo = et_vepo
et_vevw = et_vevw
et_highest_level = et_highest_level
et_messages = et_messages
EXCEPTIONS
hu_locked = 1
no_hu_found = 2
fatal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE et_vepo INDEX 1 INTO wa_vepo.
READ TABLE et_vekp INDEX 1 INTO wa_vekp.
MOVE-CORRESPONDING wa_vepo TO is_packing_request.
is_packing_request-belnr = wa_vepo-vbeln.
is_packing_request-quantity = wa_vepo-vemng.
is_packing_request-veanz = '-1'.
is_packing_request-meins = wa_vepo-vemeh.
is_packing_request-exidv = wa_vekp-exidv.
CALL FUNCTION 'HU_PACKING_AND_UNPACKING'
EXPORTING
is_packing_request = is_packing_request
IMPORTING
ef_rcode = ef_rcode
es_p_request = es_p_request
es_item = es_item
CHANGING
cs_header = cs_header
EXCEPTIONS
missing_data = 1
hu_not_changeable = 2
not_possible = 3
customizing = 4
weight = 5
volume = 6
serial_nr = 7
fatal_error = 8
OTHERS = 9.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'HU_POST'
EXPORTING
if_synchron = 'X'
if_commit = 'X'
IMPORTING
ef_number = ef_number.
break nunfx004.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Thanks in advance,
Fernanda
Hi ,
Check this code.
Pack componet HU to Overpack HU. *
l_packing_req-venum = g_ovrp_venum. "Overpack Internal HU
l_packing_req-exidv = g_ovrp_exidv. "Overpack External HU
l_packing_req-veanz = '1'. "PACK Constant
l_packing_req-sub_hu_venum = l_int_venum.
l_packing_req-sub_hu_exidv = l_int_exidv. "Componet External HU
l_packing_req-velin = '3'. "HU Type Constant
l_packing_req-quantity = '1.000'.
call function 'HU_PACKING_AND_UNPACKING'
exporting
is_packing_request = l_packing_req
exceptions
missing_data = 1
hu_not_changeable = 2
not_possible = 3
customizing = 4
weight = 5
volume = 6
serial_nr = 7
fatal_error = 8
others = 9.
if sy-subrc <> 0.
error
clear: v_msgv1, v_msgv2, v_msgv3.
v_msgv1 = text-031.
PERFORM display_message USING v_msgv1 v_msgv2 v_msgv3.
leave to screen sy-dynnr.
endif.
No Errors --> POST HU
call function 'HU_POST'
exporting
if_synchron = 'X'
if_commit = 'X'.
plz write what you are passing to 'HU_PACKING_AND_UNPACKING' and hu_post fm.
Regards
Mohinder Singh Chauhan
Similar Messages
-
BAPI or Function Module to create Handling Unit at the delivery level
Please send me the BAPI / FM details to create Handling Unit at the delivery level.
ThanksHi
you can try below BAPI's.
BAPI_HU_CREATE
BAPI_HU_PACK
Hope this helps you.
Rgds,
Kris. -
Function module for converting weight unit to another unit.
What is the function module for converting weight unit to another unit.
I want to convert LB to KG.
Tried with fm UNIT_CONVERSION_SIMPLE.
INPUT 100
NO_TYPE_CHECK
ROUND_SIGN X
UNIT_IN LB
UNIT_OUT KG
But there is no output.
Can some one help.The trick here is we need decalre input output with non-character data type like VBPLK-BRGEW.
We can test using normal SE37.
I tested and this program worked fine:
data: UNIT_IN LIKE T006-MSEHI,
UNIT_OUT LIKE T006-MSEHI,
output LIKE VBPLK-BRGEW,
input LIKE VBPLK-BRGEW.
input = 10.
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = INPUT
UNIT_IN = 'LB' "UNIT_IN
UNIT_OUT = 'KG' "UNIT_OUT
IMPORTING
OUTPUT = OUTPUT.
write: output. -
Function Module for Translation of text from Lower to Upper Case
Hi All,
Can any one give me function module for translation of text from lower to upper case.
If we use Translate statement for the program in the Extended Syntax check it is giving error.
Thanks in advance.
Regards,
srinivasHi Srinivas,
You can use any of the Function Modules below.
AIPC_CONVERT_TO_UPPERCASE
2054_TRANSLATE_2_UPPERCASE
HR_99S_CONV_UPPER_CASE
Please reward if useful.
regards,
Raj -
Function module for access OM Data from infotype 1001
We had a function module for accessing OM data viz. Infotype 1001. Could you let me know.
Advanced thanks,
Dasaradh kosanaHi Dasaradh,
Do you want the fm which fetches the data from HRP1001 , if this is the case you can use this FM RH_READ_INFTY_1001.
Reward Points if it is helpful
Regards,
Kiran I -
Urgent: Function module for getting the input from user using a pop up
Hi all,
My requirement at user commmand a pop up should appear asking the user to enter the session name for the bdc session to be created.
My report allows the user to enter the session name of his choice.
I need the name of the function module which can do this.
Thanks
Pritishbetter to create one FM to pop-up.
check this :
function y_pop_up_get_distributor_time.
*"*"Local interface:
*" IMPORTING
*" REFERENCE(W_ROUTE) LIKE VBAP-ROUTE
*" REFERENCE(W_VBELN) LIKE VBAK-VBELN
*" REFERENCE(W_VGBEL) LIKE VBAK-VGBEL
*" REFERENCE(W_VSTEL) LIKE VBRP-VSTEL
*" REFERENCE(W_AUART) LIKE VBAK-AUART
*" EXPORTING
*" REFERENCE(W_FROM_DATE) TYPE SY-DATUM
*" REFERENCE(W_FROM_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TO_DATE) TYPE SY-DATUM
*" REFERENCE(W_TO_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TKNUM) TYPE VTTK-TKNUM
*" REFERENCE(W_RC) TYPE SY-SUBRC
*" REFERENCE(W_DEPT_DATE) TYPE SY-DATUM
*" REFERENCE(W_DEPT_TIME) TYPE SY-UZEIT
*" REFERENCE(W_REPO_DATE) TYPE SY-DATUM
*" REFERENCE(W_REPO_TIME) TYPE SY-UZEIT
*" REFERENCE(W_PLNT_DATE) TYPE SY-DATUM
*" REFERENCE(W_PLNT_TIME) TYPE SY-UZEIT
*" REFERENCE(W_TRUCK_NO) TYPE YW2_TIMEENTRY-TRUCKNO
*" REFERENCE(W_LIFNRN) TYPE YW2_TIMEENTRY-LIFNR
* SET PF-STATUS 'STATUS_100' OF PROGRAM SAPLZ2SLS.
*CLEAR:W_DATE_FROM, W_DS_TIME_1, W_ADATE,
* W_ATIME,W_BDATE,W_BTIME, W_CDATE, W_CTIME.
clear : w_route1, w_vbeln1,w_vgbel1,
w_vstel1,w_auart1.
w_route1 = w_route.
w_vbeln1 = w_vbeln.
w_vgbel1 = w_vgbel.
w_vstel1 = w_vstel.
w_auart1 = w_auart.
clear: w_date_to, w_date_from, w_adate,w_atime,
w_ds_time_1, w_ds_time_2,
w_bdate, w_btime, w_cdate, w_ctime.
call screen 100 starting at 10 2 ending at 115 13.
if w_ok_code = 'SAVE'.
w_rc = 0.
w_from_date = w_date_from.
w_from_time = w_ds_time_1.
w_to_date = w_date_to.
w_to_time = w_ds_time_2.
w_tknum = w_tknum.
w_dept_date = w_adate.
w_dept_time = w_atime.
w_repo_date = w_bdate.
w_repo_time = w_btime.
w_plnt_date = w_cdate.
w_plnt_time = w_ctime.
w_truck_no = sg_truckno.
w_lifnrn = w_lifnr.
else.
w_rc = 1.
endif.
* IF w_ok_code = 'CANC'.
* W_rc = 1.
* ELSE.
* W_rc = 0.
* W_FROM_DATE = w_date_from.
* W_FROM_TIME = w_ds_time_1.
* W_TO_DATE = w_date_to.
* W_TO_TIME = w_ds_time_2.
* W_TKNUM = W_TKNUM.
* W_DEPT_DATE = W_ADATE.
* W_DEPT_TIME = W_ATIME.
* W_REPO_DATE = W_BDATE.
* W_REPO_TIME = W_BTIME.
* W_PLNT_DATE = W_CDATE.
* W_PLNT_TIME = W_CTIME.
* ENDIF.
clear w_ok_code.
endfunction.
Regards
Prabhu -
Handling unit in inbound delivery
Dear all
creation of handling uinit for inbound delivry are optional in standard as we can create H.U or without H.U for inbound delivery
please guide me how can i customize sysytem as creation of handling uinit for inbound will be mandatory in other words we can't create inbound delivery without handling unit number.
best regards
R.Tno comment
-
Assigning Handling Unit to Inbound delivery
Hi Guys,
My requirement is i need develop program which will t program which will take the mutliple Purchase orders/STOs and create a single inbound delivery. Acutally this will be done SAP transaction VL31N. But as it has sap enjoy transaction we can run write a bdc for this transaction. So I found one transaction VL34, which is taking the multiple POS, but..creating multiple deliveris i.e. a inbound delivery for each PO. So I copied this code in Z program and did the modifications to create a single inbound w.r.t. given purchase order numbers. But I found packing details are not getting updated.
So, now i need to assign the packing details (HU numbers) to created inbound delivery .
Any idea on this ?
Best Regards,
Ganesh NamaAny body knows...solution for above question ?
-
Is there any tables or function modules for getting currency units.
Hi,
I am working in smartforms.My requirement is I want to print the russian currency.
For example if there is 100,25 .I want to get 100 rub 25 kop ( kopecks) like paises for INR.
Thanks,
Saravanakumar V.Hi
Try to use this code
Write a FM like ZSPELL_AMOUNT
IMPORTING
*" REFERENCE(AMOUNT) TYPE BF_RWBTR
*" REFERENCE(IND) TYPE CHAR1 DEFAULT 'X'
*" EXPORTING
*" REFERENCE(WORD) TYPE IN_WORDS
TABLES: spell.
CALL FUNCTION 'SPELL_AMOUNT'
EXPORTING
language = 'R'
currency = 'RUB'
amount = amount
IMPORTING
in_words = spell.
CONCATENATE spell-word spell-decword INTO word SEPARATED BY space.
ELSE.
data: l_word1(255).
data: l_word2(255).
CLEAR:L_WORD1,L_WORD2.
split spell-word at 'Py'into l_word1 l_word2.
WORD = L_WORD1.
ENDIF.
ENDFUNCTION.
thank You
Surya -
Function module for translation
Hi friends,
Is there any Function module for translating the unit of currency (WAERS) to other languages. I've a requirement where I need the value EUR or USD to be printed in russian.
Thanks,
SharmilaHi
Please check the FM
<b>CURRENCY_GETLIST</b>
It basically takes the values from the table TCURT
Hope this helps.. -
Putaway of Handling units via Inbound delviery
Hi,
I have configured HUM for my warehouse & am putting away my handling units via Inbound delivery.
The system currently generates a transfer order for each & every HU/ storage unit that is created.
But i would like to create one single transfer order for every storage type. In other words one transfer order will contain all the storage units that are to be put-away per storage type.
Is there a setting to make the above mentioned possible. Do let me know if more clarity on my question is reqd.
Thanks
KiranHello,
You could check the To split functionality to see if this can help you complete your requirements.
http://help.sap.com/saphelp_erp60_sp/helpdata/EN/c6/f83df24afa11d182b90000e829fbfe/frameset.htm
Further documentation is available if you click the IMG documentation in LE>WM>strategies--> Define stock sequence for stock removal (picking)
Hope this helps
Thanks,
Edited by: Abhijit Sadhu on Jun 8, 2009 4:14 PM -
Function Module for outline agreement
Dear Sir,
I want to know the function module for contract/outline agreement from where I can fetch the details of release orders against the given contract.
Regards
Amit AgarwalHi
Go to SE37 enter the Outline agreement and press F4
you can see the function module
(or) Post the same message in SAP ABAP forum
G.Ganesh Kumar -
Any other Transaction similar to HUMO for retriving handling units .
Hi SAP GURUS ,
Please accept my thanks for the help rendered so far .
I have a Quary ,Do we have a Transaction parallel to HUMO for retrieving Handling units from stocks .
similar to HUMO .
Thanks in Advance !!!
AdarshHi ,
Thanks for your reply , but the retrieval of HU's via HUMO is showing LIst of HU's which is otherwise not possible othrewise
The easy option if the report doesnt show up once you execute is ,go for Radioa button Quick search and you will get the report
After havign raised this issue with SAP ,they have suggested us to for varients including combination of plant /material/ and storage location
otherwise ,we can as well archive the very old /unused hU's so that the report retrival through HUMO will be fast
Incidentally there is no other way except HUMO
Thanks for the reply
warm regards,
Adarsh -
Error in function module for inbound processingwhile testing from we19
hi,
I have developed a custom function module for processing inbound idoc for creating material using bdc...the problem is that when i am trying to test my idoc using we19 and calling my function module in debug mode an error is displayed showing 'interface for function module is incorrect' and also i am unable to see my function module in debugging mode.It is only displaying the error message...
I have given all the parameters necessary (import,export or tables) and found no error in the interface...I think the problem is appearing before my function module is being called....Also on seeing the short dump analysis I have seen that the error is in the form 'Idocs passed to application' which is not a part of the function module developed by me...
I am unable to understand why this error message is being displayed...
Please help me out of this..ya i know that ..But I wanted to create a simple one..moreover the problem is not with bdc....It is with the function module interface..
Also I want to ask a question that I had to define all the parameters (in the function module ) by data declaration statements in the function group top include..
If i dont do that say the first error is when i write loop at idoc_contrl ..idoc_contrl is not declared by a data statement..So IO had to write a data statement:
Idoc_contrl type table of edidc..I have seen that in other function modules (idoc inbound processing) no such data declaration is done.. -
Re-using Handling unit. Inbound deliver has unpacked materials
Dear All
We're running the process that inbound delivery is created automatically once goods issue for outbound delivery is done.
We're also running the process when handling units created in outbound delivery are re-used in Inbound delivery.
The problem we've got is that from time to time we have situation when part of materials in inbound Delivery are unpacked, while these materials were packed in handling units. There are no errors appear, and Inbound Delivery is created, but materials are unpacked.
In humo for such handling units, which are not created in Inbound Delivery i can see that the status was not updated and still remains "LOAD PHEX WHSE" and such HUs are assigned to plant where goods issue was done.
Whille for handling units which were created in Inbound Delivery the status is updated to "PHEX" and HUs are assigned to recieving plant.
Please advise if you have any idea on the root cause and solution.
Thanks in advance.
Best Regards
AndreyHI Andrey,
Wanted to know if you have recd the solution for this old thread. We arefacing a similar kind of problem wherein we get the status as 0020 when we pack for Returns Delivery. This status is like the Goods are already posted and hence we cant do PGR.
Please suggest.
rgds..Ameet
Maybe you are looking for
-
[SOLVED] X & fglrx resolution problem
Hi, i can't get my Viewsonic VX2025WM to work at 1680x1050 resolution. This is my xorg.conf: Section "Files" RgbPath "/usr/share/X11/rgb" ModulePath "/usr/lib/xorg/modules" FontPath "/usr/share/fonts/misc" FontPath "/usr/share/fonts/100dpi:unscaled"
-
Hi. I have a requeriment to get the MessageID to add the file name in archive mode. (sender channel) Only I see an option Add Time Stamp but I need the messageID is it posible? Thanks
-
please help
-
How do I determine if Kernel is 32 or 64 bit, system is AIX / Informix
Hi, I'm trying to determine if the kernel on an AIX machine is 32 or 64 bit, how can I determine that, using SM51 shows me the Kernel (46D_Ext) but does not ID a 32 or 64 bit version ?? Lloyd Campbell
-
How do you keep film roll data when exporting?
I'm moving to a newer computer and wanted to transfer my large library to the new setup. I have film rolls organized with original photo dates, but when I import the library in the new iPhoto setup from a hard drive all the dates change to the day I