Combining data from 2 database tables to convert numberID to text? ASP/VB
Hi.
I have the following two database tables:
Orders Table
orderID
customerID
collectionregion (numerical)
deliveryregion (numerical)
Regions Table
regionID
regionname
On my ASP page I have a recordset (rsOrders) which displays
the order
details.
When this is displayed, the collectionregion and
deliveryregion fields
display as a numerical value, as they should.
This numerical value ties in with the regionID field from the
regions table,
to indicate what region the collection/delivery is in.
I would like to be able to display the region name as opposed
to the number.
I created a third recordset on the page, which goes like
this:
SELECT * from tblRegions WHERE regionID = regionvar
regionvar 1 rsOrders.Fields.Item("deliveryregion")
Now, this works great when I DON'T have the rsOrders
information in a Repeat
Region, but when I add the repeat region, it simply displays
the region name
for the first record for every record. Why would it not work
in the repeat
region?
What can I do to resolve this?
Any help offered would be greatly appreciated. Thanks.
Regards
Nath.
Hi,
Ok, thinking out loud has helped a little! My Repeat Region
is for the
rsOrders recordset so simply dropping a value from a second
recordset into
this existing repeat region won't cause the second recordset
to repeat which
is why I'm seeing the first records values in every record!
Still leaves me with the problem though.
The thing that's confusing me is that both the
collectionregion and
deliveryregion fields in the Orders table hold an ID value
that ties in with
the Regions table primary key field (regionID) however
because they are not,
themselves, called regionID I can't seem to do an Inner Join
in a database
query like I normally would if there was just one field that
tied in with
the regionID.
Would appreciate some guidance. Much appreciated. Thanks.
Regards
Nath.
"Nathon Jones" <[email protected]> wrote in
message
news:[email protected]...
> Hi.
>
> I have the following two database tables:
>
> Orders Table
>
> orderID
> customerID
> collectionregion (numerical)
> deliveryregion (numerical)
>
> Regions Table
>
> regionID
> regionname
>
> On my ASP page I have a recordset (rsOrders) which
displays the order
> details.
>
> When this is displayed, the collectionregion and
deliveryregion fields
> display as a numerical value, as they should.
> This numerical value ties in with the regionID field
from the regions
> table, to indicate what region the collection/delivery
is in.
>
> I would like to be able to display the region name as
opposed to the
> number.
>
> I created a third recordset on the page, which goes like
this:
> SELECT * from tblRegions WHERE regionID = regionvar
>
> regionvar 1 rsOrders.Fields.Item("deliveryregion")
>
> Now, this works great when I DON'T have the rsOrders
information in a
> Repeat Region, but when I add the repeat region, it
simply displays the
> region name for the first record for every record. Why
would it not work
> in the repeat region?
>
> What can I do to resolve this?
> Any help offered would be greatly appreciated. Thanks.
> Regards
> Nath.
>
Similar Messages
-
Extract data from database tables and download in pdf and csv
extract data from database tables and download in pdf and csv
hi how can i re-write my old form procedure in adf java. the procedure used to extract data from diffirent table and dowload the data in pdf and csv.am not downloading image, i what to extract data from diffirent tables in my database and download that data in pdf and csv. i would like to write this in java adf.i just what direction am not asking anyone to do my work this is my learning curve
the form code is
function merge_header3 return varchar2 is
begin
return '~FACILITY DESCRIPTION~ACCOUNT NO~BRANCH CODE~BANK REF NO.~P/P/ AMOUNT~Postal Address 1~Postal Address 2~Box Postal Code~Dep. Date~Month~BANK NAME~BRANCH NAME~ACCOUNT TYPE~DESCRIPTION~OBJECTIVE DESCRIPTION';
end;
procedure download_file (i_pbat integer) is
dir varchar2(80);
file_name1 varchar2(80);
file_name2 varchar2(80);
appl_code varchar2(80);
fil1 client_text_io.file_type;
fil2 client_text_io.file_type;
dat varchar2(1000);
DATA VARCHAR2(1000);
bvspro varchar2(100);
ssch varchar2(100);
bvspro_total number(20,2);
ssch_total number(20,2);
grand_total number(20,2);
cnt integer;
cursor pbat is
select *
from sms_payment_batches
where id = i_pbat
cursor pay (pb_id integer) is
select *
from sms_payment_vw
where pbat_id = pb_id
order by subsidy ASC,programme,beneficiary_name
cursor cgref (low varchar2) is
select *
from cg_ref_codes
where rv_domain ='SMS'
and rv_low_value = low
success boolean;
begin
set_application_property(cursor_style,'busy');
appl_code := sms_global.ref_code('SMS','APP_CODE','SMS',0);
dir := sms_global.ref_code('SMS','PAY_DIR','c:\sms\batch_payments',0);
success := webutil_file.create_directory(dir);
if webutil_file.file_is_directory(dir) then
null;
-- message ('directory exists');
else
-- message ('create directory ');
success := webutil_file.create_directory(dir);
-- if success then message ('directory exists'); end if;
end if;
for c_pbat in pbat loop
file_name1 := dir ||'\' || appl_code||c_pbat.batch_number||'-'||to_char(c_pbat.batch_dt,'yyyymmdd')||'pay.txt';
file_name2 := dir ||'\' || appl_code||c_pbat.batch_number||'-'||to_char(c_pbat.batch_dt,'yyyymmdd')||'merge.txt';
--message('create files ');
-- fil1 := client_text_io.fopen (file_name1,'W');
-- fil2 := client_text_io.fopen (file_name2,'W');
fil1 := client_text_io.fopen (file_name1,'W','');
fil2 := client_text_io.fopen (file_name2,'W','');
dat := 'FROM ACCOUNT NUMBER'
||'~'||'FROM ACCOUNT DESCRIPTION'
||'~'||'MY STATEMENT DESCRIPTION'
||'~'||'BENEFICIARY ACCOUNT NUMBER'
||'~'||'BENEFICIARY SUB ACCOUNT NUMBER'
||'~'||'BENEFICIARY BRANCH CODE'
||'~'||'BENEFICIARY NAME'
||'~'||'BENEFICIARY STATEMENT DESCRIPTION'
||'~'||'AMOUNT';
-- client_text_io.put_line(fil1,dat);
bvspro:= null;
ssch := null;
cnt := 0;
dat := '~'||lpad('~',16,'~');
for c_pay in pay(c_pbat.id) loop
--message('cpay loop ' || cnt);
if bvspro is null then
dat := lpad('~',16,'~');
dat := utility.put_field(1,c_pay.programme,dat,'~');
client_text_io.put_line(fil2,dat);
dat := utility.put_field(1,c_pay.subsidy,dat,'~');
client_text_io.put_line(fil2,dat);
dat := merge_header3;
client_text_io.put_line(fil2,dat);
bvspro := c_pay.programme;
ssch := c_pay.subsidy;
grand_total := 0;
bvspro_total := 0;
ssch_total := 0;
end if;
if bvspro <> c_pay.programme then
dat := lpad('~',16,'~');
dat := utility.put_field(5,ssch_total,dat,'~');
dat := lpad('~',16,'~');
dat := utility.put_field(5,bvspro_total,dat,'~');
dat := utility.put_field(1,'Total:' || bvspro,dat,'~');
client_text_io.put_line(fil2,dat);
dat := lpad('~',16,'~');
client_text_io.put_line(fil2,dat);
dat := utility.put_field(1,c_pay.programme,dat,'~');
client_text_io.put_line(fil2,dat);
bvspro := c_pay.programme;
dat := utility.put_field(1,c_pay.subsidy,dat,'~');
client_text_io.put_line(fil2,dat);
dat := merge_header3;
client_text_io.put_line(fil2,dat);
bvspro := c_pay.programme;
ssch := c_pay.subsidy;
bvspro_total := 0;
ssch_total := 0;
cnt :=0;
end if;
if ssch <> c_pay.subsidy then
dat := lpad('~',16,'~');
dat := utility.put_field(5,ssch_total,dat,'~');
dat := lpad('~',16,'~');
client_text_io.put_line(fil2,dat);
dat := utility.put_field(1,c_pay.subsidy,dat,'~');
client_text_io.put_line(fil2,dat);
dat := merge_header3;
client_text_io.put_line(fil2,dat);
ssch := c_pay.subsidy;
ssch_total := 0;
cnt :=0;
end if;
bvspro_total := bvspro_total + c_pay.amount;
ssch_total := ssch_total + c_pay.amount;
grand_total := grand_total + c_pay.amount;
cnt := cnt +1;
--message('bfore write file 2 ' );
client_text_io.put_line(fil2
,cnt
||'~'|| c_pay.beneficiary_name
||'~'||c_pay.BENEFICIARY_ACCOUNT_NUMBER ||''
||'~'||c_pay.BRANCH_CODE ||''
||'~'|| c_pay.BENEFICIARY_STATEMENT_DESC
||'~'|| c_pay.AMOUNT
||'~'|| c_pay.address_line1
||'~'|| c_pay.address_line2
||'~'|| c_pay.postal_code
||'~'|| TO_CHAR(c_pay.deposit_date,'DD-Mon-YYYY')
||'~'|| c_pay.month
||'~'|| c_pay.bank
||'~'|| c_pay.bank_branch
||'~'|| c_pay.account_type
||'~'|| c_pay.subsidy
||'~'|| c_pay.programme)
DATA := c_pay.FROM_ACCOUNT_NUMBER
||'~'||c_pay.FROM_ACCOUNT_DESCR
||'~'||c_pay.MY_STATEMENT_DESCR
||'~'||c_pay.BENEFICIARY_ACCOUNT_NUMBER
||'~'
||'~'||c_pay.BRANCH_CODE
||'~'||c_pay.BENEFICIARY_NAME
||'~'||c_pay.BENEFICIARY_STATEMENT_DESC
||'~'||c_pay.AMOUNT;
DATA := REPLACE(DATA, ',' , ' ' );
DATA := REPLACE(DATA, '~' , ',' );
--message (cnt ||' ' || data);
--message('bfore write file 1 ' );
client_text_io.put_line(fil1, data);
end loop;
--message ('end of write');
dat := lpad('~',16,'~');
dat := utility.put_field(6,ssch_total,dat,'~');
dat := lpad('~',16,'~');
dat := utility.put_field(1,'Total:' || bvspro,dat,'~');
dat := utility.put_field(5,bvspro_total,dat,'~');
client_text_io.put_line(fil2,dat);
dat := lpad('~',16,'~');
client_text_io.put_line(fil2,dat);
dat := utility.put_field(1,'Grand Total:' ,dat,'~');
dat := utility.put_field(5,grand_total,dat,'~');
client_text_io.put_line(fil2,dat);
-- close file
for i in 1..50 loop
if substr(i,-1) = 0 then
message ('flush ' || i);
end if;
client_text_io.put_line(fil1, lpad(' ',2000));
client_text_io.put_line(fil2, lpad(' ',2000));
client_text_io.put_line(fil1, lpad(' ',2000));
client_text_io.put_line(fil2, lpad(' ',2000));
end loop;
client_text_io.fclose(fil1);
client_text_io.fclose(fil2);
end loop;
set_application_property(cursor_style,'default');
exception
when others then
message(sqlcode ||' ' ||sqlerrm);
end download_file; i try this but this code onlydownload image not data from database tables
public void downloadImage(FacesContext facesContext, OutputStream outputStream)
BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
// get an ADF attributevalue from the ADF page definitions
AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("DocumentImage");
if (attr == null)
return;
// the value is a BlobDomain data type
BlobDomain blob = (BlobDomain) attr.getInputValue();
try
{ // copy the data from the BlobDomain to the output stream
IOUtils.copy(blob.getInputStream(), outputStream);
// cloase the blob to release the recources
blob.closeInputStream();
// flush the output stream
outputStream.flush();
catch (IOException e)
// handle errors
e.printStackTrace();
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
FacesContext.getCurrentInstance().addMessage(null, msg);
}You should ask your forum in the ADF-forum.
-
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif -
Creating XML file using data from database table
I have to create an xml file using the data from multiple table. The problem That i am facing is the data is huge it is in millions so I was wondering that is there any efective way of creating such an xml file.
It would be great if you can suggest some approach to achieve my requirement.
Thanks,
-VinodAn example from the forum: Re: How to generate xml file from database table
Edited by: Marco Gralike on Oct 18, 2012 9:41 PM -
Drop Down list in table with data from database table
Hi,
I have created an interactive form in WD ABAP.
In Context tab I have created the nodes as follows:
ZSOHEADER node with cardinality 1..1
|-> MATERIAL node with cardinality 0..n. Under MATERIAL node there are 2 attrib. MAKTX and MATNR.
I am fetching data from MARA table into an internal table IT_MARA.
The node MATERIAL is bound to internal table IT_MARA.
I have created a table with property ' Body rows vary depending on data ' .
I have only one row in table. The first cell of the row is a drop down field.
I have bind the field to the node MATERIAL->DATA->MAKTX.
Now the issue is even though I have created only one row in my table, in preview it is creating as many rows in the table as the no.of records in the internal table.
I want only one row with the drop down list containing all values of the internal table.
Kindly suggest what to do.
Regards,
VinodHi,
In the WebDynpro Context, in the main node create another node like A1 with cardinality 0..n and in this node create attributes TEXT and VALUE.
Now goto method and in that method using code wizard read the node A1.
And use the below code snippet sample in your program, i.e. code this under respective method of the webdynpro.
*Declare the TYPES
TYPES : BEGIN OF TY_TABLE,
TEXT TYPE SOMETYPE,
VALUE TYPE SOMETYPE,
END OF TY_UOM.
*Define Internal Table and work area.
DATA : IT_TABLE TYPE STANDARD TABLE OF TY_TABLE INITIAL SIZE 0,
WA_TABLE TYPE TY_TABLE.
SELECT TEXT VALUE FROM TABLENAME INTO TABLE IT_TABLE.
lr_node_info->bind_table( IT_TABLE ).
And in the Adobe Form Layout
Go to Menu of the Adobe LiveCycle Designer:
Tools>Options..>DataBinding
In that window you just check the Show Dynamic properties Check Box.
Now for the Drop Down go the binding tab in object palette and click on the list items and there specify the Internal Table and specify the text as the internal table text field and value as internal table value field.
OR
From the WebDynpro Native Library Palette use the Value Help Drop Down and in object pallette goto binding tab and provide the form interface binding. Before this in the WebDynpro goto Context and for the particular field under the properties provide the search help as dictionary search help and specify the name of the dictionary search help.
OR
We have another method of setting the Text and Value to the DDL directly in the WebDynpro by coding in the methods, I dont have much knowledge on this.
Regards
Pradeep Goli -
Extracting data from database table containg perticular string.
hi every body ,
can any body provide me a solution for extracting the OT01 data from kna1 table where the OT01 ends with the string 'town' .
exe : the O/P should be
midTOWN
newTOWN
there is one more query i am not able to execute the following statement .......why?
select ORT01 from KNA1 where ORT01 CS 'TOWN'.
write:/ kna1-ort01.
endselect.
it is showing a syntax error.......
Thank You.Hi Tippu,
Your select statement consists of CS whcih may not be a valid comparision operator because of which error is displayed have look of this..
data itab like kna1 occurs 0 with header line.
parameters: s_town like kna1-ORT01.
select ORT01 from KNA1 into table itab where ORT01 = s_town.
Fetch the city and concatenate with TOWN your issue will be sloved.
Cheers!!
Balu
Edited by: Balu CH on Oct 21, 2008 11:13 PM -
Export data from database table before database migration
Hello,
We are planning to migrate our SAP ERP 6 Ehp4/NW7.01 from Oracle 11.2 to IBM DB2 v. 9.7 database. During test migrations I have established that we spend a lot of time for one particular table (COEP). Because we donu2019t have possibility to archive this table before migration I have an idea to export data from previous years from this table to the file system (using an ABAP report), delete those data from table before migration and then after migration, import back to the database from the file system.
Does anybody have any concerns or suggestions about this idea?
Thank you for your answers
AndrejHello Andrej,
I strongly do not recommend to do so.
I am not sure whether technically this could work at all..
Even it if would work .. In order to really save time, the export and the import would have to be a dirty one (meaning the system is operational and in production). With this there is a high risk to produce inconsistencies on this table. And you most likely will receive no support if something unforeseen happens and you end with problems.
Also your approach (if it should work at all) , would have to be tested thoroughly by you , also protecting the table from any changes.
I do not believe that this can save any effort compared to implementing advanced migration techniques like table splitting.
On top, you would go high risk to end with an unsupported system, with not using official migration procedures
Hans-Juergen -
Combine data from a table and insert to another in comma separated format
In my SQL database table i have some data as shown below.
KNO Course Grade Institution
124 BTECH First IIT Calicut
128 BE First KKS Institute
124 CCNA Q NIIT Delhi
124 DDCN Q Appl Calicut
128 DIT A NIIT Delhi
128 VB Q IICM Delhi
i want this courses to be arranged as sample given under to a table named mainpers
KNO Course
124 BTECH[First], CCNA[Q],DDCN[Q]
128 BE[First], DIT[A], VB[Q]
I am a System Administrator at VadodaraYou can do this in SQL.
with cte as (
select distinct KNO
from Table1
select KNO
, Stuff(
(select ',' + Course + '[' + Grade + ']'
from Table1
where Table1.KNO = cte.KNO
for xml path ('')
), 1, 1, '') as Course
from cte
http://davidduffett.net/post/5334646215/get-a-comma-separated-list-of-values-in-sql-with-for
Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com -
Select data from database tables with high performance
hi all,
how to select data from different database tables with high performance.
im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
hw to increase the performance.
kindly, reply.
thnksAlso Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
also Dont use select endselect.
if possible use up to n rows claus....
taht will limit the data base hits.
also dont run select in siode any loops.
i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD. -
Exporting data from database tables to a XML file
Hi,
We want to export data from Oracle database tables to an XML
file. What tool can we use for this purpose, and how do we go
about it ?
Can we extract data only from an Oracle8 database, or can we
extract data from Oracle7.3 databases too ?
Any help in this regard would be appreciated.
Thanks
Dipanjan
nullDipanjan (guest) wrote:
: Hi,
: We want to export data from Oracle database tables to an XML
: file. What tool can we use for this purpose, and how do we go
: about it ?
: Can we extract data only from an Oracle8 database, or can we
: extract data from Oracle7.3 databases too ?
: Any help in this regard would be appreciated.
: Thanks
: Dipanjan
Start by downloading the XML SQL Utility and make sure you have
the approriate JDBC 1.1 drivers installed for your database.
There are samples which will get you going included in the
archive.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null -
I'm trying to tell CR XI R2 to use all the data from Table A Column 1, then use whatever is in Table B Column 1 that does not match the data in Table A Column 1.
I've been trying IF statements in both Crystal and MS Access. It's probably simple...but it's Monday and I'm just not getting it.
Thanks in advance.Here's the SQL copied from the view SQL. I've tried with double quotes, single quotes, and no quotes on the fields, but still get the same error. I don't want to even try and edit it until it will compile without the error.
What I really want is all data from vFacility_Employee (the left table) and only those records from vRounding_Summary (right table) that match a time frame parameter based on the Date field in that table.
Thanks for any help you can provide! ldc
ORGINAL SQL: SELECT vRounding_Summary.Number_Employees, vRounding_Summary.Info_Id, vFacility_Employee.FacDesc, vFacility_Employee.FacHR, vFacility_Employee.Facility_Employees, vRounding_Summary.Date
FROM Leader_Rounding.Rnd.vFacility_Employee vFacility_Employee
LEFT OUTER JOIN Leader_Rounding.Rnd.vRounding_Summary vRounding_Summary ON vFacility_Employee.LKP_RegionFacilityID=vRounding_Summary.Facility_Id
WHERE (vFacility_Employee.FacHR='0301' OR vFacility_Employee.FacHR='0305' OR vFacility_Employee.FacHR='0309' OR vFacility_Employee.FacHR='0310' OR vFacility_Employee.FacHR='0314' OR vFacility_Employee.FacHR='0338' OR vFacility_Employee.FacHR='0340' OR vFacility_Employee.FacHR='0342' OR vFacility_Employee.FacHR='0380' OR vFacility_Employee.FacHR='0382' OR vFacility_Employee.FacHR='0384' OR vFacility_Employee.FacHR='0414' OR vFacility_Employee.FacHR='0415' OR vFacility_Employee.FacHR='0420' OR vFacility_Employee.FacHR='0426' OR vFacility_Employee.FacHR='0427' OR vFacility_Employee.FacHR='5300' OR vFacility_Employee.FacHR='5305' OR vFacility_Employee.FacHR='5312' OR vFacility_Employee.FacHR='5322' OR vFacility_Employee.FacHR='5355' OR vFacility_Employee.FacHR='5397')
SQL if I add the Date from the right table as a Select record option. The problem with this SQL is that I lose all those records from the left join table that have no dat in the right table.
SELECT "vRounding_Summary"."Number_Employees", "vRounding_Summary"."Info_Id", "vFacility_Employee"."FacDesc", "vFacility_Employee"."FacHR", "vFacility_Employee"."Facility_Employees", "vRounding_Summary"."Date"
FROM "Leader_Rounding"."Rnd"."vFacility_Employee" "vFacility_Employee"
LEFT OUTER JOIN "Leader_Rounding"."Rnd"."vRounding_Summary" "vRounding_Summary" ON "vFacility_Employee"."LKP_RegionFacilityID"="vRounding_Summary"."Facility_Id"
WHERE ("vFacility_Employee"."FacHR"='0301' OR "vFacility_Employee"."FacHR"='0305' OR "vFacility_Employee"."FacHR"='0309' OR "vFacility_Employee"."FacHR"='0310' OR "vFacility_Employee"."FacHR"='0314' OR "vFacility_Employee"."FacHR"='0338' OR "vFacility_Employee"."FacHR"='0340' OR "vFacility_Employee"."FacHR"='0342' OR "vFacility_Employee"."FacHR"='0380' OR "vFacility_Employee"."FacHR"='0382' OR "vFacility_Employee"."FacHR"='0384' OR "vFacility_Employee"."FacHR"='0414' OR "vFacility_Employee"."FacHR"='0415' OR "vFacility_Employee"."FacHR"='0420' OR "vFacility_Employee"."FacHR"='0426' OR "vFacility_Employee"."FacHR"='0427' OR "vFacility_Employee"."FacHR"='5300' OR "vFacility_Employee"."FacHR"='5305' OR "vFacility_Employee"."FacHR"='5312' OR "vFacility_Employee"."FacHR"='5322' OR "vFacility_Employee"."FacHR"='5355' OR "vFacility_Employee"."FacHR"='5397') *AND ("vRounding_Summary"."Date">={ts '2010-03-01 00:00:00'} AND "vRounding_Summary"."Date"<{ts '2010-04-01 00:00:00'})*
Edited by: ldclem on Mar 16, 2010 4:48 PM
Edited by: ldclem on Mar 16, 2010 4:53 PM -
Guidance for getting material master data from database table
Hi,
I need guidance to fetch following Material master data from the system data base.Please guide me for the same.
BASIC DATA1
BASIC DATA2
MRP1,2,3,4
WORK SCHEDULING
QUALITY MANAGEMENT
ACCOUNTING1
ACCOUNTING2
COSTING1,2
PURCHASING
PURCHASE ORDER TEXTSALES ORG1,2
SALES GENERAL/PLANT
PLANT DATA/STOR.1,2
WAREHOUSE MGMNT1,2
Also please tell me in general what is the reason for error while uploading the data into system using BAPi(AM talking about return message error).
Thank you.
Edited by: sanu debu on Feb 24, 2009 12:41 PM
Edited by: sanu debu on Feb 24, 2009 12:42 PMUse BAPI's
BAPI_MATERIAL_GET_DETAIL
BAPI_MATERIAL_GETALL
BAPI_MATERIAL_GET_ALL -
Need help in retrieving data from database table
Hi ,
I have a Ztable with primary key.The table gets automatically sorted on primary key
But I want to retrieve the ztable data in the order in which i enter data in to table.
EXAMPLE :
I enter data as : mydata
action
welcome
When i retrieve this data internal table should be filled in the same order.
Your inputs will be very helpful.
Thanks in advance.You will need to change your table to use a number as the first key field (after the client) which you increase by 1 each time you make a new entry. Alternatively you can add a data/time stamp to the end of your table and use this to sort your internal table once you've extracted the records.
Regards,
Nick -
Error in Abap code when combining data from two tables
Hi,
I got error in my code when i try to select data based on two tables
error message Unknown column name "(" field list. field list. field list. field list.
select ( WLK1~ARTNR )
into ZOXE1D0041-ZZPROMO
from WLK1 INNER JOIN T001W
ON WLK1FILIA = T001WKUNNR.
where WLK1-PFLKN NE 'P' AND
WLK1-QUELL NE '2'.
Table 1 WLK1
ARTNR FILIA PFLKN QUELL
001 C001 P 2
002 C001 A 1
Table 2 T001W
KUNNR WERKS
C001 P001
My requirement is to extract from article number from table WLK1 where the customer number (FILIA) matches with Customer number from (T001W) and plant (WERKS).
In conclusion I like to have this only this row
ARTNR FILIA PFLKN QUELL
002 C001 A 1Hi
You need to append every article number after each select is performed
is this an intermal table ZOXE1D0041 with header line ? if yes
then do this way
select WLK1~ARTNR
into ZZARTICLE
from WLK1 INNER JOIN T001W
ON WLK1FILIA = T001WKUNNR
where WLK1~PFLKN NE 'P' AND
WLK1~PFLKN NE 'S' AND
WLK1~QUELL NE '2'.
ZOXE1D0041-ZZLISTARTICLE = ZZARTICLE.
Append ZOXE1D0041. " <edited>
endselect.
then ZOXE1D0041 will have all article numbers.
Edited by: Sonal Patel on Sep 5, 2009 10:27 AM -
Long time taken to fetch data from Database Table
Moved to correct forum by moderator.
I had a requirement where i need to fetch records from table A912 for the matching entries in an internal table and satisfying some conditions.
The Internal Table(it_out) has 1,206 entries, while Databse table(A912) has 9,758,234 entries.
The Structure of Internal Table and Select Query are,
TYPES : BEGIN OF ty_a912,
matnr LIKE a912-matnr, "Material
kunwe LIKE a912-kunwe, "Ship-to party
datbi LIKE a912-datbi, "Validity end dt
datab LIKE a912-datab, "Validity start
knumh LIKE a912-knumh, "Cond rec no.
END OF ty_a912.
TYPES : BEGIN OF ty_out,
erdat LIKE vbak-erdat, "Date
vbeln LIKE vbak-vbeln, "Sales document
posnr LIKE vbap-posnr, "Item
kunnr LIKE vbpa-kunnr, "Customer
fkdat LIKE vbkd-fkdat, "Billing Date
ndc LIKE zndc-zndc, "EAN/UPC
matnr LIKE vbap-matnr, "Material
zr00p LIKE konv-kbetr, "ZR00 Price
zcarp LIKE konv-kbetr, "ZCAR Price
zrfcp LIKE konv-kbetr, "ZRFC Price
ctrnr TYPE char80, "Contract#
ctrnm TYPE char80, "Contract Name
a912p TYPE konv-kbetr,
END OF ty_out.
SELECT
matnr kunwe datbi datab knumh
FROM a912
INTO TABLE t_a912
FOR ALL ENTRIES IN t_out
WHERE matnr EQ t_out-matnr
AND kunwe EQ t_out-kunnr
AND datbi GE t_out-fkdat
AND datab LE t_out-fkdat.
It takes very long time to process this select query, is there any alternate way?
Please suggest some valid solution for this issue.
Edited by: Matt on Dec 3, 2008 10:08 AMPrabhakar Manoharan wrote:>
> Moved to correct forum by moderator.
>
> I had a requirement where i need to fetch records from table A912 for the matching entries in an internal table and satisfying some conditions.
> The Internal Table(it_out) has 1,206 entries, while Databse table(A912) has 9,758,234 entries.
>
Hi,
can you give us an SQL trace in ST05? The SQL Trace (ST05) Quick and Easy
The FAE will be processed in a special way: see https://forums.sdn.sap.com/click.jspa?searchID=-1&messageID=6630311
If an index is NOT supported the FAE part will take forever...
if t_out is filled by another table you may go for a join? But again, index support is the key
bye
yk
Edited by: YukonKid on Dec 4, 2008 10:31 AM
Maybe you are looking for
-
I'm trying to finalize/share to Media Browser a 20 minute still slide show with music and text. I'd like to finalize it 1080 hd and have tried several times, but just before it's finished, a message box pops up saying it can't be done because "File a
-
How to print a value in text format
hello, I want to print a value for eg. 1083.00 in word like one thousand eighty three only......can anybody tell me is there any function module present in SAP to do same.......<removed by moderator> Edited by: Mike Pokraka on Aug 4, 2008 6:4
-
Audio out of Sync - Final Cut Pro to Soundtrack and back
I have edited some talking head interviews in FCP 7.0.3 When I "Send to Soundtrack Pro Multitrack Project" and then send back to Final Cut (by exporting an AIFF) The audio is 9 frames shorter than the original audio. (The video is 06:29:12 long) I ha
-
Let start with the simple stuff. Operating system is Windows XP Photoshop version is CS4 V11 I have been racking my brains trying to figure out how to embed a video file into an image in Photoshop. GOAL: i have a Jpeg of a TV screen frame. I want to
-
My iphone 5 getting hot asif it is kept in a furnace
i brought this phone recently,i am facing this strange problem.Even though no app are running phone is getting red hot as if taken out from furnace..baterry also draining very fast,plz help me with this problem.