Purchase order to bin
How would I enter a recieved purchase order directly into a storage bin?
In this case you have to create the storage type search than storage section search and storage bin procedure needs to be set up
once you fully configure your WM than you go to your mateiral master and extend for WM
and WM 1 view you can define the stock removal and placement strategy in WM1 view and than assign storage bin in wm2 view.
make sure you define the same bin in same storage type you use entered in the materia master.
Similar Messages
-
Reverse Back delete status in Purchase Order
Hi
I'm having problem when do the reversing for item in purchase order.
ie
Purchase Order : 123456
Item 10 Part A already GR
Item 20 Part B already GR
Item 30 Part C User wrongly click Delete.
in this case this PO will be close because 2 part has been GR and one part has been delete. How do i open this delete Part ? ...Hello Nizamkz,
When you delete line item in Purchase order (trash bin) using ME22/ME22N, it will not be go away from your purchase order, but it will grayed out in your purchase order and against that lineitem you will not be able to do further process i.e. GR, Invoice.
Now if you want to do undelete, you select the line item (which is shwoing Trashbin in the first column) and clock on Unlock button.
Hope this will help.
Hope this will help.
Regards
Arif Mansuri
Reward if answer is helpful. -
Issue using material document number as dynamic bin for purchase orders
Hi...
We are currently using the material document number as a dynamic bin at receiving because we expect to have multiple receipts of the same purchase order. The current setup has everything going into quality inspection, and an inspection lot creates for each goods receipt.
When QM rejects parts to return to vendor, a 122 movement is automatically generated. When this 122 movement generates, the WM stock overview shows a negative balance using the material document number of the 122 movement as the dynamic bin. The positive balance still shows as the material document from the 101 movement.
Is there any configuration that can be set up to fix this issue or will SAP always take the most recent material document as the dynamic bin?
Thanks for the help!I've tried the following configuration with movement type configuration:
Quality stock in 902 storage type with material document as dynamic bin (requirement type configuration updated). When a return to vendor is completed, there is a positive balance in 902 with the GR material doc number as the bin and a negative balance with the 122 material doc # as the bin.
I also tried configuring this with using GR-DOCK as a bin, and had the issue with the quant record being updated by the most recent inspection lot #.
I also tried using the PO as dynamic bin, and have the same error as above with the quant.
Error:
Error during creation of transfer orders for material document 0026001535
Date: 05/16/2008
Time: 10:52:23
Post.chge not. HR1 2000000011
No quants exist for posting changes
So as according to the OSS note I should use material doc # as dynamic bin to avoid this...but when I set this up I get the issue with positive and negative balances in my stock overview because SAP uses the most recent material document number for each posting. -
Automatic creation of transfer orders from goods receipt of purchase order.
Hi experts
The project i am currently working on requires the following;
When goods receipting a purchase order i have a requirement for the system to create automatic transfer orders to put the stock away into storage bins. I am aware that the stock goes straight into the 902 area once goods receipted. Is it possible to have the transfer orders created automatically out of 902 once the goods receipt has been posted.
In support of this, i have made an entry in transaction OMKX for the following;
Reference Movement Type - 101
Movement Indicator - B (goods movement for purchase order)
Movement Type - 101
TR Create Transfer requirement - X
Immed. TO Creation - A
Addl Data - X
Once i receipt the PO it just sits in 902 and does not create any automatic transfer orders.
Could someone please help me
Thanks
SimonPlease try to process the material document of the GR manually by LT06 in foreground to find out the root cause of the error.
You may also want to setup the mail control (V_T321-MAILK) for immediate TO creation in OMKX. The system will send you a express message (depending on your setup) if TO creation is failed. -
Open Purchase Order Separation from item Order Qty
Hi All,
Kindly suggest me how to separate open Purchase order from Item Order Qty.if i have 2 WH with different Order qty.in report it will be shown total order qty of both WH's.like
Item WH Order Qty
A 01 100
A 02 50
or
A 01 0
i need like this A--150 OR A--50(order qty).
plz look into my query and suggest me how to do this.
select distinct t3.CardName as SuplierName,t2.[ItemCode], t2.itemname,t2.[U_pperson]as PP,((SELECT sum(T4.[OnHand])FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH')) as Stock,t2.MinLevel as 'Min Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH'))-t2.MinLevel) as balance,
sum(t1.openqty)
as OrderQty,
t2.MaxLevel as 'Max Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum( T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH'))-t2.MaxLevel)as 'Balance II' from OPOR t0 inner join POR1 t1 on t0.DocEntry=t1.DocEntry inner join OITM t2 on t2.ItemCode=t1.ItemCode inner join ocrd t3 on t3.CardCode=t2.CardCode inner join OITW t4 on t4.ItemCode=t1.ItemCode and t4.WhsCode=t1.WhsCode where t2.validFor='y' and t2.[U_pperson]='p1' or t2.[U_pperson]='p2' or t2.[U_pperson]='p3' group by t3.CardName,T4.[OnHand],t2.[ItemCode], t2.itemname,t2.[U_pperson],t2.MinLevel,t2.MaxLevel,t1.OpenQty
Thanks&Regards,
P.PratapHi,
Try this:
select distinct t3.CardName as SuplierName,t2.[ItemCode], t2.itemname,t2.[U_pperson]as PP,((SELECT sum(T4.[OnHand])FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH')) as Stock,t2.MinLevel as 'Min Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH'))-t2.MinLevel) as balance,
sum(t1.openqty)
as OrderQty,
t2.MaxLevel as 'Max Bin',(((SELECT sum(T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = '01')
+(SELECT sum( T4.[OnHand]) FROM OITW T4 WHERE T2.[ItemCode] = T4.[ItemCode] AND T4.[WhsCode] = 'EWH'))-t2.MaxLevel)as 'Balance II'
from
OPOR t0 inner join POR1 t1 on t0.DocEntry=t1.DocEntry inner join OITM t2 on t2.ItemCode=t1.ItemCode inner join ocrd t3 on t3.CardCode=t2.CardCode inner join OITW t4 on t4.ItemCode=t1.ItemCode and t4.WhsCode=t1.WhsCode where t2.validFor='y' and t2.[U_pperson]='p1' or t2.[U_pperson]='p2' or t2.[U_pperson]='p3'
group by t3.CardName,t2.[ItemCode], t2.itemname,t2.[U_pperson],t2.MinLevel,t2.MaxLevel
Thanks & Regards,
Nagarajan -
Create single TO for each position of material in purchase order
Hi, I am facing a problem while recieving stock from GR mvt 101
I'm following this steps
1.- I'm creating a purchase order with several materials (The number of material
is diferent for each material)
2.- Good Receipt with MIGO,I'm using movement type 101, this was configurated for
create automatic TR and TO
3.- while I'm traying to create a Tranfer Order(LT04), SAP system send this errror
"you need to create single TO for each position of material"
Note: Only one Transfer Requirement was created with several postions.
4.- if I use LB11, the transfer order is created manual for each material, however
I need to do this one by one.
Are there any configuration that enable create one single TO for each position in
purchase order??.
Im trying to create TO with LT10 using a new movement type and this enable me move
material to bin location. However the TR still exist.
Thanks in advance.
RegardsThe problem was resolved.
Thanks in advance -
WM -Purchase order and configuration steps
HI Gurus,
kindly help me to configure the ware house management to create the purchse order and i want to move the
raw material to production order..i have the confusion, what i maintain in the WM-ACTIVITIES -MOVEMENT TYPE
pls help me to do the configuration
with regards
dineshwarehouse managment does not create purchase orders.
you create your POs like you do it without WM.
WM is a sublevel to a storage location.
If WM is activated and you post a receipt to a PO to this storage location, at the same time a quant is created in interim storage type 902 along with a transport request to putaway that wuant into its final bin in the warehouse. -
Sending purchase order through e-mail
Hi,
I need to send purchase order in PDF through e-mail. I know it is possible to automatically have it sent to the vendor, but my requirement is different. PO is created as conversion of PREQ, so I need to send it not to vendor directly, but to the PREQ creator first (for possible corrections etc.) Is this somehow possible? I'm using exit EXIT_SAPMM06E_020 where I'd like to paste call to the function module (in update task), which would send the e-mail.
Thanks in advance.
TomasHi,
Use this program
*& Report YMSL_ORDER_ACCEPTANCE
REPORT YMSL_ORDER_ACCEPTANCE.
*********Variable Declarations *****************************
DATA: GV_FORM_NAME TYPE RS38L_FNAM, " Used to store the function module generated by Smartform
GV_BIN_FILESIZE TYPE I, " Store the file size
GV_POS TYPE I,
GV_LEN TYPE I,
GV_TAB_LINES TYPE I,
gv_desc_lines type i.
********Constants *******************************************
DATA : GC_TEXT(11) TYPE C VALUE 'Form Output',
GC_TST(3) TYPE C VALUE 'TST',
GC_TESTING(20) TYPE C VALUE 'Order Acceptance'.
*********Work Area Declarations *****************************
DATA: GS_DOCDATA TYPE SODOCCHGI1, " Data of an object which can be changed
GS_CTRLOP TYPE SSFCTRLOP, " Smart Forms: Control structure
GS_OUTOPT TYPE SSFCOMPOP, " SAP Smart Forms: Smart Composer (transfer) options
GS_OTFDATA TYPE SSFCRESCL, " Smart Forms: Return value at end of form printing
GS_RECLIST TYPE SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GS_PDF_TAB TYPE TLINE, " Workarea for SAP Script Text Lines
GS_OBJBIN TYPE SOLISTI1, " SAPoffice: Single List with Column Length 255
GS_OBJPACK TYPE SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : w_doc_chng typE sodocchgi1.
*********Internal tables Declarations *****************************
DATA : I_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
DATA: GT_RECLIST TYPE TABLE OF SOMLRECI1, " SAPoffice: Structure of the API Recipient List
GT_PDF_TAB TYPE TABLE OF TLINE, " SAPscript: Text Lines
GT_OTF TYPE TABLE OF ITCOO, " OTF Structure
GT_OBJBIN TYPE TABLE OF SOLISTI1, " SAPoffice: Single List with Column Length 255
GT_OBJPACK TYPE TABLE OF SOPCKLSTI1. " SAPoffice: Description of Imported Object Components
DATA : BEGIN OF IT_ADR6 OCCURS 0,
SMTP_ADDR TYPE ADR6-SMTP_ADDR,
END OF IT_ADR6.
DATA : W_FILE_NAME TYPE STRING,
W_FILE_PATH TYPE STRING,
W_FULL_PATH TYPE STRING.
CLEAR : GV_FORM_NAME,
GS_CTRLOP,
GS_OUTOPT,
GS_OTFDATA,
GV_BIN_FILESIZE,
GV_POS,
GV_LEN,
GV_TAB_LINES.
SELECTION-SCREEN: BEGIN OF SCREEN 1001 AS WINDOW TITLE scr_ttl .
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TXT_B1 NO INTERVALS.
SELECTION-SCREEN BEGIN OF LINE .
SELECTION-SCREEN COMMENT 1(15) TX_VBELN.
PARAMETER : P_VBELN TYPE VBAK-VBELN .
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK B1.
*SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TXT_B2 .
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: R_OUT RADIOBUTTON GROUP R1 DEFAULT 'X' USER-COMMAND RAD11 .
SELECTION-SCREEN COMMENT 5(20) TXT_OUT. " roles by t-code
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_PDF RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(20) TXT_PDF.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETER R_MAIL RADIOBUTTON GROUP R1 .
SELECTION-SCREEN COMMENT 5(15) TXT_MAIL.
*SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 20(7) TXT_MAL1.
PARAMETER : P_MAIL TYPE ADR6-SMTP_ADDR MODIF ID M1 .
SELECTION-SCREEN END OF LINE.
*SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN: END OF SCREEN 1001 .
CALL SELECTION-SCREEN 1001 STARTING AT 20 5 ENDING AT 105 10.
*SET PF-STATUS 'STATUS'.
INITIALIZATION.
TX_VBELN = 'Order'.
TXT_B1 = 'Selection Criteria '.
TXT_B2 = 'Output Criteria '.
scr_ttl = 'Order Acceptance'.
TXT_OUT = 'Print Output'.
TXT_PDF = 'Save To PDF'.
TXT_MAIL = 'Mail the Output'.
TXT_MAL1 = 'E-mail'.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF R_MAIL <> 'X'.
IF SCREEN-GROUP1 = 'M1'.
SCREEN-INVISIBLE = 1.
SCREEN-INPUT = 0. " Disable for input.
MODIFY SCREEN.
ENDIF.
ENDIF.
ENDLOOP.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MAIL.
PERFORM TABLE_HELP.
START-OF-SELECTION..
IF P_VBELN IS NOT INITIAL.
PERFORM GET_SF.
IF R_PDF = 'X' .
PERFORM CONVERT_OTF.
PERFORM SAVE_DIALOG.
PERFORM DOWNLOAD.
ELSEIF R_MAIL = 'X'.
IF P_MAIL IS NOT INITIAL.
PERFORM CONVERT_OTF.
PERFORM SEND_MAIL.
ELSE.
MESSAGE 'Please Enter Email Address' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
ENDIF.
ELSE.
MESSAGE 'Please Enter Order No' TYPE 'S'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
*ENDIF.
END-OF-SELECTION.
*& Form TABLE_HELP
FORM TABLE_HELP .
IF R_MAIL = 'X'.
SELECT SMTP_ADDR FROM ADR6 INTO TABLE IT_ADR6.
SORT IT_ADR6.
DELETE ADJACENT DUPLICATES FROM IT_ADR6 COMPARING ALL FIELDS.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'IT_ADR6-SMTP_ADDR'
PVALKEY = ' '
DYNPPROG = SY-REPID
DYNPNR = SY-DYNNR
DYNPROFIELD = 'EMAIL'
STEPL = 0
WINDOW_TITLE = 'SELECT MAIL ADDRESS'
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = IT_ADR6
FIELD_TAB =
RETURN_TAB =
DYNPFLD_MAPPING =
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDFORM. " TABLE_HELP
*& Form GET_SF
FORM GET_SF .
*u2022 Generate Function Module name
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'Z_CHK'
IMPORTING
FM_NAME = GV_FORM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*u2022 Assigning values to Form Control Structure and Form Composer
IF R_OUT <> 'X'.
GS_CTRLOP-GETOTF = 'X'.
GS_CTRLOP-NO_DIALOG = 'X'.
GS_OUTOPT-TDNOPREV = 'X'.
ENDIF.
*/1BCDWB/SF00000368
CALL FUNCTION GV_FORM_NAME "'/1BCDWB/SF00000368'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
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 GV_FORM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = GS_CTRLOP
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = GS_OUTOPT
USER_SETTINGS = 'X'
TEMP_VBELN = P_VBELN
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO = GS_OTFDATA
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " GET_SF
*& Form CONVERT_OTF
FORM CONVERT_OTF .
*u2022 Assigning the OTFDATA to OTF Structure table
CLEAR GT_OTF.
GT_OTF[] = GS_OTFDATA-OTFDATA[].
*u2022 Convert the OTF DATA to SAP Script Text lines
CLEAR GT_PDF_TAB.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
IMPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
BIN_FILE =
TABLES
OTF = GT_OTF
LINES = GT_PDF_TAB
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
ERR_BAD_OTF = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*t_otf[] = t_otf_from_fm-otfdata[].
Function Module CONVERT_OTF is used to convert the OTF format to PDF
*CALL FUNCTION 'CONVERT_OTF'
*EXPORTING
*FORMAT = 'PDF'
*MAX_LINEWIDTH = 132
ARCHIVE_INDEX = ' '
COPYNUMBER = 0
ASCII_BIDI_VIS2LOG = ' '
PDF_DELETE_OTFTAB = ' '
*IMPORTING
*BIN_FILESIZE = W_bin_filesize
BIN_FILE =
*TABLES
*otf = T_OTF
*lines = T_pdf_tab
*EXCEPTIONS
*ERR_MAX_LINEWIDTH = 1
*ERR_FORMAT = 2
*ERR_CONV_NOT_POSSIBLE = 3
*ERR_BAD_OTF = 4
*OTHERS = 5
*IF sy-subrc <> 0.
*MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
ENDFORM. " CONVERT_OTF
*& Form SAVE_DIALOG
FORM SAVE_DIALOG .
To display File SAVE dialog window
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Download to PDF '
DEFAULT_EXTENSION = '(*.PDF)'
DEFAULT_FILE_NAME = 'file.pdf'
FILE_FILTER = 'PDF Format(*.PDF)'
INITIAL_DIRECTORY = 'C:\Documents and Settings\Administrator\Desktop'
WITH_ENCODING =
PROMPT_ON_OVERWRITE = 'X'
CHANGING
FILENAME = W_FILE_NAME
PATH = W_FILE_PATH
FULLPATH = W_FULL_PATH
USER_ACTION =
FILE_ENCODING =
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 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.
ENDFORM. " SAVE_DIALOG
*& Form DOWNLOAD
FORM DOWNLOAD .
Use the FM GUI_DOWNLOAD to download the generated PDF file onto the
presentation server
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE = GV_BIN_FILESIZE
FILENAME = W_FULL_PATH
FILETYPE = 'BIN'
APPEND = ' '
WRITE_FIELD_SEPARATOR = ' '
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
IMPORTING
FILELENGTH =
TABLES
DATA_TAB = GT_PDF_TAB
FIELDNAMES =
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
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DOWNLOAD
*& Form SEND_MAIL
FORM SEND_MAIL .
***changes by rajan
*DATA : v_first TYPE USER_ADDR-NAME_FIRST,
V_LAST TYPE USER_ADDR-NAME_LAST.
DATA : detail TYPE STRING.
*SELECT SINGLE NAME_FIRST NAME_LAST FROM
USER_ADDR INTO (V_FIRST,V_LAST)
WHERE BNAME = syst-UNAME.
CONCATENATE v_first V_LAST INTO detail SEPARATED BY space.
data : v_po_no TYPE vbkd-bstkd,
v_po_date TYPE vbkd-bstdk.
data : day TYPE STRING,
month type STRING,
year TYPE STRING.
data : date TYPE STRING.
SELECT SINGLE BSTKD BSTDK
FROM VBKD
INTO (v_po_no,v_po_date)
WHERE VBELN = P_VBELN.
day = v_po_date+6(2).
month = v_po_date+4(2).
year = v_po_date+0(4).
CONCATENATE day '/' month '/' year INTO date.
CONCATENATE 'Please Find attached Order Acceptance against your P.O.No.' v_po_no 'dated' date '.' INTO detail SEPARATED BY
space.
**u2022 Assigning the Description of the object sent in the mail
CLEAR GS_DOCDATA.
GS_DOCDATA-OBJ_NAME = GC_TST.
GS_DOCDATA-OBJ_DESCR = GC_TESTING.
*u2022 Assigning the email id to Structure of the API Recipient List table
CLEAR : GT_RECLIST, GS_RECLIST.
GS_RECLIST-RECEIVER = P_MAIL. "
GS_RECLIST-REC_TYPE = 'U'."'G' ."'O'. "'B'. "'U'.
APPEND GS_RECLIST TO GT_RECLIST.
mail body rajan
I_OBJTXT = 'Dear Sir/Madam.'.
APPEND I_OBJTXT.
I_OBJTXT = detail.
APPEND I_OBJTXT.
I_OBJTXT = ''.
APPEND I_OBJTXT.
I_OBJTXT = 'Thanks.'.
APPEND I_OBJTXT.
I_OBJTXT = 'Best Regards,'.
APPEND I_OBJTXT.
I_OBJTXT = 'For Bilcare Ltd.'.
APPEND I_OBJTXT.
DESCRIBE TABLE i_objtxt LINES gv_desc_lines.
*DESCRIBE TABLE i_objtxt LINES v_lines_txt.
CLEAR I_OBJTXT.
READ TABLE I_OBJTXT INDEX gv_desc_lines.
if sy-subrc = 0.
Document information.
GS_DOCDATA-obj_name = 'ord_accept'.
GS_DOCDATA-expiry_dat = sy-datum + 10.
GS_DOCDATA-obj_descr = 'Order Acceptance'.
GS_DOCDATA-sensitivty = 'F'. "Functional object
GS_DOCDATA-doc_size = gv_desc_lines * 255.
CLEAR Gs_OBJPACK-transf_bin.
Start line of object header in transport packet
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-doc_size = gv_desc_lines * 255.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = gv_desc_lines.
GS_OBJPACK-DOC_TYPE = 'RAW'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'ORDER_ACCEPTANCE.PDF'.
APPEND GS_OBJPACK TO GT_OBJPACK.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-doc_type = 'RAW'.
*APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
*u2022 Passing the SAP Script text lines to SAPoffice: Single List with Column Length 255 table
CLEAR : GS_OBJBIN, GS_PDF_TAB.
LOOP AT GT_PDF_TAB INTO GS_PDF_TAB.
GV_POS = 255 - GV_LEN.
IF GV_POS > 134. "length of pdf_table
GV_POS = 134.
ENDIF.
GS_OBJBIN+GV_LEN = GS_PDF_TAB(GV_POS).
GV_LEN = GV_LEN + GV_POS.
IF GV_LEN = 255. "length of out (contents_bin)
APPEND GS_OBJBIN TO GT_OBJBIN.
CLEAR: GS_OBJBIN, GV_LEN.
IF GV_POS < 134.
GS_OBJBIN = GS_PDF_TAB+GV_POS.
GV_LEN = 134 - GV_POS.
ENDIF.
ENDIF.
ENDLOOP.
IF GV_LEN > 0.
APPEND GS_OBJBIN TO GT_OBJBIN.
ENDIF.
*u2022 Filling the details in SAPoffice: Description of Imported Object Components table
DESCRIBE TABLE GT_OBJBIN LINES GV_TAB_LINES.
CLEAR GS_OBJBIN.
READ TABLE GT_OBJBIN INTO GS_OBJBIN INDEX GV_TAB_LINES.
IF SY-SUBRC = 0.
GS_OBJPACK-DOC_SIZE = ( GV_TAB_LINES - 1 ) * 255 + STRLEN( GS_OBJBIN ).
GS_OBJPACK-TRANSF_BIN = 'X'.
GS_OBJPACK-HEAD_START = 1.
GS_OBJPACK-HEAD_NUM = 0.
GS_OBJPACK-BODY_START = 1.
GS_OBJPACK-BODY_NUM = GV_TAB_LINES.
GS_OBJPACK-DOC_TYPE = 'PDF'.
GS_OBJPACK-OBJ_NAME = 'ORDER_ACCEPTANCE'.
GS_OBJPACK-OBJ_DESCR = 'Order Acceptance'.
APPEND GS_OBJPACK TO GT_OBJPACK.
ENDIF.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = GS_DOCDATA
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = GT_OBJPACK
OBJECT_HEADER = I_OBJTXT
CONTENTS_BIN = GT_OBJBIN
CONTENTS_TXT = I_OBJTXT
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = GT_RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE 'Sent Successfully'.
MESSAGE 'Sent Successfully' TYPE 'I'.
CALL TRANSACTION 'YMSL20'.
LEAVE LIST-PROCESSING.
ENDIF.
SUBMIT RSCONN01
WITH MODE EQ 'INT'
AND RETURN.
ENDFORM. " SEND_MAIL
Thanks
Ankur Sharma -
Purchase Order Cancellation/Deletion
Dear SAP Gurus,
I would appreciate if any of you could advise me the best way to handle the below specific scenario.
A PO is created based on a PR. It has been released an approved. No GR/IR has been created.
How do I cancel this PO (regardless whether there is only one item or more? I suppose it cannot be deleted at all from the system.
I would do the following.
1. Cancel the release
2. Update the line item(s) price to 0.01
3. Delete the line item(s) (Trash bin). Save PO
4. Go to PR. Block the PR and close it.
Detailed steps would be very much appreciated.
Also, what would the process be when there is already GR/IR posted against the PO?
Regards,
JonathanHi,
I m losing hope now.
Can u plz tell me about that cancellation date option why it is not working and how that guy said that this is working on his system.?
I cannot undersand why?
And also i checked the second way as you suggested to select open Purchase Order in Open Item List. But you can close one P.O. at one time not multiple by selection.
Regards,
Ravi -
Smartform output to pdf in ECC 6.0 for Purchase Order
Hi Experts,
I am developing the Smartform to print Purchase Order. For this I have copied the standard Smartform of PO and modifying according to Client requirement. But I did not do any modifications on Print Program. Our client wants to save the PO into PDF format as local file after seeing the print preview . How to achieve this.I have already searched some threads, for this I need to modify the print program also. Is there any way to save PO as PDF file format with out modifying the Print Program?. Further I have another doubt, is there any possible way to save the PO as PDF after seeing the print preview?
For this the standard Print Program Is YBAA_FM06P.
Thanks and Regards,
Jagadeesh.
Edited by: Jagadeesh on Jan 22, 2009 5:33 PMHi Jagdeesh,
I hope the given code will solve your problem 100%
You just change the Parameters and your Smartform Name.
*variable declaration
DATA : fm_name TYPE rs38l_fnam. " Name of the Function Module
DATA: it_otf TYPE STANDARD TABLE OF itcoo,
it_docs TYPE STANDARD TABLE OF docs,
it_lines TYPE STANDARD TABLE OF tline,
st_job_output_info TYPE ssfcrescl,
st_document_output_info TYPE ssfcrespd,
st_job_output_options TYPE ssfcresop,
st_output_options TYPE ssfcompop,
st_control_parameters TYPE ssfctrlop,
v_len_in TYPE so_obj_len,
v_language TYPE sflangu VALUE 'E',
v_e_devtype TYPE rspoptype,
v_bin_filesize TYPE i,
v_name TYPE string,
v_path TYPE string,
v_fullpath TYPE string,
v_filter TYPE string,
v_uact TYPE i,
v_guiobj TYPE REF TO cl_gui_frontend_services,
v_filename TYPE string,
v_fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_GET_DEVICE_TYPE'
EXPORTING
i_language = v_language
i_application = 'SAPDEFAULT'
IMPORTING
e_devtype = v_e_devtype.
st_output_options-tdprinter = v_e_devtype.
st_output_options-tdprinter = 'locl'.
st_control_parameters-no_dialog = 'X'.
st_control_parameters-getotf = 'X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZDTK_MM_57FC'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = fm_name
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3
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 fm_name
*CALL FUNCTION '/1BCDWB/SF00000044'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS = st_control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = st_output_options
USER_SETTINGS = 'X'
SFP_BUKRS = P_BUKRS
SFP_WERKS = P_WERKS
SFP_EXNUM = P_EXNUM
IMPORTING
DOCUMENT_OUTPUT_INFO = st_document_output_info
JOB_OUTPUT_INFO = st_job_output_info
JOB_OUTPUT_OPTIONS = st_job_output_options
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
ELSE.
.........................CONVERT TO OTF TO PDF........................
CALL FUNCTION 'CONVERT_OTF_2_PDF'
IMPORTING
bin_filesize = v_bin_filesize
TABLES
otf = st_job_output_info-otfdata
doctab_archive = it_docs
lines = it_lines
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
.....................GET THE FILE NAME TO STORE.......................
CONCATENATE P_EXNUM '.pdf' INTO v_name.
CREATE OBJECT v_guiobj.
CALL METHOD v_guiobj->file_save_dialog
EXPORTING
default_extension = 'pdf'
*default_extension = 'doc'
default_file_name = v_name
file_filter = v_filter
CHANGING
filename = v_name
path = v_path
fullpath = v_fullpath
user_action = v_uact.
IF v_uact = v_guiobj->action_cancel.
EXIT.
ENDIF.
....................DOWNLOAD AS FILE..................................
MOVE v_fullpath TO v_filename.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_bin_filesize
filename = v_filename
filetype = 'BIN'
*filetype = 'DAT'
TABLES
data_tab = it_lines
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.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
Regards,
Devalla T Kumar -
Show SO# on purchase order
Hi, everyone-
I would like to show the SO number for each item on a purchase order. This will allow our distribution center to store the received items in bins for each particular sales order rather than putting the items in stock then re-pulling the order later.
How would I do this? I don't have a SO field option in the Form Settings on the purchase order. I'm using B1 2007A, patch 42.
Thanks in advance for your help,
Shelby
Edited by: Shelby Behrens on Mar 23, 2009 2:31 PMThanks, everyone. Can you give me some additional info?
We create PO's two ways:
Most of our PO's are created by the MRP function. Almost all of these PO's are for multiple sales orders. So I would need to create a UDF on the row level for this? Guess I thought I could only create UDF's that showed in a separate screen on the right hand side of my documents. Can you advise?
Secondly, we sometimes create PO's directly from the SO for dropships directly from the vendor to our customer. I'm guessing this hits a separate field. Would I need to create yet another UDF for this so I can be sure it prints on the PO form? Need help here too.
Basically what we're trying to do is print a copy of the PO, then have our distribution center put each item in separate bins based on SO # as they receive the PO. We don't want them to have to pull up any additional documents in SAP to find this info - should all print on the PO.
Your thoughts?
Thanks,
Shelby -
Undelete Purchase order line item
Good day,
Is it possible to undelete a deleted purchase order line item? If yes, how can I establish this?
Thanks & regards,
Christel Smoldershi
u will see block / unblock symbol also dust bin symbol in Po line. U can delete line item here and when u want to undelete by pressing unblock u can achive same
select the line item and then press unblock / undelete symbol ( Open lock symbol) line item will undelete
Vishal... -
Hello all,
we would like to save our purchase orders as pdf file on the pc. We use SAPscript to create the POs.
I have already searched the forums, but I didn't find a solution for me so far.
I don't wanna use the way over the spool requests and the program RSTXPDFT4, because the end users don't have access to that.
My question is, do I have to create a new output type for that? How does that work? Or what else do I have to do (step by step)?
Thank you,
Anne
Message was edited by:
Anne JannaschHi Anne,
*PO to PDF to string
CALL FUNCTION 'ECP_PDF_DISPLAY'
EXPORTING
purchase_order = p_ebeln
IMPORTING
* PDF_BYTECOUNT =
pdf = file
*Converting Xstring to binary_tab
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = file
* APPEND_TO_TABLE = ' '
* IMPORTING
* OUTPUT_LENGTH =
TABLES
binary_tab = int_tab1
**Downloading into PDF file
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
* BIN_FILESIZE =
filename = 'D:RDsample1.pdf'
filetype = 'BIN'
TABLES
data_tab = int_tab1
With the help of above code and triggering user exit while saving PO , you are able to get PO PDF into PC.
Just try it.
Regards,
Madhu -
WM-Purchase order -Tansfer order issue
Hi,
i created the purchase order and GRN,
1) In the transfer order
Source stor.bin 902 001 4500001113
Destination bin ZEL 001 0A-02-02
here i storage location is 001 .but i already configure Source storage section as AAA. But it triggered 001. where i have to check .
2) i maintain the storage bin structure for automatic creation
warehouse number storage type sequence
ZWM ZEL AAA
ZWM ZEL BBB
ZWM ZEL CCC
MATERIAL RM01_A is should Sequence AAA (BIN)
MATERIAL RM01_B is should Sequence BBB (BIN)
MATERIAL RM01_Ais should Sequence CCC (BIN)
Each material should move particular selected bin structure , if bin is full means system should move to avalblae bin structure
system is should give preference to allocated bin only . if bin is full means stock is move to available binHi
For question 1)
- Check Material Master WM view 1 what is the storage section assigned
- Check Customizing for Storage section IMG>Logistic Execution>WM>Strategies>Storage section search
For question 2)
- Use Storage Bin type/storage Unit type combintaion along with Storage bin type search
- Maintain Storage unit type in MMR WM view 2
- Create the storage bins with storage bin type.
Hope it helps
Karthik -
WM-Purchase order -return transfer order
hi friends
i did purchase order ,GRN ,TR, TO.. i did wrongly Transfer order..i want return to move the stock other storage bin....
with regards
dinesh
Moderator message:
Locked. Reason: basic question.
Please search how to cancel transfer order or if you can't please search how to transfer stock within your WH.
Edited by: Csaba Szommer on Jun 22, 2011 11:37 AMHi,
The concept of RETURN to vendor are two types. One is return the material to vendor if quality is not good & another one material is available as unused in the company,for example if we procure a material like Filter Plate 100 quantity and we are procuring this material very rarely and we used 95 quantity in our industry and 5 number are in stock. If you have no use of that Filter Plate further (if you feel) and if you want to dispose them you have two options.
1.One option is to sell it.
2.The other option is to return to vendor if you have good terms with vendor.
In this case, you create RETURN PO with slection of return incator in PO and then MIGO with RETURN PO with 161 MT, then quantity will reduce from your inventory.Then do Credit memo w.r.t. RETURN PO in MIRO.
But you use 122MT only if we do GR against a PO with 101 and if we want to return the material to vendor (reason may be like quality is not good , package condition is not good etc) with respect to the same PO.
For more chcek the notes 491785, 359247
Regards,
Biju K
Maybe you are looking for
-
Errors when creating spatial index
Hi, I am new to OTN and oracle technology. I met a problem as I wanted to create a spatial index. I created a table 'geoobject' with a column 'shape' of sdo_geometry. The I run the following script: insert into user_sdo_geom_metadata values ('geoobje
-
Hi, I have got a problem. I need to get the number of files which are in a folder and i also need to get the name of these files. Is there any easy method how ot do it? betlor5
-
Issue with Mulidimensional Nested Table
Hi All, I am studing Multidimensional Nested table and have the below code: DECLARE TYPE table_type1 IS TABLE OF INTEGER; TYPE table_type2 IS TABLE OF TABLE_TYPE1; table_tab1 table_type1 := table_type1(); table_tab2 table_type2 := table_type2
-
Append a line to a dynamic table in a dynamic structure
Hello, i've created a dynamic structure <ls_itab> TYPE ANY. This structure contains a deep structure name 'CELLSTYLES' of type lvc_t_styl. Now i want to add a line to the deep structure CELLSTYLES. I'll tried something like this: data: <ld_fld> TY
-
sim not vaild 4s