Avoid duplicate standard receipe qty
Dear All,
I have found one query when i am making one report. In C203 t.code we can see product receipe. Generally receipe group is only one for one product but in some products i have found two receipe group like 5....100 & 5...200 and it is ok and it happens.
Now i need to fetch standard qty for input materials vs process order qty for input materials. so currently i can fetch two receipe group like 0001...820 for one receipe group and 0001...820 for second receipe group but i need only one receipe group qty. currently it seems double standard qty against process order qty because BOM no(STLNR) is same for both receipe group.
I can also see in COR3 t.code in master data tab, there is defined particular receipe group like 5...100. and this effect we see in AFKO table. But mainly i need std.qty of receipe so i have found STAS,STKO and STPO table.In STPO table i can see std.qty of input materials and in STKO we can see Product no and its batch size. STLAL field in STAS table and also in STKO but noy in STPO for linking purpose. Now in STPO i can see like,
STLNR IDNRK Qty
00000639 0001...820 50
00000639 0001...820 50
In my report std.qty comes 100 but i want 50 qty because i have not ound any link to filter one BOM no.(STLNR).
Is there any other tables that i can search or what to do.
Regards,
Shivam.
Hi! shivam pastagia
u can use delete adjacent syntax to avoid duplicate records in internal table.
STLNR IDNRK Qty
00000639 0001...820 50
00000639 0001...820 50
sort itab by stlnr idrnk etc..
DELETE ADJACENT DUPLICATES FROM itab comparing stlnr idrnk tetc...
Regards,
Mohammed Rasul.S
Similar Messages
-
How to avoid duplicate posting of noted items for advance payment requests?
How to avoid duplicate posting of noted items for advace payments request?
Puttasiddappa,
In the PS module, we allow the deletion of a component pruchase requisition allthough a purchase order exists. The system will send message CN707 "<i>A purchase order already exists for purchase requisition &</i>" as an Iinformation message by design to allow flexible project management.
If you, however, desire the message CN707 to be of type E you have to
modify the standard coding. Doing so, using SE91, you can invoke the
where-used-list of message 707 in message class CN, and to change the
i707(cn)
to
e707(cn)
where desired.
Also, user exit CNEX0039 provides the possibility to reject the
deletion of a component according to customers needs e. g. you may
check here whether a purchase order exists and reject the deletion.
Hope this helps!
Best regards
Martina Modolell -
How to avoid duplicate record in a file to file
Hi Guys,
Could you please provide a soultion
in order to avoid duplicate entries in a flat file based on key field.
i request in terms of standard functions
either at message mappingf level or by configuring the file adapter.
warm regards
mahesh.hi mahesh,
write module processor for checking the duplicate record in file adapter
or
With a JAVA/ABAP mapping u can eliminate the duplicate records
and check this links
Re: How to Handle this "Duplicate Records"
Duplicate records
Ignoring Duplicate Records--urgent
Re: Duplicate records frequently occurred
Re: Reg ODS JUNK DATA
http://help.sap.com/saphelp_nw2004s/helpdata/en/d0/538f3b294a7f2de10000000a11402f/frameset.htm
regards
srinivas -
Hi All,
I need to code for avoid duplicate IDOC when my program convert one idoc to another IDOC. The Code is written below..
LOOP AT t_seldoc.
SELECT SINGLE * FROM edidc
WHERE docnum EQ t_seldoc-idoc.
REFRESH: t_idocst,
t_edidd.
IF edidc-mestyp = c_msg_type.
MOVE: c_new_type TO edidc-mestyp,
c_st69 TO edidc-status,
c_st69 TO t_seldoc-status,
t_seldoc-idoc TO t_idocst-docnum.
ELSE.
MOVE: 'Z_NGI_SBT_TICKET' TO edidc-mestyp,
c_st69 TO edidc-status,
c_377 TO edidc-stdmes, "Add the stdmes for acks
c_st69 TO t_seldoc-status,
t_seldoc-idoc TO t_idocst-docnum.
ENDIF.
APPEND t_idocst TO t_idocst.
PERFORM update_idoc.
READ TABLE t_output WITH KEY idoc = t_seldoc-idoc.
MOVE sy-tabix TO l_tabix.
MOVE c_upd_idoc TO t_output-status.
MODIFY t_output INDEX l_tabix.
MODIFY t_seldoc.
ENDLOOP.
Line: -
This is the perform statement.
CHANGE BY Swati Namdev 28042009
types : begin of ty_vbak,
vbeln type vbak-vbeln,
end of ty_vbak.
Data : LT_dup_check type standard table of Z1NG_SBTTICKETHD,
it_vbak type standard table of ty_vbak.
End Here Swati Namdev 28042009
CALL FUNCTION 'EDI_DOCUMENT_OPEN_FOR_EDIT'
EXPORTING
document_number = t_seldoc-idoc
ALREADY_OPEN = 'N'
IMPORTING
IDOC_CONTROL =
TABLES
idoc_data = t_edidd
EXCEPTIONS
document_foreign_lock = 1
document_not_exist = 2
document_not_open = 3
status_is_unable_for_changing = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
LOOP AT t_edidd WHERE segnam EQ c_tickey_hdr.
MOVE t_edidd-sdata TO z1tickethd.
IF z1tickethd-tkt_type EQ '0'.
MOVE '3' TO z1tickethd-tkt_type.
ELSEIF
z1tickethd-tkt_type EQ '1'.
MOVE '4' TO z1tickethd-tkt_type.
ENDIF.
MOVE z1tickethd TO t_edidd-sdata.
MODIFY t_edidd.
ENDLOOP.
DATA: z1ng_sbttickethd LIKE z1ng_sbttickethd,
z1ng_sbtticketdt LIKE z1ng_sbtticketdt,
z1ng_ticketdt LIKE z1ng_ticketdt.
LOOP AT t_edidd WHERE segnam EQ 'Z1NG_TICKETDT'.
MOVE t_edidd-sdata TO z1ng_ticketdt.
CLEAR: z1ng_sbtticketdt.
MOVE-CORRESPONDING z1ng_ticketdt TO z1ng_sbtticketdt.
MOVE z1ng_sbtticketdt TO t_edidd-sdata.
t_edidd-segnam = 'Z1NG_SBTTICKETDT'.
MODIFY t_edidd.
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENT'
EXPORTING
idoc_changed_data_record = t_edidd
EXCEPTIONS
idoc_not_open = 1
data_record_not_exist = 2
OTHERS = 3.
ENDLOOP.
LOOP AT t_edidd WHERE segnam EQ 'Z1NG_TICKETHD'.
MOVE t_edidd-sdata TO z1ng_tickethd.
CLEAR: z1ng_sbttickethd.
MOVE-CORRESPONDING z1ng_tickethd TO z1ng_sbttickethd.
MOVE z1ng_sbttickethd TO t_edidd-sdata.
t_edidd-segnam = 'Z1NG_SBTTICKETHD'.
MODIFY t_edidd.
CHANGE BY Swati Namdev 28042009
MOVE-CORRESPONDING z1ng_sbttickethd TO LT_dup_check.
append z1ng_sbttickethd to LT_dup_check.
End here Swati Namdev 28042009
ENDLOOP.
CHANGE BY Swati Namdev 28042009
refresh it_vbak. clear it_vbak.
if lt_dup_check[] is not initial.
Select vbeln from vbak into table it_vbak for all entries in
lt_dup_check where KUNNR = lt_dup_check-CUST
and ZZTKT_NBR = lt_dup_check-TKT_NBR.
if it_vbak[] is not initial.
Message text-002 type 'E'.
endif.
endif.
End here Swati Namdev 28042009
CALL FUNCTION 'EDI_CHANGE_CONTROL_RECORD'
EXPORTING
idoc_changed_control = edidc
EXCEPTIONS
idoc_not_open = 1
direction_change_not_allowed = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.
CALL FUNCTION 'EDI_CHANGE_DATA_SEGMENT'
EXPORTING
idoc_changed_data_record = t_edidd
EXCEPTIONS
idoc_not_open = 1
data_record_not_exist = 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.
EXIT.
ENDIF.
CALL FUNCTION 'EDI_DOCUMENT_CLOSE_EDIT'
EXPORTING
document_number = t_seldoc-idoc
do_commit = c_yes
do_update = c_yes
WRITE_ALL_STATUS = 'X'
TABLES
STATUS_RECORDS = T_EDI_DS40
EXCEPTIONS
idoc_not_open = 1
db_error = 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.
EXIT.
ENDIF.
CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
EXPORTING
idoc_number = t_seldoc-idoc
TABLES
idoc_status = t_idocst.
COMMIT WORK.
CALL FUNCTION 'EDI_DOCUMENT_DEQUEUE_LATER'
EXPORTING
docnum = t_seldoc-idoc.
COMMIT WORK.
ENDFORM. " UPDATE_IDOC
AT present I am checking if IDOC is Duplicate giving error message but now I have to set status as 51 and for duplicate idoc and run for remaining.
Please provide the solution.
regards
Swati
Edited by: Swati Namdev on May 5, 2009 11:26 AM
Edited by: Swati Namdev on May 5, 2009 11:28 AM
Edited by: Swati Namdev on May 5, 2009 11:28 AM
Edited by: Swati Namdev on May 5, 2009 11:29 AM
Edited by: Swati Namdev on May 5, 2009 11:32 AMHi all
any inputs on this pl...?
Q: If the same idoc is received second time then how to stop the processing
the duplicate idoc ?
(I understood the question this way )
regards -
Function module to avoid duplicates in seacrch help through search helpexit
Hi all,
I have created composite seacrh help using 2 search helps( i have craeated search helps through se11).
now after i execute my program and press f4 , it is giving duplicate values( repeated values in my list if i press f4 )
I came to know that i can avoid duplicates if i call cooreesponding function module in seacrh help exit ( we can find this tab in se11 screens )
Can you please help me in knowing the standard function module to avoid duplicates in seacrh help through seacrh help exit ?
Thank u vry much in advance...Hi,
check this thread
[Thread|http://www.sapfans.com/forums/viewtopic.php?f=13&t=313139]
Also check this FM C140_DELETE_DUPLICATES
Rhea.
Edited by: rhea on Dec 2, 2008 9:31 AM -
Avoid duplicate results after a Catalog search
Hello,
I tried implementing note Note 811194 - Avoid duplicate results after a Catalog search - but unfortunately, the code in my version of WebCatItemList is quite different. Is there another note for newer versions of eCommerce? Or is code modification necessary at all?
Many thanks!Hi
When a product is listed in multiple catalog categories, the product appears multiple times in the search results.
This is standard
Please be aware that the note mentioned is a consulting note, as this behavior is standard.
The suggested changes in the note for ISA 5.0
Alternatively the relevant .jsp could be modified to also display the product's area information next to the product, so that the customer can see that the product originates from different catalog areas.
Kind regards.
Peter -
How to rewrite this query to avoid duplicates , please
Hello Good Morning All,
Happy New Year,
Could you please help to rewrite the below two queries (so that i can avoid duplicates) i need to send email to everyone not the dupllicated ones), please?
Create table #MyPhoneList
AccountID int,
EmailWork varchar(50),
EmailHome varchar(50),
EmailOther varchar(50),
IsOffersToWorkEmail bit,
IsOffersToHomeEmail bit,
IsOffersToOtherEmail bit,
IsValidEmailWork bit,
IsValidEmailHome bit,
IsValidEmailOther bit
--> In this table AccountID is uniquee
--> email values could be null or repetetive for work / home / Other (same email can be used more than one columns for accountid)
-- a new column will be created with name as Sourceflag( the value could be work, Home, Other depend on email coming from) then removes duplicates
SELECT AccountID , Email, SourceFlag, ROW_NUMBER() OVER(PARTITION BY AccountID, Email ORDER BY Sourceflag desc) AS ROW
INTO #List
from (
SELECT AccountID
, EmailWork AS EMAIL
, 'Work' AS SourceFlag
FROM #MyPhoneList (NoLock) eml
WHERE IsOffersToWorkEmail = 1
AND EMAILWORK IS NOT NULL
AND IsValidEmailWork = 1
UNION
SELECT AccountID
, EmailHome
, 'Home' AS SourceFlag
FROM #MyPhoneList (NoLock) eml
WHERE IsOffersToHomeEmail = 1
AND EMAILHOME IS NOT NULL
AND IsValidEmailHome = 1
UNION
SELECT AccountID
, EmailOther
, 'Other' AS Sourceflag
FROM #MyPhoneList (NoLock) eml
WHERE EmailOther = 1
AND EMAILOther IS NOT NULL
AND IsValidEmailOther = 1
) eml --select count(*) from #email
--Email dedupe on source
SELECT * INTO #distinct FROM #List WHERE ROW = 1
Thank you in Advance
MilanPlease follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for:
https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
>> Could you please help to rewrite the below two queries (so that I can avoid duplicates) I need to send email to everyone not the duplicated ones), please? <<
This mess is not a table because it has no keys, not way to have a key. You are using UNION like we used punch card merges in the o9ld days.
What math do you do on the account_id? That is the only reason that you use numeric values Why do you think that an email is fifty characters long? Yes, most them are, but did you bother to look at the maximum length? NO! Why did you name it “Phone_List” when
it is nothing but email addresses? emails are not phones.
Please read this article so you will know why RDBMS does not use assembly language flags like you are doing.
https://www.simple-talk.com/sql/t-sql-programming/bit-of-a-problem/
It would also help if you know what normalization was. Here is one design that is valid.
CREATE TABLE Something_emails
(account_id CHAR(15) NOT NULL,
email_address VARCHAR(256) NOT NULL,
email_type CHAR(5) NOT NULL
CHECK (email_type IN ('home', 'work', 'misc')),
PRIMARY KEY (email_address, email_type)
>> In this table account_id is unique <<
No, not without the DDL you did not post.
>> email values could be NULL or repetitive for work / home / Other (same email can be used more than one columns for account_id) <<
Not a problem. Look at the primary key. Also why would anyone store invalid data in a table? SQL programmers try to keep it out!
>> a new column will be created with name as Source_flag (the value could be work, Home, Other depend on email coming from) then removes duplicates <<
More kludges! Oh, putting the comma at the front of a line is how non-SQL mimic punch cards. An SQL progtrqammer would put related subsets of columns on one line – we think in sets! After 30+ years of SQL, this is one of the code smells I use to find bad
code.
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL -
Avoid duplicate batch (batch managment)
dear all,
We are facing problem related to batch managment .we are using manual batch entry .we don't want to make duplicate entry of same batch (which have already assign to material) against any material.what is solution to avoid duplicate batch entry.
can u tell me the settings and any user exit in which we can avoid the duplicate batch.
regardsHi hema,
in our scenario user manually enter batch of raw material in MIGO when we do good recipte in MIGO againts purchase order we enter batch manually.but we need that a batch which has already assign to raw material can not be assign again .if user enter the previous batch then system gives a error that batch has already exist.
may be u know the prob -
How to avoid duplicate BOM Item Numbers?
Hello,
is there a way to avoid duplicate BOM Item Numbers (STPO-POSNR) within one BOM?
For Routings I could avoid duplicate Operation/Activity Numbers with transaction OP46 by setting T412-FLG_CHK = 'X' for Task List Check. Is there an aquivalent for BOMs?
Regards,
Helmut GanteHello,
is there a way to avoid duplicate BOM Item Numbers (STPO-POSNR) within one BOM?
For Routings I could avoid duplicate Operation/Activity Numbers with transaction OP46 by setting T412-FLG_CHK = 'X' for Task List Check. Is there an aquivalent for BOMs?
Regards,
Helmut Gante -
#MULTIVALUE even affter checking avoid duplicate row agg.
Hi experts
I am getting multivalue error in few rows even after checking the option of avoid duplicate row agg.
any ideas
regardsHi,
#Multivalue :- this error will occur in 3ways
1) #multivalue in aggregation -
the o/p context not include i/p context its situation this error occurs.
2) #multivalue in breaks header or footer
3) #multivalue in section level.
Please provide us with the description of the issue u r facing.
Regards,
Chitha. -
how can I avoid duplicates on contacts and how do I get contacts created on iPhone/ipad synchronized on my mac? so far it doesn't work correctly, just sometimes. same for icalendar
On your Mac, for duplicates, switching Contacts off then back on in System Preferences > iCloud may prevent duplicates.
On the iPhone / iPad tap Settings > iCloud. Make sure Contacts and Calendars are swtiched on.
Try restarting your Mac and your iOS devices when items won't sync as they should.
To restart an iOS device: Hold the On/Off Sleep/Wake button down until the red slider appears. Slide your finger across the slider to turn off iPhone. To turn iPhone back on, press and hold the On/Off Sleep/Wake button until the Apple logo appears. -
Lookup transformation to avoid duplicate rows? - SSIS 2005
Hi,
I'm maintaning a SSIS 2005 pkg. I need to read a flat file to write on a SQL Server table, avoiding duplicates.
I can have duplicates rows into the flat file to import and I need to prevent the insert of any rows already existing in the SQL Server table.
So, I think to use a lookup transformation. I've created a flat file source, then I connect it to a lookup transformation and inside it I've specified as the reference table the SQL Server destination table. Then, I've checked the available lookup columns
each adding as a new column: but the lookup task has arised an error and so I've specified as lookup operation the replacement. For each unmatching I need to write on the SQL Server table (the reference table in the lookup). For the lookup output error I've
indicate to ignore failure. Other steps?
However, when I run the pkg then inside the SQL Server destination table I can see only NULL values, but I want to see the rows don't already present in the table.
Any suggests to me, please? ThanksHi,
I'm using SSIS 2005 as reported in the title of the post.
I could have duplicates inside the source file and the existing table could haven't any rows.
Thanks
If you dont have any rows in existing table, then they will go through Error output in lookup task. For duplicates, lookup task will find matches and will go through lookup match output
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
To avoid duplicate entries in multi row
Hi i need to avoid duplicate entries in multi record form.In the master block i have AGENCY CODE.These are the fields, RATING_CODE(composite primary key alng with AGENCY_CODE in the detail block,but set as hidden) and DESCRIPTION
in the detail block.If AGENCY_CODE is CRISIL,then for that i should not enter duplicate RATING CODES.I have written
DECLARE
L_COUNT2 NUMBER;
l_ret varchar2(20);
BEGIN
SELECT COUNT(*) INTO L_COUNT2 FROM CSTM_AGENCY_CODE_DETAIL
WHERE AGENCY_CODE=:BLK_CSTM_AGENCY_CODE_DETAIL.AGENCY_CODE
AND RATING_CODE=:BLK_CSTM_AGENCY_CODE_DETAIL.RATING_CODE;
IF L_COUNT2 > 0 THEN
l_ret := ovpkcs.fn_dispmsg('AGYCOD-03;',';',';');
Raise Form_Trigger_Failure;
END IF;
END;
in WHEN_VALIDATE_ITEM.
Now when i press the TAB to move next time it gives the message,DUPLICATE RATING CODE.The
problem is when i move back to the previous record by clicking mouse and change it to the already existing value,and while i save the validation is not happening and the message is not shown.Kindly tell me where i should code.
Thank youhy,
you can check whan commit( an save button)
for i = 1 to n-1
check condition (item = item +1)
next_record
end
or by stored insert whit exception return to form program when duplicate key is found
... -
SQVI - Quick Viewer - Avoid Duplicates
Hi All,
I am running a Quick Viewer and need to display the Count of records for each month.
Now I have 2 records for each Employee.(Say 1 for dental and 1 for medical)
Say I have 5 employees,So I could display the Count as 10 records.
But in Actual I need to display the count as 5 because there are 5 employees.
Since in my dataset 2 records are fetched for each employee,Record count is many a times double the employee count .
Is there anyway we could avoid duplicates in Quick viewer.
Edited by: Kumar B on Nov 3, 2009 9:48 AMI am using a custom infotype table in HR similar to the IT0167 (health plans).
Problem is few employees have medical and dental,Few have only medical and few Only dental.
Thus making it difficult to get the actual count of employees.
Thank you,
Edited by: Kumar B on Nov 3, 2009 10:19 AM -
Avoid Duplicate Tasks when Expanding Groups for Custom Task Process
Is there a way to:
Avoid Duplicate Tasks when Expanding Groups for Custom Task Process?
I've got a people metadata column that I am planning on putting groups into. I want the groups to expand and send a task for all users in the groups. I also want to avoid creating multiple tasks if a user happens to be in two groups at the same
time.
I'm trying to work out a way to assign users a read task based on job training requirements. Right now assigning groups and using a workflow task to confirm read is what I'm trying to accomplish. I just end up getting two tasks for a user if
their in multiple groups.
David JenkinsHi David,
Please verify the followings:
After Participants, select Parallel(all at a once)
Expand Task Options, select ‘Assign a task to each member within groups’
Open the action properties, make sure ExpandGroup is Yes
Also in SharePoint Designer ,you can edit the property for the Start Approval Porcess to enable ExpandGroup:
Reference:
https://social.msdn.microsoft.com/Forums/office/en-US/d14da1c4-bd5a-459b-8698-3a89bb01e6ad/expand-groupnot-creating-tasks-for-users-issue-in-sharepoint-2013-designer-workflow?forum=sharepointgeneral
https://social.technet.microsoft.com/Forums/office/en-US/ac245d45-ff66-4341-815c-79213efc4394/sharepoint-2010-designer-workflows-and-sharepoint-user-groups?forum=sharepointcustomizationprevious
Best Regards,
Eric
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected]
Maybe you are looking for
-
How to create a view indicating column's length?
SQL>create table abc (a number(12)); I want to create a view cde with a length of number(5) by "describe cde" in sql*plus. SQL>create view cde(a) as select a from abc; SQL>desc cde A NUMBER(12) how to create a view indicating column's length? the act
-
New iPod to replace existing iPod?
Just bought a new 5th gen 60GB iPod for my wife. She has been using the older 40GB iPod and has purchased a ton of music from the iPod (judging by my credit card statements, anyway). Is there anything specific that she needs to do to "de-authorize" t
-
Security feature in exporting pdf report is not work. For example to add password to pdf report it will be done but when I try to open that pdf report is opened without asking for password!!
-
"Content not allowed in Prolog" XML error while using RemoteSession API
Hi, I am trying to create a view by using a RemoteSession object CREATED on the RPC URL of Sun Identity Manager. Here is the code I am trying out. try URL url = new URL ("http","localhost",8080,"/idm/servlet/rpcrouter2"); System.out.println (url.toSt
-
Exporting selected range only from Excel / Calc
Hi, I would like to know if it is possible to create a PDF that contains only a selected range of cells, when working in MS Excel or OO.o Calc. I don't mean just checking the Print only Selection option -- that prints those cells, but into a letter-s