Move column from one place to another..

Hi
I need to  arrange the order in which the columns are displayed in my ALV Grid displayed so that i can move the columns from one position to another but its not been allowed in the program so could u pls suggest which field needs to be set for this?
Regards
Gunjan

Hi
You can use the following statement
ls_fcat-col_pos           =  01.
By using this you can fix your column position
or else to sort the column try like this
sort-spos = '10'.
SORT-FIELDNAME = 'Years'.
SORT-TABNAME = 'DATA_TAB2'.
sort-UP = 'X'.
sort-subtot = 'X'.
SORT-GROUP = '* '.
APPEND SORT. CLEAR SORT.
In the It_SOET internal table write:
IT_SORT-Group = 'X'.
REPORT  ZSDN                                    .
TABLES : ekkn,ekko,EKPO,EKET,VBEP,LFA1.
TYPE-POOLS : slis, ICON.
DATA : DATE1 TYPE SY-DATUM.
data : begin of itab occurs 0,
      VBELN like ekkn-VBELN, "SALE ORDER
      VBELP LIKE EKKN-VBELP, "LINE ITEM
      BEDAT LIKE EKKO-BEDAT, "DOCUMENT DATE
      KUNNR LIKE VBAK-KUNNR, "SOLD TO PARTY
      VBELN1 like VBEP-VBELN, "SALE ORDER1
      POSNR1 LIKE VBEP-POSNR, "LINE ITEM
      EDATU LIKE VBEP-EDATU, "END DATE
      EMATN LIKE EKPO-EMATN, "STATUS
      BMENG LIKE VBEP-BMENG, "DAYS
      TDDAT LIKE VBEP-TDDAT, "START DATE
      LMENG LIKE VBEP-LMENG, "DAYS -START DATE
      LABNR LIKE EKPO-LABNR, "STATUS
      PLNUM LIKE VBEP-PLNUM, "OVERALL STATUS
      EKGRP like ekko-EKGRP, "PURCHASING GROUP
      EBELN LIKE EKKN-EBELN, "PO NO
      EBELP like ekkn-EBELP, "LINE ITEM
      EINDT LIKE EKET-EINDT, "DELIVERY DATE
      MATNR LIKE EKPO-MATNR, "MATERIAL NUMBER
      TXZ01 LIKE EKPO-TXZ01, "MATERIAL TEXT
      LIFNR LIKE EKKO-LIFNR, "VENDOR
      MENGE LIKE EKPO-MENGE, "QUANTITY
      WEMNG LIKE EKET-WEMNG, "GR QTY
      WAMNG LIKE EKET-WAMNG, "BAL QTY
      MEINS LIKE EKPO-MEINS, "OUn
      NETPR LIKE EKPO-NETPR, "PRICE
      LOEKZ LIKE EKPO-LOEKZ, "DELETED
      LIFNR1 LIKE LFA1-LIFNR, "VENDOR
      NAME1 LIKE LFA1-NAME1, "VENDOR NAME
      WERKS LIKE EKPO-WERKS, "PLANT
      end of itab.
DATA : BEGIN OF it_final OCCURS 0,
      KUNNR LIKE VBAK-KUNNR, "SOLD TO PARTY
      LABNR LIKE EKPO-LABNR, "STATUS
      EMATN LIKE EKPO-EMATN, "STATUS
      VBELN like ekkn-VBELN, "SALE ORDER
      VBELP LIKE EKKN-VBELP, "LINE ITEM
      BEDAT LIKE EKKO-BEDAT, "DOCUMENT DATE
      EDATU LIKE VBEP-EDATU, "END DATE
      TDDAT LIKE VBEP-TDDAT, "START DATE
      PLNUM LIKE VBEP-PLNUM, "OVERALL STATUS
      EKGRP like ekko-EKGRP, "PURCHASING GROUP
      EBELN LIKE EKKN-EBELN, "PO NO
      EBELP like ekkn-EBELP, "LINE ITEM
      EINDT LIKE EKET-EINDT, "DELIVERY DATE
      MATNR LIKE EKPO-MATNR, "MATERIAL NUMBER
      TXZ01 LIKE EKPO-TXZ01, "MATERIAL TEXT
      NAME1 LIKE LFA1-NAME1, "VENDOR NAME
      MENGE LIKE EKPO-MENGE, "QUANTITY
      WEMNG LIKE EKET-WEMNG, "GR QTY
      WAMNG LIKE EKET-WAMNG, "BAL QTY
      MEINS LIKE EKPO-MEINS, "OUn
      NETPR LIKE EKPO-NETPR, "PRICE
      WERKS LIKE EKPO-WERKS, "PLANT
