BDC Query
Hello,
I am having a problem when i execute the foll code:
DATA : l_trfar TYPE HRP1005-TRFAR,
l_trfgb TYPE HRP1005-TRFGB.
SELECT SINGLE trfar trfgb INTO (l_trfar,l_trfgb)
FROM hrp1005 WHERE otype = 'S' AND
objid = second_per-plans AND
begda LE second_per-begda AND
endda GE second_per-begda.
REFRESH: bdc_table.
PERFORM build_dynpro USING 'X' 'SAPMP50A' '1000'.
PERFORM build_dynpro USING ' ' 'RP50G-PERNR' second_per-pernr.
PERFORM build_dynpro USING ' ' 'RP50G-CHOIC' '0008'.
PERFORM build_dynpro USING ' ' 'BDC_OKCODE' '=COP'. "dvhk910657
PERFORM build_dynpro USING ' ' 'BDC_OKCODE' '=INS'.
PERFORM build_dynpro USING 'X' 'MP000800' '2010'.
PERFORM build_dynpro USING ' ' 'P0008-BEGDA' second_per-begda.
PERFORM build_dynpro USING ' ' 'P0008-PREAS' second_per-preas.
PERFORM build_dynpro USING ' ' 'P0008-TRFAR' l_trfar.
PERFORM build_dynpro USING ' ' 'P0008-TRFGB' l_trfgb.
PERFORM build_dynpro USING ' ' 'P0008-TRFGR' second_per-trfgr.
IF second_per-ansal = ' '. "CHG20599
bypass sending the field in the BDC
ELSE. "CHG20599
PERFORM build_dynpro USING ' ' 'Q0008-ANSAL' second_per-ansal.
ENDIF. "CHG20599
PERFORM build_dynpro USING ' ' 'BDC_OKCODE' '/11'.
PERFORM build_dynpro USING 'X' 'MP000800' '2010'.
PERFORM build_dynpro USING ' ' 'BDC_OKCODE' '/11'.
CALL TRANSACTION 'PA30' USING bdc_table
MODE s_view
UPDATE 'S' " Synchronous
MESSAGES INTO tran_itab.
retcode = sy-subrc.
CLEAR bdc_table.
REFRESH bdc_table.
IF retcode <> 0.
WRITE:/ 'Could not Modify IT0008 for personnel # : ',
second_per-pernr.
end_session = 1.
ENDIF.
In this code i am making changes in infotype 0008, its givin error
wat cud b posss cause of error.
Answers will be rewarded.
Hi,
What is the Error you are getting...u can see the contents of the tran_itab. in debugging to see what are the problems....
santhosh
Similar Messages
-
hi sap techies i'm mew to abap,
please help me out on one bdc query.
tell me how to define an internl table wrt to incoming file and how to get in to that into this internal table.
i do have two radio buttons in selection screen one for yes and one for no.
if radio button is yes
pgm to scan through the file ,pick up the consumer no go to FKKVKP table pick up the contract a/c no(VKONT) value where accnt in legacy field
(VKONa) is equal to consumer number extracted from the file.
if radio button is no, below functionality should be done.
Program to pickup the records from the input file and update the same in Z table(ZIPG).
This table ZIPG will have below fields
a. contract a/c number of 12 in length,
b.agency code of 6 in length,
c.company name of 4 in length ,
d.activation flag ( length = 1)
1.If any entry for consumer already exists in the above table with the activation flag u201CYu201D then the same should also be capture in the log as u201Cconsumer already registered with the details of the party where he is registered as per the tableu201D
2.Pgm to pickup contract a/c number as per the file and go to CA A2 transaction in payment / taxes tab,
Check the field incoming payment method if the fields is blank then populate it with u201CIu201D , if the field not blank but has some value other than u201CIu201D then PGM shouldnu2019t change payment method should be reported in log.
PGM to check whether the file has been uploaded previously or not if yes error message should be given that the file is already uploaded by referring custom table ZFIF
This table will have below fields
a.file name (18 in length).
b. Processed flag (1 in lenght).
Sample file will have below format
RY0901111005851620090281 (filename)
From above file contact a/c no would be 1110058516 , Send me the code.
Edited by: sush babu on Mar 14, 2009 5:05 PMWelcome to SCN, but please do not post your requirements and ask the forum to do your work.
Rob -
Select query is not working in BDC Program
Hi,
I am working in BDC for update valuation class for T-code mm01.Actually In this BDC i am using two recoding based on material type.
i am using two internal table : I_DATA and ITAB
Use I_DATA to hold excle data in which material No, plant , valuation type , valuation No. and ITAB for material No, material type Only.
So, i am fetching material Type ( MARA-MTART ) through select query. But Select query is not working. and also i did check MARA table according that Material Number then material no. exit in Mara Table.
Note : at run time I_DATA have 1 row but ITAB have 0 row ....
DATA: BEGIN OF I_DATA OCCURS 0,
MATNR TYPE MARA-MATNR,
WERKS TYPE MARC-WERKS,
BWTAR TYPE RMMG1-BWTAR,
VERPR TYPE BMMH1-VERPR,
BKLAS TYPE MBEW-BKLAS,
STATUS TYPE C,
END OF I_DATA.
DATA : BEGIN OF ITAB OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
END OF ITAB.
Loop at I_DATA.
select matnr mtart from mara into table itab where matnr = I_DATA-matnr.
endloop.
Guide me..........If you use your
Loop at I_DATA.
select matnr mtart from mara into table itab
where matnr = I_DATA-matnr.
endloop.
At end of loop, itab will only contain the result of the last select, so use a
Loop at I_DATA.
select matnr mtart from mara APPENDING table itab
where matnr = I_DATA-matnr.
endloop.
better
if I_DATA[] is not initial.
select matnr mtart from mara into table itab
FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
endif.
Some Remarks
- If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
- You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
Regards,
Raymond -
BDC select query with addition based on all If conditions
Hi can any one send me the select query with conditions like
If Itab is not initial.
Endif. and if possible with valiadations messages also.
IF CHECK_NUMBER of CHECK_ADVICE of the flat file = PAYR-CHECT. Then update SAP field BSEG-XREF2 .
9. When Flat file check Number = PAYR-CHECT then Insert or Update Flat file RECEIPT_DATE into SAP field BSEG-XREF1.
Please send me immediately.> SELECT rsnum
> rspos
> matnr
> werks
> lgort
> shkzg
> aufnr
> bdmng
> enmng
> FROM resb INTO TABLE it_rsnum FOR ALL ENTRIES IN it_aufnr
> WHERE rsnum EQ it_aufnr-rsnum
> AND xloek NE 'X'
> AND postp NE 'X'
> AND resbbdmng GE resbenmng.
> ENDIF.
>
> Database Table RESB: 40,000,000 Records (40 Million)
> Internal Table it_aufnr: 20,000 Entries
> Entries selected from RESB: 150,000.
>
Hi,
the problem is the big for all entries table.
Your 20.000 records FAE will be split into SEVERAL sql statements depending on the size of the table.
Where do you get the it_auftrn from?
If it's another transparent table try to JOIN this table to your big table.
SELECT rsnum
rspos
matnr
werks
lgort
shkzg
aufnr
bdmng
enmng
FROM resb JOIN tab_auftrn on resbrsnum = tab_auftrnauftrn
AND xloek NE 'X'
AND postp NE 'X'
AND resbbdmng GE resbenmng.
Make sure that your WHERE filter and the JOIN keys on both tables are supported by indexes.
150.000 records about of 40 Mio. can definitly be serviced by an appropriate index:
i.e. Index fields (check your PK or secondary indexes):
rsnum
enmng
aufnr
bye
yk -
Query on availability of BDC/BADI for following enhancement
Hi,
I want to know whether any user exit/BADI/BDC is available for the following Scenario:
I have a PO having 80 Project materials. The PO will be created with reference to a PR which will have all the Project Materials. The Client doesn't want to maintain conditions and the Tax code at line item level (conditions cannot be maintained at Header level as these are different for the condition types) for 80 Project materials in a single PO as it is too laborious. Instead he want's to populate the fields thro' an excel file where he will be maintain the values for the condition type and tax code.
My question's are:-
Is this Possible?
How? using BDC/BADI ?
Solution to the Problem ?
Please treat this as urgent and respond.Yes it is possible by doing some development work.
Create a new transaction code which can list down all the PR's for a vendor to be converted into a PO. dispaly all the line items in a ALV Grid format whcoh can be downloaded so that the user can populate the PO price and tax code in differnt columns for the lines and provide an updload functionality which will then update the table. Once updated , you need to provide a selection icon for creating the PO whcih will invoke the BAPI - BAPI_PO_CREATE1 for creating the PO using the fields from the screen.
Hope this helps.
Thanks & Regards
Kishore -
hi friends,
I really have doubt on bdc program. I wantedto complete this task.
1. Create a BDC program for the following
- Read a flat file containing Vendor Master details (keep the record structure as simple as possible). The file should contain a list of Vendors to be created in the SAP system.
- Using BDC technique, create the Vendor master using FK01 transaction
- Repeat the steps for creating all Vendors listed in the file. For each transaction, print out if the BDC was successful or not, and if successful print out the Vendor Number that was created.
but nothing is woking out.
I jus wnated to know what was my mistake.
I would provide my screen shots with expalnations for each and ery step.
Kindly please anyone of help me to know my mistake and to get the program done. i need to finish this by today since theres a lot of pressure in my work place.
Pls provide me ur mail id to send my documents as attachmnents..
I would be very thankful for your timely help.
Thanks in advance
rinky123I have tested your program up to the BDC part, looks like you program is uploading the data and putting it in to the RECORD internal table correctly. This leads me to believe that the problem is in the BDC code itself. As Srinivas has suggested, run the program with mode "A". You can set this in the selection screen. Currently it is mode "N". Mode "A" will allow you to see all of the steps that the BDC is doing and you can find out what the error is at that time.
Regards,
Rich Heilman -
Hai All,
My Problem is : Creating Pricing conditions using BDC.
My Questation is : I have a doubt on scale screens, I am using 031 Screen for
Value scale and 0303 Screen for quanty scale.
<b>Why and When we are using Screen 0300. </b>
Standard Program is : RV14BTCI , I checked the standard program but i did not understand. Can any one help me.
Thanks,
Naga.I have tested your program up to the BDC part, looks like you program is uploading the data and putting it in to the RECORD internal table correctly. This leads me to believe that the problem is in the BDC code itself. As Srinivas has suggested, run the program with mode "A". You can set this in the selection screen. Currently it is mode "N". Mode "A" will allow you to see all of the steps that the BDC is doing and you can find out what the error is at that time.
Regards,
Rich Heilman -
BDC Error in transaction code IHC1IP
HI Experts,
I have a requirment to Park/Post multiple Payment orders via transaction code IHC1IP .So proceeded with BDC but in the screen of IHC1IP there a long text called Payment Notes which i am unable capture by recording. Please suggest if anyone has faced the same problem. As per as my understanding because of container is used for payment notes .
So is it because of container its not captured by BDC or is there any problem. Please sugggest me the way to proceed further.
Regards,
Krishna Prasad.KHi Krishna,
If you have got the answer for the above query, please share with me. As I am stuck at the same place.
Thanks in advance!!!
Regards,
Roli -
Select query in routing(operation,sequence)
Hello frds,
i am into change routing BDC actually i want a select query .....for like existing of operation for a particular sequence in routing....
if i will found operation for particular sequence i will run the bdc code lese i will exit...any one can help me...
just provide me a query....to check existnece of operation for a particular sequence......ASAP...Why on earth would you want to keep the queries separate? As Tom Kyte would say, databases are born to join!
Providing emp_id has an index on it (and it should, assuming it's the table's primary key!) your "complex" (or, what I would call simple*), it'll most likely be faster than doing it separately. You've not got the context switches for one thing.
If you want to see what the optimizer does with your query, you should run a trace on the query. An explain plan would give you an idea of what it's going to do, too.
In general, doing something like this procedurally is going to almost certainly be worse than doing it in SQL (and by worse, I mean slower).
* I'd hate to see what you'd call some of the monster queries I work with, if you think that query is complex! -
Download Data From Excel - VBA Code to SAP Using BDC
Hi ,
I am Sudhir Dure, working with Satyam Computers.
I need help on the below query:
I have an excel file which download data from Excel to SAP using RFC function & with the help of VBA interface.
In this VBA code I have used BDC recording of SAP Transaction KE21N to post data into SAP.
Now I am facing problem to find sub screen (tab page screen ) in SAP from VBA code .
How to pass BDC Subscreen details from VBA code to SAP using below code?
BDCTABLE.Rows.Add
BDCTABLE.Cell(J, "PROGRAM") = PROGRAMNAME
BDCTABLE.Cell(J, "DYNPRO") = "0200"
BDCTABLE.Cell(J, "DYNBEGIN") = "X"
BDCTABLE.Cell(J, "FNAM") = "BDC_OKCODE"
BDCTABLE.Cell(J, "FVAL") = "=NEXT"
Thanks,
Sudhir Dure
9972097464can anyone tell me how to get the PurchaseOrder number and item quantity from the Salesorder...? what are the fields here as given below..??
For Each oItem In oSalesOrder.items
wsTemplate.Range(cols(3) & Indexv).Value = oItem.material.material
'wsTemplate.Range(cols(4) & Indexv).Value = ' I need item quantity here ????
wsTemplate.Range(cols(1) & Indexv).Value = sapSoNumber
wsTemplate.Range(cols(2) & Indexv).Value = ' I need purchase order number here>???
Indexv = (Indexv + 1)
Next
reply fast. please .. thanks -
What is BAPI?How to create a BAPI? Difference b/w BAPI and BDC
Hi all,
Can some one help me regarding...
What is an BAPI?where it is used?
How to create a BAPI?
What is the difference between BAPI and BDC Program?
Iam in Initial stage regarding BAPI concept.
Please respond me soon.
Thanks,
LeeHI,
Here it is:
BAPI Programming Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
BAPI User Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
http://techrepublic.com.com/5100-6329-1051160.html#
http://www.sap-img.com/bapi.htm
http://www.sap-img.com/abap/bapi-conventions.htm
http://www.sappoint.com/abap/bapiintro.pdf
http://ifr.sap.com/catalog/query.asp
STEP BY STEP for BAPI
http://sap-img.com/abap/bapi-step-by-step-guidance.htm
<b>DIFFERENCE between BAPI and BDC</b>
BDC is traditional way of coding the transactions for uploading the legacy data, Sap is changing all transactions to Object oriented programming. Since BAPI is Object based and supports all the new transactions it is preffered over BDC. More over BAPI's process data faster than BDC.
BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI. BDC is a method of driving screens programatically, for updating SAP data. BAPIs are generally faster than BDCs.
A BAPI is faster because it is updating the DB "directly". Whereas BDC with call
transaction goes through the whole screen sequence like any user would do, simply put, fills screens.
However - there is not always a BAPI for a particular transaction and not all functions that are performed by a transaction can be done by a BAPI. BDCs produce error sessions which can be processed by the user, while BAPIs don't.
First choose the BAPI ,if there is no BAPI go for BDC.
why BAPI first not BDC.
SAP comes up with Change in Version, so each and every time they will change the screens/number etc.
so you have to change your BDC programs accordingly.
and also Most of the Latest versions transactions are Enjoy Transaction. they will not support BDC's in Background.
But Using BAPI's No such disadvantages.
A BAPI is faster because it is updating the DB "directly" through ABAP code.
A BDC with call transaction goes through the whole screen sequence like any user would do, simply put, it is filling screens.
Actually it depends on your requirement but BAPI is more effective as it is standard function module to update SAP databases rather than BDC.
using bdc over bapi has advantages and also disadvantages
advantages:
1. using bdc we can upload data into database tables using 2 ways
1. foreground -
means that user interaction is there for each and every record.
2. back ground -
no user interaction and tasks are done automatically.
using these two options is one of the greatest advantage over bapi.
2. in bdc call transaction method we can control the display of screen resolution which is not possible with bapi's
3. bdc is generally used for transferring of large amount of data than bapi's
4.session method of bdc allows us to place data directly in application server and then finally transfered into sap database tables
disadvantages:
1.bdc is only used for sap to sap system data transferring
2. bapis's generally works more faster than bdc's
3. using bapis we can connect to remote systems and also to non sap systems.
if useful reward some points.
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
<b><REMOVED BY MODERATOR></b>
Manish
Message was edited by:
Alvaro Tejada Galindo -
How to return the result ( fields ) form using the BDC in background mode ?
hi,
I am now having to develop a sub routines for executing the transaction COR1 using BDC ( transaction SHDB ) , in the FORM i pass the 4 params for the fields of the screens of the transaction ( COR1 is used for creating the process order ) , and at last i have to take the number of the process order that has been created by the transaction , how can i do that , if we can no , in which table it is contained ( AUFNR ) ? .
In fact , i use the CALL TRANSACTION 'COR1' USING BDCDATA......
so , if you please to help me resolve this problem ( it is really urgent )...
Thank you so much .Thank you so much for your reply , I think that it would be very useful to me .
Hi Vijay Sai , i have used the itab TYPE BDCMSGCOLL for calling the transaction but just for taking the error messages , so as you say , it contains all the values of the fields including AUFNR ( which i need to get the its value after creating with COR1 ) .......if it is right , we just need to access the new value by using the query at the internal table just like :
LOOP AT itab INTO wa.
if wa-fname = 'AUFNR' .
res = ws-fval .
ENDIF.
Is that right ? -
Sir,
I am uploading vendor master ( xk01) with BDC session method.But I have query while uploading
Withholding tax accounting records. ( there 4 to 5 records in with/ tax information on screen no 0610)
can any one tell me how to upload muliple records on same sreen.
Manoj..Here is my sample code.
LOOP AT t_custxl INTO fs_custxl.
ON CHANGE OF fs_custxl-name1 .
PERFORM bdc_dynpro USING 'SAPMF02D' '0100'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02D-BUKRS'
fs_custxl-bukrs . " '1000'.
PERFORM bdc_field USING 'RF02D-KTOKD'
fs_custxl-ktokd . "'CUST'.
PERFORM bdc_field USING 'RF02D-REF_KUNNR'
PERFORM bdc_dynpro USING 'SAPMF02D' '0110'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KNA1-ANRED'
fs_custxl-anred . "'Mr.'.
PERFORM bdc_field USING 'KNA1-NAME1'
fs_custxl-name1 . "'asdf'.
PERFORM bdc_field USING 'KNA1-SORTL'
fs_custxl-sortl . "'ASDF'.
PERFORM bdc_field USING 'KNA1-PFACH'
fs_custxl-pfach . "'500017'.
PERFORM bdc_field USING 'KNA1-ORT01'
fs_custxl-ort01 . "'hyderabad'.
PERFORM bdc_field USING 'KNA1-PSTLZ'
fs_custxl-pstlz . "'500017'.
PERFORM bdc_field USING 'KNA1-PSTL2'
fs_custxl-pstl2 . "'500017'.
PERFORM bdc_field USING 'KNA1-LAND1'
fs_custxl-land1. "'in'.
PERFORM bdc_field USING 'KNA1-SPRAS'
fs_custxl-spras. "'en'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0120'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0125'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0130'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0340'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_dynpro USING 'SAPMF02D' '0370'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
PERFORM bdc_field USING 'KNA1-CIVVE'
'X'.
ENDON .
ADD 1 TO w_var .
PERFORM bdc_dynpro USING 'SAPMF02D' '0360'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ENTR'.
CLEAR w_word .
CONCATENATE 'KNVK-NAMEV(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-namev . "'fdsa'.
CLEAR w_word .
CONCATENATE 'KNVK-NAME1(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-kname1 . .
CLEAR w_word .
CONCATENATE 'KNVK-TELF1(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-telf1 .
CLEAR w_word .
CONCATENATE 'KNVK-ABTNR(' w_var ')' INTO w_word .
PERFORM bdc_field USING w_word
fs_custxl-abtnr .
AT END OF name1 . -
HI all ,
i am new to bapi . i have created so many bdcs to upload data in sap but havent done any bapi .
i want to upload data through bapi for mm01 .
how can i achieve this and which bapi is responsible for this job . plz send any sample code for this .
Thanks ,
Amit Ranjan .Hi Amit,
Refer to the code in the following link:
Re: Reg Transfer of MM01 data using BAPI method
Hope this will solve your query... -
XQuery select query is not working in proper speed
In our project we have large no. data (its a property listing site) and I'm storing that data to Barkeley DB (XML DB). The problem is when I am searching for a property it will list the first 10 property quickly(100% speed). Then I'm going to 2dn, 3rd page its working in the same speed. But if I'm going to 10th(30% speed) or 100th or 1500th(15%speed) page is working very slowly.
Following are my query:
let $property_ids:=
for $property in collection('bdb/properties.dbxml')/properties/property
order by $property/sale_price/number() descending
return $property/@property_id,
for $property in collection('bdb/properties.dbxml')/properties/property
order by $property/sale_price/number() descending
return $property/@property_id,
for $property in collection('bdb/properties.dbxml')/properties/property
order by $property/sale_price/number() descending
return $property/@property_id
return <properties>{
for $id in subsequence($property_ids, 1, 10) return
collection('bdb/properties.dbxml')/properties/property@property_id = $id
}</properties>
And some times query will change like the following way based on the filter option in my page(means sort by only sale_price field):
let $property_ids:=
for $property in collection('bdb/properties.dbxml')/properties/property
order by $property/sale_price/number() descending
return $property/@property_id
return <properties>{
for $id in subsequence($property_ids, 1, 10) return
collection('bdb/properties.dbxml')/properties/property@property_id = $id
}</properties>
then from the first page its self its performance is very slow(15%).
Could you please check my query and help me to solve the issue...
Thank you,
VijeshIf you use your
Loop at I_DATA.
select matnr mtart from mara into table itab
where matnr = I_DATA-matnr.
endloop.
At end of loop, itab will only contain the result of the last select, so use a
Loop at I_DATA.
select matnr mtart from mara APPENDING table itab
where matnr = I_DATA-matnr.
endloop.
better
if I_DATA[] is not initial.
select matnr mtart from mara into table itab
FOR ALL ENTRIES IN i_data where matnr = i_data-matnr.
endif.
Some Remarks
- If actually required (where does I_DATA come from, is it an external format, you need the internal value to use in SELECT statement), check via SE11 the correct [conversion exit|http://help.sap.com/saphelp_nw04/helpdata/en/35/26b217afab52b9e10000009b38f974/content.htm] associated with domain MATNR (Is it truly ALPHA, and not something like MATN1, so [CONVERSION_EXIT_MATN1_INPUT|http://www.sdn.sap.com/irj/scn/advancedsearch?query=conversion_exit_matn1_input])
- You could try to use BAPI like [BAPI_MATERIAL_SAVEDATA|http://www.sdn.sap.com/irj/scn/advancedsearch?query=bapi_material_savedata] and not BDC
Regards,
Raymond
Maybe you are looking for
-
apple tv 3, software: 5.2 Using an Ipad2 , ios 6.1.2 can't seem to share in itunes?
-
Cannot start weblogic server anymore in oracle user after config. in root
Hi all, My weblogic server 10.3.4.0 installed in oracle developer days in oralce linux guest was able to start before using the oracle user account. However, after I copied a folder into the autodeploy directory in weblogic server under the root acco
-
I clear my laptop with A S C programme but latest review identified 118000 privacy issues in less than one day. This is a regular problem. Needless to say this overall issue slows my computer down until I clean it up again. The programme I use identi
-
I'm getting "ORA-12560 TNS:protocol adapter error" when trying to Add Connection in VS2010 (Server Explorer > Add Connection > Username: hr, Password: hr, Data source name: Local Database). This is sample HR database in Oracle XE 10g. I'm guessing th
-
Is the cache shared between process ?
Hi, When I set the cachesize to 200MB in each process, does it mean that each process will need 200MB ? Or is there a chance that it will be shared ? As I use PHP scripts in a multi-process environnement to access the database I want to know the cons