ADF BC How to read a record from database in a bean
Due to the problem I have in this thread Re: Inserting multiple rows programmatically got unique key error I need a work around. One work around is checking whether a record is exist in database prior to insert/commit. This can be achieve whether reading the record and if found that it exists or there is function that I can call to check whether a record is exist. Please note that the search criteria (read criteria) is a combination of two fields.
Thanks.
It's kind of unproductive to open a new thread, as we now need to keep track of two threads.
If you korean a new thread you should provide all info to understand the problem, the jdev version you use and the user case. All this info is missing in this thread, but given in the other thread. Conclusion is that we should continue in the other thread.
Timo
Similar Messages
-
How to read the records from VO
hi
How to read the records from VO and after reading the records the selected records has to be save to DB thru other VO
help me outhi,
its a custom one i am creating
Select C.Name, A.Primary_Flag, , B.Comments, B.ATTRIBUTE_CATEGORY, B.ATTRIBUTE1, B.ATTRIBUTE2
FROM XXVOC_CSD_PRIME_DIAG_CODES_B A, XXVOC_CSD_PRIME_DIAG_CODES_TL B, CSD_DIAGNOSTIC_CODES_TL C, CSD_RO_DIAGNOSTIC_CODES D
Where A. RO_DIAGNOSTIC_CODE_ID = D. RO_DIAGNOSTIC_CODE_ID
AND A. RO_DIAGNOSTIC_CODE_ID = B. RO_DIAGNOSTIC_CODE_ID
AND C.DIAGNOSTIC_CODE = D.DIAGNOSTIC_CODE
AND A.REPAIR_LINE_ID = :1
UNION
SELECT C.NAME, ‘’, ‘’, ‘’,’’,’’
FROM CSD_DIAGNOSTIC_CODES_TL C, CSD_RO_DIAGNOSTIC_CODES D
WHERE C.DIAGNOSTIC_CODE = D.DIAGNOSTIC_CODE
AND D.REPAIR_LINE_ID = :1
from above query i have to select attributes and set it in the EO based VO
Edited by: Naveenapps on Feb 22, 2009 10:36 PM -
How to read some records from a text file into java(not all records)
hello,
how to read text files into java. i need only few records from the text file not all records at a time.
If any one knows plz reply me
my id is [email protected]this snipet reads a text file line by line from line 1 to 3
try {
FileReader fr = new FileReader(directory);
BufferedReader br = new BufferedReader(fr);
int counter = 0;
while ((dbconn = br.readLine()) != null) {
switch(counter){
case 0:
status = dbconn;
break;
case 1:
userName = dbconn;
break;
case 2:
apword = dbconn;
break;
counter++;
br.close();
}catch(IOException e){
} -
How to access next record from database on to form
hi
i have written the following piece of code to retrieve data from database oon to form...
Try
rset = oDICompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
query = "Select * from [@TEST] where Code = ('" + oform.Items.Item("6").Specific.value + "') "
rset.DoQuery(query)
Catch ex As Exception
SBO_Application.MessageBox(ErrorToString)
End Try
' oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
but i can see only one record on my form controls.... i have placed on more button called " Next" so that i can access next records from DB when i click on "Next" button...
Public Sub NextRecords()
Try
rset.MoveFirst()
While Not rset.EoF
' oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
rset.MoveNext()
End While
rset.MoveNext()
Catch ex As Exception
SBO_Application.MessageBox(ErrorToString)
SBO_Application.MessageBox("Updated")
End Try
End sub
i'm not able to access next records...
plz provide me the solution and code for this how to handle this scenario....From your question and code sample given, I think the problem is you are seeing only the last record when pressing the next button.
In the Next button press, you are coded such a way that it will populate the last record.
Try removing the do..While.. loop and simply code like
if Not rset.EoF
rset.MoveNext()
oform.Items.Item("6").Specific.value = rset.Fields.Item("Code").Value
oform.Items.Item("7").Specific.value = rset.Fields.Item("Name").Value
oform.Items.Item("8").Specific.value = rset.Fields.Item("U_Sal").Value
end if
So when you click next, you can see the next record. Not the last record.
Anoop -
How do read/write records from a SQL server hosted on the Web?
If I have a MS SQL Server hosted on the internet, how can I use Labview to access it? Examples appreciated.
TIA,
Les
Solved!
Go to Solution.I have a web-hosted MySQL database. I set up an ODBC data source (Windows) and use a UDL file and am able to connect just as easily as I can an Access database on my PC.
Message Edited by jcarmody on 04-23-2009 09:12 AM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
Attachments:
datasource.PNG 26 KB -
How to delete the records from database table without using work area
Hi all,
The purpose of the down program is to delete the entire contents from all the tables. The deletion of the table should be in sorted manner. Is there any other way to write the code more efficiently,
TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
DELETE ZFFMCTL_AP.
IF SY-SUBRC = 0.
DELETE ZFFMMHDR_AP.
IF SY-SUBRC = 0.
DELETE ZFFM_CHANGE_LOG.
IF SY-SUBRC = 0.
DELETE ZFFMDTL_AR.
IF SY-SUBRC = 0.
DELETE ZFFMHDR_AR.
IF SY-SUBRC = 0.
DELETE ZFFMDTL_JV.
IF SY-SUBRC = 0.
DELETE ZFFMHDR_JV.
IF SY-SUBRC = 0.
DELETE ZFFMDTL_SKF.
IF SY-SUBRC = 0.
DELETE ZFFMHDR_SKF.
IF SY-SUBRC = 0.
DELETE ZFINVOICE_DETAIL.
IF SY-SUBRC = 0.
DELETE ZFFMMASTER.
IF SY-SUBRC = 0.
DELETE ZFFMLOGREAD_CLUS.
IF SY-SUBRC = 0.
DELETE ZFFMCTL.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
ENDIF.
Waiting for response,
Thanks in advance
JohnWrite this way....
TABLES: ZFFMCTL_AP, ZFFMHDR_AP, ZFFM_CHANGE_LOG, ZFFMDTL_AR, ZFFMHDR_AR, ZFFMDTL_JV, ZFFMHDR_JV, ZFFMDTL_SKF,ZFFMHDR_SKF,ZFINVOICE_DETAIL, ZFFMMASTER, ZFFMLOGREAD_CLUS, ZFFMCTL.
DELETE ZFFMCTL_AP.
CHECK SY_SUBRC = 0.
DELETE ZFFMMHDR_AP.
CHECK SY_SUBRC = 0.
DELETE ZFFM_CHANGE_LOG.
CHECK SY_SUBRC = 0.
DELETE ZFFMDTL_AR.
CHECK SY_SUBRC = 0.
DELETE ZFFMHDR_AR.
CHECK SY_SUBRC = 0.
DELETE ZFFMDTL_JV.
CHECK SY_SUBRC = 0.
DELETE ZFFMHDR_JV.
CHECK SY_SUBRC = 0.
DELETE ZFFMDTL_SKF.
CHECK SY_SUBRC = 0.
DELETE ZFFMHDR_SKF.
CHECK SY_SUBRC = 0.
DELETE ZFINVOICE_DETAIL.
CHECK SY_SUBRC = 0.
DELETE ZFFMMASTER.
CHECK SY_SUBRC = 0.
DELETE ZFFMLOGREAD_CLUS.
CHECK SY_SUBRC = 0.
DELETE ZFFMCTL. -
How to get first 50 records from database using cmp beans 2.0?
does any body know how i should write ejb-statment to do that?
thanks
winnickiif i run method for example findAll() and thereare
500k recods my server will by out of memory ithink.
Yes, you are right. I know some guys who wrote
quite a large system in that style :-)
Of course, the application didnt work in real life.
Customer decided to throw the system away and later
er some other guys rewrote it ....... in .NET
What a pity! sigh -
Fetch records from Database based on Input value
Hi Experts,
In my mobile application, I have designed one input field with F4 help or input assist. I need to fetch records from database based on that input and need to display records in table.
My question is:
How to fetch the records from database/back end based on the input value and display them as table format as we are doing in SAP ABAP?
Here, I need to fetch the records based on input value available in the UI screen and pass that value to gateway, fetch the records from database and need to bind with table in SAPUI5.
Kindly share the whole process flow with sample code for this requirement. Hope I have explained the requirement in detail.
Thanks In Advance..
Regards,
Arindam Samanta.Hi,
Try something like this.
In this, I am passing From date, To date, RelGrp, RelStr, Uname as input. Then I am storing those values in variables and passing this data in Odata request.
OData.read({ requestUri: "http://xxxx:8000/sap/opu/odata/sap/Z188_PO_SRV/pos?$filter=Docdate le datetime'"
+ todateformat+"T00:00:00' and Docdate ge datetime'"
+ fromdateformat+"T00:00:00' and RelGrp eq '"
+ relcode +"'and RelStr eq '"
+ relstg +"'and Uname eq '"
+ username+ "' "},
function (data) {
console.log(data);
When we are giving correct inputs it will goes to Success function and get the data from back end.
In console we can see the data.
Hope this will helps to you.
Thanks&Regards
Sridevi -
Fetch last record from database table
hi,
how to fetch last record from database table.
plz reply earliest.
Regards,
Jyotsna
Moderator message - Please search before asking - post locked
Edited by: Rob Burbank on Dec 11, 2009 9:44 AMabhi,
just imagine the table to be BSEG or FAGLFLEXA... then what would be performance of the code ?
any ways,
jyotsna, first check if you have a pattern to follow like if the primary key field have a increasing number range or it would be great if you find a date field which stores the inserted date or some thing..
you can select max or that field or order by descending using select single.
or get all data.. sort in descending order.(again you need some criteria like date).
read the first entry. using read itab index 1 -
How to read relevant record type from file into LSMW ?
Here my req is like this.
file with 5 records.
some of records in file are begin with 'AD'.
i want to read only that records from file while reading data.
i created one field in source structure with record type filed.
even i had given this Identifing Field Content:AD
but after reading data from file its reading all records from file.
But it should read only record type AB from source file.
How can we achieve this?
Thanks in Advance.For this do the follwing steps
goto step 3 Maintain Source Fields
press the change mode button after the double click the filed which is pass the AD value
then it will appier one popup window in this window you have one check box like " selection parameter for import/convert data"
tick thic chekc box and save it.
now when you read the data in Step9 , here you find select options there you enter AD* now you will get the only records start with AD. -
How to read Group ID from Value Mapping Context in Cache Monitoring ?
Hi friends,
In RWB --> Cache Monitoring --> Integration Server (Java) -> (Search for Value Mapping Groups) in this each item is identified by Value Mapping Group (GroupID, Context, Identifier/Agency, Identifier/Scheme). Either we create Value Mapping Table in ID or replicate value mapping data directly from text file/SAP table etc., in run time cache, data will be identified in this manner.
Now, our requirement is to delete a record the Cache for a particular context. Two operations provided by XI one is 'Delete' and another one is 'DeleteGroup'. When we use either of this, we should know GroupID. Suppose, I replicated some large amount of data from my text file in Runtime Cache. Value Mapping Table is like that IN --> India, US --> USA, AU --> Australia, EG --> Egypt. Now, I am required to write a program to get the input country code from user which is going to delete in the value mapping table like IN/AU.... For this, what logic we should follow in the program is, First we scan the value mapping table and find the record (country code) which is match with the input. Then find the GUID value for this record. Now we use the DeleteGroup Operation and pass this GUID and then delete the record.
So, in essence, how to read the GUID from value mapping context.
Friends, Kindly help me to do this.
Thanks in advance.
Jegatheeswaran P.Did you get the way to read group id?
-
How to read appended objects from file with ObjectInputStream?
Hi to everyone. I'm new to Java so my question may look really stupid to most of you but I couldn't fined a solution by myself... I wanted to make an application, something like address book that is storing information about different people. So I decided to make a class that will hold the information for each person (for example: nickname, name, e-mail, web address and so on), then using the ObjectOutputStream the information will be save to a file. If I want to add a new record for a new person I'll simply append it to the already existing file. So far so good but soon I discovered that I can not read the appended objects using ObjectInputStream.
What I mean is that if I create new file and then in one session save several objects to it using ObjectOutputStream they all will be read with no problem by ObjectInputStream. But after that if in a new session I append new objects they won't be read. The ObjectInputStream will read the objects from the first session after that IOException will be generated and the reading will stop just before the appended objects from the second session.
The following is just a simple test it's not actual code from the program I was talking about. Instead of objects containing different kind of information I'm using only strings here. To use the program use as arguments in the console "w" to create new file followed by the file name and the strings you want save to the file (as objects). Example: "+w TestFile.obj Thats Just A Test+". Then to read it use "r" (for reading), followed by the file name. Example "+r TestFile.obj+". As a result you'll see that all the strings that are saved in the file can be successfully read back. Then do the same: "+w TestFile.obj Thats Second Test+" and then read again "+r TestFile.obj+". What will happen is that the strings only from the first sessions will be read and the ones from the second session will not.
I am sorry for making this that long but I couldn't explain it more simple. If someone can give me a solution I'll be happy to hear it! ^.^ I'll also be glad if someone propose different approach of the problem! Here is the code:
import java.io.*;
class Fio
public static void main(String[] args)
try
if (args[0].equals("w"))
FileOutputStream fos = new FileOutputStream(args[1], true);
ObjectOutputStream oos = new ObjectOutputStream(fos);
for (int i = 2; i < args.length ; i++)
oos.writeObject(args);
fos.close();
else if (args[0].equals("r"))
FileInputStream fis = new FileInputStream(args[1]);
ObjectInputStream ois = new ObjectInputStream(fis);
for (int i = 0; i < fis.available(); i++)
System.out.println((String)ois.readObject());
fis.close();
else
System.out.println("Wrong args!");
catch (IndexOutOfBoundsException exc)
System.out.println("You must use \"w\" or \"r\" followed by the file name as args!");
catch (IOException exc)
System.out.println("I/O exception appeard!");
catch (ClassNotFoundException exc)
System.out.println("Can not find the needed class");How to read appended objects from file with ObjectInputStream? The short answer is you can't.
The long answer is you can if you put some work into it. The general outline would be to create a file with a format that will allow the storage of multiple streams within it. If you use a RandomAccessFile, you can create a header containing the length. If you use streams, you'll have to use a block protocol. The reason for this is that I don't think ObjectInputStream is guaranteed to read the same number of bytes ObjectOutputStream writes to it (e.g., it could skip ending padding or such).
Next, you'll need to create an object that can return more InputStream objects, one per stream written to the file.
Not trivial, but that's how you'd do it. -
How to download (contacts) records from a device?
I've noticed that iSync only syncs information of records that exist on both Mac and device (unless the option is chosen that the records on the device should be fully replaced by the Mac's contents) and updates missing records on the device. However, it does not update missing records on my Mac. So if John and Mary are on my Mac and John and Suzy are on the device, Mary will be added to the device, any info on John that has changed will be transferred to the Mac or the device according to which changes were latest, but Suzy will not be imported from the device to my Mac. But that's what I want it to do, too!
So basically - how can I import records from a device to my Address Book for pete's sake?! (I use a Motorola Pebl, but I'm aiming to discover the general trick, if it exists that is - which it should.)
Many thanks in advance!Ok, the weirdest thing just happened...
I wanted to follow your suggestions, but backing up my phone's contacts is not possible (at least not without a lot of fuss googling feeble third-party apps, which I loathe). So I went on backing up and erasing my address book trying to d/l everything from my mobile.
And what happened? A few seconds after erasing every record, the records that are only on my mobile suddenly appeared in my address book! It's like it only now discovers there are some records imported. Very buggy, that feels. Well, I think I'll manage from here, but it would be nice if this sort of thing would not happen... -
How to remove duplicates records from output ?
how to remove duplicates records from output ? i used delete adjacent but duplicates records are coming again ..suggest me
hi shruthi,
thanks for ur answer ..but duplicates records coming again
here is my code >> plz check it out
*& Report ZCRM_TROUBLE_TICKET
REPORT zcrm_trouble_ticket.
TYPES : BEGIN OF ty_qmih,
qmnum TYPE qmnum,
equnr TYPE equnr,
iloan TYPE iloan,
ausvn TYPE ausvn,
ausbs TYPE ausbs,
auztv TYPE auztv,
auztb TYPE auztb,
iwerk TYPE iwerk,
END OF ty_qmih,
BEGIN OF ty_qmel,
qmnum TYPE qmnum,
qmtxt TYPE qmtxt,
indtx TYPE indltx,
priok TYPE priok,
strmn TYPE strmn,
strur TYPE strur,
ltrmn TYPE ltrmn,
ltrur TYPE ltrur,
objnr TYPE qmobjnr,
arbpl TYPE lgwid,
vkorg TYPE vkorg,
vtweg TYPE vtweg,
spart TYPE spart,
END OF ty_qmel,
BEGIN OF ty_ihpa,
parnr TYPE i_parnr,
parvw TYPE parvw,
objnr TYPE qmobjnr,
END OF ty_ihpa,
BEGIN OF ty_crhd,
arbpl TYPE arbpl,
objid TYPE cr_objid,
END OF ty_crhd,
BEGIN OF ty_crtx,
ktext TYPE cr_ktext,
objid TYPE cr_objid,
END OF ty_crtx,
BEGIN OF ty_qmfe,
fecod TYPE fecod,
fegrp TYPE fegrp,
qmnum TYPE qmnum,
END OF ty_qmfe,
BEGIN OF ty_qmur,
urcod TYPE urcod,
urgrp TYPE urgrp,
urtxt TYPE urstx,
qmnum TYPE qmnum,
END OF ty_qmur,
BEGIN OF ty_iloa,
tplnr TYPE tplnr,
iloan TYPE iloan,
END OF ty_iloa,
BEGIN OF ty_output,
qmnum TYPE qmnum,
equnr TYPE equnr,
iloan TYPE iloan,
ausvn TYPE ausvn,
ausbs TYPE ausbs,
auztv TYPE auztv,
auztb TYPE auztb,
iwerk TYPE iwerk,
qmtxt TYPE qmtxt,
indtx TYPE indltx,
priok TYPE priok,
strmn TYPE strmn,
strur TYPE strur,
ltrmn TYPE ltrmn,
ltrur TYPE ltrur,
objnr TYPE qmobjnr,
arbpl TYPE lgwid,
vkorg TYPE vkorg,
vtweg TYPE vtweg,
spart TYPE spart,
parnr TYPE i_parnr,
parvw TYPE parvw,
arbpl TYPE arbpl,
objid TYPE cr_objid,
arbpl1 TYPE arbpl,
ktext TYPE cr_ktext,
fecod TYPE fecod,
fegrp TYPE fegrp,
urcod TYPE urcod,
urgrp TYPE urgrp,
urtxt TYPE urstx,
tplnr TYPE tplnr,
END OF ty_output.
DATA : it_qmih TYPE STANDARD TABLE OF ty_qmih,
it_qmel TYPE STANDARD TABLE OF ty_qmel,
it_ihpa TYPE STANDARD TABLE OF ty_ihpa,
it_crhd TYPE STANDARD TABLE OF ty_crhd,
it_crtx TYPE STANDARD TABLE OF ty_crtx,
it_qmfe TYPE STANDARD TABLE OF ty_qmfe,
it_qmur TYPE STANDARD TABLE OF ty_qmur,
it_iloa TYPE STANDARD TABLE OF ty_iloa,
it_output TYPE STANDARD TABLE OF ty_output,
wa_qmih TYPE ty_qmih,
wa_qmel TYPE ty_qmel,
wa_ihpa TYPE ty_ihpa,
wa_crhd TYPE ty_crhd,
wa_crtx TYPE ty_crtx,
wa_qmfe TYPE ty_qmfe,
wa_qmur TYPE ty_qmur,
wa_iloa TYPE ty_iloa,
wa_output TYPE ty_output.
INITIALIZATION.
REFRESH : it_qmih,
it_qmel,
it_ihpa,
it_crhd,
it_crtx,
it_qmfe,
it_qmur,
it_iloa,
it_output.
CLEAR: wa_qmih,
wa_qmel,
wa_ihpa,
wa_crhd,
wa_crtx,
wa_qmfe,
wa_qmur,
wa_iloa,
wa_output.
start-of-selection.
SELECT qmnum
equnr
iloan
ausvn
ausbs
auztv
auztb
iwerk
FROM qmih
INTO TABLE it_qmih.
SORT it_qmih BY qmnum .
DELETE ADJACENT DUPLICATES FROM it_qmih COMPARING qmnum equnr iloan ausvn ausbs auztv auztb iwerk.
SELECT qmnum
qmtxt
indtx
priok
strmn
strur
ltrmn
ltrur
objnr
arbpl
vkorg
vtweg
spart
FROM qmel
INTO TABLE it_qmel
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
SORT it_qmel BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmel COMPARING qmnum
qmtxt
indtx
strmn
strur
ltrmn
ltrur
objnr
arbpl
vkorg
vtweg
spart.
IF it_qmel IS NOT INITIAL.
SELECT parnr
parvw
objnr
FROM ihpa
INTO TABLE it_ihpa
FOR ALL ENTRIES IN it_qmel
WHERE objnr = it_qmel-objnr.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_ihpa COMPARING parnr
parvw
objnr.
IF it_qmel IS NOT INITIAL.
SELECT arbpl
objid
FROM crhd
INTO TABLE it_crhd
FOR ALL ENTRIES IN it_qmel
WHERE objid = it_qmel-arbpl.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_crhd COMPARING arbpl
objid.
IF it_qmel IS NOT INITIAL.
SELECT ktext
objid
FROM crtx
INTO TABLE it_crtx
FOR ALL ENTRIES IN it_crhd
WHERE objid = it_crhd-objid.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_crtx COMPARING ktext
objid.
IF it_qmih IS NOT INITIAL.
SELECT fecod
fegrp
qmnum
FROM qmfe
INTO TABLE it_qmfe
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
ENDIF.
SORT it_qmfe BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmfe COMPARING fecod
fegrp.
IF it_qmih IS NOT INITIAL.
SELECT urcod
urgrp
urtxt
qmnum
FROM qmur
INTO TABLE it_qmur
FOR ALL ENTRIES IN it_qmih
WHERE qmnum = it_qmih-qmnum.
ENDIF.
SORT it_qmur BY qmnum.
DELETE ADJACENT DUPLICATES FROM it_qmur COMPARING urcod
urgrp
urtxt.
IF it_qmih IS NOT INITIAL.
SELECT tplnr
iloan
FROM iloa
INTO TABLE it_iloa
FOR ALL ENTRIES IN it_qmih
WHERE iloan = it_qmih-iloan.
ENDIF.
DELETE ADJACENT DUPLICATES FROM it_iloa COMPARING tplnr
iloan.
LOOP AT it_qmih INTO wa_qmih.
wa_output-qmnum = wa_qmih-qmnum.
wa_output-equnr = wa_qmih-equnr.
wa_output-iloan = wa_qmih-iloan.
wa_output-ausvn = wa_qmih-ausvn.
wa_output-ausbs = wa_qmih-ausbs.
wa_output-auztv = wa_qmih-auztv.
wa_output-auztb = wa_qmih-auztb.
wa_output-iwerk = wa_qmih-iwerk.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmel INTO wa_qmel WITH KEY qmnum = wa_qmih-qmnum.
wa_output-qmtxt = wa_qmel-qmtxt.
wa_output-indtx = wa_qmel-indtx.
wa_output-priok = wa_qmel-priok.
wa_output-strmn = wa_qmel-strmn.
wa_output-strur = wa_qmel-strur.
wa_output-ltrmn = wa_qmel-ltrmn.
wa_output-ltrur = wa_qmel-ltrur.
wa_output-objnr = wa_qmel-objnr.
wa_output-arbpl = wa_qmel-arbpl.
wa_output-vkorg = wa_qmel-vkorg.
wa_output-vtweg = wa_qmel-vtweg.
wa_output-spart = wa_qmel-spart.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_ihpa INTO wa_ihpa WITH KEY objnr = wa_qmel-objnr.
wa_output-parnr = wa_ihpa-parnr.
wa_output-parvw = wa_ihpa-parvw.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_crhd INTO wa_crhd WITH KEY objid = wa_qmel-arbpl.
wa_output-arbpl = wa_crhd-arbpl.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_crtx INTO wa_crtx WITH KEY objid = wa_crhd-objid.
wa_output-ktext = wa_crtx-ktext.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmfe INTO wa_qmfe WITH KEY qmnum = wa_qmih-qmnum.
wa_output-fecod = wa_qmfe-fecod.
wa_output-fegrp = wa_qmfe-fegrp.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_qmur INTO wa_qmur WITH KEY qmnum = wa_qmih-qmnum.
wa_output-urcod = wa_qmur-urcod.
wa_output-urgrp = wa_qmur-urgrp.
wa_output-urtxt = wa_qmur-urtxt.
APPEND wa_output TO it_output.
CLEAR wa_output.
READ TABLE it_iloa INTO wa_iloa WITH KEY iloan = wa_qmih-iloan.
wa_output-tplnr = wa_iloa-tplnr.
APPEND wa_output TO it_output.
CLEAR wa_output.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM it_output COMPARING qmnum
equnr
ausvn
ausbs
auztv
auztb
iwerk
qmtxt
indtx
priok
strmn
strur
ltrmn
ltrur
vkorg
vtweg
spart
parnr
parvw
arbpl
ktext
fecod
fegrp
urcod
urgrp
urtxt
tplnr.
*CALL FUNCTION 'STATUS_TEXT_EDIT'
EXPORTING
CLIENT = SY-MANDT
FLG_USER_STAT = ' '
objnr =
ONLY_ACTIVE = 'X'
spras = en
BYPASS_BUFFER = ' '
IMPORTING
ANW_STAT_EXISTING =
E_STSMA =
LINE =
USER_LINE =
STONR =
EXCEPTIONS
OBJECT_NOT_FOUND = 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.
*CALL FUNCTION 'READ_TEXT'
EXPORTING
CLIENT = SY-MANDT
id =
language =
name =
object =
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
tables
lines =
EXCEPTIONS
ID = 1
LANGUAGE = 2
NAME = 3
NOT_FOUND = 4
OBJECT = 5
REFERENCE_CHECK = 6
WRONG_ACCESS_TO_ARCHIVE = 7
OTHERS = 8
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*LOOP AT IT_OUTPUT INTO WA_OUTPUT.
*WRITE : / WA_OUTPUT-qmnum,
WA_OUTPUT-equnr,
WA_OUTPUT-iloan,
WA_OUTPUT-ausvn,
WA_OUTPUT-ausbs,
WA_OUTPUT-auztv,
WA_OUTPUT-auztb,
WA_OUTPUT-qmtxt,
WA_OUTPUT-indtx,
WA_OUTPUT-strmn,
WA_OUTPUT-strur,
WA_OUTPUT-ltrmn,
WA_OUTPUT-ltrur,
WA_OUTPUT-objnr,
WA_OUTPUT-arbpl,
WA_OUTPUT-parnr,
WA_OUTPUT-parvw,
WA_OUTPUT-objid,
WA_OUTPUT-ktext,
WA_OUTPUT-fecod,
WA_OUTPUT-fegrp,
WA_OUTPUT-urcod,
WA_OUTPUT-urgrp,
WA_OUTPUT-urtxt,
WA_OUTPUT-tplnr.
*ENDLOOP.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
BIN_FILESIZE =
filename = 'E:\CRM1.TXT'
FILETYPE = 'ASC'
APPEND = ' '
write_field_separator = '|'
HEADER = '00'
TRUNC_TRAILING_BLANKS = ' '
WRITE_LF = 'X'
COL_SELECT = ' '
COL_SELECT_MASK = ' '
DAT_MODE = ' '
CONFIRM_OVERWRITE = ' '
NO_AUTH_CHECK = ' '
CODEPAGE = ' '
IGNORE_CERR = ABAP_TRUE
REPLACEMENT = '#'
WRITE_BOM = ' '
TRUNC_TRAILING_BLANKS_EOL = 'X'
WK1_N_FORMAT = ' '
WK1_N_SIZE = ' '
WK1_T_FORMAT = ' '
WK1_T_SIZE = ' '
WRITE_LF_AFTER_LAST_LINE = ABAP_TRUE
IMPORTING
FILELENGTH =
TABLES
data_tab = it_output
FIELDNAMES =
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF. -
How to read the file from a folder.
Hi All,
How to read the file from a folder or directory from the non sap server / remote server.
Regards
Sathisopen dataset filename for input in text mode
encoding default.
filename is character type variable with the destination filename.
Edited by: Jino Augustine on Apr 19, 2010 1:31 PM
Maybe you are looking for
-
Graphics card upgrade for HP Pavilion a1020n
Hi Everyone! I need to upgrade the Graphics card in my HP Pavilion a1020n for windows 7 Aero or windows 8. i need the graphics card to run Minecraft,Roblox,The Sims 3, Roller coaster tycoon 3, decently. Thanks This question was solved. View Solution.
-
Anyone else noticed that the phone usage has not been updated on My BT since 5/7/14. I have definately made calls, and know it takes 48 hours to appear. It seems to coincide with the anytime calls add-on being visible, give or take a few days. It do
-
Outline Order, Calc Script Performance, Substitution Variables
Hi All, I am currently looking in to the performance side. This is mainly about the calculation script performance. There are lot of questions in my mind and as it is said you can get the results only by testing. 1. Outline order should be from least
-
Function module needed to read all the BOM statuses
Dear Friends, In a report we are using CS_BOM_EXPL_MAT_V2 function module to get the dispaly the BOMs. But it is displaying only the BOMs which are in Active stauts e.g 1 & 3. My requirement is needs to read both active and inactive BOMs. Inactive BO
-
Serial number status of semi finished material.
Hi Gurus, I have a serialized finished product. I have a serialized semi finished material as a component of that finished product. After issuing the semifinished to the production order of the finished product, the serial number status of the semifi