END OF it_final.
DATA: color TYPE TABLE OF lvc_s_scol WITH HEADER LINE,
      st_layout TYPE slis_layout_alv.
DATA : fcat TYPE slis_t_fieldcat_alv,
      ls_fcat LIKE LINE OF fcat,
      fheader TYPE TABLE OF slis_listheader WITH NON-UNIQUE DEFAULT KEY
      WITH HEADER LINE INITIAL SIZE 0.
DATA :i_repid LIKE sy-repid,
     gs_layout   TYPE slis_layout_alv,
     week type n.
SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: zso FOR ekkn-vbeln.
SELECT-OPTIONS: zpgr FOR ekko-EKGRP.
SELECT-OPTIONS: ZPL FOR EKPO-WERKS.
SELECTION-SCREEN END OF BLOCK bk1.
gs_layout-colwidth_optimize = 'X'.
select A~VBELN
      A~VBELP
      A~EBELN
      A~EBELP
      B~MATNR
      B~TXZ01
      B~MENGE
      B~MEINS
      B~NETPR
      B~WERKS
      B~LOEKZ
      C~EINDT
      C~WEMNG
      D~EKGRP
      D~LIFNR
      D~BEDAT
      INTO CORRESPONDING FIELDS OF TABLE ITAB
      FROM EKKN AS A
      INNER JOIN EKPO AS B ON A~EBELN = B~EBELN
      AND A~EBELP = B~EBELP
      INNER JOIN EKET AS C ON A~EBELN = C~EBELN
      AND A~EBELP = C~EBELP
      INNER JOIN EKKO AS D ON A~EBELN = D~EBELN
      WHERE A~VBELN IN ZSO
      AND D~EKGRP IN ZPGR
      AND B~WERKS IN ZPL.
LOOP AT ITAB.
ITAB-WAMNG = ITAB-MENGE - ITAB-WEMNG.
SELECT SINGLE VBELN KUNNR
FROM VBAK INTO (ITAB-VBELN , ITAB-KUNNR )
WHERE VBELN = ITAB-VBELN.
SELECT SINGLE VBELN EDATU
FROM VBEP INTO (ITAB-VBELN , ITAB-EDATU)
WHERE VBELN = ITAB-VBELN.
DATE1 =  SY-DATUM.
ITAB-BMENG = ITAB-EDATU - DATE1.
if itab-BMENG  < 0.
   ITAB-EMATN = 'OVER DUE'.
elseif itab-BMENG ge 0 AND itab-BMENG le 10.
   ITAB-EMATN = 'CRITICAL'.
elseif itab-BMENG > 10.
   ITAB-EMATN = 'UNDER FOLLOW-UP'.
endif.
SELECT SINGLE VBELN POSNR TDDAT
FROM VBEP INTO (ITAB-VBELN1 , ITAB-POSNR1 , ITAB-TDDAT)
WHERE VBELN = ITAB-VBELN AND
POSNR = ITAB-VBELP.
ITAB-LMENG = ITAB-TDDAT - DATE1.
if itab-LMENG  < 0.
   ITAB-LABNR = 'OVER DUE'.
elseif itab-LMENG ge 0 AND itab-LMENG le 10.
   ITAB-LABNR = 'CRITICAL'.
