Storage location validation in ME21n
Dear Experts,
While creating a PO in ME21N, there is no validation for a storage location for checking whether the material record created for storage location or not.
How to set a warning or error messgae in such cases?
Please post your valuable inputs
regards,
Shetty
>
shetty123s wrote:
> Dear Experts,
>
> While creating a PO in ME21N, there is no validation for a storage location for checking whether the material record created for storage location or not.
>
> How to set a warning or error messgae in such cases?
>
> Please post your valuable inputs
>
> regards,
> Shetty
Check for BAdI ME_PURCHDOC_POSTED...here you can write a code with help of your ABAP person that the system will first check the material code (MATNR) & storage location (LGORT) from each PO line item...then with the same combination will check if there is any entry in table MARD...if no entry found then system will throw a customized error...
Regards,
Indranil
Similar Messages
-
Storage location list during Confirmation
Hi! I discovered during confirmation of the goods in SRM (SRM 4, extended classic) that when I choose to list the storage location for selection, although only the relevant storage locations are listed, there are gaps in between the storage locations. I suspect that it is taking the sequence of the order in the user attributes.
For example, if I maintain the attributes in the following fashion:
Plant SLoc
0001 0010
0001 0020
0002 0010
0002 0020
0002 0030
On saving the attributes, it will be sorted and shown like this:
Plant SLoc
0001 0010
0002 0010
0001 0020
0002 0020
0002 0030
If my order is for plant 0002, on listing the SLoc for the item during confirmation, I get the sloc listed like this
<blank>
0010
<blank>
0020
0030
What I would like to achieve is for the system to show the storage location valid for the plant and as per maintained in the attributes
0010
0020
0030
Does anyone have similar problem as described? What should be the standard behavior?
Cheers!
SFHi! I found this note 632616 but it is about listed the details of the plants and logical system so that the user knows which storage location to pick. It did not specially talk about the blanks/gaps.
-
How to validate the storage location in me21n?
Hi,
I am having the requirement to validate the storage location in me21n transaction
whether the entered material is belongs to that storage location or not.
is there any exit to this requirement?
Helpful information is rewarded.
Regards,
Riaz.Hello Riaz,
The BADI <b>ME_PROCESS_PO_CUST</b> would be very useful here. If you want to trigger your validation message after user entered the data then use method <b>PROCESS_ITEM</b>.
I hope this helps.
Best regards, -
ME21N: COST CENTER DETERMINATION BASED ON STORAGE LOCATION
Hi,
When creating a purchase order (ME21N) I need to determine the cost center based on storage location. How can I solve this problem?
If the solution goes through creating an USER EXIT, please, have in mind that my knowledge about ABAP is really poor.
Thanks in advance.
Luis Álvarez.Hello Priyanka,
first of all, thanks for your quick response. By COA I suppose you mean Controlling Area.
Secondly, isn't possible to implement something like this for purchase orders?:
https://forums.sdn.sap.com/click.jspa?searchID=18930382&messageID=6494959
Regards,
Luis.
Edited by: LUIS ÁLVAREZ on Nov 20, 2008 8:28 AM -
Validation for storage location
Greetings to Experts!!
I am looking for following two validations;
1- stock outward movement from a particular storage location (say ABC ) could only be possible via 351.
2- 351 movement type could only be used for storage location ABC
Plz Help,
Regards,
M. Tayyab AslamFor the first one, IN OMJJ, for the movement type , tick The storage location automatic option. If the stor loc in maintained in the material master, then that will be picked automatically..
For the second , I don find any possiblilty
karthick -
Badi for ME21N & ME22N to check storage location
Hello Guru's,
I need BADI for ME21N & ME22N to check storage location is maintained for plant used in PO i'm using method IF_EX_ME_PURCHDOC_POSTED~POSTED with definition name ME_PURCHDOC_POSTED but this throws message on SAVE.
But my requirement this message should be displayed before saving.Please guideHi,
Use BADI:
ME_PROCESS_PO_CUST
BADI CL_ME_PO_CUST
Business Add-in
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Customer
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
ME_PO_PRICING Enhancements to Price Determination: Internal
ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
SMOD_MRFLB001 Control Items for Contract Release Order
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
MM_DELIVERY_ADDR_SAP Determination of Delivery Address
ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_REQ_POSTED Purchase Requisition Posted
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
ME_PURCHDOC_POSTED Purchasing Document Posted
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
ME_BSART_DET Change document type for automatically generated POs
ME_BAPI_PR_CREATE_02
ME_BAPI_PR_CREATE_01
ME_BAPI_PO_CREATE_02
ME_BAPI_PO_CREATE_01
ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMITMENT_RETURN Commitment for return item
ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CHECK_OA Check BAdI for Contracts
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
Edited by: Neenu Jose on Nov 21, 2008 6:13 AM
Edited by: Neenu Jose on Nov 21, 2008 6:16 AM -
Validation on storage location
Dera Experts ,
I have the following queries:
1. Is it possible to have a particular user to have authorizations for a few selected storage locations? That is , the user should be able 2 carry out the transaction for only a few stores & the rest , he should not . If yes how .
2. Is it possible to ahve the validation of the storage loaction for a material > Eg if a material is being wrongly posted thye wrong store , is it possible to validate it ? If yes How ?
Regards
AnisYou wil first have to activate "Authorization checks for storage location" , goto SPRO->MAterials mgmt->Inventory Management and physical inventory->Authorization Management->Authorisation checks for storage location , here you need to select the storage locations for which you want to enable the authorization checks.
Then you will have to ask yor Basis person to assign relevant storage locations to the user roles.
Regards
Raviraj -
Material deletion flag at storage location level is not working
I have a material that is created in some plants and also in some storage locations within each plant. If I mark the deletion flag at plant level I am not able to create a PO -> Me051 error message appears. Whereas if I mark the deletion flag at storage location level nothing appens. I am able to create a PO and also to create to goods receipt. Is there any customization that I should do in order to get the error message?
Thanks in advance.storage location level deletion flag is not checked at order creation.
it is assumed that you can change the storage location when you do the receipt.
MRP run is at plant level, so the requirement is valid even the storage location view is flagged for deletion. -
Valuation at Storage Location Level
Dear Experts ,
We need to transfer Stock from Storage Location to another Storage Location. MVT 311
The problem is that we want the system to create Financial Document during this step, And as we know valuation is on Company Code or Plant Level .
So What help us to execute this is it profit center or Business Area or what ?
Please AdviceHi,
Try this,
You can follw this following process for Stock Transfer between Depots (locations):
Material should exist in both the plants (Delivering & Ordering),
Internal customer should be assigned to the ordering plant ( MM -> Purchasing -> Purchase Order -> Setup stock transport order -> assign the internal customer to the ordering plant and assign the Sales area of the internal customer)
T-code : OMGN
Assign its Sales area to the delivering plant
Assign the document type and Delivery type NB and NLCC
Assign the Supplying plant --> Receiving Plant --> NB
Take the delivering plant and assign the sales area.
Vendor master has to be created and assign the supply source ( Delivering Plant).
Create a purchase order ME21N (Purchasing Document type UB)---> Save
Delivery - VL10 B ---> Calculation rule (appropriate) --> Assign the purchase order number here and execute.
Select the Delivery creation line and do the back ground process.
Start the log display and see the delivery document number by the documents button
Go to VL02N --> do picking and PGI --> Then do the MIGO with respect to the delivery document.
Subsequently yopu can also issue stock transfer Invoice (which is treated as Proforma Invoice & not posted in accounts) for records or to be given with vehicle.
Hope this helps...
Regards
KK -
Stock transfer between Plant/Storage location to Plant/Storage location
Dear Experts,
This is a MM component of SAP Retail.
We have 4 brands ( Plants of type B, Plants of type C etc) that needs inventory from the same Distribution center (Plant A) for some common products. Here the direction is to prioritize the inventory per brand. The requirement is one brand should not take the inventory of the other brand.
To overcome this problem , the solution proposed is to have different storage location for different brands in the same DC.
When we run replenishment planning for the brands and do a ATP check, the availability check should consider only the one issuing storage location in the DC which we allocated for the brand.
I do see the following set up in SPRO and I have done the following.
Step1: Activate Stock Transfer between Storage Locations SPRO->Material Management->Purchasing->Purchase Order->set up stock transport order->set up stock transport order between storage locations-> u2018Activate Stock transfer between storage locationsu2019
Step2: Assign Delivery Type and checking rule according to storage
SPRO->Material Management->Purchasing->Purchase Order->set up stock transport order->set up stock transport order between storage locations->Assign Delivery Type and Checking Rule According to Storage
Step3: Define Shipping Data for Stock Transfer between Storage Locations
SPRO ->Material Management ->Purchasing ->Purchase Order ->set up stock transport order ->set up stock transport order between storage locations -> Define Shipping Data for Stock Transfers between Storage Locations
Step4: Define Rule for Determination off Shipping Point SPRO->Material Management->Purchasing->Purchase Order->set up stock transport order->set up stock transport order between storage locations -> Set-up Storage-Location u2013dependent shipping point determination->Define rule for determination of shipping point
Step5: Shipping Point Assignment According to Storage Location
SPRO->Material Management->Purchasing->Purchase Order->set up stock transport order->set up stock transport order between storage locations-> Set-up Storage-Location u2013dependent shipping point determination-> Assign Shipping Points According to Storage Location
Question.No:1- After completing the above set up in me21n, the issuing storage location field is greyed out. I am not able to enter any value here. Can you please help.
Question.No:2
I do see the following setting.
Under IMG ---> Material Management ---> Purchasing --> Purchase Order --> Set up Stock Transport Order -->Business Add-In for Determination of Issuing Storage Location
Display the IMPLEMENTATION
Double click on the method GET_SUPPLYING_SL
Click the Execute button
Click the detail button on IF_EX_MD_EXT_SUP
Execute GET_SUPPLYING_SL
There is a prerequisite for this BADI .I have done those things.What i dont understand is where to force the combination of supplying site/issuing stor.loc/receiving site/receiving stor.loc
Kindly provide your inputs.
Thanks,
VasanthanDear,
Have You configure MRP in second plant (where you want to transport the Material).
Please try with this and do again Po for stock transport.
Regards
Piyush Patel -
Storage location Data is not saving in table MARD using BAPI method.
Hi Experts,
TABLES: T001L, "Storage Locations
MARA, "General Material Data
MAKT, "Material Descriptions
MBEW, "Material Valuation
MARC, "Plant Data for Material
MARD. "Storage Location Data for Mate
DATA: BAPI_HEAD LIKE BAPIMATHEAD, "MATERIAL
BAPI_MAKT LIKE BAPI_MAKT, "Material Description
BAPI_MARA1 LIKE BAPI_MARA, "Client Data
BAPI_MARAX LIKE BAPI_MARAX,
BAPI_MARC1 LIKE BAPI_MARC, "Plant View
BAPI_MARCX LIKE BAPI_MARCX,
BAPI_MBEW1 LIKE BAPI_MBEW, "Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX,
BAPI_MARD1 LIKE BAPI_MARD, "Storage location
BAPI_MARDX LIKE BAPI_MARDX,
BAPI_RETURN LIKE BAPIRET2.
DATA: BEGIN OF INT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF INT_MAKT.
DATA: BEGIN OF INT_MAT OCCURS 100,
WERKS(4), "Plant
LGORT(4), "Storage location
MTART(4), "Material type
MATNR(18), "Material number
MAKTX(40), "Material description
MATKL(9) , "Material group
MBRSH(1), "Industry sector
MEINS(3), "Base unit of measure
GEWEI(3), "Weight Unit
SPART(2), "Division
EKGRP(3), "Purchasing group
VPRSV(1), "Price control indicator
STPRS(12), "Standard price
PEINH(3), "Price unit
SPRAS(2), "Language key
BKLAS(4), "VALUATION CLASS
VERPR TYPE VERPR_BAPI, "MOVING PRICE
BWTTY(1), "Valuation Catogory
MLAST(1), "Price determination
MLMAA(1), "Material Ledger
EKLAS(4), "Valuation Class for sales order stock
QKLAS(4), "Valuation Class for Project Stock
ZKPRS TYPE DZKPRS, "Future price
ZKDAT TYPE DZKDAT, "Valid From Date
BWPRS TYPE BWPRS, "Tax price 1
BWPS1 TYPE BWPS1, "Tax price 2
VJBWS TYPE VJBWS, "Tax price 3
ABWKZ TYPE ABWKZ, "Devaluatin indicator
BWPRH TYPE BWPRH, "Commercial price 1
BWPH1 TYPE BWPH1, "Commercial price 2
VJBWH TYPE VJBWH, "Commercial Price 3
XLIFO(1), "LIFO/FIFO revelant
MYPOL(4), "Pool no for LIFO
MMSTA(2), "Plant specific material status
AUSME TYPE AUSME, "Unit of issue
QMATA(6), "Material Authorization group
RBNRM(9), "Catalog Profile
WEBAZ TYPE WEBAZ, "Goods reciept processing time in days
PRFRQ TYPE PRFRQ, "Recurring Insepction
SSQSS(8), "QM Control key
QZGTP(4), "Certificate Type
QSSYS(4), "Required QM system for vendor
END OF INT_MAT.
DATA: V_MATNR TYPE MARA-MATNR.
SELECT-OPTIONS:
PLANT FOR MARC-WERKS OBLIGATORY MEMORY ID PLT,
S_LGORT FOR MARD-LGORT MEMORY ID STL,
MATERIAL FOR MARA-MATNR MEMORY ID MAT,
MATLTYPE FOR MARA-MTART MEMORY ID MTY,
DIVISION FOR MARA-SPART MEMORY ID DIV.
PARAMETERS: F_FILE LIKE RLGRAP-FILENAME
DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
IF GETDATA = 'X'.
PERFORM DOWNLOAD_DATA.
PERFORM DOWNLOAD_FILE.
ENDIF.
IF UPDDATA = 'X'.
PERFORM UPLOAD_FILE.
PERFORM UPDATE_MM.
ENDIF.
FORM DOWNLOAD_DATA.
SELECT * FROM MARC WHERE LVORM EQ ' '
AND WERKS IN PLANT
AND MATNR IN MATERIAL.
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR = MARC-MATNR.
CHECK MATLTYPE.
CHECK DIVISION.
CLEAR MBEW.
SELECT SINGLE * FROM MBEW WHERE MATNR = MARC-MATNR
AND BWKEY = MARC-WERKS.
CLEAR MAKT.
SELECT SINGLE * FROM MAKT WHERE SPRAS = 'EN'
AND MATNR = MARC-MATNR.
CLEAR MARD.
SELECT SINGLE * FROM MARD WHERE WERKS IN PLANT
AND LGORT IN S_LGORT.
WRITE:/ MARC-WERKS, "Plant
MARD-LGORT, "Storage location
MARA-MTART, "Material type
MARA-MATNR, "Material number
MARA-MATKL, "Material group
MARA-MBRSH, "Industry sector
MARA-MEINS, "Base unit of measure
MARA-GEWEI, "Weight Unit
MARA-SPART, "Division
MARC-EKGRP, "Purchasing group
MBEW-VPRSV, "Price control indicator
MBEW-STPRS, "Standard price
MBEW-PEINH, "Price unit
MBEW-BKLAS, "VALUE CLASS
MAKT-SPRAS, "Language key
MBEW-BKLAS, "Valuation Class
MBEW-VERPR, "Moving price
MAKT-MAKTX, "Material description
MBEW-BWTTY, "Valutaion Catogorey
MBEW-MLAST, "Price Determination
MBEW-MLMAA, "Material Ledger
MBEW-EKLAS, "Valuation class for Sales order stock
MBEW-QKLAS, "Valutaion Class for Project Stock
MBEW-ZKPRS, "Future Price
MBEW-ZKDAT, "Valid From Date
MBEW-BWPRS, "Tax price 1
MBEW-BWPS1, "Tax price 2
MBEW-VJBWS, "Tax price 3
MBEW-ABWKZ, "Devaluatin indicator
MBEW-BWPRH, "Commercial price 1
MBEW-BWPH1, "Commercial price 2
MBEW-VJBWH, "Commercial Price 3
MBEW-XLIFO, "LIFO/FIFO revelant
MBEW-MYPOL, "Pool no for LIFO
MARC-MMSTA, "Plant specific material status
MARC-AUSME, "Unit of issue
MARC-QMATA, "Material Authorization group
MARA-RBNRM, "Catalog Profile
MARC-WEBAZ, "Goods reciept processing time in days
MARC-PRFRQ, "Recurring Insepction
MARC-SSQSS, "QM Control key
MARC-QZGTP, "Certificate Type
MARC-QSSYS. "Required QM system for vendor
INT_MAT-WERKS = MARC-WERKS. "Plant
INT_MAT-LGORT = MARD-LGORT. "Storage Location
INT_MAT-MTART = MARA-MTART. "Material type
INT_MAT-MATNR = MARA-MATNR. "Material number
INT_MAT-MAKTX = MAKT-MAKTX. "Material description
INT_MAT-MATKL = MARA-MATKL. "Material group
INT_MAT-MBRSH = MARA-MBRSH. "Industry sector
INT_MAT-MEINS = MARA-MEINS. "Base unit of measure
INT_MAT-GEWEI = MARA-GEWEI. "Weight Unit
INT_MAT-SPART = MARA-SPART. "Division
INT_MAT-EKGRP = MARC-EKGRP. "Purchasing group
INT_MAT-VPRSV = MBEW-VPRSV. "Price control indicator
INT_MAT-STPRS = MBEW-STPRS. "Standard price
INT_MAT-PEINH = MBEW-PEINH. "Price unit
INT_MAT-SPRAS = MAKT-SPRAS. "Language key
INT_MAT-BKLAS = MBEW-BKLAS. "VALVATION CLASS
INT_MAT-VERPR = MBEW-VERPR. "MOVING price
INT_MAT-BWTTY = MBEW-BWTTY. "Valutaion Catogorey
INT_MAT-MLAST = MBEW-MLAST. "Price Determination
INT_MAT-MLMAA = MBEW-MLMAA. "Material Ledger
INT_MAT-EKLAS = MBEW-EKLAS. "Valuation class forS.O Stock
INT_MAT-QKLAS = MBEW-QKLAS. "Valutaion Class for Project
INT_MAT-ZKPRS = MBEW-ZKPRS. "Future Price
INT_MAT-ZKDAT = MBEW-ZKDAT. "Valid From Date
INT_MAT-BWPRS = MBEW-BWPRS. "Tax price 1
INT_MAT-BWPS1 = MBEW-BWPS1. "Tax price 2
INT_MAT-VJBWS = MBEW-VJBWS. "Tax price 3
INT_MAT-ABWKZ = MBEW-ABWKZ. "Devaluatin indicator
INT_MAT-BWPRH = MBEW-BWPRH. "Commercial price 1
INT_MAT-BWPH1 = MBEW-BWPH1. "Commercial price 2
INT_MAT-VJBWH = MBEW-VJBWH. "Commercial Price 3
INT_MAT-XLIFO = MBEW-XLIFO. "LIFO/FIFO revelant
INT_MAT-MYPOL = MBEW-MYPOL. "Pool no for LIFO
INT_MAT-MMSTA = MARC-MMSTA. "Plant specific material
INT_MAT-AUSME = MARC-AUSME. "Unit of issue
INT_MAT-QMATA = MARC-QMATA. "Material Authorization group
INT_MAT-RBNRM = MARA-RBNRM. "Catalog Profile
INT_MAT-WEBAZ = MARC-WEBAZ. "Goods reciept processing
INT_MAT-PRFRQ = MARC-PRFRQ. "Recurring Insepction
INT_MAT-SSQSS = MARC-SSQSS. "QM Control key
INT_MAT-QZGTP = MARC-QZGTP. "Certificate Type
INT_MAT-QSSYS = MARC-QSSYS. "Required QM system for
APPEND INT_MAT.
CLEAR INT_MAT.
ENDSELECT.
ENDFORM.
FORM DOWNLOAD_FILE.
call function 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Download Successfully to your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPLOAD_FILE.
call function 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Upload Successfully from your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPDATE_MM.
LOOP AT INT_MAT.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = INT_MAT-MATNR
IMPORTING
OUTPUT = INT_MAT-MATNR
EXCEPTIONS
LENGTH_ERROR = 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.
Header
BAPI_HEAD-MATERIAL = INT_MAT-MATNR.
BAPI_HEAD-IND_SECTOR = INT_MAT-MBRSH.
BAPI_HEAD-MATL_TYPE = INT_MAT-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH INT_MAKT.
INT_MAKT-LANGU = INT_MAT-SPRAS.
INT_MAKT-MATL_DESC = INT_MAT-MAKTX.
APPEND INT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = INT_MAT-MATKL.
BAPI_MARA1-BASE_UOM = INT_MAT-MEINS.
BAPI_MARA1-UNIT_OF_WT = INT_MAT-GEWEI.
BAPI_MARA1-DIVISION = INT_MAT-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = INT_MAT-WERKS.
BAPI_MARC1-PUR_GROUP = INT_MAT-EKGRP.
BAPI_MARC1-PUR_STATUS = INT_MAT-MMSTA.
BAPI_MARC1-ISSUE_UNIT = INT_MAT-AUSME.
BAPI_MARC1-QM_AUTHGRP = INT_MAT-QMATA.
BAPI_MARC1-GR_PR_TIME = INT_MAT-WEBAZ.
BAPI_MARC1-INSP_INT = INT_MAT-PRFRQ.
BAPI_MARC1-CTRL_KEY = INT_MAT-SSQSS.
BAPI_MARC1-CERT_TYPE = INT_MAT-QZGTP.
BAPI_MARC1-QM_RGMTS = INT_MAT-QSSYS.
BAPI_MARCX-PLANT = INT_MAT-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-PUR_STATUS = 'X'.
BAPI_MARCX-ISSUE_UNIT = 'X'.
BAPI_MARCX-QM_AUTHGRP = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
BAPI_MARCX-INSP_INT = 'X'.
BAPI_MARCX-CTRL_KEY = 'X'.
BAPI_MARCX-CERT_TYPE = 'X'.
BAPI_MARCX-QM_RGMTS = 'X'.
Accounting 1
BAPI_MBEW1-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
BAPI_MBEW1-STD_PRICE = INT_MAT-STPRS.
BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
BAPI_MBEW1-MOVING_PR = INT_MAT-VERPR.
BAPI_MBEW1-VAL_CLASS = INT_MAT-BKLAS.
BAPI_MBEW1-VAL_CAT = INT_MAT-BWTTY.
BAPI_MBEW1-ML_SETTLE = INT_MAT-MLAST.
BAPI_MBEW1-ML_ACTIVE = INT_MAT-MLMAA.
BAPI_MBEW1-VM_SO_STK = INT_MAT-EKLAS.
BAPI_MBEW1-VM_P_STOCK = INT_MAT-QKLAS.
BAPI_MBEW1-FUTURE_PR = INT_MAT-ZKPRS.
BAPI_MBEW1-VALID_FROM = INT_MAT-ZKDAT.
*ACCOUNTING 2
BAPI_MBEW1-TAXPRICE_1 = INT_MAT-BWPRS.
BAPI_MBEW1-TAXPRICE_2 = INT_MAT-BWPS1.
BAPI_MBEW1-TAXPRICE_3 = INT_MAT-VJBWS.
BAPI_MBEW1-DEVAL_IND = INT_MAT-ABWKZ.
BAPI_MBEW1-COMMPRICE1 = INT_MAT-BWPRH.
BAPI_MBEW1-COMMPRICE2 = INT_MAT-BWPH1.
BAPI_MBEW1-COMMPRICE3 = INT_MAT-VJBWH.
BAPI_MBEW1-LIFO_FIFO = INT_MAT-XLIFO.
BAPI_MBEW1-POOLNUMBER = INT_MAT-MYPOL.
BAPI_MBEWX-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
BAPI_MBEWX-MOVING_PR = 'X'.
BAPI_MBEWX-VAL_CLASS = 'X'.
BAPI_MBEWX-VAL_CAT = 'x'.
BAPI_MBEWX-ML_SETTLE = 'X'.
BAPI_MBEWX-ML_ACTIVE = 'X'.
BAPI_MBEWX-VM_SO_STK = 'X'.
BAPI_MBEWX-VM_P_STOCK = 'X'.
BAPI_MBEWX-FUTURE_PR = 'X'.
BAPI_MBEWX-VALID_FROM = 'X'.
BAPI_MBEWX-TAXPRICE_1 = 'X'.
BAPI_MBEWX-TAXPRICE_2 = 'X'.
BAPI_MBEWX-TAXPRICE_3 = 'X'.
BAPI_MBEWX-DEVAL_IND = 'X'.
BAPI_MBEWX-COMMPRICE1 = 'X'.
BAPI_MBEWX-COMMPRICE2 = 'X'.
BAPI_MBEWX-COMMPRICE3 = 'X'.
BAPI_MBEWX-LIFO_FIFO = 'X'.
BAPI_MBEWX-POOLNUMBER = 'X'.
*Storage Locations
BAPI_MARD1-PLANT = INT_MAT-WERKS.
BAPI_MARD1-STGE_LOC = INT_MAT-LGORT.
BAPI_MARDX-PLANT = INT_MAT-WERKS.
BAPI_MARDX-STGE_LOC = INT_MAT-LGORT.
WRITE:/ BAPI_HEAD-MATERIAL, BAPI_MARC1-PLANT ,BAPI_MARD1-STGE_LOC.
call function 'BAPI_MATERIAL_SAVEDATA'
exporting
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
<b> STORAGELOCATIONDATA = BAPI_MARD1
STORAGELOCATIONDATAX = BAPI_MARDX</b>
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = INT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error Message ', BAPI_RETURN-MESSAGE.
ENDIF.
ENDLOOP.
ENDFORM.
<b>i am using this bapi method to copy materials from one plant to another plant using storage location so here what happenig is everyting is going correct but only the storage location data is not saving in table mard so any body faced this kind of problem please tell me.... and one more dbt
bapi_marcx-pur_status = 'x' what is 'X' here??? is that mandatory field or required field ???
points wil be rewarded.
reagrds,
sunil k airam.In the HEADDATA structure, STORAGE_VIEW should also be set as 'X' , in order to update storage location data
for example
BAPI_HEAD-STORAGE_VIEW = 'X'.
Also, PUR_STATUS corresponds to field MARA-MSTAE whose domain has value table T141, therefore values in the field are checked against T141
Edited by: Harris Veziris on May 12, 2008 12:37 PM -
Storage location missing in purchase order
Hi all, I'm struggling to find why the storage location is not copied from purchase requisition to purchase order using ME21n.
Further this happens only for one buyer, the same PR's if converted in PO by other buyers, move correctly storage locations to PO.
Only for one buyer the storage location comes up blank and he has to populate manually the field.
I've checked his SAP profile and it's perfectly the same of all other buyers. Also he hasn't any particular personal settings in his ME21n.
Apparently there aren't reason why it should happen but it does.
Also searching on the web I haven't found any documentation or any other SAPer with the same issue
Can someone give me some suggestion?
thanks
LucaThere are 3 reasons for this issue...
1. Authorization
You have said that, all authorizations are same for this buyer compare with other.
2. Personal settings in me21n.
You have also said that there are no issues with the personal settings..
3. User parameter..
Check user parameter from su01 tcode. Is it showing same as other users..
Also check again the personal settings, is there tick the option "Always propose" for storage location in me21n.. -
Change default storage location during creation of PO
Hello all,
I have the following question.
When creating a purchase order using ME21N and filling in the items, the storage location is retreived from the material masterdata and displayed as default.
I need to change this default, because the storage location must be determined in another way.
So when entering the values for the item in the screen, another Stloc needs to be determined and displayed, overwriting the Stloc from the material master data.
For this I probably need a BAPI.
Can anyone tell me which BAPI to use and how I can implement this?
Because I also no experience with BAPI's.
Thanks in advance.
Kind regards,
MarcoHi Van,
You need to goto SE18 -> give 'ME_PROCESS_PO_CUST' in BADI Name - > Click on Enhancement Implementation at the header -> Create -> Give some implementation name starts with 'Z ->provide some short description -> Here you need to click on 'Interface' tab -> and double click on the method which serves your purpose.
I think you need to do the enhancement for storage location so you need to use the method 'PROCESS_ITEM'.
<text removes>
Thanks,
Siva
Message was edited by: Matthew Billingham - don't ask for points -
Default SC Plant Company code and Storage location Based on Position
Hi All,
We are on version SRM 7.02.
We are using SAP ECC R/3 EHP7 based system as a back end FI and HR system.
Org structure in SRM is replicated fromm HR system.
We have case of concurrent employment in the HR org structure , which means one USER can be assigned to multiple Positions in an org structure.
We have a user A , who is created in Two different org units say O1 , O2 occupying positions P1 and P2, belonging to company code C1 and C2.
Whenever a SC is created a custom enhancement shows all the user positions to him and he has to choose one from the list of positions.
Now based on the selected position(P1) , i have to default plant(PL1), storage location(SL1) and Company code(C1).
Even after defaulting attributes based on the position, user gets an error "company code C1 is not valid for user"
This error (Message class : /SAPSRM/CLL ; # 135) is thrown from method : /SAPSRM/CL_CH_WD_DODM_SC_I_BD /SAPSRM/IF_CLL_MAPPER~UPDATE
after getting user's Company code using following method.
/sapsrm/cl_pdo_shared_user=>/sapsrm/if_pdo_shared_user~get_company_code
This gets Company code as C2 ; Based on Users Attributes and not based on User Position attributes.
If i overwrite values fetched by this method in Implicit enhancement, then plant(PL1), storage location(SL1) are not getting fetched.
Does anyone have any solution for this problem?
Regards,
Ashish ShahHi MURUGESAN !
Can you give me some information more in Special Procument Configure in plant 2000 like:
- Procurement type (maybe F)
- Special procurement (Maybe U)
- Plant (Maybe 1000).
- Issuing plant (maybe 2000)
We will check together.
Regards,
Tony -
Automatic Storage location at the time of GR
Dear Gurus,
How can we make customization that the storage locations to come by default as given in Material Master while doing the Goods Receipt?
Pls provide speedy answer.
For example if I have given storage location as Raw material store in material master then it should come automatically while I do MIGO and without manually entering the same.
Regards
ShashDear Shash
If you want Storage Location automatic when Goods Receipt, please fill Storage Location in:
- PO when you issue manual (ME21N)
- Purchase Requisition if PO convert from Purchase Requisition (create Purchase Requisition - ME51N).
- Material Master (MM01) If you issue PO from PlOrd convert to Purchase Requisition and Purchase Requisition to PO.
Regards,
Thang
Maybe you are looking for
-
Hi guys, You know how in Final Cut Pro there is a feature that lets you preview onto a DV cam or other firewire device, this lets me send my final cut project to my camera which is connected to my tv so I can preview my output, I got thinking of usin
-
I am trying to remote administrate a Mac Mini running Mac 10.8 server but couldn't figure out which port to use. Tried the following but still woudn't connect unless DMZ is opened. Remote Login (SSH) - 22 Screen Sharing Service (VNC) - 5900 Web Servi
-
How load different types of file in SSIS
could you please suggest how can we load different types of file in SSIS. The file metadata is not defined . So the SSIS package will read the files palced in a defined shared location or folder where based on the column value will determine the data
-
Is there a way to enable the cover tab in iTunes 11.1.1?
I try to load a cover picture to an album. The cover tab is disabled. Where can can I enable the functionality? Just adding a picture in information cover section does not work.
-
Hi, I have installed the oc4j and running it on Windows 98. I installed the oc4j with the command - java -jar oc4j.jar -install. I did run the server with command - java -jar oc4j.jar. Now when I stop the server - java -jar admin.jar ormi://localhost