How to delete data from the table PA0007
Hi Friends,
Thank you for your kindly help.
When I upload data to infotype 0007(planed working time),
there is something wrong with the infotype 2011. So I want
to delete the data of infotype 0007. While using the program RPUREOPN to delete the data, the system will say:0007 cannot be deleted because of time constraint 1/A.
Now how can I delete the data from table PA0007?
Pls help me urgently.
Best wishes
Anne
Hi Sikindar,
Thank you for your help.
There is another question. There are five clients (Client 300,310,320,330,350) in my HR DEV system. I just want to delete the data of infotype 0007 in client 350. When I change the the time constraint and delete the data in client 350, the data of infotype 0007 in other clients will be safe or not?
Thank you again for your help!
Best wishes
Anne
Similar Messages
-
How to dispaly datas from the table, base on the selection screen
hi there gurus,
im currently developing a stock aging report,
i have completed one program but it do not allow me to excutes the program althought the syntax is correct.
i would to get some ideas from you, regarding how to extract the datas from the tables?
my selction screen will be, mat number, date, and gl account.
and the out put datas are, mbew-matnr, makt-maktx, mbew-lbkum, mara_meins, mbew-salk3,and the consumptions for the past 12months and the values for it.
can u plz guide me with this,
thank you,.
this is kind of very urgent program that i need to finish , plz help me.here is the total code the i do
REPORT ZSTK_AGING_REP2.
*TABLES
TABLES: mseg,
mara,
makt,
SKAT,
SKA1,
MARV,
T001,
T030,
T149D,
AM07M,
MCMSEG,
T001K,
T001W,
T134M,
vbak,
mbew,
mcon, rmcb0, marc, t024w, mvke, v134w, t438a, propf, maprf, t000, t024e
, tvko.
DATA: BEGIN OF ta_material OCCURS 2,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
labst LIKE mard-labst,
umlme LIKE mard-umlme,
insme LIKE mard-insme,
einme LIKE mard-einme,
speme LIKE mard-speme,
retme LIKE mard-retme,
verpr LIKE mbew-verpr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
erdat LIKE vbak-erdat,
END OF ta_material.
DATA: BEGIN OF ta_mseg OCCURS 2,
mblnr LIKE mseg-mblnr,
*->Begin of KL02+ -
mjahr like mseg-mjahr,
zeile like mseg-zeile,
*->End of KL02+ -
meins LIKE mseg-meins,
menge LIKE mseg-menge,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
budat LIKE mkpf-budat,
saknr LIKE SKA1-SAKNR,
END OF ta_mseg.
single recs based on MATNR
DATA: BEGIN OF i_matnr OCCURS 0,
werks LIKE mard-werks,
lgort LIKE mard-lgort,
matnr LIKE mard-matnr,
maktx LIKE makt-maktx,
mblnr LIKE mseg-mblnr,
verpr LIKE mbew-verpr,
labst LIKE mard-labst, "Valuated stock with
*unrestricted use
umlme LIKE mard-umlme, "Stock in transfer
*(from one storage location to another)
insme LIKE mard-insme, "Stock in quality
*inspection
einme LIKE mard-einme, "Total Stock of All
*Restricted Batches
speme LIKE mard-speme, "Blocked stock
retme LIKE mard-retme, "Blocked Stock Returns
meins LIKE mara-meins, "base unit
bukrs LIKE t001-bukrs,
konto LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
lbkum LIKE mbew-lbkum,
END OF i_matnr.
recs based on MBLNR
DATA: BEGIN OF i_mblnr OCCURS 0,
mblnr LIKE mseg-mblnr,
werks LIKE mseg-werks,
lgort LIKE mseg-lgort,
matnr LIKE mseg-matnr,
menge LIKE mseg-menge,
meint LIKE mseg-meins,
budat LIKE mkpf-budat,
bukrs LIKE t001-bukrs,
konts LIKE t030-konts,
butxt LIKE t001-butxt,
txt50 LIKE skat-txt50,
MABTR LIKE MCMSEG-DMBTR,
SKBTR LIKE MCMSEG-DMBTR,
WAERS LIKE T001-WAERS,
WAER2 LIKE T001-WAERS,
BWKEY LIKE MBEW-BWKEY,
LBKUM LIKE MBEW-LBKUM,
MEINS LIKE MARA-MEINS,
SALK3 LIKE MBEW-SALK3,
WAERS1 LIKE T001-WAERS,
BUKRS1 LIKE T001-BUKRS,
KONTO1 LIKE T030-KONTS,
END OF i_mblnr.
TYPES: BEGIN OF t_mat,
lgort LIKE mseg-lgort,
werks LIKE mseg-werks,
matnr LIKE mseg-matnr,
mblnr LIKE mseg-mblnr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat.
DATA: i_mat2 TYPE t_mat OCCURS 0 WITH HEADER LINE.
TYPES: BEGIN OF t_mat2,
lgort LIKE mard-lgort, " storage location
cnt0(5),
cnt1(5),
cnt2(5),
cnt3(5),
cnt4(5),
meng0 LIKE mbew-lbkum,
value0 LIKE mbew-salk3,
meng0 LIKE mard-labst, "0 to 10 days
value0 LIKE mseg-dmbtr,
meng1 LIKE mard-labst, "11 to 30 days
value1 LIKE mseg-dmbtr,
meng2 LIKE mard-labst, "31 to 60 days
value2 LIKE mseg-dmbtr,
meng3 LIKE mard-labst, "61-90
value3 LIKE mseg-dmbtr,
meng4 LIKE mard-labst, "90 days onwards
value4 LIKE mseg-dmbtr,
END OF t_mat2.
DATA: i_matsum TYPE t_mat2 OCCURS 0 WITH HEADER LINE.
DATA: w_mengb TYPE mbew-lbkum,
w_workqyt TYPE mbew-lbkum,
w_index TYPE sy-tabix,
*DATA: w_mengb TYPE mard-labst, "tmp Balance qty
w_workqty TYPE mard-labst, "Work qty
w_index TYPE sy-tabix,
w_days(5) TYPE n, "duration difference (days)
w_mths(5) TYPE n, "duration difference (mths)
w_dat1 TYPE sy-datum, "date
w_dat2 TYPE sy-datum, "today's date
w_detl(1) TYPE c,
w_summ(1) TYPE c,
w_denom TYPE i,
w_numer TYPE i,
w_conv TYPE i,
w_ttlcnt TYPE i,
w_cnt TYPE i,
v_topofpage(1),
w_meng LIKE mard-labst,
w_meng LIKE mbew-lbkum,
*sapscript values
w_title(20) TYPE c. "Summary / Detail Report
DATA: lv_peinh LIKE mbew-peinh, "Price Unit
lv_verpr LIKE mbew-verpr. "Moving Price
proram comes here
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_werks FOR mseg-werks,
s_lgort FOR mseg-lgort,
s_matnr FOR mara-matnr,
s_saknr FOR ska1-saknr,
S_ERDAT FOR VBAK-ERDAT.
PARAMETERS: pck_detl RADIOBUTTON GROUP rep1,
pck_summ RADIOBUTTON GROUP rep1,
pck_dtsm RADIOBUTTON GROUP rep1 DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK blk1.
top of the page
TOP-OF-PAGE.
PERFORM f_top_of_page.
FORM f_top_of_page .
IF v_topofpage = 'D'.
*-->Report header for detail report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Detail',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--=<QTY ON THIS DATE -->',
78 '<-- =< 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ELSE.
*-->Report header for Summary report
WRITE:/2 'Printed By :', sy-uname,
80 'Stock Aging Report - Summary',
180 'Printed on:', sy-datum, sy-timlo,
220 'Page:', sy-pagno.
WRITE:/,/,/.
WRITE:/2 'Storage',
10 'Matl ID',
22 'Matl Description',
61 'UOM',
78 '<--< QTY ON THIS DATE -->',
78 '<-- < 10 days -->',
112 '<--11 to 30 days -->',
148 '<--31 to 60 days -->',
181 '<--61 to 90 days -->',
216 '<-- > 90 days -->',
/2 'Location',
76 'Qty',
92 'Value'.
112 'Qty',
128 'Value',
148 'Qty',
164 'Value',
181 'Qty',
195 'Value',
216 'Qty',
231 'Value'.
WRITE:/2 sy-uline(235).
ENDIF.
ENDFORM. " f_top_of_page
*start-of-selection
*PERFOM f_data_selection.
FORM f_data_selection.
SELECT a~werks
a~lgort
a~matnr
a~saknr
a~lbkum
a~erdat
a~labst
a~umlme
a~insme
a~einme
a~speme
a~retme
b~verpr "this field no long been used
c~maktx
d~meins
INTO CORRESPONDING FIELDS OF TABLE ta_material
FROM mard AS a
INNER JOIN makt AS c ON amatnr = cmatnr
INNER JOIN mara AS d ON amatnr = dmatnr
WHERE a~matnr IN s_matnr
AND a~werks IN s_werks
AND a~lgort IN s_lgort
AND a~saknr IN s_saknr
AND a~erdat IN s_erdat
AND c~spras = 'EN'.
*--> SC01 - End of Insertion **
*-->Select material documents
SELECT a~mblnr
a~mjahr
a~zeile
a~meins
a~menge
a~werks
a~lgort
a~matnr
b~budat
INTO CORRESPONDING FIELDS OF TABLE ta_mseg
FROM mseg AS a INNER JOIN mkpf AS b
ON amblnr = bmblnr
AND amjahr = bmjahr
FOR ALL ENTRIES IN ta_material
WHERE matnr = ta_material-matnr
AND a~werks = ta_material-werks
AND a~lgort = ta_material-lgort
AND algort NE aumlgo
AND a~shkzg = 'S'
AND a~smbln EQ space
AND a~smblp EQ space.
*--> SC03 - Start of Insertion **
If MBLNR exist in MSEG-SMBLN and this
record's SHKZG = 'H'. Remove it from the table.
This is becuase this particular record has already been reverse.
LOOP AT ta_mseg.
SELECT SINGLE *
FROM mseg
WHERE smbln = ta_mseg-mblnr
*->Begin of KL02+ -
and SMBLP = ta_mseg-zeile.
AND shkzg = 'H'. "return. " KL02-
*->End of KL02+ -
IF sy-subrc = 0.
DELETE ta_mseg.
ENDIF.
ENDLOOP.
*--> SC03 - Enf of Insertion **
ENDFORM. " f_data_selection
*IMPORTANT , NEED TO CHECK LATER
FORM f_data_preparation.
*-->Append data for report details
LOOP AT ta_material.
DATA: ta_msegtemp LIKE ta_mseg OCCURS 2 WITH HEADER LINE.
*-->Loop at all material documents into a temp table
REFRESH ta_msegtemp. CLEAR ta_msegtemp.
LOOP AT ta_mseg WHERE matnr = ta_material-matnr AND
werks = ta_material-werks AND
lgort = ta_material-lgort.
ta_msegtemp = ta_mseg. APPEND ta_msegtemp.
ENDLOOP.
*-->Add up all the stock for the material
CLEAR w_mengb.
w_mengb = ta_material-labst +
ta_material-umlme +
ta_material-insme +
ta_material-einme +
ta_material-speme +
ta_material-retme.
IF w_mengb IS INITIAL.
CONTINUE.
ENDIF.
*-->sort msegtemp by posting date
SORT ta_msegtemp BY budat DESCENDING.
*-->get the values from the material documents into the report output
LOOP AT ta_msegtemp.
*->Begin of KL02- -
CALL FUNCTION 'HRCM_TIME_PERIOD_CALCULATE'
EXPORTING
begda = ta_msegtemp-budat
endda = sy-datum
IMPORTING
NOYRS =
nomns = w_mths
nodys = w_days
EXCEPTIONS
invalid_dates = 1
overflow = 2
OTHERS = 3
*->End of KL02- -
*->Begin of KL02+ -
*-->Get the days difference btw two dates
clear w_days.
w_days = sy-datum - ta_msegtemp-budat.
*--> Include today's date into calculation
w_days = w_days + 1.
*->End of KL02+ -
check base unit, do conversion
IF ta_material-meins <> ta_msegtemp-meins.
CALL FUNCTION 'MD_CONVERT_MATERIAL_UNIT'
EXPORTING
i_matnr = ta_material-matnr
i_in_me = ta_msegtemp-meins
i_out_me = ta_material-meins
i_menge = ta_msegtemp-menge
IMPORTING
e_menge = ta_msegtemp-menge
EXCEPTIONS
error_in_application = 1
error = 2
OTHERS = 3.
ENDIF.
*--> SC01 - Start of Insertion **
SELECT SINGLE peinh
verpr
INTO (lv_peinh,
lv_verpr)
FROM mbew
WHERE matnr = ta_material-matnr
AND bwkey = ta_material-werks.
IF sy-subrc = 0.
ta_material-verpr = lv_verpr.
ENDIF.
*--> SC01 - End of Insertion **
*-->check whether the mseg value is LE than the stock value
IF ta_msegtemp-menge LE w_mengb.
*-->Days < 10 days
IF w_days LE 1 AND w_days EQ 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
**-->Days 11 - 30 days
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 31-60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr."+SC01
ENDIF.
**-->Days 61-90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**-->Days > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = w_mengb - ta_msegtemp-menge.
ELSE.
IF NOT w_mengb LE 0 .
IF NOT lv_peinh EQ 0.
**->End of KL001+
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh )
*ta_material-verpr."+SC01
**->Begin of KL001+
ENDIF.
ELSEIF w_days GE 22.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh )
*ta_material-verpr.
ENDIF.
**->End of KL001+
ENDIF.
**--> SC02 - End of Insertioin **
ENDIF.
*->End of KL002-
*->Begin of KL002+
*--> < 10 days
IF w_days EQ 1 AND w_days LE 366.
i_mat2-meng0 = i_mat2-meng0 + ta_msegtemp-menge.
IF NOT lv_peinh EQ 0.
i_mat2-value0 = ( i_mat2-meng0 / lv_peinh ) *
ta_material-verpr."+SC01
ENDIF.
ELSEIF w_days >= 11 AND w_days =< 30.
i_mat2-meng1 = i_mat2-meng1 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value1 = ( i_mat2-meng1 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 31 - 60 days
ELSEIF w_days >= 31 AND w_days =< 60.
i_mat2-meng2 = i_mat2-meng2 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value2 = ( i_mat2-meng2 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> 61 - 90 days
ELSEIF w_days >= 61 AND w_days =< 90.
i_mat2-meng3 = i_mat2-meng3 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value3 = ( i_mat2-meng3 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
**--> > 90 days
ELSEIF w_days > 90.
i_mat2-meng4 = i_mat2-meng4 + w_mengb.
IF NOT lv_peinh EQ 0.
i_mat2-value4 = ( i_mat2-meng4 / lv_peinh ) *
*ta_material-verpr.
ENDIF.
ENDIF.
*->End of KL002+
w_mengb = 0.
ENDIF. " check stock value NE zero
ENDIF. "check Mat doc amount is LE than the stock value
ENDIF.
ENDLOOP. " msegtemp
*-->append i_mat2 values
i_mat2-werks = ta_material-werks.
i_mat2-lgort = ta_material-lgort.
i_mat2-matnr = ta_material-matnr.
i_mat2-maktx = ta_material-maktx.
i_mat2-meins = ta_material-meins.
APPEND i_mat2. CLEAR i_mat2.
ENDLOOP. " ta_material
*-->Append data for summary data
DATA: i_lgort LIKE i_mat2 OCCURS 2 WITH HEADER LINE.
i_lgort[] = i_mat2[].
SORT i_lgort BY werks lgort.
DELETE ADJACENT DUPLICATES FROM i_lgort COMPARING werks lgort.
DATA: v_cnt0(5), v_cnt1(5), v_cnt2(5), v_cnt3(5), v_cnt4(5),
v_value0 LIKE i_matsum-value0.
v_value1 LIKE i_matsum-value1,
v_value2 LIKE i_matsum-value2,
v_value3 LIKE i_matsum-value3,
v_value4 LIKE i_matsum-value4.
LOOP AT i_lgort.
CLEAR v_cnt0. CLEAR v_value0.
CLEAR v_cnt1. CLEAR v_value1.
CLEAR v_cnt2. CLEAR v_value2.
CLEAR v_cnt3. CLEAR v_value3.
CLEAR v_cnt4. CLEAR v_value4.
LOOP AT i_mat2 WHERE lgort = i_lgort-lgort AND
werks = i_lgort-werks.
IF NOT i_mat2-meng0 IS INITIAL.
v_cnt0 = v_cnt0 + 1.
v_value0 = v_value0 + i_mat2-value0.
ENDIF.
IF NOT i_mat2-meng1 IS INITIAL.
v_cnt1 = v_cnt1 + 1.
v_value1 = v_value1 + i_mat2-value1.
ENDIF.
IF NOT i_mat2-meng2 IS INITIAL.
v_cnt2 = v_cnt2 + 1.
v_value2 = v_value2 + i_mat2-value2.
ENDIF.
IF NOT i_mat2-meng3 IS INITIAL.
v_cnt3 = v_cnt3 + 1.
v_value3 = v_value3 + i_mat2-value3.
ENDIF.
IF NOT i_mat2-meng4 IS INITIAL.
v_cnt4 = v_cnt4 + 1.
v_value4 = v_value4 + i_mat2-value4.
ENDIF.
ENDLOOP.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt0 NE space.
i_matsum-cnt0 = v_cnt0.
i_matsum-value0 = v_value0.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt1 NE space.
i_matsum-cnt1 = v_cnt1.
i_matsum-value1 = v_value1.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt2 NE space.
i_matsum-cnt2 = v_cnt2.
i_matsum-value2 = v_value2.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt3 NE space.
i_matsum-cnt3 = v_cnt3.
i_matsum-value3 = v_value3.
APPEND i_matsum.
ENDIF.
CLEAR i_matsum.
i_matsum-lgort = i_mat2-lgort.
IF v_cnt4 NE space.
i_matsum-cnt4 = v_cnt4.
i_matsum-value4 = v_value4.
APPEND i_matsum.
ENDIF.
ENDLOOP.
ENDFORM. "f_data_preparation
*IMPORTANT , NEED TO CHECK LATER
FORM f_display_data .
IF pck_dtsm = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
*-->display summary
v_topofpage = 'S'.
NEW-PAGE.
PERFORM f_display_summary.
ELSEIF pck_detl = 'X'.
*-->Display detail
v_topofpage = 'D'.
PERFORM f_display_detail.
ELSEIF pck_summ = 'X'.
*-->display summary
v_topofpage = 'S'.
PERFORM f_display_summary.
ENDIF.
ENDFORM. " f_display_data
FORM f_display_detail .
v_topofpage = 'D'.
SORT i_mat2 BY werks lgort.
*DATA: v_count(5),
DATA: v_count,
v_va1 LIKE i_mat2-value0.
v_va2 LIKE i_mat2-value0,
v_va3 LIKE i_mat2-value0,
v_va4 LIKE i_mat2-value0,
v_va5 LIKE i_mat2-value0.
LOOP AT i_mat2.
WRITE:/2 i_mat2-lgort,
10 i_mat2-matnr,
22 i_mat2-maktx(38),
61 i_mat2-meins,
64 i_mat2-meng0,
82 i_mat2-value0.
100 i_mat2-meng1,
118 i_mat2-value1,
136 i_mat2-meng2,
154 i_mat2-value2,
169 i_mat2-meng3,
186 i_mat2-value3,
204 i_mat2-meng4,
222 i_mat2-value4.
*-->Set counter and add up all values by lgort
v_count = v_count + 1.
v_va1 = v_va1 + i_mat2-value0.
v_va2 = v_va2 + i_mat2-value1.
v_va3 = v_va3 + i_mat2-value2.
v_va4 = v_va4 + i_mat2-value3.
v_va5 = v_va5 + i_mat2-value4.
AT END OF lgort.
WRITE:/10 'Cnt:',
15 v_count,
55 'Subtotal',
82 v_va1.
118 v_va2,
154 v_va3,
186 v_va4,
222 v_va5.
CLEAR v_count. CLEAR v_va1.
CLEAR v_va2. CLEAR v_va3. CLEAR v_va4. clear v_va5.
ENDAT.
ENDLOOP.
ENDFORM. " f_display_detail
FORM f_display_summary .
v_topofpage = 'S'.
LOOP AT i_matsum.
IF NOT i_matsum-cnt0 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt0,
82 i_matsum-value0.
ENDIF.
IF NOT i_matsum-cnt1 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt1,
118 i_matsum-value1.
ENDIF.
IF NOT i_matsum-cnt2 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:',15 i_matsum-cnt2,
154 i_matsum-value2.
ENDIF.
IF NOT i_matsum-cnt3 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt3,
186 i_matsum-value3.
ENDIF.
IF NOT i_matsum-cnt4 IS INITIAL.
WRITE:/2 i_matsum-lgort,
10 'Cnt:', 15 i_matsum-cnt4,
222 i_matsum-value4.
ENDIF.
ENDLOOP.
ENDFORM. " f_display_summary -
In a PrC, how to delete data from the PSA that have been loaded in Prcs Chn
Hello,
In a process chain, how can I delete the data from the PSA that have been loaded within that process chain. I don't want to delete data that belongs to other business units that use the same datasource.
Thanks,
AndreI dont think so you can achieve that, PSA is actually datasource dependent.
One you load from a datasource to PSA.That is accesible by multiple DTPs if you have created so.
As you said "I don't want to delete data that belongs to other business units that use the same datasource."
If you delete the PSA, you may have to repull the data from source system again and if thats delta it wont work out.
As said by above ppl you can include the "Delete PSA" in process chain but choose some 15 days buffer.
Hope this helps. -
How to get data from the Tables (Can func.module help then how to write )
Hi,
Can anyone tell the use of functional module to extract the data from R/3.i am working on PM module and need to extract the status of work order and equipment which i can get from First i had to get objnr then i had to go to jsto in jsto i get stsma and estat. by using estat and stsma i can get status in table tj30t here estat is same as stat in jest table.
how to get all these in bw . any help.
I need status of work orders and equipments which exists in tj30t or we can get from tj30 tables in the fields txt30 and txt04
Any one pls help to get all these stuff from R/3 to BW
Regards
Srini-----Hi
You need to enhance (write a user exit) for your Data Source.
Here are some links on UE:
Enhancment Framework
====================
SAP Help Enhancment Framework
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Enhancements in sap bw
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
User Exit Enhancments
Enhancement
User exit
BADI
http://help.sap.com/saphelp_nw2004s/helpdata/en/c2/eab541c5b63031e10000000a155106/frameset.htm
Reg's
Edan -
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 -
Deleting data from a table where there are no indexes on the table
Hi
We have one interface program for one time process.When I was testing the process it was taking too much time to load the data around 1000 records.
it happens in 2 steps
1 puts into stage table
2 puts into base table
in the process/package I have delete statement that deletes data from stage table before each process.
Stage table did not have any indexes but the base table has(obvisiosly)
any idea?
please help me on this.
Thanks,
YHi,
Please post the application/database details along with the OS.
Is this interface program a seeded or custom one?
Please enable trace on this concurrent program as per (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) and generate the TKPROF to find out why it takes that long to load/delete the data.
Thanks,
Hussein -
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 delete data from single field in a database table?
Hi guys,
Plz suggest me How to delete data from single field in a database table?
thnks,
pavanhi
in addition to abv details..chk this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
regards,
madhu -
How to export some data from the tables of an owner with integrity?
Hi to all,
How to export some data from the tables of an owner with integrity?
I want to bring some data from all tables in a single owner of the production database for development environment.
My initial requirements are: seeking information on company code (emp), contract status (status) and / or effective date of contract settlement (dt_liq_efetiva) - a small amount of data to developers.
These three fields are present in the main system table (the table of contracts). Then I thought about ...
- create a temporary table from the query results table to contract;
- and then use this temporary table as a reference to fetch the data in other tables of the owner while maintaining integrity. But how? I have not found the answer, because: what to do when not there is the possibility of a join between the contract and any other table?
I am considering the possibility of consulting the names of tables, foreign keys and columns above, and create dynamic SQL. Conceptually, something like:
select r.constraint_name "FK name",
r.table_name "FK table",
r.column_name "FK column",
up.constraint_name "Referencing name",
up.table_name "Referencing table",
up.column_name "Referencing column"
from all_cons_columns up
join all_cons_columns r
using (owner, position), (select r.owner,
r.constraint_name fk,
r.table_name table_fk,
r.r_constraint_name r,
up.table_name table_r
from all_constraints up, all_constraints r
where r.r_owner = up.owner
and r.r_constraint_name = up.constraint_name
and up.constraint_type in ('P', 'U')
and r.constraint_type = 'R'
and r.owner = 'OWNERNAME') aux
where r.constraint_name = aux.fk
and r.table_name = aux.table_fk
and up.constraint_name = aux.r
and up.table_name = aux.table_r;
-- + Dynamic SQL
If anyone has any suggestions and / or reuse code to me thank you very much!
After resolving this standoff intend to mount the inserts in utl_file by a table and create another program to read and play in the development environment.
Thinking...
Let's Share!
My thanks in advance,
PhilipsThanks, Peter.
Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
Once again, thank you,
Philips
Reading Oracle Docs... -
Hi,
I would like to retrive the data from the table COEP ,based on KOKRS,BELNR fields.
I need the output for Cost centre, cost element, wbs element,net work ,activity.
These values are storing OBJNR ,OBJNAR_1,OBJNR_2,OBJNR_N3.
But here always these field are not giving the correct values.
for example : for one record COST CENTRE vlaue is storing in OBJNR_1 field,
for one record COST CENTRE vlaue is storing in OBJNR_2 field,
for one record COST CENTRE vlaue is storing in OBJNR_3 field.
Here SAP has used a generic approach for this.
How can I dispaly the values in this case ?
Thanks and Regards
Srinivas.NHi,
I am asking, how can we say OBJNR_1 value alwyas belongs to cost center ?
USPOB is not filling always. -
Goto: How to export some data from the tables of an owner with integrity?
Hi to all,
Help please: How to export some data from the tables of an owner with integrity?
My thanks in advance,
PhilipsThanks, Peter.
Well, I am working with release 9.2.0.8.0. But the planning is migrate to 10g this year. So my questions are:
With Data Pump can export data just from tables owned for me (SCHEMAS = MYOWNER) parameterizing the volume of data (SAMPLE) and filters to table (QUERY), right? But parameterizing a contract table QUERY = "WHERE status NOT IN (2,6) ORDER BY contract ":
1º- the Data Pump automatically searches for related data in other tables in the owner? ex. parcel table has X records related (fk) with Y contracts not in (2,6): X * SAMPLE records will be randomly exported?
2º- for the tables without relation (fk) and which are within the owner (MYOWNER) the data is exported only based on the parameter SAMPLE?
Once again, thank you,
Philips
Reading Oracle Docs... -
To Delete the Entire Data from the Tables
Requirement ::
To use select Options for table name and based on the table names we want to delete the data from the tables...
conditions :
we have to first check if the tables having mandat and the configuration tables if this tables then dnt delete the data from this tables. if the table other than mandat n config tables the data will be deleted from other tables.
Input On Selection Screen :::
Name of the tables : : we want to select multiple table names using select options.
Type of Update : : Synchronous / Asynchronous
Test Run : : /* if test run is selected the tables will be validated based on the condition and the data is not
deleted from the SAP tables or the status is not updated . untill u run Actual run.
Actual Run : : /* Here finally the data will be deleted from the SAP tables . the changes finally will be reflected in
Actual run...to the SAP Tables
Output Required :::
srno | Table name | No.of Records deleted | Date | Time
Please provide me the sample code for the above Requirement ...
Thanks in Advance....
Moderator message : Spec dumping is not allowed. Thread locked.
Edited by: Vinod Kumar on Sep 30, 2011 4:54 PMVenkat,
I belive in LBWQ you can only see one entry for an application. You'll see only one entry MC*18 for all your datasources.
Do one thing. Do not delete from there. Run your "Job Control" job which moves all the data from LBWQ queue to RSA7 queue, making your LBWQ queue empty. Now go to RSA7 and delete your data for the specified datasource...
Been a while since I looked at those screens, but I believe I am right.
Good Luck
Gova -
How to delete/drop all the tables from SQL Server Database without using Enterprise Manager?
I tried using DROP Tables, Truncate Database, Delete and many more but it is not working. I want to delete all tables using Query Analyzer, i.e. through SQL Query.
Please help me out in this concern.
Nishith ShahInformative thread indeed. Wish I saw it early enough. Managed to come up with the code below before I saw this thread.
declare @TTName Table
(TableSchemaTableName
varchar
(500),
[status] int
default 0);
with AvailableTables
(TableSchemaTableName)
as
(select
QUOTENAME(TABLE_SCHEMA)
+
+
QUOTENAME(TABLE_NAME)
from
INFORMATION_SCHEMA.TABLES)
insert into @TTName
(TableSchemaTableName)
select *
from AvailableTables
declare @TableSchemaTableName varchar
(500)
declare @sqlstatement nvarchar
(1000)
while 1=1
begin
set @sqlstatement
=
'DROP TABLE '
+ @TableSchemaTableName
exec
sp_executeSQL
@sqlstatement
print
'Dropped Table : '
+ @TableSchemaTableName
update @TTName
set [status]
= 1
where TableSchemaTableName
= @TableSchemaTableName
if
(select
count([Status])
from @TTName
where [Status]
= 0)
= 0
break
end -
How i cen get back deleted data from the bin?
how i cen get back deleted data from the bin?
Not once you have put the data in the trash and pressed the button to delete it.
There may be some hope if you can understand what I am telling you in my first post to you.
Time machine is too complex to explain in this kind of post but I am giving you five links below which should explain quite a lot. There are no formal instruction manuals for Time Machine.
Time Machine Tutorial
Time Machine 101
How to back up and restore your files This in particular
Time Machine Features
Apple - Support - Mac OSX v10.5 Leopard Time Machine -
Deleting data from EDPAR table
hi everyone,
I need to delete data forom table EDPAR. two conditions are there. Once through first radio button in selection screen based on values of kunnr selected from select options. In the second case. if i select the second radio button, all data from EDPAR table gets deleted.
Can any one offer me proper CODE to do it....Pls help.SAP delivers a standard transaction to edit the contents of this table, VOE4, this is safer then using a custom code to delete rows from the table.
Maybe you are looking for
-
Mini Displayport - DVI - HDMI 5V?
I kind of have an odd setup desire for an external display. I want to send video and audio to my entertainment unit from my MBP across the room. I already have audio sorted out (mini optical -> 30ft optical cable), but the video is a bit more difficu
-
Export of CDCLS table running for more than 72 hours
Hello , We are doing a Combined Upgrade and Unicode Conversion of CRM 4.0 system to CRM 7.0(Running Oracle 10.2) . We have run parallel Export/import . The Export and Import of all tables have finished except CDCLS , whcih is being runnign for almost
-
Javax.servlet.servletException and root cause error(how to solve?)
Hi! ALL, I have created a enterprise application using netbeans IDE , j2ee and jboss server.Now I want to run that enterprise application in remote server as jboss.I have uploaded that application in remote server.I am running in this way http://IP A
-
hi, i have a question. if u have a async process then u send several request and u may or may not receive response immediately. Then, how can soa infrastructure relate - whenever the response does come "Which response is meant for which request" ? Ho
-
Performance Slow while content management by many users
We are using portal 3.0.9. We get the error message "Error : Timed out for content = some_number". This message appears when multiple users are managing the contents. Has anybody faced a similar problem and have a solution.