elseif itab-LMENG > 10.
   ITAB-LABNR = 'UNDER FOLLOW-UP'.
endif.
IF ITAB-WAMNG LE 0 OR
    ITAB-LOEKZ = 'L' OR
    ITAB-LOEKZ = 'S'.
    ITAB-PLNUM = 'CLOSED'.
ELSE.
    ITAB-PLNUM = 'OPEN'.
ENDIF.
SELECT SINGLE LIFNR NAME1
FROM LFA1 INTO (ITAB-LIFNR1 , ITAB-NAME1)
WHERE LIFNR = ITAB-LIFNR.
MODIFY ITAB.
ENDLOOP.
loop at itab.
   move-corresponding itab to it_final.
   append it_final.
endloop.
perform edit_mask.
i_repid = sy-repid.
PERFORM fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
   EXPORTING
     i_callback_program      = i_repid
     i_callback_user_command = 'USER_COMMAND'
     it_fieldcat             = fcat
     i_save                  = 'A'
   TABLES
     t_outtab                = it_final
   EXCEPTIONS
     program_error           = 1
     OTHERS                  = 2.
*&      Form  fieldcat
*       text
*  -->  p1        text
*  <--  p2        text
FORM fieldcat .
MOVE sy-repid TO i_repid.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-decimals_out = 2.
ls_fcat-col_pos = 1.
ls_fcat-fieldname = 'KUNNR'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Sold to Party'.
ls_fcat-emphasize = 'C310'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  6.
ls_fcat-fieldname = 'LABNR'.
ls_fcat-outputlen = 20.
ls_fcat-seltext_m = 'Window Start Status'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C510'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  5.
ls_fcat-fieldname = 'EMATN'.
ls_fcat-outputlen = 15.
ls_fcat-seltext_m = 'Window End Status'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C410'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  2.
ls_fcat-fieldname = 'VBELN'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Sale Order'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C710'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  3.
ls_fcat-fieldname = 'VBELP'.
ls_fcat-outputlen = 5.
ls_fcat-seltext_m = 'Item'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C710'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  4.
ls_fcat-fieldname = 'EBELN'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'PO Number'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C710'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  7.
ls_fcat-fieldname = 'EBELP'.
ls_fcat-outputlen = 5.
ls_fcat-seltext_m = 'PO Item'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  8.
ls_fcat-fieldname = 'EKGRP'.
ls_fcat-outputlen = 3.
ls_fcat-seltext_m = 'Pur.Group'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  9.
ls_fcat-fieldname = 'BEDAT'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'PO Doc.Date'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  10.
ls_fcat-fieldname = 'EINDT'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'PO Delivery Date'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  11.
ls_fcat-fieldname = 'MATNR'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Material Number'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  12.
ls_fcat-fieldname = 'TXZ01'.
ls_fcat-outputlen = 15.
ls_fcat-seltext_m = 'Description'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  13.
ls_fcat-fieldname = 'NAME1'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Vendor'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C110'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  14.
ls_fcat-fieldname = 'MENGE'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'PO Quantity'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  15.
ls_fcat-fieldname = 'WEMNG'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Quantity Recvd'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  16.
ls_fcat-fieldname = 'WAMNG'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Bal Qty'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  17.
ls_fcat-fieldname = 'MEINS'.
ls_fcat-outputlen = 2.
ls_fcat-seltext_m = 'OUn'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  18.
ls_fcat-fieldname = 'NETPR'.
ls_fcat-outputlen = 8.
ls_fcat-seltext_m = 'NetPrice'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  19.
ls_fcat-fieldname = 'TDDAT'.
ls_fcat-outputlen = 15.
ls_fcat-seltext_m = 'Window Start date'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  20.
ls_fcat-fieldname = 'EDATU'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'Window End date'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  21.
ls_fcat-fieldname = 'PLNUM'.
ls_fcat-outputlen = 10.
ls_fcat-seltext_m = 'PO Status'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C610'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ls_fcat-col_pos           =  22.
ls_fcat-fieldname = 'WERKS'.
ls_fcat-outputlen = 5.
ls_fcat-seltext_m = 'Plant'.
ls_fcat-tabname = 'IT_FINAL'.
ls_fcat-emphasize = 'C210'.
APPEND ls_fcat TO fcat.
clear ls_fcat.
ENDFORM.                    " fieldcat
*&      Form  edit_mask
*       text
*  -->  p1        text
*  <--  p2        text
FORM edit_mask .
loop at it_final.
   CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
     EXPORTING
       INPUT  = it_final-vbeln
     IMPORTING
       OUTPUT = it_final-vbeln.
