Help to find same value in itab
hi,
i have internal table and i wont to now if i can find in table the same recored that twice (date field) ?
the date is changing.
e.g.
itab 1
01022008
02022008
02022008
04022008
05022008
01022008
06028002
itab2
01022008
02022008
02022008
04022008
05022008
06028002
05022008
07022008
Regards
Alvaro if u read the message u see its not duplicates
Try this -:) Sorry about last post -:( I really thought it was duplicated -:(
REPORT ydummy_atg.
TYPES: BEGIN OF ty_test,
line(10) TYPE c,
END OF ty_test.
TYPES: BEGIN OF ty_found,
line(10) TYPE c,
count TYPE i,
END OF ty_found.
DATA: t_test TYPE STANDARD TABLE OF ty_test
WITH HEADER LINE,
t_found TYPE STANDARD TABLE OF ty_found
WITH HEADER LINE.
DATA: w_line TYPE string,
w_tabix TYPE sy-tabix.
t_test-line = '01022008'.
APPEND t_test.
t_test-line = '02022008'.
APPEND t_test.
t_test-line = '02022008'.
APPEND t_test.
t_test-line = '04022008'.
APPEND t_test.
t_test-line = '05022008'.
APPEND t_test.
t_test-line = '01022008'.
APPEND t_test.
t_test-line = '06028002'.
APPEND t_test.
LOOP AT t_test.
w_tabix = sy-tabix.
READ TABLE t_test INDEX w_tabix.
w_line = t_test-line.
SEARCH t_test FOR w_line.
IF sy-subrc EQ 0.
MOVE w_line TO t_found-line.
MOVE 1 TO t_found-count.
COLLECT t_found.
ENDIF.
ENDLOOP.
LOOP AT T_FOUND.
WRITE:/ T_FOUND-LINE,T_FOUND-COUNT.
ENDLOOP.
The output is:
01022008 2
02022008 2
04022008 1
05022008 1
06028002 1
Greetings,
Blag.
Similar Messages
-
How to find same values in 1 column???
TITLE AUTHOR_NUM
A Deepness in the Sky 3
Magic Terror 5
The Stranger 18
Venice 11
Second Wind 4
The Edge 4
Dreamcatcher: A Novel 6
Treasure Chests 23
Treasure Chests 25
Beloved 1
Harry Potter and the Prisoner of Azkaban 15
Van Gogh and Gauguin 9
Van Gogh and Gauguin 19
Of Mice and Men 20
Electric Light 17
Group: Six People in Search of a Life 2
Nine Stories 16
The Soul of a New Machine 24
Travels with Charley 20
Catch-22 10
Jazz 1
Band of Brothers 14
A Guide to SQL 7
Franny and Zooey 16
East of Eden 20
Harry Potter and the Goblet of Fire 15
The Fall 18
Godel, Escher, Bach 12
When Rabbit Howls 8
Black House 5
Black House 6
Song of Solomon 1
The Grapes of Wrath 20
Slay Ride 4
The Catcher in the Rye 16
To Kill a Mockingbird 13List the branch number and names of shops which do not have any books written by Pratt in stock. Order the list by branch number.
how can I code this? if that statement was positive, i would say something like "*where ..... author_last IN ('Pratt')"*
But in this case, how can I do it? i don't think there's a command like "OUT" in SQL :) -
How to implement multiple Value Helps within the same Application ??
Dear Experts,
I want to implement multiple value helps in the same view.For that I have declared exporting parameters of type 'wdy_key_value_table.' within the component controller for each of the value helps.While I do activate and test the application I get the following error :
The following error text was processed in the system HE6 : A row with the same key already exists.
The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 4 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: IF_PO_VIEW1~VALUESET_BSART of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: WDDOINIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: IF_WDR_VIEW_DELEGATE~WD_DO_INIT of program /1BCWDY/9VSHJWRNR0EZPKFT3ZKC==CP
Method: DO_INIT of program CL_WDR_DELEGATING_VIEW========CP
Method: INIT_CONTROLLER of program CL_WDR_CONTROLLER=============CP
Method: INIT_CONTROLLER of program CL_WDR_VIEW===================CP
Method: INIT of program CL_WDR_CONTROLLER=============CP
Method: GET_VIEW of program CL_WDR_VIEW_MANAGER===========CP
Method: BIND_ROOT of program CL_WDR_VIEW_MANAGER===========CP
I dont know how to implement multiple value helps.Need your help on this.
Regards,
Mamai.Hi
Hint is : A row with the same key already exists it means , It is assigning the same value/Key to row and you are calling it at WDDOINIT so it giving error at the time of initialization .
Better way to do the coding at some event in view OR if not possible than just execute the first value help in wddoinit later clear all the value before gettig the other Value help. Code it at WdDoModify View to get its run time behaviour.
BR
Satish Kumar -
Sql Query Help to find values?
Hi!
i have a table structure like this...
you can see the image here.
http://postimg.org/image/3k5nvkvn5/
i which i need to find some values.
Example: i need to find all column "District" values where value=46
then in that case you can see in above image that row 1 to 4 has to fetched because these columns contains value between 45-52, also in row 5 where value is 46,47 the also it has to be fetched, here i have to kind of structure to be used in table one
is comma separated and another one is comma and dash separated value, so how can i find these values in table. so how can achieve this using query, Any help would be triplicated.Ah this is not correct way to store data in table
If you store like this you've to do lots of manipulations before values can be used in filter
So as per above you would require something like this
;With Numbers(N)
AS
SELECT 1
UNION ALL
SELECT 1
UNION ALL
SELECT 1
UNION ALL
SELECT 1
UNION ALL
SELECT 1
UNION ALL
SELECT 1
Num_Matrix(N)
AS
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 1))
FROM Numbers n1
CROSS JOIN Numbers n2
CROSS JOIN Numbers n3
CROSS JOIN Numbers n4
CROSS JOIN Numbers n5
CROSS JOIN Numbers n6
CROSS JOIN Numbers n7
CROSS JOIN Numbers n8
SELECT DISTINCT t.po_city_st_zip
FROM
SELECT LEFT(f.Val,CHARINDEX('-',f.Val+'-')-1) AS StartVal,
STUFF(f.Val,1,CHARINDEX('-',f.Val+'-'),'') AS EndVal,
t.*
FROM YourTable t
CROSS APPLY do.ParseValues(t.District,',')f
)m
INNER JOIN Num_Matrix n
ON n.N BETWEEN m.StartVal AND m.EndVal
WHERE n.N = <your Value>
See ParseValues UDF here
http://visakhm.blogspot.ae/2010/02/parsing-delimited-string.html
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Finding the same value in different columns
Hello,
I am trying to figure out how I would go about finding the same value in the same row but in different columns. For example, in the table sometimes the report name is the same as the description. I would like to find all of the rows where this is the case.
Thanks
Report name
Description
Date
Time
Report 1
Report 1
dddd
tttt
Report 2
Billing Report
dddd
tttt
Report 3
Report 3
dddd
ttttHi,
Is this what you want?
SELECT * -- or whatever columns you want
FROM table_x
WHERE report_name = description
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
I want to manually modify something in our ERP system. But I find some fields in table which is in date type have the value '0000-00-00'. How can I insert the same value to the database?
Our DBMS is oracle 816.
SQL> select to_char(t$curd,'yyyy-mm-dd hh:mi:ss') from triton.ttdsls051702
2 where
3 t$orno = 104497;
TO_CHAR(T$CURD,'YYY
0000-00-00 00:00:00
0000-00-00 00:00:00
0000-00-00 00:00:00
SQL> select to_date('0000-00-00' , 'yyyy-mm-dd') from dual;
select to_date('0000-00-00' , 'yyyy-mm-dd') from dual
ERROR at line 1:
ORA-01843: not a valid month
Please offer me some help. Thank you!Oracle has some funny ideas about dates. I tried this on 8.0.6, 8.1.7 and 9.0.1.
SQL> SELECT TO_CHAR(TO_DATE('01-01-0001','dd-mm-yyyy'),'j') FROM dual;
TO_CHAR
1721424
SQL> SELECT TO_CHAR(TO_DATE('1721423','j'),'dd-mm-yyyy') FROM dual;
SELECT TO_CHAR(TO_DATE('1721423','j'),'dd-mm-yyyy') FROM dual
ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0
but ...
SQL> SELECT TO_CHAR(TO_DATE('1721424','j')-1,'dd-mm-yyyy') FROM dual;
TO_CHAR(TO
00-00-0000
again but...
SQL> CREATE TABLE t (dt DATE);
Table created.
SQL> INSERT INTO t SELECT TO_DATE('1721424','j')-1 from dual;
1 row created.
SQL> ALTER SESSION SET nls_date_format = 'dd-mm-yyyy';
Session altered.
SQL> select * from t;
DT
31-12-0000
yet again but ...
SQL> SELECT TO_CHAR(dt,'dd-mm-yyyy') FROM t;
TO_CHAR(DT
00-00-0000I think it is probably safe to set those dates to null, or some other acceptable default value depending on what t$curd means in your application.
TTFN
John -
YTD and accumul. depreciation have the same value when dpis is 2 years ago
Hi all
I am using FA and i have some problems. I have just setup this module and now i want to migrate assets in the system. The customer gave me an excel with the following fields that want to be in the system like: asset cost, accumulated depreciation, date placed in service, ytd accumulation and so on.
the problems are:
1) when i want to enter new asset manually the ytd depreciation and accumulated depreciation are required to be equal. ok so far, i register new asset on test environment and when i enter the date placed in service for example two years ago (because that is the real date placed in service of the asset) and run depreciation, the system has calculated correctly the accumulated depreciation, but has calculated the same value even for YTD depreciation which is not true, because in this case accumulated depreciation and ytd depreciation are completely different. how to solve this problem? How can i put correct values in this fields?
2) when i enter these assets directly in the fa_mass_additions table according to the fixed assets user guide, i have the following errors: when i put "ON HOLD" on queue name, and open these assets on the system, the on hold field has no value (is empty)
When i try to run post mass additions, the report is not finding the parameter (book) because the system is giving en error message telling me that there is no value in this list of values
please help to solve this problems because i am not being able to migrate assets for the company.
Thank you and best regardsgaskins,
You may have different Color Settings, and if you use Pantone you should be aware that the whole interpretation has changed (a number of times, most radically recently).
If you say more, more can be said. -
Help in finding out error in include ---se37
Hello everyone,
This is regarding the include in the function module .
Where we define constants , i have to define like this
If plant EQ 'ita' OR plant EQ 'del' OR plant EQ 'net' .
c_form LIKE itcta-tdform VALUE 'form1' .
ELSE .
c_form LIKE itcta-tdform VALUE 'form2' .
ENDIF .
The error that i get while activating is "unable to interpret PLANT -possible causes -incorrect spelling or comma error".
I am not able to find out where i am going wrong .
Can anyone help me find out the error or where and what i missed out .
Any help will be appreciated .
Thanks
SumitHi,
U have not defined the varibale PLANt.
Defin ethe same in Tcode = SE37
Give the function module name and clcik on change.
Use menu GOTO----
>GLOBAL DATA. define the plant here as below.
data: plant type werks.
Regards,
Pravin -
How to find the value of a variable in other program
How to find the value of a variable in other program say I am in a FM and this FM is being called in from other program and I want to know some of the variable details of the program from the FM itself. Imagine if this is a txn. and I need to know the details from some of the programs while executing the same transaction
Regards
VinHi Vinayak,
you will be having your first program values in internal table or some variables,
when you are calling the second program you wii use like this,
SUBMIT <Second Program Name> USING SELECTION-SCREEN '1000'
WITH s_emp(second program select-options) IN t_emp(first program variables)
WITH p_chk EQ t_chk
WITH p_r1 EQ t_r1
WITH p_month EQ t_month
WITH s_cust1 IN t_cust1
WITH p_r2 EQ t_r2
WITH s_cust2 IN t_cust2
WITH s_week IN t_week
AND RETURN.
you have pas like this to get your first program details. -
Need help in finding a font for a logo
I was looking for help in finding a font for my logo. I'm not a designer at all, so I'm calling on all the fine designers and folks on the Adobe site to help me out. All replies are, of course, appreciated and any suggestions/comments/ideas will be welcome.
I'm designing a logo for my film company. I wanted to keep it simple but not boring either. I put together the first draft of the logo using Photoshop CS3 and used Trajan Pro for the film company words (Panthera Films) and used Futura for the slogan ("Inspiration through Imagination"). While I don't mind the fonts, it's simple but, alas, too boring. I love the panther image but need a dynamic font for "Panthera Films" and a complimenting font for the slogan.
Can anyone recommend a good combination of fonts to replace the Trajan Pro and Futura? As well, I want to give the logo a nice presence without it being too loud, bold or jumping off the page. As well, should the font for "Films" be the same as "Panthera" or can they be different?
The image I attached is something I was thinking to use as a banner on a website.
Any help would be appreciated too with this
TIA,
DaleDale,
As I said, I like it too.
You may consider making it a bit heavier, maybe bold, for readability at small sizes.
It is hard to recommend a specific font because it should represent your company and what it stands for. Have you tried typing the name in a word processing application (Worst or something better) and then running through all the font you have? If not, that might give you a few new thoughts about the overall kind of font you feel is the right one. And then it is much easier to recommend something. -
Hi,
I currently have written an application that reads information from an Excel/CSV file and key into the Words document.
I did this by introducing a specific bookmark inside the Word document and use the Append Report Text.vi to insert the bookmark.
Now, there are some values where it requires the same bookmark to appear in multiple places. Ie. The same value should be replicated
in many places. I tried to insert cross-references in the template, but whenever the Append Report Text is performed, it overwrites the bookmark.
Hence the cross reference cannot find the bookmarks again.
Another issue is the font size of the replacement. It seems that it keeps on replacing it at Font 10.
Whenever the above VI is called. Is there a way to retain the same bookmark font as per what was saved as the template?
Thanks & Best Regards,
Kah WaiI think I manage to resolve this using the VI created by Henrik Volkers
http://forums.ni.com/t5/LabVIEW/How-to-edit-text-in-MS-Word-HEADER-using-bookmarks/m-p/1477060#
Sorry for the post -
Is it possible to store a multiple indexes for the same value extractor?
I ran into a situation where there were different queries that I was interested in doing that might have benefitted from having several indexes, sorted differently, but for the same ValueExtractor() instance.
Is this good practice, is it recommended, and is there a clean way to do it? It seemed like the only way I could logically "trick" the system into it would be passing some sort of "query type" constant into the ValueExtractor when it was created, and then making the equals and hashCode() methods on the ValueExtractor delegate to the constant for equality, but this seemed like a massive hack.Hi Kris,
First, try without each value extractor and see how the different queries compare in performance. You may find that you need only one. If you find otherwise, please let us know because it may indicate a good area for additional optimizations.
Second, you are correct that the value extractor is the key of the index, and thus to have two indexes on the same value, you will need two different value extractors (i.e. the hashcode/equals comment you made.)
Peace,
Cameron Purdy
Tangosol, Inc.
Coherence: Easily share live data across a cluster! -
I am having trouble not having the right cable when connecting my MacBook Pro 10.7.5 OS X to my Zenith 50" flatscreen HDTV- the laptop was purchased in July, and HDTV is one year old. I moved to Central America (Belize) in August, so am lacking in tech support or purchasing options here, and I only know just enough to be dangerous--I am a relatively new Mac user. I just found out I have a friend coming to visit in 10 days who can bring something if I can get it to her! It would take me days to research and decide what I might need, and then it might still not be right. I thought you guys might help me find something quickly.
The cables I brought have allowed video but not sound, and I would like to order whatever I may need online and have delivered to her to bring with her when she comes, making us somewhat short on time. Bear with me while I try to describe what I have. On the Mac, I have a couple different ports that I am unsure what they are called (along with the usual 2 USB ports). One has the lighting strike symbol next to it, the other looks like a little cheerleader with her arms & pom poms in the air, and the third is the flat one that I used to be able to use to connect my (now gone) iPhone. The MacBook does not have an HDMI port. On the Zenith HDTV, I have the usual AV in-ports, and HDMI ports, and a port that looks like an HDMI port only more square.
Just a side note, my husband also has a 6 month old Ipad and we do have the little pigtail to use to hook it up to the TV which works great for the iPad, but I would prefer to use my MacBook so we can watch the movies we put on an external hard drive before moving. I am unsure exactly what cord I need, only that what I brought with me to Belize is not what I need, and apparently can't be found here-no one carries Mac stuff even in the capital city of Belmopan.
(I also have a cranky older 13" mid-2009 model MacBook pro 10.6.8 OS X I have quit using cuz it's quirkly-- that doesn't produce sound through the tv either--but doesn't have the same ports as the new Mac --if there is something we can use to hook it up, that would be great too-I would order both, then I could leave that as a dedicated movie/internet tv box)
Any help, descriptions or pictures or links to what I might be able to order to make either one work and have delivered quickly so she could bring would be GREATLY APPRECIATED. You guys Rock!You need two things: a mini-Displayport to HDMI adaptor, and a regular HDMI cable.
The mini-Displayport connector on the Macbook is the one you've described with the lightning bolt. That port on your Macbook is actually called Thunderbolt, but for this purpose it's acting as a mini-Displayport connector.
When you buy the Displayport adaptor, make sure you get one that supports audio. Not all do.
I'm sorry I don't know the best options available to you in Belize, but hopefully that information will help you approach a local electronics supplier.
Matt -
PLEASE HELP ME FIND A GOOD CAR PLUG FOR MY iPHONE
Alright guys, I have been through 3 different plugs to connect my iphone to my car to play music, and I am a bit ticked. So i figured I would ask the Apple Discussion Boards so you guys can tell me the best audio/charger combo for my iPhone. Here is what happened with each of my previous plugs...
The first one was just a regular ordinary headphone plug that plugged from my iphones headphone slot to my car's auxiliary slot. It worked for a while but then the audio only started coming out through the right side of my car speakers occasionally, and I know for sure it is not my car that made the problem because my radio and CD's play fine through both speakers.
The second one is a "Kensington LiquidAUX Auxiliary Car Kit with Remote for iPod and iPhone". First off the remote that it came with didn't work properly. But here comes the worse part that is so annoying. This problem got progressively worse by the way.... a lot of times the plug would think that it unplugged itself for some strange reason and the music would stop as well as the charging, but then 1 millisecond later it would think it was plugged back in, and although it starts charging again, the music doesn't play again until I press play. Don't tell me to make sure it is plugged in securely because trust me my friends, I have tried everything possible to get this to work. Keep in mind I am driving...so it is a very bad idea to be messing with my phone to press the play again. And lately it has been getting so bad that I actually have to unplug the plug from my iphone and then plug it back in and press play, which is incredibly annoying. This happens about once a minute OR MORE now a days. Also, it makes a really annoying "whirrling" sound whenever I am using it. By the way, I even turned Airplane mode on, and the exact same problems still happened. So a summary of this: this audio/charger combo is a failure.
My 3rd plug I decided to try a normal headphone to aux plug again like the first except this time by a better brand, Griffin. But oh wait, the exact same problem happened that the first one had.
Ok guys, so what I really want for you to do for me is PLEASE HELP ME FIND A GOOD CAR PLUG FOR MY iPHONE.
Here is what I am looking for in my plug:
Plays music through my car's speakers AND charges at the same time;
I would prefer if it wasn't an FM transmitter because those tend to lose audio quality compared to direct plugins, unless you know of an amazing FM transmitter where you don't lose audio quality;
And finally, I want my plug to ACTUALLY WORK WITHOUT GLITCHES
Also, it would be nice if the plug that you refer to me, you actually own, so I know that you have tested it out before and that it works great.
Any HELP would be very much appreciated, thank you.i thought about going the same route you did, but when I started looking at the prices of everything, I decided it was a better idea to just get a new stereo that can play and charge my iPhone.
After a lot of comparing, looking and price checking, I decided to go with the Alpine IDA-X100. This is a media player only device (no cd player built in) and it has been great. It has an awesome interface and dial setup that let's you go through your music just as if it were on an iPod. It even has a small color screen that displays the album artwork for you. My car has a factory BOSE system in it and the Alpine head unit even managed to improve the sound quality. Go see you local alpine dealer (or best buy) and check it out. The supplied cable charges the phone and plays music too. Your iPhone will give you an error message when you plug it in, saying that the accessory was not designed for iPhone, but if you just click no it works great. -
ME21N - new field added and same value posted to it for all line items
hi all
i have added new field under item level in me21n screen.
data for new filed fetched from tables with values entered in header level material number.
For one record, it is ok
but for multiple records, same value is fetched for all line items
i have written coding in screen exit for 0111
and function exits EXIT_SAPMM06E_016 and EXIT_SAPMM06E_018
how to solve
pl help
regards
senthilMODULE STATUS_0111 OUTPUT.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
if sy-tcode eq 'ME23N' or sy-tcode eq 'ME23'.
LOOP at SCREEN.
if screen-group1 ne 'PCS'.
screen-input = 0.
MODIFY SCREEN.
endif.
ENDLOOP.
ENDIF.
TYPES : BEGIN OF ty_cabn1,
atnam TYPE cabn-atnam,
end of ty_cabn1.
DATA : itab_cabn1 TYPE STANDARD TABLE OF ty_cabn1 INITIAL SIZE 0,
wa_cabn1 TYPE ty_cabn1.
TYPES : BEGIN OF ty_cawn1,
atinn TYPE cawn-atinn,
atzhl TYPE cawn-atzhl,
atwrt TYPE cawn-atwrt,
end of ty_cawn1.
DATA : itab_cawn1 TYPE STANDARD TABLE OF ty_cawn1 INITIAL SIZE 0,
wa_cawn1 TYPE ty_cawn1.
TYPES : BEGIN OF ty_cawnt1,
pcs TYPE cawnt-atwtb,
atinn TYPE cawnt-atinn,
atzhl TYPE cawnt-atzhl,
atwtb TYPE cawnt-atwtb,
end of ty_cawnt1.
DATA : itab_cawnt1 TYPE TABLE OF ty_cawnt1,
wa_cawnt1 TYPE ty_cawnt1.
TYPES : BEGIN OF ty_pcs1,
pcs TYPE cawnt-atwtb,
atwrt TYPE cawn-atwrt,
atwtb TYPE cawnt-atwtb,
end of ty_pcs1.
DATA : itab_pcs3 TYPE TABLE OF ty_pcs1,
itab_pcs4 TYPE TABLE OF ty_pcs1,
wa_pcs1 TYPE ty_pcs1.
TYPES : BEGIN OF ty_pcsn,
matnr TYPE ausp-objek,
ebelp TYPE dynpread-stepl,
atwrt TYPE cawn-atwrt,
atwtb TYPE cawnt-atwtb,
END OF ty_pcsn.
DATA : itab_pcsn TYPE TABLE OF ty_pcsn,
wa_pcsn TYPE ty_pcsn.
TYPES : BEGIN OF ty_ausp1,
objek TYPE ausp-objek,
atinn TYPE ausp-atinn,
atwrt TYPE ausp-atwrt,
END OF ty_ausp1.
DATA : itab_ausp1 TYPE STANDARD TABLE OF ty_ausp1 INITIAL SIZE 0,
wa_ausp1 TYPE ty_ausp1.
DATA : param_name1(35) TYPE c.
DATA: progname1 TYPE sy-repid,
dynnum1 TYPE sy-dynnr,
dynpro_values1 TYPE TABLE OF dynpread,
dynpro_values2 TYPE TABLE OF dynpread,
field_value1 LIKE LINE OF dynpro_values1,
ematn1 TYPE mara-matnr.
if sy-tcode ne 'ME23N' and sy-tcode ne 'ME23'. "psk
clear : itab_cabn1,itab_cawn1,itab_cawnt1,itab_pcs3,itab_pcs4,itab_pcsn,itab_ausp1.
clear : wa_cawn1,wa_cawnt1,wa_pcs1,wa_ausp1.
if sy-uname eq 'IBM_ABAP'.
param_name1 = '000000001'.
else.
param_name1 = '000000013'.
endif.
SELECT atnam
FROM cabn
INTO CORRESPONDING FIELDS OF TABLE itab_cabn1
WHERE atinn = param_name1.
select *
FROM cawn
into CORRESPONDING FIELDS OF TABLE itab_cawn1
WHERE atinn = param_name1.
if itab_cawn1[] is NOT INITIAL.
SELECT atinn atzhl atwtb
FROM cawnt
INTo CORRESPONDING FIELDS OF TABLE itab_cawnt1
FOR ALL ENTRIES IN itab_cawn1
WHERE atinn = itab_cawn1-atinn
AND atzhl = itab_cawn1-atzhl.
endif.
if itab_cawnt1[] is NOT INITIAL.
sort itab_cawnt1 by atinn atzhl.
loop at itab_cawnt1 INTO wa_cawnt1.
READ TABLE itab_cawn1 INTO wa_cawn1 with key atinn = wa_cawnt1-atinn
atzhl = wa_cawnt1-atzhl BINARY SEARCH.
if sy-subrc eq 0.
CONCATENATE wa_cawn-atwrt '->' wa_cawnt-atwtb INTO wa_cawnt-pcs.
MODIFY itab_cawnt FROM wa_cawnt TRANSPORTING pcs.
wa_pcs-pcs = wa_cawnt-pcs.
wa_pcs1-atwrt = wa_cawn1-atwrt.
wa_pcs1-atwtb = wa_cawnt1-atwtb.
append wa_pcs1 to itab_pcs3.
ENDIF.
CLEAR : wa_cawnt1,wa_cawn1, wa_pcs1.
ENDLOOP.
ENDIF.
CLEAR: dynpro_values1, field_value1.
dynpro_values-FIELDNAME = 'MEPO1211-EMATN'.
APPEND dynpro_values.
field_value1-fieldname = 'MEPO1211-ematn'.
APPEND field_value1 TO dynpro_values1.
progname1 = 'SAPLMEGUI'.
dynnum1 = '1211'.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
DYNAME = progname1
DYNUMB = dynnum1
TRANSLATE_TO_UPPER = ' '
REQUEST = 'A'
PERFORM_CONVERSION_EXITS = ' '
PERFORM_INPUT_CONVERSION = ' '
DETERMINE_LOOP_INDEX = ' '
START_SEARCH_IN_CURRENT_SCREEN = ' '
START_SEARCH_IN_MAIN_SCREEN = ' '
START_SEARCH_IN_STACKED_SCREEN = ' '
START_SEARCH_ON_SCR_STACKPOS = ' '
SEARCH_OWN_SUBSCREENS_FIRST = ' '
SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
TABLES
DYNPFIELDS = dynpro_values1
EXCEPTIONS
INVALID_ABAPWORKAREA = 1
INVALID_DYNPROFIELD = 2
INVALID_DYNPRONAME = 3
INVALID_DYNPRONUMMER = 4
INVALID_REQUEST = 5
NO_FIELDDESCRIPTION = 6
INVALID_PARAMETER = 7
UNDEFIND_ERROR = 8
DOUBLE_CONVERSION = 9
STEPL_NOT_FOUND = 10
OTHERS = 11
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
READ TABLE dynpro_values1 INTO field_value1 with KEY fieldname = 'MEPO1211-EMATN'.
LOOP at dynpro_values1 INTO field_value1 WHERE fieldname = 'MEPO1211-EMATN'.
clear ematn1.
if sy-subrc eq 0.
ematn1 = field_value1-fieldvalue.
endif.
if ematn1 is not INITIAL.
clear : wa_cawn1,wa_cawnt1,wa_pcs1,wa_ausp1.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = ematn1
IMPORTING
OUTPUT = ematn1.
select *
FROM ausp
INTO CORRESPONDING FIELDS OF TABLE itab_ausp1
WHERE objek = ematn1
and atinn = param_name1.
CLEAR itab_pcs4.
if itab_ausp1[] is not INITIAL.
sort itab_ausp1 by atinn atwrt.
sort itab_cawn1 by atinn.
READ TABLE itab_ausp1 INTO wa_ausp1 INDEX 1.
loop at itab_cawn1 INTO wa_cawn1 WHERE atinn = wa_ausp1-atinn AND atwrt = wa_ausp1-atwrt.
READ TABLE itab_cawnt1 INTO wa_cawnt1 WITH KEY atinn = wa_cawn1-atinn
atzhl = wa_cawn1-atzhl.
if sy-subrc eq 0.
wa_pcs1-atwrt = wa_cawn1-atwrt.
wa_pcs1-atwtb = wa_cawnt1-atwtb.
append wa_pcs1 to itab_pcs4.
wa_pcsn-matnr = wa_ausp1-objek.
wa_pcsn-ebelp = field_value1-stepl.
wa_pcsn-atwrt = wa_cawn1-atwrt.
wa_pcsn-atwtb = wa_cawnt1-atwtb.
APPEND wa_pcsn to itab_pcsn.
ENDIF.
clear : wa_ausp1,wa_cawn1,wa_cawnt1.
ENDLOOP.
ENDIF.
clear wa_pcs1.
read TABLE itab_pcs4 into wa_pcs1 index 1.
if sy-subrc eq 0.
EKPO_CI-ZPCS = wa_pcs1-atwrt.
endif.
ENDIF.
ENDLOOP.
CLEAR: field_value1.
LOOP at dynpro_values1 INTO field_value1 WHERE fieldname = 'MEPO1211-EMATN'.
clear wa_pcsn.
if field_value1-fieldvalue is not INITIAL.
read TABLE itab_pcsn INTO wa_pcsn with key matnr = field_value1-fieldvalue
ebelp = field_value1-stepl.
if sy-subrc eq 0.
clear EKPO_CI-ZPCS.
*EKPO_CI-ZPCS = wa_pcs1-atwrt.
EKPO_CI-ZPCS = wa_pcsn-atwrt.
endif.
endif.
ENDLOOP.
CLEAR: field_value1, dynpro_values1.
progname1 = 'SAPLXM06'.
dynnum1 = '0111'.
field_value1-fieldname = 'EKPO_CI-ZPCS'.
APPEND field_value1 TO dynpro_values1.
if ematn1 is not INITIAL.
clear wa_pcs1.
read TABLE itab_pcs4 into wa_pcs1 index 1.
if sy-subrc eq 0.
EKPO_CI-ZPCS = wa_pcs1-atwrt.
endif.
ENDIF.
endif.
ENDMODULE. " STATUS_0111 OUTPUT
Function exits:
^^^^^^^^^^^^^^^^^
EXIT_SAPMM06E_016
^^^^^^^^^^^^^^^^^
INCLUDE ZXM06U41 .
DATA XFISTL LIKE EKPO-FISTL.
TABLES: ADRC, T001W.
DATA: PLANT LIKE T001W-WERKS.
SELECT SINGLE * FROM T001W WHERE WERKS = I_EKPO-WERKS.
SELECT SINGLE * FROM ADRC WHERE ADDRNUMBER = T001W-ADRNR.
XFISTL = ADRC-SORT2.
SET PARAMETER ID 'FIS' FIELD XFISTL.
* Added For PCS 12.11.2010
DATA : fs_ekpo type EKPO_CI.
if sy-tcode = 'ME22N' or sy-tcode = 'ME23N'.
* if tekpo-zpcs is INITIAL.
* message e000(zmm) with 'PCS Type should be chosen'.
* endif.
loop at tekpo.
if ( tekpo-ebeln eq i_ekpo-ebeln and tekpo-ebelp eq i_ekpo-ebelp ).
ekpo_ci-zpcs = tekpo-zpcs.
endif.
ENDLOOP.
endif.
^^^^^^^^^^^^^^^^^
EXIT_SAPMM06E_018
^^^^^^^^^^^^^^^^^
INCLUDE ZXM06U40 .
E_CI_EKPO-ZPCS = EKPO_CI-ZPCS.
E_CI_UPDATE = 'X'.
Maybe you are looking for
-
How can i create a query of overdues with days wise
Hi, thanks for quick reference and i am using time char cal year/month,period like and some thing i got it but i am not able to sure that its enough to crate a query. if u dont mine can u give me a step by step procedure for it and i know that i h
-
Appraisal BSP form not saving in IE
We created an appraisal form that works fine in transaction PHAP_CHANGE_PA. But when we access the BSP (HAP_DOCUMENT), the form presents a problem with Internet Explorer: it does not save, it only reloads the form with the old information. It happens
-
9iAS 9.0.3 / Webcache / Auto-Start does not start!
Hello! I've installed 9iAS 9.0.3 (OHS, J2EE, Webcache) on SUSE-Linux. I've changed the configuration to use auto-start with the Webcache-Admin-Website and restarted the webcache. But using webcachectl status shows, that the auto-restart monitor is no
-
Losing WiFi connection after waking from sleep
I've iMac 27 in. with recently upgraded OS X Lion to 10.7.4. After this was done the problems strated with connecting to Wi-Fi through my Time Capsule (2TB, 802.11n 4th Gen) after waking from sleep. Everything works fine when iMac is started after sh
-
Error 1335 'itunes.cab' is corrupt.
I can't finish the install of the new version of iTunes because of an error 1335. I tried downloading the install package a second time to see if maybe there was just a problem during the download, but no dice. Any ideas? --d