Hanlding Unit Pack and Unpack Function module
Hi All,
Can any one know the functiona modules for PACK Handling Unit and UNPACK Handling Unit? If so please reply me.
Thanks,
Pranav
Hi,
Please check this FM.
PACK_HANDLING_UNIT
UNPACK_HANDLING_UNIT
Hope this will help.
Regards,
Ferry Lianto
Similar Messages
-
GUI_DOWNLOAD and UPLOAD Function Modules?
Hi All,
What exactly done by GUI_DOWNLOAD and UPLOAD Function Modules?
Akshitha.What you exactly want know?
Here is the Sap documentation for both FM:
FU GUI_UPLOAD
Short Text
Upload for Data Provider
Functionality
The module loads a file from the PC to the server. Data can be transferred binarily or as text. Numbers and date fields can be interpreted according to the user settings.
Example
Binary upload: No conversion or interpretation
begin of itab,
raw(255) type x,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'BIN'
filename = 'C:\DOWNLOAD.BIN'
tables
data_tab = itab.
Text upload
begin of itab,
text(255) type c,
end of itab occurs 0.
CALL FUNCTION 'GUI_UPLOAD'
exporting
filetype = 'ASC'
filename = 'C:\DOWNLOAD.TXT'
tables
data_tab = itab.
Parameters
FILENAME
FILETYPE
HAS_FIELD_SEPARATOR
HEADER_LENGTH
READ_BY_LINE
DAT_MODE
CODEPAGE
IGNORE_CERR
REPLACEMENT
CHECK_BOM
VIRUS_SCAN_PROFILE
NO_AUTH_CHECK
FILELENGTH
HEADER
DATA_TAB
Exceptions
FILE_OPEN_ERROR
FILE_READ_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
BAD_DATA_FORMAT
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
HEADER_TOO_LONG
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
Function Group
SFES
FU GUI_DOWNLOAD
Short Text
Download an Internal Table to the PC
Functionality
Data transfer of an internal table form the server to a file on the PC. The Gui_Download module replaces the obsolete modules Ws_Download and Download. The file dialog of the download module is available in the class Cl_Gui_Frontend_Services.
Further information
TYPE-POOLS: ABAP.
Binary download table
DATA: BEGIN OF line_bin,
data(1024) TYPE X,
END OF line_bin.
DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.
Ascii download table
DATA: BEGIN OF line_asc,
text(1024) TYPE C,
END OF line_asc.
DATA: data_tab_asc LIKE STANDARD TABLE OF line_asc.
DAT download table
DATA: BEGIN OF line_dat,
Packed TYPE P,
Text(10) TYPE C,
Number TYPE I,
Date TYPE D,
Time TYPE T,
Float TYPE F,
Hex(3) TYPE X,
String TYPE String,
END OF line_dat.
DATA: data_tab_dat LIKE STANDARD TABLE OF line_dat.
Get filename
DATA: fullpath TYPE String,
filename TYPE String,
path TYPE String,
user_action TYPE I,
encoding TYPE ABAP_ENCODING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Gui_Download Demo'
WITH_ENCODING = 'X'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = filename
PATH = path
FULLPATH = fullpath
USER_ACTION = user_action
FILE_ENCODING = encoding
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
IF user_action <> CL_GUI_FRONTEND_SERVICES=>ACTION_OK.
EXIT.
ENDIF.
Download variables
DATA: length TYPE I.
Binary download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'BIN'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_bin
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Ascii download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'ASC'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_asc
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
DAT download
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = fullpath
FILETYPE = 'DAT'
IMPORTING
FILELENGTH = length
TABLES
DATA_TAB = data_tab_dat
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
Parameters
BIN_FILESIZE
FILENAME
FILETYPE
APPEND
WRITE_FIELD_SEPARATOR
HEADER
TRUNC_TRAILING_BLANKS
WRITE_LF
COL_SELECT
COL_SELECT_MASK
DAT_MODE
CONFIRM_OVERWRITE
NO_AUTH_CHECK
CODEPAGE
IGNORE_CERR
REPLACEMENT
WRITE_BOM
TRUNC_TRAILING_BLANKS_EOL
WK1_N_FORMAT
WK1_N_SIZE
WK1_T_FORMAT
WK1_T_SIZE
WRITE_EOL
FILELENGTH
DATA_TAB
FIELDNAMES
Exceptions
FILE_WRITE_ERROR
NO_BATCH
GUI_REFUSE_FILETRANSFER
INVALID_TYPE
NO_AUTHORITY
UNKNOWN_ERROR
HEADER_NOT_ALLOWED
SEPARATOR_NOT_ALLOWED
FILESIZE_NOT_ALLOWED
HEADER_TOO_LONG
DP_ERROR_CREATE
DP_ERROR_SEND
DP_ERROR_WRITE
UNKNOWN_DP_ERROR
ACCESS_DENIED
DP_OUT_OF_MEMORY
DISK_FULL
DP_TIMEOUT
FILE_NOT_FOUND
DATAPROVIDER_EXCEPTION
CONTROL_FLUSH_ERROR
Function Group
SFES -
Packing and Unpacking BITS from a SHORT
Hello everyone,
I am have six pieces of data packed into a 16bit short value and I am wondering if my code to pack and unpack the short looks right to everyone else. The six smaller values that I am pulling out of the short are of the length (in order) 2+2+3+3+3+3 bits . My approach to unpacking the short is applying a bitmask to isolate just the sub-value I want, then using the bitwise-left shift ( << operator) to move that value to the 0-position in the short, then casting the value to a byte for use in my program. The code to do that looks something like this:
public final short maskValue1 = Short.parseShort("0000000000000011", 2);
public final short maskValue2 = Short.parseShort("0000000000001100", 2);
public final short maskValue3 = Short.parseShort("0000000001110000", 2);
public final short maskValue4 = Short.parseShort("0000001110000000", 2);
public final short maskValue5 = Short.parseShort("0001110000000000", 2);
public final short maskValue6 = Short.parseShort("111000000000000", 2);
public void unpackEncodedMap(short map, byte[] outMap) {
outMap[0] = (byte)((map & maskValue1) << 14);
outMap[1] = (byte)((map & maskValue2) << 12);
outMap[2] = (byte)((map & maskValue3) << 9);
outMap[3] = (byte)((map & maskValue4) << 6);
outMap[4] = (byte)((map & maskValue5) << 3);
outMap[5] = (byte)(map & maskValue6);
The approach I use to encode the short value involves taking my input byte array and casting each into a short. Then I use the bitwise-right shift operator ( >> ) to move the bit value into the appropriate position. To apply the next byte-value I bitwise-OR the previous value onto the new mask. The values in the byte-array are assured not to be greater then their sub-value bit lengths ... so the downcast is all right. Here is my code to do the packing:
public short encodeMap(byte[] mymap) {
short out = (short)(((short)mymap[0]) >> 2);
out = (short)((out | ((short)mymap[1])) >> 2);
out = (short)((out | ((short)mymap[2])) >> 3);
out = (short)((out | ((short)mymap[3])) >> 3);
out = (short)((out | ((short)mymap[4])) >> 3);
out = (short)(out | ((short)mymap[5]));
return out;
Thanks for looking at my functions and point out any inconsistencies. I feel like there is something I am not seeing in my code. Thanks!Well...thanks for the one-line answer :) yes, in the sense that it compiles and runs, but I am not sure if there is a problem with my logic or not.My program is acting strange and I am trying to isolate my problem, I think the problem might be in my pack/unpack methods.... possibly in my bit-math.
-
When you pack and unpack the domain from one server to another server, config.xml is missing while we unpack the same,
here we would like to know, do we need to metion the same path(Same folder structure) while pack and unpack?Hi
Yes, one of the basic requirements is all the Machines should have Absolutely same version of Weblogic Software and in the same folder structure. The reason is when we run Pack command on the main master domain, it does store the full folder structure of some folders that has all the modules. So when you run UnPack on this other machine, basically it will unpack. But runtime, if folder structure is not matching, the most common error you may get is like Java home not found, middleware home not found and ofcourse ends up with all NoClassDefFound errors.
Hence the folder structure should be same. And one more thing. After running unpack command, immediately you will NOT see any managed server folders under your domain/servers. That folder will be still Empty only. Only when you start the managed server like startManagedWeblogic.cmd myMS1 adminurl, thats when under domain/servers you will see a new folder named "myMS1" which is the name of managed server that you gave when you created the main master domain and packed it. Also, note it will prompt for username and password. ALSO, everytime you start managed servers, it will go to Admin Server and get some important files like config.xml file, jdbc files and few other config files and mainly all the LDAP files. Basically everytime it Syncs from AdminServer. So do NOT make any changes to any files on ManagedServer. Because when you restart they will get overwritten by admin files.
Thanks
Ravi Jegga -
Need help on mapping of obsolete and new function module
Hi Expert,
We are working on a upgradation tool in which i have to repace the obsolete function module "HELP_VALUES_GET_WITH_CHECKTAB
" by "F4IF_FIELD_VALUE_REQUEST
". I am not sure about the functionalities of these function modules as i have never used it. Can anyone please help me by providing some information abt these FMs. Also i need to do the mapping of parameters of old and new function module. So please provide the details of mapping also. Any pointers on this will be highly appreciated.
Thanks & Regards,
P Sharma
Moderator message : Duplicate post locked. Continue with [Parameter mapping of FMs|Parameter mapping of FMs;.
Edited by: Vinod Kumar on Jul 8, 2011 9:40 AMHey Enivass,
you can ckeck the input field "Account Number" whether it is numeric or Alphabet using *"Conversions ->Fixvalues"*
Steps:
1. Extract first character of input using *" Text -> substring"* -- start position 0 , char count 1
2. In Fix Value table you have to give following values:
Dafault value : Alphabet
key----
value
0----
Number
1----
Number
2----
Number
9----
Number
3. Write logic IF "number" than "Arithmatic -> FormatNumber (0000000000) -
// for leading zeros
ELSE
concat with extra space -
Thanks -
Pack and unpack in ABAP objects
can anyone explain me how to pack or unpack a field inside a method which is inside a class.
Hi
See the doc of PACK and UNPACK
PACK source TO destination.
This statement, <b>which is forbidden in classes</b>, converts the content of the data object source to the data type p of length 16 without decimal places. In contrast to the conversion rules for elementary data types, a decimal separator in source is ignored. This assigns the converted content to the data object destination.
The data type of source must be character-type, flat, and its content must be interpretable as a numeric value. The data type of destination must be flat. If destination has the data type p, the interim result is assigned to it from left to right. Surplus characters are cut off on the left, and the decimal places are determined by the data type of destination. If destination does not have the data type p, the interim result is converted to the data type of destination according to the rules in the conversion table for source field type p.
UNPACK source TO destination.
This statement converts the content of the data object source according to a specific rule and assigns the converted content to data object destination. For source, the data type p of length 16 without decimal places is expected. The data type of destination must be character-type and flat.
The conversion is performed according to the following rules:
If the data type of source is not of the type p with length 16 and without decimal places, then the content of source is converted to this data type. Contrary to the rules described in conversion rules for elementary data types, any decimal separator in source is completely ignored.
The digits of the interim result are assigned to data object destination right-aligned and without +/- sign. Any additional places in destination are filled with leading zeros. If the length of destination is not sufficient, the assigned variable is truncated from the left.
Reward points for useful Answers
Regards
Anji -
Functioning of Enqueue and dequeue function modules
Hi to all
Please tell me what is the actual functioning of HR_EMPLOYEE_ENQUEUE and HR_EMPLOYEE_DEQUEUE function modules.
My requirement is that if any one working on same employee no. or other tcode is processing same emp no then no one able to work on thet and an error message should be displayed.
How to do it.
Please advice.
Regards
Anubhav GuptaHi,
Use the following.
BAPI_EMPLOYEE_ENQUEUE
BAPI_EMPLOYEE_DEQUEUE.
Pass pernr to it.
Regards,
Nishant Gupta -
Start conditions and check function modules
Hi,
When we apply start conditions to any particular even linkage you will find check function module as SWB_2_CHECK_FB_START_COND_EVAL. However, what if i want to implement both a custom check function module AND start conditions ?
My requirement is to implement both start conditions and check function module.
Is this possible ?
Thank you,
Nikhil.Hi,
You can use both of the things, however its advisable to check all start conditions if you are using check FM.
This is interface for custom check FM,once you have the key value, you can put all the checks here
*"*"Local Interface:
*" IMPORTING
*" VALUE(OBJTYPE) TYPE SWETYPECOU-OBJTYPE
*" VALUE(OBJKEY) TYPE SWEINSTCOU-OBJKEY
*" VALUE(EVENT) TYPE SWETYPECOU-EVENT
*" VALUE(RECTYPE) TYPE SWETYPECOU-RECTYPE
*" EXPORTING
*" REFERENCE(REFERENCE) TYPE C
*" TABLES
*" EVENT_CONTAINER STRUCTURE SWCONT
*" EXCEPTIONS
*" NOT_TRIGGERD
Hope this helps.
Regards,
Sangvir Singh -
Hi,
I'm using a JFrame and I 'd like to put a JButton to pack and unpack the window. Now, the pack is simple (I use the pack() method), but to enlarge the window? I've tried to store the original size before pack, and then resize the window but, since I use a BorderLayout layout manager the center panel doen't return visible.
can anyone help me?You likely are not calling validate() on the layout after the resize
Eximport javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends JFrame implements ActionListener
private JPanel p;
private Rectangle r;
public Test()
super("Flip");
setDefaultCloseOperation(EXIT_ON_CLOSE);
setSize(770,580);
p = new JPanel(new BorderLayout());
JPanel p2 = new JPanel(new FlowLayout());
p2.add(new JLabel("North"));
p.add(p2, BorderLayout.NORTH);
p2 = new JPanel(new FlowLayout());
p2.add(new JLabel("West"));
p.add(p2, BorderLayout.WEST);
p2 = new JPanel(new FlowLayout());
p2.add(new JLabel("East"));
p.add(p2, BorderLayout.EAST);
p2 = new JPanel(new FlowLayout());
p2.add(new JLabel("Center"));
p.add(p2, BorderLayout.CENTER);
p2 = new JPanel(new FlowLayout());
JButton pack = new JButton("Pack");
JButton unpack = new JButton("Unpack");
pack.addActionListener(this);
unpack.addActionListener(this);
p2.add(pack);
p2.add(unpack);
p.add(p2, BorderLayout.SOUTH);
setContentPane(p);
public void actionPerformed(ActionEvent ae)
String s = ae.getActionCommand();
if(s.equals("Pack"))
r= getBounds();
pack();
else
setBounds(r);
validate();
public static void main(String[] args)
new Test().setVisible(true);
} -
No entries in Define conversion group and external function module setting.
Hi all,
After active bussiness function SAP Oil & Gas, my system have a problem in SPRO.
SPRO --> IMG --> Industry solution Oil & Gas (Downstream) --> HPM --> QCI configuration --> Define conversion group and external function module setting.
Problem appear: Has no entries in there!
Please, help me! Thank you so much!
Tks & best regards,
DatHTDat,
There are few entries normally delivered by SAP and which are good for a regular implementation. It is possible that those are not copied over from the reference client. Second option is to check the BC set (if) available for this activity and pull those in. Check the SAP reference client first, most likely that has entries which you can copy over to your regular client.
Regards, -
Encrypt and Decrypt function modules
Hi
Please tell the function module names to Encrypt the code with key and Decrypt code with key.
i know these function module names
'FIEB_PASSWORD_ENCRYPT' and 'FIEB_PASSWORD_DECRYPT'
but its not working.
Is there any other function modules?
if it is not there please tell the documentation of the to create encrypt function module and decrypt function module.
Thanks.
Edited by: Craig Cmehil on Jul 18, 2008 10:01 AMtry this it will do little bit closer to encription and decription
DATA:
g_key TYPE i VALUE 26101957,
g_slen TYPE i,
g_pwd type string VALUE 'Pass1234',
g_pwd1 type xstring ,
obj type ref to cl_http_utility.
CREATE OBJECT obj.
CALL METHOD obj->if_http_utility~encode_utf8
EXPORTING
unencoded = g_pwd
receiving
encoded = g_pwd1
EXCEPTIONS
conversion_failed = 1
others = 2
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 METHOD obj->if_http_utility~decode_utf8
EXPORTING
encoded = g_pwd1
receiving
unencoded = g_pwd
EXCEPTIONS
conversion_failed = 1
others = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write:/ g_pwd. -
Hi MM Gurus,
I have a requirement of packing one HU of say 5EA Qty and Unpack in two HUs say 4EA & 1EA.Is this scenario is possible in Handling Unit Management. If possible please explain.
Regards,
Manikyappahi,
if you have handling unit management activated (TVSHP-EXIDV_UNIQUE), you can create HUs within hu02. Here you can pack the f.e. 5 pieces into one HU or also unpack it into two HUs with 4+1 pieces (add material, total quantity, plant and storage location and the packaging material -> select these to lines and push "pack" button in the middle of the screen for packing it; to unpack HUs use the "empty" or "delete HU" button on the left side of the screen, after this you can pack again like you want... you have several possibilities to create HUs within this transaction). You can also use transaction humo for changing HUs (and for a lot of useful things used with HUs).
(If you do not have handling unit management activated, you can only create shipping units within a delivery (you have the same screen there as in hu02).)
I hope I could help you.
Regards, Ely -
SRM 7 ECS : SC and PO Function Modules
Hi Gurus,
Has anybody some documentation about function modules which are triggered in extended classic regarding SC and PO.
Many thanks in advance.What are the FM involved in PO replication to the backend?
Thanks -
I have an importing parameter in function module interface, type BEGDA (type DATUM), default value SY-DATUM.
When I execute test function module via SE37 and F8, the default value gets value "02....20.3" instead of 03.02.2012 as set up in SU01 for my user.
What can be wrong?At the risk of also incurring your scorn, let me add that I cannot make this fail, using exactly what you have in the original post. Obviously, something unusual is happening this client/instance, or in code that is manipulating the incoming date value.... my dd.mm.yyyy input defaulted to sy-datum shows 20120306 in begda duringe execution (in debug). Without being able to debug the mentioned FM at every step, it would be hard to pinpoint a specific problem.
-
Pricing and Rebates Function Module
Hi,
I need function module for uploading the prices in the following transaction
VK11 : Creation of condition type
VK12 : Change of condition type and
VB01 : Creation of Rebate Agreements
VB01 : Change of Rebate Agreements
Please, Let me the function module.
Regards,
M.SaravananHi,
check the FM BAPI_PRICES_CONDITIONS for Pricing conditions .
Because this is FM which is INBOUND FM for Cond_A02 idoc type for posting Pricing Routines,
<REMOVED BY MODERATOR>
Raj
Edited by: Raj D on Jun 13, 2008 5:11 PM
Edited by: Alvaro Tejada Galindo on Jun 13, 2008 11:12 AM
Maybe you are looking for
-
Ok some of you might have seen my post on the problems with raid that i am having. well this morning i went to boot up my system and it says that the power connecter is disconnected from my gfx card but it isn't??? i tried using different cables etc
-
JNI Registry can't write to HKEY_LOCAL_MACHINE
Hi all! Thanks for reading my post. I use the JNI Registry API to access to the windows registry. I want to disable the User Account Control. I use this code to open the key. RegistryKey key = Registry.openSubkey(Registry.HKEY_LOCAL_MACHINE, "Softwar
-
Guten Abend, ich habe eine Frage zum erstellen eines Wiederherstellungsdatenträgers. Um einen einen solchen zu erstellen gehe ich auf Start -> Systemsteuerung -> System und Sicherheit -> Lenovo - Datenträger zur Werksseitigen Wiederherstellung. Danac
-
sorry^^| I have a problem.... when I use the wtk to postting my code to be a .jar file. I detect the .jar file is too large (184k) it's include all midp package but i was not use all of them how can i do to solve this problem^^"
-
I am trying to delete all WebApp items (before importing updated records), but after the process runs nothing is deleted. I have done this before without a problem, so I know how it should work. Have tried logging off and logging in as a different us