Read table it_final.
*  modify it_final.
endloop.
ENDFORM.                    " edit_mask
Reward all helpfull answers
Regards
Pavan

Similar Messages

  • How do I move pictures from one library to another?

    How do I move pictures from one library to another?

    For just a few export them out of Library A via the File ➙ Export ➙ File Export menu option with Kind = Original and import them into Library B.
    However, this will not include any edits or metadata (keywords, titles, etc.) that you've added.
    To get the original image, any edits and all metadata, keywords, titles, descriptions, places, etc., you'll need the paid version of  iPhoto Library Manager.  It can copy albums or events from one library to another and keep those items I mentioned earlier with the photos.
    OT

  • How to move cursor from one textfield to another textfield byusing enterkey

    hii all,
    I have a problem in java script.
    To move cursor from one textbox to another text box ,I have take the length of the textboxes of the first column.I used onkeyDown event .
    in the function ,firest i checked the condition like
    for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
    if(event.keyCode==13)
    form1.box[i+1].focus();
    return false;
    by using this the cursor is moving from first text box to secon textbox and stops.
    if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
    my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
    if any one has solution please help me.
    also if we can do in another way also,please help me.
    thanx.>

    try the following code :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> New Document </TITLE>
    <META NAME="Generator" CONTENT="EditPlus">
    <META NAME="Author" CONTENT="">
    <META NAME="Keywords" CONTENT="">
    <META NAME="Description" CONTENT="">
    </HEAD>
    <SCRIPT language="Javascript">
    function fnTest(str)     {     
              if(event.keyCode==13)          {
                   if(str == 4)     {
                        formHeader.box[0].focus();
                   else     {
                        formHeader.box[parseInt(str)+1].focus();
                   return false;
    </SCRIPT>
    <BODY>
    <FORM name="formHeader">
    <CENTER>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('2');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
    <br>
    <INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
    </CENTER>
    </FORM>
    </BODY>
    </HTML>
    ----------------------------------------------

  • 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 You

    Hi 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

  • [CS3 JS]  Move pages from one document to another?

    First, a brief explanation of what I am trying to do. I have several individual chapters that I am including in an INDD book. However, I also want to be able to allow those individual chapters to stand alone, meaning that I want to add a cover/title page to each chapter file (these two pages would be placed before the current page 1 of each chapter).
    My preference would be to write a script that would open the cover/tp file and open the first chapter file; this part is no problem. Where I am running into trouble however, is the second step: moving the cover/tp pages (2 pages) over into the chapter file.
    Manually, I would open Cover.indd, activate the "move pages" menu, "Move pages: 1-2", "Destination: Before_Page 1", "Move to: Chapter1.indd".
    With over 100 chapters in the book, however, I would prefer to automate the process. I have looked into the Page.move and PageItem.move elements, but both look like they would require a location in the current document (either in (x,y) form or using "AT_BEGINNING".
    If I cannot get this to work, I will likely try to insert two blank pages, then cut/paste with a script, but I would prefer the "move" functionality, if it is possible.
    A couple of answers to potential questions:
    I can't simply place the INDD cover file b/c it uses a text variable to pull the chapter name; this personalizes each stand-alone chapter.
    Same answer to why I can't just slap the 2-page .pdf on the front of each. I need the text variable to still be active.
    Has anyone tried to move pages from one document to another using scripting? I tried to explain what I am trying to do, but if it doesn't make sense, I can try again. :)
    thanks!
    Matt

    ok here we are
    I get a raw skeleton that you will have to adjust but it's functional.
    Use a PDF for placement as you can specify the page that you want to place.
    I don't know if you can do the same for indesign files.
    So basically, it starts adding 2 pages and placeing the pdf in the same time.
    After that, it creates the textVariable and the frame that will receive it.
    Here you are:
    //If a document is open
    if(app.documents.length!=0)
    var ad = app.activeDocument;
    //Pages placement
    for(i=0; i<2; i++)
    //Add 2 pages on top of the document;
    var tmpPg = ad.pages.add(LocationOptions.BEFORE, ad.pages[0]);
    //Here you place your pdf
    app.pdfPlacePreferences.pageNumber = i;
    tmpPg.place(File(cover.pdf), false)
    //You should specify page x and page y but ain't found yet the way to go.
    //Text variable creation
    //Check if the textVariable named "txtVar" does not already exist...
    if(ad.textVariables.item("txtVar")==null)
    //if not found, create the text variable named "txtVar"
    var txtVar = ad.textVariables.add();
    txtVar.variableType =VariableTypes.CUSTOM_TEXT_TYPE;
    txtVar.name = "txtVar";
    //Set the contents of the text variables to the string "test"
    ad.textVariables.item("txtVar").variableOptions.contents = "test";
    //these coordinates don't care aboutyour units but you may adjust them to your needs
    var y1 = ad.marginPreferences.left;
    var x1 = ad.marginPreferences.top;
    var y2 = y1+5;
    var x2 = x1+25;
    var myFrame = ad.pages[0].textFrames.add({geometricBounds:[y1,x1,y2,x2]});
    //Set the contents of the frame to the text variables "txtVar"
    myFrame.contents=ad.textVariables.item("txtVar").variableOptions.contents;
    //You may want to stylize the txtVar
    //In this case, either you use a existing characterStyle or you create one in the script
    Bye Loic

  • How to move BLOBs from one table to another ??

    Hi All,
    I am trying to move blobs from one table to another, however my insert statement is not working. What i mean is its running, but records are not being inserted into the table.
    This is my first time moving blobs, so please bear with me.
    here is my insert statement:
    INSERT INTO CASES.FILESTORAGE
    SELECT      DID,
              DRENDITIONID,
              DLASTMODIFIED,
              DFILESIZE,
              DISDELETED,
              BFILEDATA       // this attribute is the BLOB
    FROM      USSC_CASES_TMP.FILESTORAGE
    WHERE      DID NOT IN (SELECT DID FROM CASES.FILESTORAGE);here is the DDL for the table.
    CREATE TABLE "USSC_CASES_TMP"."FILESTORAGE"
        "DID"          NUMBER(*,0) NOT NULL ,
        "DRENDITIONID" VARCHAR2(30 CHAR) NOT NULL ,
        "DLASTMODIFIED" TIMESTAMP (6),
        "DFILESIZE"  NUMBER(*,0),
        "DISDELETED" VARCHAR2(1 CHAR),
        "BFILEDATA" BLOB,
        CONSTRAINT "PK_FILESTORAGE" PRIMARY KEY ("DID", "DRENDITIONID")
      );CASES.FILESTORAGE table has the same DDL, but in a different schema.
    Thanks in advance.

    If this seems rather straight forward. If the schema are exact simply execute:
    inset into [destination] select * from [source] ;if something is amiss you should be throwing errors someplace* but try this:
    create table [scratch table name] as select * from [source table] where [place some limit here] ;If this does not work then something someplace is very wrong and if you are not the DBA you need to get this persons attention, fairly quickly. I would do the above from sqlplus and then after each statement would:
    commit;then check to see if it succeeded.

  • Why can't i move files from one folder to another by sliding them?

    help. i am trying to move files from one folder to another. but i cant slide them by clicking on a file and sliding it to another place. any suggestions? thank

    Go to Finder "Go" menu hold the option key and choose Library. Then go to Preferences trash these files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then, restart, or log out and in again.
    (You will have to reset a few finder prefs the way you like them.)

  • Drag a column from one position to another within the table.

    Hello All,
    In Web Dynpro Java, Is it possible to provide user a functionality with which he/she can move the columns of a table from one position to another ?
    Scenario : Users want flexibility to decide the location the columns as per their convinience while they are working with the application.
    So can we develop some code or can we use some UI element so that user is able to drag a column from one position to another within the table.
    Regards
    Mrinalini.

    Hi Mrinalini,
    Yes this is possible you can try to move the table columns (Change the order). for this you don't need to do additional coding or property change its a default property for web Dynpro java tables.
    Regards
    Jeetendra

  • Can I move applications from one user to another on the same computer?

    If I have two users on one mac, can I move applications from one user to another on the same computer?
    Thanks

    By default, apps are installed for all the users in /Applications

  • Can i move money from one account to another?

    Can i move money from one account to another?

    Basically, no; only the iTunes Store staff can do this, and then only by putting the balance from a completely unspent gift card back onto the card.
    (83942)

  • How do I move contacts from one group to another?

    I entered several contacts in address book.  How do I control which group they are assigned to at the time of entry?  The ones I added showed up in my office contacts in Outlook instead of in Hotmail/iCloud.
    Is it possible to move them from one group to another once entered?

    Do the contacts that are not in iCloud belong to an external account such as Gmail, Yahoo or an Exchange account?  Or, do they belong to On My iPhone?

  • How do I move files from one album to another?

    How can I move files from one album to another? And why does itunes split up imported folders?

    Press the Command key while dragging them.
    (58054)

  • Can I move photos from one computer to another using Vault?

    Can I move photos from one computer to another using Vault?  I use an external hard drive as a vault for my Imac and I want to import photos to my Macbook pro.  I have aperture 3 on both units.  Can I just plug the ext. drive into the laptop and import from the vault?

    You can't import from the vault but you can restore that vault onto the MBP. This will restore the complete library that is contained in the vault.

  • TS3274 How do I move icons from one screen to another?

    How do I move icons from one screen to another. 

    Hold down on one icon until they start shaking, then drag the icon to the edge of the screen, and the screen should slide to the next one, you can then drop it on that screen or drag it again to the edge to move to the next screen.
    Page 21 of the user guide explains this under Arranging Apps:
    http://manuals.info.apple.com/en/ipad_user_guide.pdf

  • Can't move files from one volume to another

    Using the 1.2 client on SLED, I don't appear to be able to move files from
    one volume to another. I have two drive "mappings", each to a
    different volume on a NW65SP5 box, but when I try and cut and paste files
    I get an error saying "Not on the same file system". However if I drop to
    a terminal and just use mv, that works.
    Is this a known issue?
    Joe

    On Tue, 12 Sep 2006 12:59:23 +0000, Joseph Marton wrote:
    Hmm, yep get the smae problem when trying to move files.
    Copy works just great though.
    I know there are some issues in Gnome/Nautilus that's being worked upon.
    These are outlined in the Readme. For example it's not possible to copy a
    folder from Server A to Server B, then delete the folder form Server A.
    Finally later on copy the folder back to Server A from Server B.
    Also Gnome is leaking file handles, which could be the cause for the
    problem we're getting here.
    I'll ask my contact at Novell about this and have him enter it in as a bug
    if it's not a known issue.
    For a workaround you already have a good alternative of using mv in a
    terminal.
    Niclas Ekstedt, CNA/CNE/CNS/CLS
    Senior Network Consultant/NSC Sysop
    Telindus Sweden AB

Maybe you are looking for