Restrict changes to BOM in PO
Hi everyone,
I have an item in a Purchase Order with item category L. Now when i go into the component button I want to put a restriction on it so that no one should be able to change any data in the BOM.I am working on version 4.6C. Pls suggest a solution.
Edited by: KURUVELLA NAVEEN on Aug 7, 2008 10:56 AM
hi,
there is badi for that ....please go for enhancement point...
Similar Messages
-
Object to Restrict Changes in BOM (CS02)
Dear Sap Experts,
I want to restrict changes in BOM t-code CS02 on the basis of Material Category 1. For example I have 2 material category Camera and Vaccum cleaner. And on one user I want to allow changes only cameras BOM. Please guide me what is object for it.
Thanks
Regards
Muhammad UmarHi Umar,
In BOM header data under Quants/Long txt you have on field as Authorization group. You can control the BOM changes by different users through authorizaton groups.
Define authorization groups for the two users Eg: Z001, Z002. Enter Z001 for BOM's header materials pertaining to category camera and Z002 for BOM's header materials pertaining to Vaccum.
Create seperate roles in PFCG (Take Basis help) for User 1, User 2 and maintain this authorization group in the role for change BOM T code i.e. CS02 against authorization field BEGRU in authorization object C_AENR_BGR.
System will display the error message as 'You are not authorized for authorization group XXXX' if they try to change BOM with other authorization group.
Thanks & Regards,
Ramagiri -
BAPI to change a BOM copmonent
Hi gurus,
I am using a BAPI named by BAPI_BOM_UPLOAD_SAVE.
With this BAPI i could create a new BOM. But i am not able to change a specific component in the BOM. Is there any indicators to imply the change or is there any BAPI to change the existing BOM component without having the whole structure to be used.
Regards,
Nehru.FU CSAP_MAT_BOM_MAINTAIN
Functionality
You can use function module CSAP_MAT_BOM_MAINTAIN to process simple material BOMs.
This function module is intended mainly as a tool for changing BOMs. However, it can also be used to create BOMs.
If you only want to create BOMs, use function module CSAP_MAT_BOM_CREATE.
To change BOMs, you can also use the following function modules:
CSAP_MAT_BOM_OPEN
CSAP_BOM_ITEM_MAINTAIN
CSAP_MAT_BOM_CLOSE
For more information and examples, see the documentation of the individual function modules.
Restrictions:
To date, you can only process one alternative or variant with this function module. This means that, if you do not enter an alternative for function module CSAP_MAT_BOM_MAINTAIN, the system assumes that you want to process alternative 01.
To date, changes to the BOM header are not yet supported.
Please note:
The item to be changed can be identified in two ways:
via the fields item category, item number, sort string, and object (depending on the item category, this can be material, document data, or class data).
The names of these identifying fields begin with 'ID_' and are contained in structure CSIDENT_02. Structure CSIDENT_02 is part of structure STPO_API03.
You can use any combination of these fields to identify the item, provided the fields identify the item uniquely. Otherwise you see the error message 'Item cannot be identified uniquely'.
via the BOM node and BOM item counter
These fields are only known to the system if you have read the BOM before. If you identify the item in this way, you should therefore use function modules CSAP_MAT_BOM_OPEN, CSAP_BOM_ITEM_MAINTAIN, or CSAP_MAT_BOM_CLOSE to change the BOM.
If the error message 'Item cannot be changed' appears in the log, this can be for the following reasons:
- The item is not valid on the valid-from date - it becomes valid at a
later date.
- The item has already been changed on the same valid-from date
with a different change number.
You cannot change the item category of an item that exists already in the system.
To delete an item, you must identify it as described above for the change function and set the deletion indicator.
FL_BOM_CREATE (default ' ')
If you set this indicator to 'X', the system creates a new BOM if it cannot find the BOM you want to change and there is no other error.
Items can only be created if sufficient data exists to do this.
The system ignores items with a deletion indicator when creating a BOM.
FL_NEW_ITEM (default ' ')
If you set this indicator to 'X', the system creates a new item if it cannot find the item with the identification entered.
The system ignores items with a deletion indicator.
Example
*---- BOM header data structure
data: begin of tstk2.
include structure stko_api02.
data: end of tstk2.
*---- BOM items table
data: begin of tstp3 occurs 0.
include structure stpo_api03.
data: end of tstp3.
*---- Object dependencies table
* Basis data
data: begin of tdep2_data occurs 0.
include structure dep_data.
data: end of tdep2_data.
* Description
data: begin of tdep2_descr occurs 0.
include structure dep_descr.
data: end of tdep2_descr.
* Source
data: begin of tdep2_source occurs 0.
include structure dep_source.
data: end of tdep2_source.
* Sequence
data: begin of tdep2_order occurs 0.
include structure dep_order.
data: end of tdep2_order.
* Documentation
data: begin of tdep2_doc occurs 0.
include structure dep_doc.
data: end of tdep2_doc.
data: flg_warning like capiflag-warning.
*- Initialize database log
call function 'CALO_INIT_API'
exceptions
log_object_not_found = 1
log_sub_object_not_found = 2
other_error = 3
others = 4.
*- Fill item data
* Exception: items that can be identified uniquely via their item
* number
* 1. Item 0010: change quantity
clear tstp3.
tstp3-id_item_no = '0010'. "Item identification
tstp3-comp_qty = '5.000'.
append tstp3.
* 2. Item 0020: delete
clear tstp3.
tstp3-id_item_no = '0020'. "Item identification.
tstp3-fldelete = 'X'.
append tstp3.
*- 3. New item 0030 (stock material)
* For new items, the ID_ fields, BOM nodes, and BOM item counters are
* initial unless they use
* FLG_NEW_ITEM
clear tstp3.
tstp3-item_no = '0030'.
tstp3-component = 'MAT200'.
tstp3-item_categ = 'L'.
tstp3-comp_qty = '1'.
tstp3-rel_prod = 'X'.
tstp3-sortstring = 'A1'.
append tstp3.
* 3. Item 0040: change component
clear tstp3.
tstp3-id_item_no = '0040'. "Item identification
tstp3-component = 'MAT500'.
append tstp3.
*- Change BOM
call function 'CSAP_MAT_BOM_MAINTAIN'
exporting
material = 'MAT100'
plant = '0001'
bom_usage = '1'
valid_from = '14.10.1996'
fl_bom_create = ' '
fl_new_item = ' '
i_stko = tstko
importing
fl_warning = flg_warning
o_stko = tstk2
tables
t_stpo = tstp3
exceptions
others = 1.
if sy-subrc eq 1.
*---- Error
* Please see log
endif.
if flg_warning eq 'X'.
*---- Please see log for information, warning messages, and success
* messages.
Endif.
Parameters
MATERIAL
PLANT
BOM_USAGE
ALTERNATIVE
VALID_FROM
CHANGE_NO
REVISION_LEVEL
I_STKO
FL_NO_CHANGE_DOC
FL_COMMIT_AND_WAIT
FL_CAD
FL_BOM_CREATE
FL_NEW_ITEM
FL_COMPLETE
FL_DEFAULT_VALUES
FL_IDENTIFY_BY_GUID
FL_WARNING
O_STKO
T_STPO
T_DEP_DATA
T_DEP_DESCR
T_DEP_ORDER
T_DEP_SOURCE
T_DEP_DOC
T_DOC_LINK
T_DMU_TMX
T_LTX_LINE
T_STPU
Exceptions
ERROR
Function Group
CSAP -
While trying to change a BOM with transaction CS02, a runtime error appears
While trying to change a BOM with transaction CS02, a runtime error appears.
In intial screen he entered material ,plant BOM usage and date valid from after executed then id displayed item list in that he wantu2019s delete one item, he has been deleted selected item after that when he was saving he is getting runtime error
Developer trace
ABAP Program SAPLKED1_WRITE_CE4_BPS1 .
Source LKED1_WRITE_CE4_BPS1U01 Line 30.
Error Code SAPSQL_ARRAY_INSERT_DUPREC.
Module $Id: //bas/640_REL/src/krn/runt/absapsql.c#17 $ SAP.
Function HandleRsqlErrors Line 775.
RABAX: level LEV_RX_STDERR completed.
RABAX: level LEV_RX_RFC_ERROR entered.
RABAX: level LEV_RX_RFC_ERROR completed.
RABAX: level LEV_RX_RFC_CLOSE entered.
RABAX: level LEV_RX_RFC_CLOSE completed.
RABAX: level LEV_RX_IMC_ERROR entered.
RABAX: level LEV_RX_IMC_ERROR completed.
RABAX: level LEV_RX_DATASET_CLOSE entered.
RABAX: level LEV_RX_DATASET_CLOSE completed.
RABAX: level LEV_RX_RESET_SHMLOCKS entered.
RABAX: level LEV_RX_RESET_SHMLOCKS completed.
RABAX: level LEV_RX_ERROR_SAVE entered.
RABAX: level LEV_RX_ERROR_SAVE completed.
RABAX: level LEV_RX_ERROR_TPDA entered.
RABAX: level LEV_RX_ERROR_TPDA completed.
RABAX: level LEV_RX_PXA_RELEASE_RUDI entered.
RABAX: level LEV_RX_PXA_RELEASE_RUDI completed.
RABAX: level LEV_RX_LIVE_CACHE_CLEANUP entered.
RABAX: level LEV_RX_LIVE_CACHE_CLEANUP completed.
RABAX: level LEV_RX_END entered.
RABAX: level LEV_RX_END completed.
RABAX: end RX_RFC
In sm21
Perform rollback
Run-time error "SAPSQL_ARRAY_INSERT_DUPREC" occurred
Short dump "090618 110101 donalda 11557 " generated
Runtime Error SAPSQL_ARRAY_INSERT_DUPREC
Exception CX_SY_OPEN_SQL_DB
Occurred on 18.06.2009 at 11:01:01
The ABAP/4 Open SQL array insert results in duplicate database records.
What happened?
Error in ABAP application program.
The current ABAP program "SAPLKED1_WRITE_CE4_BPS1" had to be terminated because
one of the
statements could not be executed.
This is probably due to an error in the ABAP program.
What can you do?
Print out the error message (using the "Print" function)
and make a note of the actions and input that caused the
error.
To resolve the problem, contact your SAP system administrator.
You can use transaction ST22 (ABAP Dump Analysis) to view and administer
termination messages, especially those beyond their normal deletion
date.
Error analysis
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither
caught nor passed along using a RAISING clause, in the procedure
"RKE_WRITE_CE4__BPS1" "(FUNCTION)"
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.
The reason for the exception is:
If you use an ABAP/4 Open SQL array insert to insert a record in
the database and that record already exists with the same key,
this results in a termination.
(With an ABAP/4 Open SQL single record insert in the same error
situation, processing does not terminate, but SY-SUBRC is set to 4.)
How to correct the error
The exception must either be prevented, caught within the procedure
"RKE_WRITE_CE4__BPS1"
"(FUNCTION)", or declared in the procedure's RAISING clause.
To prevent the exception, note the following:
Use an ABAP/4 Open SQL array insert only if you are sure that none of
the records passed already exists in the database.
You may able to find an interim solution to the problem
in the SAP note system. If you have access to the note system yourself,
use the following search criteria:
"SAPSQL_ARRAY_INSERT_DUPREC" CX_SY_OPEN_SQL_DBC
"SAPLKED1_WRITE_CE4_BPS1" or "LKED1_WRITE_CE4_BPS1U01"
"RKE_WRITE_CE4__BPS1"
If you cannot solve the problem yourself, please send the
following documents to SAP:
1. A hard copy print describing the problem.
To obtain this, select the "Print" function on the current screen.
2. A suitable hardcopy prinout of the system log.
To obtain this, call the system log with Transaction SM21
and select the "Print" function to print out the relevant
part.
3. If the programs are your own programs or modified SAP programs,
supply the source code.
To do this, you can either use the "PRINT" command in the editor or
print the programs using the report RSINCL00.
4. Details regarding the conditions under which the error occurred
or which actions and input led to the error.Hi ,
you are getting beacuse u are trying to do mass update to database.
Please check that below note are applicable to your system.
Note 453313 - DBIF_RSQL_ERROR_INTERNAL for mass insert
Note 869534 - AFS MRP doesn't work properly with all BOM item categories
Thanks Rishi Abrol -
Training & Event Management: Restrict Change to Business Event
Hi,
Does anyone know if there is a way to restrict change to Business Event (eg. changes to the Event Schedule) based on certain business criteria? My criteria cannot restrict by authorization.
For eg. let say if something happens (based on business scenario), then my program will restrict the users to change details in Business Event, but they can still book Personnels to the event- so that means I can't use the LOCK/UNLOCK function.
Thank you for your help.
Regards,Dear,
Oh! Sorry I did not noticed your initial post date, any how at least we can share knowledge.
Regarding your concern about the FM, we have created function module ZHR_TRAINING_AUTH and table ZHR_TRAINING_AUTH to restrict authorization related to respective department secretaries and business event group.
Then in Customization to create and configure the profile: go to Human Resources > Personal Management > Personal Development > Settings > Current Settings > Define Authorization Profile
Then later on you can Assign this newly created profile to the users, then you are able to restrict.
I hope this small information will help,
Good luck -
Transfer of changed order BOM from quotation to sales order
Good morning!
Please consider the following scenario involving variant configuration:
A quotation is raised in the system, and the values of the characteristics are assigned. Therefore a order BOM is generated (for the quotation), and that order BOM is changed manually using tcode CU51 (for cost estimates purposes). When it is saved, the system updates the BOM in the quotation automatically (ok, this is a desired behavior).
Although when we create an sales order with reference to that quotation, the newly chnaged order BOM is not copied to this new order, the order BOM is redetermined instead.
How can I make the system to copy it from the quotation properly?
Thanks in advance!
Adriano CardosoThanks for the reply. I have verified this note and it seems more toward the BOM explosion in the sales documents themselves than for the modifications made afterwards (CU51 changes in BOM, for example).
After realizing that, I´ve made a little research and found the Order Engineering Workbench possibility, which seems to fulfill all our requirements regarding this point. I looked all over SDN and haven't found too much input about it. In the SAP VC book, says it is not part of the SAP ERP, but a add-on.
So, you don't happen to have any idea of how can we check if it is activated / installed in our system or not? We are on version 5.0.
Thanks!
Adriano Cardoso -
How to restrict change type in CC31
Hi ,
I have a new requirement in which I need to restrict change types in txn CC31 (Create ECR).onlya set of people should create a ECR with one change type and another set of ppl with another change type, but I am not able to find any auth object with the field CCART(Change types) to provide these restrictions .
Is creating a new auth object the only way ? please let me know if there is any other possibility or any other auth objects which can be used for the same ?
Thanks,
NandaFields of such types (e.g. document types, master data accounts, etc) are often not the same field name that you are looking for in an authorization object, but rather grouped in their master records and the authority-check is against the assigned group value.
More often than not, if no group value is assigned to a record then no check is made.
So what you can try to look for is a BEGRU type field of an object in the code and look to see where it is gettings its value from.
Might be worth a try...
Cheers,
Julius -
Function Module to Change / Update BOM Line Items
Hi,
I need a Function Module to Change / Update BOM Line Items.
Please help.
Thanks.Try this FM - CSAP_MAT_BOM_MAINTAIN
-
Is there a way to restrict changing the browsing history in safari with ought restricting the entire application?
For the iPod touch in your profile?
Private browsing help here > iOS: Safari web settings
For Safari for Mac OS X ...
From your Safari menu bar click Safari > Private Browsing
You can only block all history in Private Browsing, pages you visit, and autofill. -
Restricting changes in PO ?
Hi all,
I have to restrict changes in ME22N , if VA02 is open .
Please help me on solving this by specifying the code to be written in BADI or User-exit?
Thanks,
Aravind.
Edited by: aravind kosaraju on Jul 27, 2008 6:18 PMHi aravind,
A PR is just a requesting document, and SAP allows for changes to these
as this does not break the document flow if the PO exists. A user can
change the PR to use it for creation of a new PO.
I have seen OSS notes about this on a previous clients site, check SAP
OSS (https://websmp209.sap-ag.de/~SAPIDP/0020068250000 00234912001E).
TCode OPUA will not help you here as it only allows you to set which
fields are visible/required/highlighted etc.
thanks
karthik -
Hi PP Gurus,
I am using change numbers for BOM. My requirement is while changing BOM system should ask the reason or some description where I can enter the reason. How this is possible?
Also User should not change the quantity is subcontracting Purchase order or in production order until it is changed in BOM.
Please guide me on this issues.
Mayur
Edited by: Mayur Phalak on Jan 25, 2009 12:47 PMHi,
While creating the Engg change number in Tcode : CC01 itself you will be maintaining the description for the change, which in turn is used to modify the BOM / Routing etc if the Change Management is active.
So if you want to know the description of the Change Number you can view the same in Tcode : CC03.
As required the BOM changes should not be allowed while creating the Sub-contract Order / Production order can be controlled either using the authorisation or Using User Exit in the transaction code : ME31L /ME32L and CO01 & CO02 where you can write the code in the exit to check the BOM qty with the Item reqd qty in the above transactions.
Hope this will help you.
regards
radhak mk -
dear experts
how to add materials in mass change in BOM with CS20 or LSMW or BDC.
regds
princeHI
Check T code CS20 or thru workbench for CEWB you need to activate working area in OP77 select SAP_item .
check this thread
Mass changes for BOM Base Qty
Regards
Anupam Sharma -
Mass change in BOM - field "Relevant to sales"
Hi All,
How to do Mass change in BOM for the field "Relevant to sales" ?
Thanks.
MariannaHi,
Need to use CS02 recording in such a way that you can change every item in a particular BOM.
e.g. First get into HEader Material BOM (CS02), once you've General Item Overview screen, do NOT directly go to item details of any item.... first click on tab-'Position', enter either Item Number or Component or both and then go to item details to change the relevancy indicator. Once changed for a particular item, save the BOM & come out of it. Then try for next item & so on....
Again this is my initial thought, you need to try out few recording options like this and then chose the most suitable one. Take help from ABAP expert if any available.
Off-course, initiallly it would take time to set-up LSMW but later on just need to create a data-file & do the mass changes.
Hope it will help.
Regards,
Anup -
Error when I change the BOM without a change number
Hi,
I would like to receive an Error when I change the BOM without a change number.
I define the modification parameter (EC management active and History reqmnt), I configure history reqmnt for BOM (I choice the status 1 and 3 for my BOM usage 5)
In change the message type I dont have the really message number in the liste.
How can I create a new message (045) so that I get an error by changing the BOM without a change number.
ThanksDear Dede,
check for the Authorization Object C_STUE_NOH for the
particular User Id's for which you want to Create or Change a
BOM without a Change number.
So assign this Authorization Object under all user id's for which
you want to have this control.
Adding the mentioned Authorization Object in particular User
Id's will resolve the problem.
This can be done using PFCG T code by adding in particular
Roles.
Revert back incase of any clarifications.
Regards
Mangalraj.S -
ECN field obliged when changing a BOM
Hi all,
I found after flaged the historical demand and ECM in OS27,it is still just a warning message that tells the user a ECN should be maintained when doing CS02,changing the message type and category is not available in the standard system.
How many other ways that I can make the filed ECN is a must when changing the BOM,besides SHD0.
Is there a standard and easy solution?
Txk!Dear,
For user you can do it through the Authorization object C_STUE_NOH
Please refer this link for details,
Re: Change number mandetory for CS20 -reg
Regards,
R.Brahmankar
Maybe you are looking for
-
I PURCHASED THE BOOK "BETRAYAL" BY DANIEL STEEL FOR MY IPAD AND I WAS CHARGED FOR IT BUT IT WILL NOT DOWNLOAD. THIS IS THE INVOICE NUMBER M33NVF143VV ON 4/04/12 AMOUNT 5.95. I CONTACTED APPLE SUPPORT AND THEY SENT ME AN EMAIL OF HOW TO HANDLE THE
-
Hi guys. How to check if the items can be cleared? I tried F.13, but the system says it cannot perform clearing for these items. The users are matching it by Purchasing document, so in the above image, the balance becomes zero as per PO. But the syst
-
Please can someone help, I am just trying to set up iCloud on my iPad. When I click on accept terms and conditions it says unable to connect to server? I have googled how to do this, forums suggest to open a find friends app, then try to reconnect.
-
Iphone 5 - Glitch Right Side of Power Button
Hi all, I own a white 16GB Ipone 5 model A1429 which i bought from chicago last december (still have insurance). a month ago started this wired problame with my power button that only my left side of the button works while the right side doesn't resp
-
FYI Tasks and Expiration Policy
Hi all, i try to set an expiration policy for FYI Tasks using the Human Task Editor but it doesn't work where it works for other types. can someone confirm that an expiration policy can be set for an FYI task? I am using SOA Suite 10.1.3. Thanks