HOW TO MOVE DATA FROM INT-TABLE TO DATABASE STRUCTURE?
DEAR ALL!
CAN ANY ONE GIVE ME SAMPLE CODE TO MOVE DATA FROM INT -TABLE TO DB-STRUCTURE PLEASE.
I HAVE THE VALUES IN TABLE AND I NEED TO UPDATE STRUCTURE.
REGARDS,
VJ
Hi,
If you want to update a db STRUCTURE it is not possible because Structure doesnot hold any data.
If you are trying to update a db table then the update command should do the work.
Eg : UPDATE VBPA3 FROM TABLE DA_XVBPA3U.
Note : The Internal table should be of same structure and should not have duplicate entries.
Regards,
Srini.
Similar Messages
-
How to retreive data from a table and a structure
Hi experts,
I have a requirement to create an ALV report. I have to include fields from two tables 'PA0001' and 'CATSDB' and from one structure 'CATSAPPR'. I am able to retrieve data from tables using INNERJOIN. But i have no idea how to deal with Structure.
I know that structure does not contain any data.
But i am not able to find any transparent table which has field 'ORDERTEXT' . I found field 'ORDERTEXT' only in structure 'CATSAPPR'.
So please anyone tell me, either any transparent table which has field 'ORDERTEXT' or please tell me how to deal with structure, in this case.
Please help me,
Thanks in advance
Anucheck this
Table-Fields Short descriptn
AUFK- KTEXT Order master data
COCH- KTXT Process Management: Control Recipe Header
COCHP- KTXT PI sheet: Control Recipe Header
COMPHDR- KTEXT OCM: Comparison results, indiv. records for order headers
HIKO- KTEXT Order master data history
MAAVC_MDO- KTEXT MPO: Individual Master Data for Orders
MCHPVS- AUFTEXT Batch Record: Shadow Table for Link to Archive
OCMHOMO_ARCH- KFELD Backup Table of Homogeneity List in Case of Archiving
PSJHIEDATA- KTEXT Hierarchy data to test LDB PSJ
TEWOCODEST- DESCRIPTION Order Codes (Texts)
TEWOCODET- KTEXT Allocation of Message Codes to Order
VLCSMORDER- KTEXT VELO : Service Order
VSAUFK_CN- KTEXT Version: Order master data
Yogesh N -
How to insert data from a table to database
Hi all,
My problem statement is that:
I have jsp page, which has a table with some columns editable for inserting data. I am using MySql database.
Now when I insert the data in the table and click submit button , the data entered must get stored in the database.
If its a single data I can do it , but how to do for mulitple rows or columns.
Please suggest me a solution
Regards,
Suraji did one program similar to this requirement. when the rows and columns are fixed then what is the problem.
use java script and capture all the values into an array and pass this to servlet and there call a method which will set
the bean objects. or else no need to pick the array directly pass all the parameters and set the beans by retrieving these
parameters(request.getParameter()).
Diablo -
How to Export Data from a table in database directly to Excel.
Hi,
I have some sqls that i need to run on a daily basis.My client wants them to be scheduled through a job and the result output of the query should be in the form of Excel.
Now i am no sure how to do this.Is there any in-built function in the DBMS package that can export data drectly from table to Excel. ?
Please Help me !!SQL> spool exlfile.cvs
SQL> set colsep ','
SQL> set lines 300
SQL> set pages 9999
SQL> set trimspool on
SQL>
SQL> select * from DEPARTMENTS
2 /
DEPARTMENT_ID,DEPARTMENT_NAME ,MANAGER_ID,LOCATION_ID
10,Administration , 200, 1700
20,Marketing , 201, 1800
30,Purchasing , 114, 1700
40,Human Resources , 203, 2400
50,Shipping , 121, 1500
60,IT , 103, 1400
70,Public Relations , 204, 2700
80,Sales , 145, 2500
90,Executive , 100, 1700
100,Finance , 108, 1700
110,Accounting , 205, 1700
120,Treasury , , 1700
130,Corporate Tax , , 1700
140,Control And Credit , , 1700
150,Shareholder Services , , 1700
160,Benefits , , 1700
170,Manufacturing , , 1700
180,Construction , , 1700
190,Contracting , , 1700
200,Operations , , 1700
210,IT Support , , 1700
220,NOC , , 1700
230,IT Helpdesk , , 1700
240,Government Sales , , 1700
250,Retail Sales , , 1700
260,Recruiting , , 1700
270,Payroll , , 1700 -
How to show data from different tables in database in ADF Jdeveloper 11g R2
Hi,
My requirement is to display the data in the grid (html > table), the data is to be displayed from more than one table in a single grid and thereafter I am supposed to display the sum of some of the records in another table, I am confused about this, plz help.
RajatThe view link is generally used to relate two view objects together in the AMs data model, for example in a master-detail relationship. If you use them properly, ADF takes care of coordinating master/detail records - for example, ensuring that the detail record has the correct FK to the master record.
Have you read the Fusion Developers Guide for ADF? [url http://docs.oracle.com/cd/E26098_01/web.1112/e16182/bcquerying.htm#CEGJCAHC]This section, for example?
John -
How to move data from a staging table to three entity tables #2
Environment: SQL Server 2008 R2
I have a few questions:
How would I prevent duplicate records, when/ IF SSIS is executed many times?
How would I know that all huge volume of data being loaded in the entity tables?
In reference to "how to move data from a staging table to three entity tables ", since I am loading large volume of data, while using lookup transformation:
which of the merge components is best suited.
How to configure merge component correctly. (screen shot is preferred)
Please refer to the following link
http://social.msdn.microsoft.com/Forums/en-US/5f2128c8-3ddd-4455-9076-05fa1902a62a/how-to-move-data-from-a-staging-table-to-three-entity-tables?forum=sqlintegrationservicesYou can use RowCount transformation in the path where you want to capture record details. Then inside rowcount transformation pass a integer variable to get count value inside
the event handler can be configured as below
Inside Execute SQL task add INSERT statement to add rowcount to your audit table
Can you also show me how to Check against destination table using key columns inside a lookup task and insert only non
matched records (No Match output)
This is explained clearly in below link which Arthur posted
http://www.sqlis.com/sqlis/post/Get-all-from-Table-A-that-isnt-in-Table-B.aspx
For large data I would prefer doing this in T-SQL. So what you could do is dump data to staging table and then apply
T-SQL MERGE between tables (or even a combination of INSERT/UPDATE statements)
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to move data from 2 internal table to 1 internal table
Can any body send me code that how to move data from 2 internal table into one internal table.
Moderator message : Read ABAP documentation. Thread locked.
Edited by: Vinod Kumar on Jun 13, 2011 11:45 AMHi Mohdarif92;
I don't know your full needs. But general method should be as below code.
Please check exam below code.
Best regards.
data : begin of gt_result.
... like mkpf-...
... like mkpf-...
... like mseg-...
... like mseg-...
end of gt_result
select *
into table gt_mkpf
from mkpf where ...
select *
into table mseg
from mseg where ...
loop at gt_mkpf.
loop at gt_mseg where ... = mkpf-...
move-corresponding gt_mkpf to gt_result.
move-corresponding gt_mseg to gt_result.
append gt_result
endloop.
endloop. -
How to select data from Sql server 2005 database tableinto oracle database table
Hi,
I have table text1 in sql server database and text2 in oracle database (11g). Now how to move data from SQL Server table into oracle table. So please help me how to do it.
Thanks a lot in advance.
rk
OS: Windows 7 professionalHi,
you can use export/import wizard and specify sql server as a source and oracle as destination.
I hope this is helpful.
Please Mark it as Answered if it answered your question
OR mark it as Helpful if it help you to solve your problem
Elmozamil Elamir Hamid
MCSE Data Platform
MCITP: SQL Server 2008 Administration/Development
MCSA SQL Server 2012
MCTS: SQL Server Administration/Development
MyBlog -
How to select data from cluster table
hi experts,
I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
please advice.
maniHi Manikandan,
The following code may be helpful to understand how to select the data from cluster table.
Types: Begin of ty_kna1,
Kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_kna1,
begin of ty_bseg,
belnr type bseg-belnr,
kunnr type bseg-kunnr,
end of ty_bseg,
begin of ty_final,
belnr type bseg-belnr,
kunnr type kna1-kunnr,
adrnr type kna1-adrnr,
end of ty_final.
Data: it_kna1 type table of ty_kna1,
wa_kna1 type ty_kna1,
it_bseg type table of ty_bseg,
wa_bseg type ty_bseg,
it_final type table of ty_final,
wa_final type ty_final.
Select kunnr adrnr from kna1 into table it_kna1 where....
if sy-subrc = 0.
select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
endif.
sort it_kna1 by kunnr.
Loop at it_bseg into wa_bseg.
move wa_bseg-belnr to wa_final-belnr.
read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
if sy-subrc = 0.
move: wa_kna1-kunnr to wa_final-kunnr,
wa_kna1-belnr to wa_final-belnr.
endif.
append wa_final to it_final.
clear wa_final.
endloop.
Loop at it_final into wa_final.
write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
endloop.
Reward if useful.
Thankyou,
Regards. -
How to Retrieve data from Variant Table
Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?
Hello Mohan,
if u already have data and u want to populate it in F4 help then use below code -
u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
REPORT ZGILL_VALUE_REQUEST .
data: begin of lt_all occurs 0.
include structure DYNPREAD.
data end of lt_all.
data: begin of lt_selected occurs 0.
include structure DDSHRETVAL.
data: end of lt_selected.
DATA: BEGIN OF lt_code OCCURS 0,
code LIKE zgill_main-PERNR,
END OF lt_code.
data no_dyn like sy-dynnr.
Parameters : ECODE like zgill_main-PERNR.
*parameters: pernr like pa0001-pernr .
no_dyn = sy-dynnr. "give the scren no directly or sy-dynnr in case of report.
At selection-screen on value-request for ECODE.
select PERNR into table lt_code from zgill_main.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ECODE'
dynpprog = sy-repid
dynpnr = no_dyn
dynprofield = 'ECODE'
window_title = 'Employee Details'
value_org = 'S'
DISPLAY = 'F'
TABLES
value_tab = lt_code
RETURN_TAB = lt_selected.
EXCEPTIONS
PARAMETER_ERROR = 1
NO_VALUES_FOUND = 2
OTHERS = 3
*if sy-subrc eq '0' .
write: 'success'.
*endif.
read table lt_selected index sy-tabix.
move lt_selected-fieldval to ECODE. -
How to send data from internal table to the shared folder in ABAP
Hi experts,
My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is "
xxx\y\z....".
I do not have any idea on how to send data from internal table to the shared folder path.
can anybody please help me out how to do this?
Thanks & Regards
Sireesha.Where that folder is located, its on presentation server i.e. desktop or application server.
If its on presentation server, use FM GUI_UPLOAD.
If its on application server, then use DATASET functions. Have a look at below link.
[File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
I hope it helps.
Thanks,
Vibha
Please mark all the useful answers -
Move data from one table to another table
Hi all,
I had a custom table called sales_data in that table there are columns like JAn,FEB,upto DEC including other columns so in each month there is some data total data is 23000 count but each month has has specific data like JAn-2500,FEB-2000 like that it has total 23000 records
My Requirement is i have to move data from one table to another table that too if i will pass jan only jan data should move like that feb,march,.....
in my table there is no month column i had get it from another table called gl_periods and by using cursor and case function i have written the code
well while when i am inserting data am passing year,month as parameters but 23000 data is moving it should get like that.
Please suggest me.its urgent
Thank YouHi hamid,
Please go through the below procedure.
CREATE OR REPLACE PROCEDURE APPS.copy_sales_to_forecast(p_fiscal_year varchar2,p_month number)
IS
CURSOR C1 IS select period_year,period_num,start_date,end_date from apps.gl_periods
where period_set_name='Accounting'
and period_year=p_fiscal_year
and period_num<=p_month;
type type1 is table of xxc_forecast_data%rowtype;
t1 type1;
BEGIN
FOR CREC IN C1 LOOP
BEGIN
DELETE FROM xxc_forecast2
where fiscal_year = crec.period_year
and attribute1='Copied From Sales to Forecast Table of Month '||crec.period_num;
END;
SELECT
product_category ,
product_sub_category ,
product_line ,
product_style ,
item_number ,
item_description ,
customer_name ,
customer_number ,
sales_channel ,
null ,
CASE
WHEN crec.period_num=1 THEN sales_amount_month1
ELSE 0
END Transaction_quantity_period1,
CASE
WHEN crec.period_num=1 THEN sales_cost_month1
ELSE 0
END item_cogs_period1,
CASE
WHEN crec.period_num=1 THEN sales_mtl_cost_month1
ELSE 0
END item_material_cogs_period1 ,
CASE
WHEN crec.period_num=1 THEN sales_mtl_ovhd_cost_month1
ELSE 0
END item_mtl_ovhd_cogs_period1,
CASE
WHEN crec.period_num=1 THEN sales_res_cost_month1
ELSE 0
END item_resource_cogs_period1,
CASE
WHEN crec.period_num=1 THEN sales_op_cost_month1
ELSE 0
END item_op_cogs_period1,
CASE
WHEN crec.period_num=1 THEN sales_ovhd_month1
ELSE 0
END item_ovhd_cogs_period1,
CASE
WHEN crec.period_num=1 THEN sales_units_month1
ELSE 0
END extended_amount_us_period1,
CASE
WHEN crec.period_num=2 THEN sales_amount_month2
ELSE 0
END Transaction_quantity_period2,
CASE
WHEN crec.period_num=2 THEN sales_mtl_cost_month2
ELSE 0
END item_material_cogs_period2,
CASE
WHEN crec.period_num=2 THEN sales_mtl_ovhd_cost_month2
ELSE 0
END item_mtl_ovhd_cogs_period2,
CASE
WHEN crec.period_num=2 THEN sales_res_cost_month2
ELSE 0
END item_resource_cogs_period2,
CASE
WHEN crec.period_num=2 THEN sales_op_cost_month2
ELSE 0
END item_op_cogs_period2,
CASE
WHEN crec.period_num=2 THEN sales_ovhd_month2
ELSE 0
END item_ovhd_cogs_period2,
CASE
WHEN crec.period_num=2 THEN sales_units_month2
ELSE 0
END extended_amount_us_period2,
CASE
WHEN crec.period_num=3 THEN sales_amount_month3
ELSE 0
END Transaction_quantity_period3,
CASE
WHEN crec.period_num=3 THEN sales_mtl_cost_month3
ELSE 0
END item_material_cogs_period3,
CASE
WHEN crec.period_num=3 THEN sales_mtl_ovhd_cost_month3
ELSE 0
END item_mtl_ovhd_cogs_period3,
CASE
WHEN crec.period_num=3 THEN sales_res_cost_month3
ELSE 0
END item_resource_cogs_period3,
CASE
WHEN crec.period_num=3 THEN sales_op_cost_month3
ELSE 0
END item_op_cogs_period3,
CASE
WHEN crec.period_num=3 THEN sales_ovhd_month3
ELSE 0
END item_ovhd_cogs_period3,
CASE
WHEN crec.period_num=3 THEN sales_units_month3
ELSE 0
END extended_amount_us_period3,
CASE
WHEN crec.period_num=4 THEN sales_amount_month4
ELSE 0
END Transaction_quantity_period4,
CASE
WHEN crec.period_num=4 THEN sales_mtl_cost_month4
ELSE 0
END item_material_cogs_period4,
CASE
WHEN crec.period_num=4 THEN sales_mtl_ovhd_cost_month4
ELSE 0
END item_mtl_ovhd_cogs_period4,
CASE
WHEN crec.period_num=4 THEN sales_res_cost_month4
ELSE 0
END item_resource_cogs_period4,
CASE
WHEN crec.period_num=4 THEN sales_op_cost_month4
ELSE 0
END item_op_cogs_period4,
CASE
WHEN crec.period_num=4 THEN sales_ovhd_month4
ELSE 0
END item_ovhd_cogs_period4,
CASE
WHEN crec.period_num=4 THEN sales_units_month4
ELSE 0
END extended_amount_us_period4,
CASE
WHEN crec.period_num=5 THEN sales_amount_month5
ELSE 0
END Transaction_quantity_period5,
CASE
WHEN crec.period_num=5 THEN sales_mtl_cost_month5
ELSE 0
END item_material_cogs_period5,
CASE
WHEN crec.period_num=5 THEN sales_mtl_ovhd_cost_month5
ELSE 0
END item_mtl_ovhd_cogs_period5,
CASE
WHEN crec.period_num=5 THEN sales_res_cost_month5
ELSE 0
END item_resource_cogs_period5,
CASE
WHEN crec.period_num=5 THEN sales_op_cost_month5
ELSE 0
END item_op_cogs_period5,
CASE
WHEN crec.period_num=5 THEN sales_ovhd_month5
ELSE 0
END item_ovhd_cogs_period5,
CASE
WHEN crec.period_num=5 THEN sales_units_month5
ELSE 0
END extended_amount_us_period5,
CASE
WHEN crec.period_num=6 THEN sales_amount_month6
ELSE 0
END Transaction_quantity_period6,
CASE
WHEN crec.period_num=6 THEN sales_mtl_cost_month6
ELSE 0
END item_material_cogs_period6,
CASE
WHEN crec.period_num=6 THEN sales_mtl_ovhd_cost_month6
ELSE 0
END item_mtl_ovhd_cogs_period6,
CASE
WHEN crec.period_num=6 THEN sales_res_cost_month6
ELSE 0
END item_resource_cogs_period6,
CASE
WHEN crec.period_num=6 THEN sales_op_cost_month6
ELSE 0
END item_op_cogs_period6,
CASE
WHEN crec.period_num=6 THEN sales_ovhd_month6
ELSE 0
END item_ovhd_cogs_period6,
CASE
WHEN crec.period_num=6 THEN sales_units_month6
ELSE 0
END extended_amount_us_period6,
CASE
WHEN crec.period_num=7 THEN sales_amount_month7
ELSE 0
END Transaction_quantity_period7,
CASE
WHEN crec.period_num=7 THEN sales_mtl_cost_month7
ELSE 0
END item_material_cogs_period7,
CASE
WHEN crec.period_num=7 THEN sales_mtl_ovhd_cost_month7
ELSE 0
END item_mtl_ovhd_cogs_period7,
CASE
WHEN crec.period_num=7 THEN sales_res_cost_month7
ELSE 0
END item_resource_cogs_period7,
CASE
WHEN crec.period_num=7 THEN sales_op_cost_month7
ELSE 0
END item_op_cogs_period7,
CASE
WHEN crec.period_num=7 THEN sales_ovhd_month7
ELSE 0
END item_ovhd_cogs_period7,
CASE
WHEN crec.period_num=7 THEN sales_units_month7
ELSE 0
END extended_amount_us_period7,
CASE
WHEN crec.period_num=8 THEN sales_amount_month8
ELSE 0
END Transaction_quantity_period8,
CASE
WHEN crec.period_num=8 THEN sales_mtl_cost_month8
ELSE 0
END item_material_cogs_period8,
CASE
WHEN crec.period_num=8 THEN sales_mtl_ovhd_cost_month8
ELSE 0
END item_mtl_ovhd_cogs_period8,
CASE
WHEN crec.period_num=8 THEN sales_res_cost_month8
ELSE 0
END item_resource_cogs_period7,
CASE
WHEN crec.period_num=8 THEN sales_op_cost_month8
ELSE 0
END item_op_cogs_period8,
CASE
WHEN crec.period_num=8 THEN sales_ovhd_month8
ELSE 0
END item_ovhd_cogs_period8,
CASE
WHEN crec.period_num=8 THEN sales_units_month8
ELSE 0
END extended_amount_us_period8,
CASE
WHEN crec.period_num=9 THEN sales_amount_month9
ELSE 0
END Transaction_quantity_period9,
CASE
WHEN crec.period_num=9 THEN sales_mtl_cost_month9
ELSE 0
END item_material_cogs_period9,
CASE
WHEN crec.period_num=9 THEN sales_mtl_ovhd_cost_month9
ELSE 0
END item_mtl_ovhd_cogs_period9,
CASE
WHEN crec.period_num=9 THEN sales_res_cost_month9
ELSE 0
END item_resource_cogs_period7,
CASE
WHEN crec.period_num=9 THEN sales_op_cost_month9
ELSE 0
END item_op_cogs_period9,
CASE
WHEN crec.period_num=9 THEN sales_ovhd_month9
ELSE 0
END item_ovhd_cogs_period9,
CASE
WHEN crec.period_num=9 THEN sales_units_month9
ELSE 0
END extended_amount_us_period9,
CASE
WHEN crec.period_num=10 THEN sales_amount_month10
ELSE 0
END Transaction_quantity_period10,
CASE
WHEN crec.period_num=10 THEN sales_mtl_cost_month10
ELSE 0
END item_material_cogs_period10,
CASE
WHEN crec.period_num=10 THEN sales_mtl_ovhd_cost_month10
ELSE 0
END item_mtl_ovhd_cogs_period10,
CASE
WHEN crec.period_num=10 THEN sales_res_cost_month10
ELSE 0
END item_resource_cogs_period10,
CASE
WHEN crec.period_num=10 THEN sales_op_cost_month10
ELSE 0
END item_op_cogs_period10,
CASE
WHEN crec.period_num=10 THEN sales_ovhd_month10
ELSE 0
END item_ovhd_cogs_period10,
CASE
WHEN crec.period_num=10 THEN sales_units_month10
ELSE 0
END extended_amount_us_period10,
CASE
WHEN crec.period_num=11 THEN sales_amount_month11
ELSE 0
END Transaction_quantity_period11,
CASE
WHEN crec.period_num=11 THEN sales_mtl_cost_month11
ELSE 0
END item_material_cogs_period11,
CASE
WHEN crec.period_num=11 THEN sales_mtl_ovhd_cost_month11
ELSE 0
END item_mtl_ovhd_cogs_period11,
CASE
WHEN crec.period_num=11 THEN sales_res_cost_month11
ELSE 0
END item_resource_cogs_period11,
CASE
WHEN crec.period_num=11 THEN sales_op_cost_month11
ELSE 0
END item_op_cogs_period11,
CASE
WHEN crec.period_num=11 THEN sales_ovhd_month11
ELSE 0
END item_ovhd_cogs_period11,
CASE
WHEN crec.period_num=11 THEN sales_units_month11
ELSE 0
END extended_amount_us_period11,
CASE
WHEN crec.period_num=12 THEN sales_amount_month12
ELSE 0
END Transaction_quantity_period12,
CASE
WHEN crec.period_num=12 THEN sales_mtl_cost_month12
ELSE 0
END item_material_cogs_period12,
CASE
WHEN crec.period_num=12 THEN sales_mtl_ovhd_cost_month12
ELSE 0
END item_mtl_ovhd_cogs_period12,
CASE
WHEN crec.period_num=12 THEN sales_res_cost_month12
ELSE 0
END item_resource_cogs_period12,
CASE
WHEN crec.period_num=12 THEN sales_op_cost_month12
ELSE 0
END item_op_cogs_period12,
CASE
WHEN crec.period_num=12 THEN sales_ovhd_month12
ELSE 0
END item_ovhd_cogs_period12,
CASE
WHEN crec.period_num=12 THEN sales_units_month12
ELSE 0
END extended_amount_us_period12,
CASE
WHEN crec.period_num=2 THEN sales_cost_month2
ELSE 0
END item_cogs_period2,
CASE
WHEN crec.period_num=3 THEN sales_cost_month3
ELSE 0
END item_cogs_period3,
CASE
WHEN crec.period_num=4 THEN sales_cost_month4
ELSE 0
END item_cogs_period4,
CASE
WHEN crec.period_num=5 THEN sales_cost_month5
ELSE 0
END item_cogs_period5,
CASE
WHEN crec.period_num=6 THEN sales_cost_month6
ELSE 0
END item_cogs_period6,
CASE
WHEN crec.period_num=7 THEN sales_cost_month7
ELSE 0
END item_cogs_period7,
CASE
WHEN crec.period_num=8 THEN sales_cost_month8
ELSE 0
END item_cogs_period8,
CASE
WHEN crec.period_num=9 THEN sales_cost_month9
ELSE 0
END item_cogs_period9,
CASE
WHEN crec.period_num=10 THEN sales_cost_month10
ELSE 0
END item_cogs_period10,
CASE
WHEN crec.period_num=11 THEN sales_cost_month11
ELSE 0
END item_cogs_period11,
CASE
WHEN crec.period_num=12 THEN sales_cost_month12
ELSE 0
END item_cogs_period12,
a.fiscal_year ,
a.budget_entity ,
a.organization_code,
a.customer_id ,
a.inventory_item_id ,
NULL,
NULL,
a.created_by ,
a.last_updated_by ,
a.creation_date ,
a.last_update_date ,
'Copied From Sales to Forecast Table of Month '||crec.period_num,
a.attribute2,
a.attribute3 ,
a.attribute4 ,
a.attribute5 ,
a.attribute6 ,
a.attribute7 ,
a.attribute8 ,
a.attribute9 ,
a.attribute10,
a.attribute11,
a.attribute12,
a.attribute13,
a.attribute14,
a.attribute15
bulk collect into t1
FROM xxc_sales_data a
where a.fiscal_year = crec.period_year
having CASE
WHEN crec.period_num=1 THEN sum(sales_amount_month1)
WHEN crec.period_num=2 THEN sum(sales_amount_month2)
WHEN crec.period_num=3 THEN sum(sales_amount_month3)
WHEN crec.period_num=4 THEN sum(sales_amount_month4)
WHEN crec.period_num=5 THEN sum(sales_amount_month5)
WHEN crec.period_num=6 THEN sum(sales_amount_month6)
WHEN crec.period_num=7 THEN sum(sales_amount_month7)
WHEN crec.period_num=8 THEN sum(sales_amount_month8)
WHEN crec.period_num=9 THEN sum(sales_amount_month9)
WHEN crec.period_num=10 THEN sum(sales_amount_month10)
WHEN crec.period_num=11 THEN sum(sales_amount_month11)
WHEN crec.period_num=12 THEN sum(sales_amount_month12)
END !=0;
FORALL i IN t1.first .. t1.last
INSERT INTO xxc_forecast2 VALUES t1(i);
--commit;
END LOOP;
END;
Thank You -
How to select data from a table using a date field in the where condition?
How to select data from a table using a date field in the where condition?
For eg:
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = '31129999'.
thanks.Hi Ramesh,
Specify the date format as YYYYMMDD in where condition.
Dates are internally stored in SAP as YYYYMMDD only.
Change your date format in WHERE condition as follows.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and bdatu = <b>'99991231'.</b>
I doubt check your data base table EQUK on this date for the existince of data.
Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
data itab like equk occurs 0 with header line.
select * from equk into table itab where werks = 'C001'
and <b> bdatu <= '99991231'.</b>
Thanks,
Vinay
Thanks,
Vinay -
How to select data from a table by passing document number from another tab
How to select data from a table by passing document number from another table.
for eg:-
I want to display name, adres, region from ADRC table
by using field delivery document number
Kind Regards,
Shanbagavalli.SHi Shanbagavalli,
There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
**Consider that you have a Internal table having document number from other table..
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
FOR ALL ENTRIES IN IT_DOC
WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
**Consider that you have 1 document number then
SELECT NAME ADRES REGION FROM ADRC
INTO IT_ADRC
WHERE DOCUMENT_NO = W_DOCUMENT_NO.
Hope this solves your problem.
Regards,
Kunjal -
How to transform data from hierarchy table to taxonomy table?
Hi Friends
Regarding my issue:
1) I am having data in the hierarchy table which contains two fields(i.e. code, description) , now we have created another taxonomy table which contains two fields(i.e. code,description) same as hierarchy table.
2) hierarchy table only contains data, which we have imported data into hierarchy table using import manager. we don't have data in the taxonomy table.
3) now my issue is,we have to move that hierachical data in the hierarchy table to taxonomy without using import manager, only through the data manager using validations and assignments.
4) If any one have solution to this issue, please help me out.
Thanks in Advance
bharat.chinthapatlaHi Ganesh,
Thanks for your reply,
I need to move data from hierarchy table to taxonomy table using validations and assignments.
Thanks in Advance
bharat.chinthapatla
Maybe you are looking for
-
Virtual Machine in the Internet Explorer
Hi I am using Internet Explorer version 6.0. I have a particular assignment where I want to stop the user from using the SUN VM in their browser. I want to them to use only the Microsoft VM enabled in their Internet Explorer. I am detecting the VM by
-
Link between CE1NROC and FI documents
Hello, I am working on one object in which I am selecting records from CE1NROC table based on some selection criteria and posting these records using FB01 transaction. The requirement is - There should not be any duplicate posting for the Sales Order
-
How do I see how many songs are in my library?
I've tried all the other suggestions on here, CTRL & / isn't working, and there is no "show status bar" in the View section. Is this no longer available with the new iTunes? Or is something wrong with my iTunes?
-
Test fails during build - flex-pmd-ruleset
Hi, I have followed the developer documentation for how to build the project, on step 7 it fails because the following tests are failing inside flex-pmd-ruleset: Failed tests: testProcessViolatingFiles(com.adobe.ac.pmd.rules.unused.UnusedLocalVaria
-
Word count not recognized as integer variable
ok, i have this command: set mywordcount to do shell script "wc -l < MyFile.txt" which gives me the number of words of a given txt with display alert it reports me number 1 when there is one word, number 4 if there are 4 words, etc... the problem com