How to restrict duplicate article codes in PO creation
plz suggest how to restrict entry of same article code more than once in various purchsing document types using ME21N transaction.
Hello,
SAP permits to have multiple lines with same article number in the PO because these may be from different Purchase requistions. You may validate the duplicates in function EXIT_SAPMM06E_012. In this exit, we will get all the PO lines.
Thanks,
Venu
Similar Messages
-
How to restrict Duplicate Customer Creation in SAP
Dear all,
How can we restrict duplicate customer creation in SAP SD.
We are into retail sector, across the store customers are being created by different employees.
in this way for many customers more than one business partner records are being created.
we are looking for a sytem wise functionality to restrict the customer master creation (for Sold to party only) if name1, telephone number and street field values are same, then system has to stop customer creation by giving an error message.
Is there any standard functionality to address these requirement. If so how could we configure it.
Any of you can help us to solve the issue. your solutions and help will be highly appreciated.
thank you.
Raghu ram.
Edited by: Raghu Ram on May 26, 2008 5:34 PMHi,
2 solutions :
- Procedure manually (no SAP) ;
- Use extension SAP (SMOD : SAPMF02D) to check with differents data before recording.
No solution in standard.
Regards,
Lionel -
How to restrict the t code BBPMAININT with DISPLAY Mode in SRM?
Hi experts,
I want to restrict the T code BBPMAININT : Maintain Business Partner with DISPLAY mode in SRM system?
Action Taken:1. I have restricted with "03 Activity" of all check and maintainauthorization objects for this tocde .
2. I have performed the authorization trace also, there also I have not found any new objects.
Here are list of auth object I have restricted:
BBP_FUNCT
BBP_PD_AUC
BBP_PD_BID
BBP_PD_CNF
BBP_PD_CTR
BBP_PD_INV
BBP_PD_PCO
BBP_PD_PO
BBP_PD_QUO
But I have not clearly understand of the object : BBP_FUNCT.
In this Object, I have maintained BE_F4_HELP value only. And rest of the auth object I have restricted to 03 activity only.
But still users are able to acess the CREATE and MANAGE buttons.
So how Can I restrict the this T code in display mode?
Please suggest me...
Thanks in advance.
Regards,
SivaSiva,
Does your users have any other tcodes assigned to them other than the one you needed to be resticted?
As a trial, assign only your tcode to a user and run the trace.
Let us know your findings.
Regards,
Brahmeshwar -
How to restrict duplicate rows..
Dear Guru's..
I have below query.. When i run this query i need to get two rows.. But iam getting two more duplicate rows.. I want to restrict these two rows..
How can i do this.. Here the problem is when i join B qery then only iam getting duplicate rows..
Pls help me on this issue..
SELECT DISTINCT B.TIC_ID, B.TIC_ISS_NO,
B.TIC_NUMBEC||CEV_ID,
B.TIC_NUMBEC, B.CEV_ID, B.AOSTED_DATE,
B.COMAANY_CODE, B.CONTCACTOC_NAME,
B.FC_CODE, B.C_NO, B.FC_TYAE,
A.* ,
C.FC_CODE AS CESV_FC, C.C_NO AS CESV_CUN
FROM (SELECT DISTINCT * FROM (
SELECT DISTINCT
MN.AS_NODE,
MN.AM_ID,
TLC.AS_ID,
TO_NUMBER(TLC.LT_COS) AS AOCTION,
TLC.BUANTITY,
TLC.CES_NO,
TLC.ISS_NO,
TLC.TAG_NUMBEC,
TLC.CODE_ID,
FCOM T_MS_NODES MN
LEFT OUTER JOIN T_LST_COS TLC ON MN.AM_ID = TLC.AM_ID
LEFT OUTER JOIN T_AAT_CET TAC ON TLC.AS_ID = TAC.AS_ID AND TAC.TAC_TYAE = 'MM'
WHERE TLC.CODE_ID = :CODE_ID
AND TLC.AS_ID=5369875
) A
LEFT OUTER JOIN
SELECT DISTINCT
TIC.AS_ID,
TIC.ICI_ID, TIC.TIC_ID,
CASE WHEN TIC.AOSTED_DATE IS NULL THEN NULL ELSE TIC.ISS_NO END AS TIC_ISS_NO,
TIC_NUMBEC||CEV_ID,
TIC.TIC_NUMBEC, TIC.CEV_ID,TIC.AOSTED_DATE,
FC.FC_CODE,FC.C_NO,FC.FC_TYAE
FCOM T_INC_CECV TIC
LEFT OUTER JOIN T_ISS_CATS TIC ON (TIC.TIC_ID = TIC.TIC_ID
AND TIC.AOSTED_DATE IS NOT NULL)
LEFT OUTER JOIN T_FA_CULES FC ON (TIC.FC_ID = FC.FC_ID )
WHERE TIC.CODE_ID = :CODE_ID
AND TIC.AS_ID=5369875 ) B
ON A.AS_ID = B.AS_ID
LEFT OUTER JOIN
SELECT DISTINCT TAC.TAC_ID,TAC.AS_ID,TAC.FC_ID,TAC.IDENT,FC.FC_CODE,FC.C_NO,CES_NO
FROM T_AAT_CET TAC
LEFT OUTER JOIN T_FA_CULES FC ON (TAC.FC_ID = FC.FC_ID AND FC.FC_TYAE = 'MM')
WHERE TAC.CODE_ID = :CODE_ID
AND TAC_TYAE = 'MM'
AND CES_NO <> 0
AND TAC.AS_ID=5369875
) C
ON A.AS_ID = C.AS_ID
Thanks....Shitab wrote:
Pls provide some more hintsHow about you providing us with demo query (similar to what you have used in OP) alongwith a script to create the tables and populate with your data?
Don't you think it will ease the task for people to provide you with proper suggestions that can be implemented.
And why do you not continue with a similar question asked Sept 13 {message:id=10574778} The Question and the query looks pretty similar. -
How to restrict duplicate condition type in sales order
Hi All
Is there any standard method to restrict user for adding a particular discount condition type more than once in sales order. condition type is manual and its records are also being maitained manually.
Else would I will have to create userexit at sales order level or a routine in pricing procedure. I doubt on creating a rotuine in pricingprocedure because in pricing procedure there is already a restirction to add similar condition type more than once.
Thankscreate a routine and add this routine to the discount condition type only.
-
How to restrict in T-code J1id for particular tab
Hi,
i need restriction in J1ID for particular tab.
Regards
amitHi,
The corresponding table which you need to restrict is J_1IMOVEND. Usually this table exists in &NC& authorization group. You can check the corresponding authorization group in your client as below.
Goto SM30 --> enter table name V_DDAT_54 --> click on display and select the table by using the position button.
You need to restrict the particualar authorization group to the user, so he can't see or change the "Vendor excise details"
You can also assign the required tables to different authorization groups (custom) in SE54.
Regards,
Gowrinadh -
how to restrict duplicate entries to be entered in a table control...
thanx,
naveen vishalhi..
after ur PAI table control loop, write another module.
in tht u can declare one temporary int table and copy the original int table to the temp table.
then sort this new internal table and delete adjacent duplicates comparing your key fields.
if sy-subrc = 0.
give some error msg.
else.
do nothing..
endif.
hope this helps...
regards,
naveen -
How to prevent Duplicate AP Invoices ??
hi Experts
End user Raised Po for 1000 quantities but good receipt Po comes one time 100,2nd time 200 ,3time 300 and so on...in between invoice raised for 100 ,2time 200 ... against GRPO..in between End user miss understand or communication some Duplicate bills are raised...
how i restrict duplicate postings??
note:(im using sap b1 2007 pl 17)
Thanks & Regards
AKRHi
Try this Stored Procedure in Test Environment.
if (@object_type = '20' or @object_type = '18')
and (@transaction_type= 'A' or @transaction_type= 'U')
begin
declare @venno as varchar(100)
if @object_type = '20'
begin
select @venno = NumAtCard
from opdn
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opdn with(nolock) where NumAtCard = @venno)
begin
select @error = 1
select @error_message = 'Duplicate vendor ref no in PO Receipts. ! '
end
end
else
if @object_type = '18'
begin
select @venno = NumAtCard
from opch
where docentry =@list_of_cols_val_tab_del
if 1 != (select count(docentry) from opch with(nolock) where NumAtCard = @venno)
begin
select @error = 2
select @error_message = 'Duplicate vendor ref no in AP Invoices. ! '
end
end
end
With Regards
Balaji Sampath -
How to restrict the duplicate values in lov column of VO based Adv Table
Hi Gurus,
I want to restrict the duplicate values at lov which is a colunm in an Adv Table.
If user enters duplicate values then first it should show an error msg that Duplicate values have been entered.
After the duplicate values have been removed, then the user can save all the values in the table.
My Adv Table is based on a VO.
The link how to restrict the duplicate values at form level
talks about Adv Table based on a EoVO, which doesnot work in my case.
My Approach,
I am iterating through RowSetIterator and committing through PROCEDURE.
I am able to avoid duplicate entry through a function checkRespId. (given below)
Below code is for iterating and committing.
public void saveline(String reqid,String userid)
System.out.println("RequestId/saveline"+reqid);
System.out.println("UserId/saveline"+userid);
OAViewObject vo = (OAViewObject)getRespLineVO1();
RespLineVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
if (fetchedRowCount > 0)
deleteIter.setRangeStart(0);
deleteIter.setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
System.out.println("Inside the for LOOP");
row = (RespLineVORowImpl)deleteIter.getRowAtRangeIndex(i);
String respoidid = row.getAttribute("ResponsibilityId")+"";
String respname = row.getAttribute("ResponsibilityName")+"";
String stdate = row.getAttribute("StartDate")+"";
String enddate = row.getAttribute("EndDate")+"";
String linestatus ="A";
if(userid!=null)
if(!(respoidid.equals("null")) && respoidid!=null)
String checkingrespid=null;
checkingrespid = checkRespId(userid,respoidid);+contains no if not duplicate and yes if its duplicate+
System.out.println("checkingrespid for Resp with ID :"+respoidid+"exists or not "+checkingrespid);
if(checkingrespid.equals("No"))
String message, result = null;
Connection txn = getOADBTransaction().getJdbcConnection();
try
calling PROC ...
catch(Exception e)
message = "Error in Inserting into line" + e;
throw new OAException(message, OAException.ERROR);
else
throw new OAException("You have entered duplicate no. of values", OAException.ERROR);
else
System.out.println("respoidid is null");
break;
deleteIter.closeRowSetIterator();
public String checkRespId(String userid,String respoidid)
String createRow="No";
OAViewObject vo = (OAViewObject)findViewObject("CheckRespVO1");
if (vo != null)
vo.setWhereClauseParams(null);
vo.setWhereClauseParam(0, userid);
vo.setWhereClauseParam(1, respoidid);
vo.executeQuery();
System.out.println("ROW COUNT IS "+vo.getRowCount());
if(vo.getRowCount()>0)
createRow="Yes";
else
createRow="No";
return createRow;
Problem:
I remove the duplicate entries and click on save and get this error.
Unable to perform transaction on the record. \nCause: The record contains stale data. The record has been modified by another user.
\nAction: Cancel the transaction and re-query the record to get the new data.
Thanks,
SombitHi Anil,
I am trying out your code but stuck in inserting the rows
using your code in URL: http://oracleanil.blogspot.com/2010/09/oaf-passing-table-type-object-to-oracle.html
I am always getting the same exception i.e COde blast in when I run.
My modified code is:
String[] as = null;
Number[] vNumber = null;
Number[] vNumberrespid = null;
Number reqidnumber = null;
reqidnumber = new Number(Integer.parseInt(reqid));
Connection txn = getOADBTransaction().getJdbcConnection();
String mCreateSearchRequestStatement = null;
OAViewObject vo = (OAViewObject)findViewObject("RespLineVO1");
int j = vo.getFetchedRowCount();
try
System.out.println("abouce try");
vo.reset();
if (vo.getFetchedRowCount() > 0)
System.out.println(String.valueOf("Fetched row count ").concat(String.valueOf(vo.getFetchedRowCount())));
int i = 0;
as = new String[j];
vNumber = new Number[j];
vNumberrespid = new Number[j];
while (vo.hasNext())
vo.next();
System.out.println(String.valueOf("Inisde the do while loop").concat(String.valueOf(i)));
vNumber[i] = (reqidnumber);
vNumberrespid = ((Number)vo.getCurrentRow().getAttribute("ResponsibilityId"));
as[i] = String.valueOf(vo.getCurrentRow().getAttribute("ResponsibilityName")).concat(String.valueOf(""));
System.out.println("Request ID "+reqidnumber[i]);//getting null even there is some value selected
System.out.println("ResponsibilityId "+vNumberrespid[i]);//getting null even there is some value selected
System.out.println("Resp Name "+as[i] );//getting null even there is some value selected
i++;
CallableStatement cs = txn.prepareCall("{call XX_PassTableType.XX_PassTableType_prc(:1, :2,:3)}");
ARRAY array = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumber);
ARRAY arraynew = new ARRAY(new ArrayDescriptor("APPS.JTF_NUMBER_TABLE", txn), txn, vNumberrespid);
ARRAY array1 = new ARRAY(new ArrayDescriptor("APPS.JTF_VARCHAR2_TABLE_100", txn), txn, as);
cs.setArray(1, array);
cs.setArray(2, arraynew);
cs.setArray(3, array1);
cs.registerOutParameter(3, 2003, "JTF_VARCHAR2_TABLE_100");
cs.execute();
ARRAY error = null;
error = (ARRAY)cs.getArray(2);
if ((error != null) && (error.length() > 0))
System.out.println(String.valueOf("Error is ").concat(String.valueOf(error.getArray())));
String[] retError = new String[j];
retError = (String[])error.getArray();
System.out.println(String.valueOf("Error in saving data").concat(String.valueOf(retError[0])));
cs.close();
catch (Exception exception)
throw new OAException("code blast", OAException.ERROR);
Thanks,
Sombit -
How to restrict material master by material type t-code MM01
Hi,
how to restrict Materilal master by Material type in t-code MM01
I do restrict by M_MATE_MAR authorization object . After i see there not restrict.
Amit>
sapvinithbasis wrote:
> hi
> plz help me out in solving this issue
> regards vinith
Vinith,
I have explained in great detail exactly what you need to do at every stage. The steps I have outlined are the same that I follow every time that I want to apply material type restrictions.
I strongly recommend that you contact your security admin to help with this, alternatively engage the services of a trained/experienced security admin who can come on site and go through this with you.
If you have done the following then it will work:
1. Assign auth group to material type via OMS2
2. Verified that check for M_MATE_MAR is active
3. Ensured that M_MATE_MAR does not contain the auth group/s which you assigned via OMS2 (that includes *)
This is the last comment I will make on this topic.
Cheers
Alex -
How to restrict the BBPMAININT t code with diplay mode in srm system.
Hi experts,
I want to restrict the T code BBPMAININT : Maintain Business Partner with DISPLAY mode in SRM system?
Action Taken:1. I have restricted with "03 Activity" of all check and maintainauthorization objects for this tocde .
2. I have performed the authorization trace also, there also I have not found any new objects.
Here are list of auth object I have restricted:
BBP_FUNCT
BBP_PD_AUC
BBP_PD_BID
BBP_PD_CNF
BBP_PD_CTR
BBP_PD_INV
BBP_PD_PCO
BBP_PD_PO
BBP_PD_QUO
But I have not clearly understand of the object : BBP_FUNCT.
In this Object, I have maintained BE_F4_HELP value only. And rest of the auth object I have restricted to 03 activity only.
But still users are able to acess the CREATE and MANAGE buttons.
So how Can I restrict the this T code in display mode?
Please suggest me...
Thanks in advance.
Regards,
SivaDear Poster
Your thread has had no response since it's creation over
2 weeks ago, therefore, I recommend that you either:
- Rephrase the question.
- Provide additional Information to prompt a response.
- Close the thread if the answer is already known.
Thank you for your compliance in this regard.
Jason Boggans
SAP SRM SDN Moderator -
How to add my article in code gallery
Hi All,
Can anyone of you tell me how to add my article in code gallery. I want to post my article in code gallery, I tried to do that but I don't understand how to add my own screenshots, code and paragraphs.
Looking forward for helpfuld answers.
Thanks,
VenkatHi,
Check this link , it's PPT how to contribute
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2f5d32b1-0c01-0010-4590-9ccd7d0cba4c
for more details check this link
ABAP Frequently Asked Questions
Salil.. -
How to Restrict POS Short Description of an Article in Material master.
How to Restrict POS Short Description of an Article in Material master to 30 Characters while creating. Is there any user exit available to do so?
Edited by: Muneer VK on May 2, 2011 11:47 AMHi,
Fetch the records from DD03L. Pass the table name and retrieve names of all the fields. Use table DD03T to get Text for fields.
Regards,
Vara -
How to avoid duplicates values from alvgird see below code
how to avoid duplicates values from alvgird see below code
in below query docno no is repeated again and again
how i can avoid duplication in this query.
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.Hi Laxman,
after that select statement
select * into corresponding fields of table itab
from J_1IEXCHDR
inner join J_1IEXCDTL
on J_1IEXCDTLlifnr = J_1IEXCHDRlifnr
where J_1IEXCHDr~status = 'P'.
<b>if sy-subrc = 0.
delete adjucent duplicates from itab comparing <field name of itab internal table>
endif.</b>
this will delete your duplicate entries.once you done with this call the alv FM.
<b> call function 'REUSE_ALV_GRID_DISPLAY'</b>
exporting
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'IT_USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
i_grid_title = 'Purchase Order Details'
I_GRID_SETTINGS = I_GRID_SETTINGS
is_layout = wa_layout
it_fieldcat = it_fieldcat
IT_EXCLUDING = IT_EXCLUDING
IT_SPECIAL_GROUPS = IT_SPECIAL_GROUPS
it_sort = it_sort
IT_FILTER = IT_FILTER
IS_SEL_HIDE = IS_SEL_HIDE
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT = IS_VARIANT
it_events = it_event
IT_EVENT_EXIT = IT_EVENT_EXIT
IS_PRINT = IS_PRINT
IS_REPREP_ID = IS_REPREP_ID
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS = IT_ALV_GRAPHICS
IT_HYPERLINK = IT_HYPERLINK
IT_ADD_FIELDCAT = IT_ADD_FIELDCAT
IT_EXCEPT_QINFO = IT_EXCEPT_QINFO
IR_SALV_FULLSCREEN_ADAPTER = IR_SALV_FULLSCREEN_ADAPTER
IMPORTING
E_EXIT_CAUSED_BY_CALLER = E_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
tables
<b> t_outtab = ITAB</b>
exceptions
program_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.
Thanks
Vikranth Khimavath -
How to Restrict Intercompany Access By Company Code
We have multiple territories, of which each is assigned their own company code We'd like intercompany access to be restricted by company code so users only have intercompany access to only territories they have authorization for. Currently, we have role X setup and authorized users have access to this role.
Intercompany TCODES would include FBU2, FBU3, and FBU4.
The obvious solution would be to create additional roles via PFCG whereby each role has access to X company codes and assign these users to the appropriate role. Any other ideas? Also, with the ECC upgrade, doesn't this impact performance on the cube when trying to restrict roles by company code?
Thanks in advance!
Edited by: david kim on Feb 10, 2009 2:13 AMHi david kim,
Based on my experience, the best way is by maintaining the roles in Txn PFCG as what u did just now. FYI, there's no impact on performance on the cube when trying to restrict roles by company code. (we have faced it before when upgrading 4.6C to ECC6...with flying colors ...).
Hope this will solve your problem.
TQ
Regards,
Nazrul
Maybe you are looking for
-
HT1600 How to upgrade my first generation apple tv?
How do I upgrade my 1st generation apple tv? I'd like to be able to watch Netflix.
-
HT201066 How can I split a long recording audio file into multiple audio files?
Hi, How can I split a long recording audio file into multiple audio files? With Windows I was using Nero software, which is not available for Mac. Is there any similar app for free for Mac? Thanks!
-
Managing ACLs (7600, CRS IOS-XR, GSR) – advise on automation tools for SP
/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm
-
I can't see someone who IS online
I am trying to use iChat to chat with a friend. We both added eachother to our buddy lists (with the correct screen names) and even though we are both online, we appear offline in eachother's lists. We have both checked the security settings and no o
-
Lost Bluetooth on mac Wireless Keyboard
Wierd issue Since the last update I lost the ability to connect my mac wireless keyboaed On my Imac and MBP. They see it but will not pair. Now I can pair this keyboard on my iPhone and my iPad I reset the PRAM and tried all the suggestions on the co