Request to check my coding..... Urgent
MY program is with ALV_Grid
1. Selection Screen
Customer Number: KUNNR
Billing Date: FKDAT
Now Using the above Selection screen inputs, I want to generate the following fields in the output.
2. Output Screen
Invoice No: VBELN
Invoice Date: FKDAT
Customer Number: KUNNR
Customer Name: NAME1
Material Description: MAKTX
Payment Terms: ZTERM
Net Value: NETWR
Ship-to City: ORT01
Sold-to party: KUNAG
Ship-to party: KUNNR
Tables Used:
Delivery: LIKP, LIPS
Invoice:VBRK, VBRP
Customer: KNA1
Material: MARA
Material Description: MAKT
Now the Problem what I got is....How to link between these tables...ie., what common fields can be used between these tables so that I can use FOR ALL ENTRIES and retrieve the above output fields.
3. Create Dictionary Structure for Output Data
4. Create Dynpro (Screen 9000)
5. Create ALV Grid Object and Call Method "set_table_for_first_display" of alv obj in PBO Module of Screen
this is my coding so can
*& Report ZTESTALVOOPS
REPORT ZTESTALVOOPS.
tables: KNA1, KNVV,VBAK,VBFA, VBRK, mara.
data gr_alv_grid type ref to cl_gui_alv_grid.
data gc_custom_control_name type scrfname value 'CC_ALV'.
data gr_custom_container type ref to cl_gui_custom_container.
data gt_fieldcat type lvc_t_fcat.
data gs_layout type lvc_s_layo.
types: lvc.
selection screen *******************
select-options: so_kunnr for kna1-kunnr,
so_fkdat for vbrk-fkdat.
data begin of gt_list occurs 0.
include structure ZDIC_STRUC. " Dictionary Structure for Output Data
data end of gt_list.
start of selection **********************
end of selection *************************
call screen 9000.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'SET_STATUS'.
SET TITLEBAR 'FIRST' of program prg with cnt.
perform disp_alv. " DISPLAY ALV GRID
ENDMODULE. " STATUS_0100 OUTPUT
*& Form disp_alv
text
--> p1 text
<-- p2 text
FORM disp_alv .
if gr_alv_grid is INITIAL.
CREATE OBJECT GR_CUSTOM_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = gc_custom_control_name
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GR_ALV_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = gr_custom_container
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform prepare_fieldcat changing gt_fieldcat.
perform prepare_layout changing gs_layout.
CALL METHOD GR_ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = gt_exclude
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = gt_list[]
IT_FIELDCATALOG = gt_fieldcat
IT_SORT = gt_sort
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
else.
CALL METHOD GR_ALV_GRID->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = gt_list[]
I_SOFT_REFRESH = gt_list[]
EXCEPTIONS
FINISHED = 1
others = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
ENDFORM. " disp_alv
*& Form prepare_fieldcat
text
<--P_GT_FIELDCAT text
FORM prepare_fieldcat CHANGING P_GT_FIELDCAT type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'dic_struc'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
CT_FIELDCAT = p_gt_fieldcat[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*loop at p_gt_fieldcat into ls_fcat.
*case ls_fcat-fieldname.
*when 'CARRID'.
*ls_fcat-hotspot = 'X'.
*ls_fcat-outputlen = '10'.
*ls_fcat-coltext = 'Carrier ID'.
*modify p_gt_fieldcat from ls_fcat.
*when 'PAYMENTSUM'.
*ls_fcat-no_out = 'X'.
*ls_fcat-outputlen = '10'.
*modify p_gt_fieldcat from ls_fcat.
*endcase.
*endloop.
ENDFORM. " prepare_fieldcat
*& Form prepare_layout
text
<--P_GS_LAYOUT text
FORM prepare_layout CHANGING P_GS_LAYOUT type lvc_s_layo.
p_gs_layout-zebra = 'X'.
p_gs_layout-grid_title = 'FLIGHTS'.
p_gs_layout-smalltitle = 'X'.
ENDFORM. " prepare_layout
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm.
when 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
when 'CANCEL'.
LEAVE PROGRAM.
WHEN 'OTHERS'.
LEAVE PROGRAM.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
Can anyone tell the code for selction statement for this program .....
Now check the coding for the MY program is with ALV_Grid
1. Selection Screen
Customer Number: KUNNR
Billing Date: FKDAT
Now Using the above Selection screen inputs, I want to generate the following fields in the output.
2. Output Screen
Invoice No: VBELN
Invoice Date: FKDAT
Customer Number: KUNNR
Customer Name: NAME1
Material Description: MAKTX
Payment Terms: ZTERM
PR00_NETVALUE: KBETR
VPRS_COST: KWERT
VPRS_PROFITMARG: KBETR
Ship-to City: ORT01
Sold-to party: KUNAG
Ship-to party: KUNNR
Tables Used:
Delivery: LIKP, LIPS
Invoice:VBRK, VBRP
Customer: KNA1
Material: MARA
Material Description: MAKT
salesDocument VBAK - Head, VBAP Positions
3. Create Dictionary Structure for Output Data
4. Create Dynpro (Screen 9000)
5. Create ALV Grid Object and Call Method "set_table_for_first_display" of alv obj in PBO Module of Screen
Coding
REPORT ZTESTALVOOPS.
tables: KNA1, KNVV,VBAK,VBFA, VBRK, mara.
data gr_alv_grid type ref to cl_gui_alv_grid.
data gc_custom_control_name type scrfname value 'CC_ALV'.
data gr_custom_container type ref to cl_gui_custom_container.
data gt_fieldcat type lvc_t_fcat.
data gs_layout type lvc_s_layo.
types: lvc.
selection screen *******************
select-options: itab_kunnr for kna1-kunnr,
itab_fkdat for vbrk-fkdat.
data begin of gt_list occurs 0.
include structure Zrata_STRUC. " Dictionary Structure for Output Data
data end of gt_list.
start of selection **********************
select avbeln afkdat akunag a vbeln_va avndat_veda a vbeln_va anetwr bposnr bkbetr bkwert bkbetr bmaktx b~vgbel
from vbrk as a join vbrp as b on avbeln = bvbeln
into table itab where a~kunag in s_kunnr and
a~fkdat in s_fkdat.
loop at itab.
select single maktx from makt into itab-maktx
where matnr = itab-matnr and spras = sy-langu.
select single kunag into itab-kunag from likp
where vbeln = itab-vgbel.
select single name1 from kna1 into itab-name1
where kunnr = itab-kunnr.
select single ort01 from kna1 into itab-ort01
where kunnr = itab-kunag.
modify itab index sy-tabix transporting maktx name1 kunag ort01.
endloop.
end of selection *************************
call screen 9000.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'SET_STATUS'.
SET TITLEBAR 'FIRST' of program prg with cnt.
perform disp_alv. " DISPLAY ALV GRID
ENDMODULE. " STATUS_0100 OUTPUT
*& Form disp_alv
text
--> p1 text
<-- p2 text
FORM disp_alv .
if gr_alv_grid is INITIAL.
CREATE OBJECT GR_CUSTOM_CONTAINER
EXPORTING
PARENT =
CONTAINER_NAME = gc_custom_control_name
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT GR_ALV_GRID
EXPORTING
I_SHELLSTYLE = 0
I_LIFETIME =
I_PARENT = gr_custom_container
I_APPL_EVENTS = space
I_PARENTDBG =
I_APPLOGPARENT =
I_GRAPHICSPARENT =
I_NAME =
EXCEPTIONS
ERROR_CNTL_CREATE = 1
ERROR_CNTL_INIT = 2
ERROR_CNTL_LINK = 3
ERROR_DP_CREATE = 4
others = 5
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
perform prepare_fieldcat changing gt_fieldcat.
perform prepare_layout changing gs_layout.
CALL METHOD GR_ALV_GRID->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME =
IS_VARIANT =
I_SAVE =
I_DEFAULT = 'X'
IS_LAYOUT = gs_layout
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING = gt_exclude
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
CHANGING
IT_OUTTAB = gt_list[]
IT_FIELDCATALOG = gt_fieldcat
IT_SORT = gt_sort
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
else.
CALL METHOD GR_ALV_GRID->REFRESH_TABLE_DISPLAY
EXPORTING
IS_STABLE = gt_list[]
I_SOFT_REFRESH = gt_list[]
EXCEPTIONS
FINISHED = 1
others = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
ENDFORM. " disp_alv
*& Form prepare_fieldcat
text
<--P_GT_FIELDCAT text
FORM prepare_fieldcat CHANGING P_GT_FIELDCAT type lvc_t_fcat.
data ls_fcat type lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'dic_struc'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
CT_FIELDCAT = p_gt_fieldcat[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*loop at p_gt_fieldcat into ls_fcat.
*case ls_fcat-fieldname.
*when 'CARRID'.
*ls_fcat-hotspot = 'X'.
*ls_fcat-outputlen = '10'.
*ls_fcat-coltext = 'Carrier ID'.
*modify p_gt_fieldcat from ls_fcat.
*when 'PAYMENTSUM'.
*ls_fcat-no_out = 'X'.
*ls_fcat-outputlen = '10'.
*modify p_gt_fieldcat from ls_fcat.
*endcase.
*endloop.
ENDFORM. " prepare_fieldcat
*& Form prepare_layout
text
<--P_GS_LAYOUT text
FORM prepare_layout CHANGING P_GS_LAYOUT type lvc_s_layo.
p_gs_layout-zebra = 'X'.
p_gs_layout-grid_title = 'FLIGHTS'.
p_gs_layout-smalltitle = 'X'.
ENDFORM. " prepare layout
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
Case sy-ucomm.
When 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
When 'CANCEL'.
LEAVE PROGRAM.
WHEN 'OTHERS'.
LEAVE PROGRAM.
Endcase.
ENDMODULE. USER_COMMAND_0100 INPUT
Similar Messages
-
Hi All,
I am configuring RSS Viewer webpart to SP 2013.
But i am getting an error "An unexpected error occurred processing your request. Check the logs for details and correct the problem."
I looked for solution of this error. i got to know, we need to set proxy server in web.config file.
So, in order to resolve this i put the following set of code in web.config and save the file
<system.net>
<defaultProxy>
<proxy usesystemdefault="True" proxyaddress="http://myproxyserver" bypassonlocal="True" />
</defaultProxy>
</system.net>
But, still i am getting the error.
What could be the problem now.
Any help is much appreciated.
Thanks,
RakeshHi Rakesh,
According to your description, my understanding is that you got an error when you used RSS viewer web part in SharePoint 2013.
The RSS viewer web part uses authentication delegation and is using the current user's credentials to access the proxy. However, the RSS viewer only supports anonymous and Kerberos authentication. So if you are using NTLM authentication, the RSS viewer will
not be able to authenticate the user through the proxy. More information, please refer to the link:
http://kalsing.blogspot.com/2007/11/troubleshooting-rss-viewer-web-part.html
Also see:
http://blogs.technet.com/b/sharepointdse/archive/2007/04/13/fun-with-rss.aspx
I hope this helps.
Thanks,
Wendy
Wendy Li
TechNet Community Support -
Material Consumption Report all expert requested to check my code
Hi all guru
Plz
I am creating Material Consumption Report
so all expert are requested to check my code
bcz its giving me wrong value change if nessary
*& Report Z_MATERIAL_CONSUPTION
*&IEDK901096
REPORT Z_MATERIAL_CONSUPTION
LINE-COUNT 65(2)
LINE-SIZE 345
MESSAGE-ID zate_msg
NO STANDARD PAGE HEADING.
*T A B L E S
TABLES:MARC,
mara,
makt,
mard,
mbew,
mseg,
mkpf.
T Y P E S
Types for MARC
TYPES: begin of ty_marc,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
end of ty_marc.
********Types for T001W*****
TYPES:BEGIN OF ty_t001w,
werks LIKE t001w-werks,
name1 LIKE t001w-name1,
END OF ty_t001w.
********Types for MARA*****
TYPES:BEGIN OF TY_MARA,
matnr LIKE mara-matnr,
mtart LIKE mara-mtart,
matkl LIKE mara-mtart,
END OF ty_mara.
********Types for MAKT*****
TYPES:BEGIN OF ty_makt,
matnr LIKE makt-matnr,
spras LIKE makt-spras,
maktx LIKE makt-maktx,
END OF ty_makt.
********Types for MKPF*****
TYPES:BEGIN OF ty_mkpf,
mblnr LIKE mkpf-mblnr,
budat LIKE mkpf-budat,
END OF ty_mkpf.
********Types for MSEG*****
TYPES:BEGIN OF ty_mseg,
mblnr LIKE mseg-mblnr,
mjahr LIKE mseg-mjahr,
matnr LIKE mseg-matnr,
werks LIKE mseg-werks,
menge LIKE mseg-menge,
END OF ty_mseg.
Types for main **************
TYPES: begin of ty_main,
matkl LIKE mara-mtart,
mtart LIKE mara-mtart,
matnr LIKE mara-matnr,
werks LIKE marc-werks,
name1 LIKE t001w-name1,
maktx LIKE makt-maktx,
budat LIKE mkpf-budat,
mblnr LIKE mseg-mblnr,
mjahr LIKE mseg-mjahr,
menge LIKE mseg-menge,
menge1 LIKE mseg-menge,
bwart LIKE mseg-bwart,
ret_qty LIKE mseg-menge,
ret_*** LIKE mseg-menge,
unit_qty LIKE mseg-menge,
unit_*** LIKE mseg-menge,
wip_qty LIKE mseg-menge,
wip_*** LIKE mseg-menge,
sub_qty LIKE mseg-menge,
sub_*** LIKE mseg-menge,
oth_qty LIKE mseg-menge,
oth_*** LIKE mseg-menge,
end of ty_main.
Types for main2 **************
TYPES: begin of ty_main2,
mblnr LIKE mseg-mblnr,
werks LIKE marc-werks,
mjahr LIKE mseg-mjahr,
menge LIKE mseg-menge,
bwart LIKE mseg-bwart,
matnr LIKE mara-matnr,
mtart LIKE mara-mtart,
matkl LIKE mara-mtart,
end of ty_main2.
*I N T E R N A L T A B L E S
DATA:it_mara TYPE ty_mara OCCURS 0 WITH HEADER LINE,
it_marc TYPE ty_marc OCCURS 0 WITH HEADER LINE,
it_t001w TYPE ty_t001w OCCURS 0 WITH HEADER LINE,
it_makt TYPE ty_makt OCCURS 0 WITH HEADER LINE,
it_main TYPE ty_main OCCURS 0 WITH HEADER LINE,
it_main2 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_mkpf TYPE ty_mkpf OCCURS 0 WITH HEADER LINE,
it_mseg TYPE ty_mseg OCCURS 0 WITH HEADER LINE,
it_mseg TYPE ty_main OCCURS 0 WITH HEADER LINE,
it_dept TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_unit TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_WIP TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_subcon TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_others TYPE ty_main2 OCCURS 0 WITH HEADER LINE.
**********I N T E R N A L T A B L E S for Cumulative Calculation**********
DATA:it_mseg1 TYPE ty_main OCCURS 0 WITH HEADER LINE,
it_dept1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_unit1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_WIP1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_subcon1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE,
it_others1 TYPE ty_main2 OCCURS 0 WITH HEADER LINE.
W O R K A R E A
DATA:wa_mara TYPE ty_mara,
wa_marc TYPE ty_marc,
wa_t001w TYPE ty_t001w,
wa_makt TYPE ty_makt,
wa_main TYPE ty_main,
wa_main2 TYPE ty_main2,
wa_mkpf TYPE ty_mkpf,
wa_mseg TYPE ty_mseg,
wa_mseg1 TYPE ty_mseg,
wa_dept TYPE ty_main2,
wa_ret_qty TYPE ty_main2,
wa_ret_*** TYPE ty_main2.
V A R I A B L E S D E C L A R A T I O N
DATA: MYDATE TYPE SY-DATUM,
per_qty TYPE p,
***_qty TYPE p ,
final_total TYPE p DECIMALS 2.
S E L E C T I O N S C R E E N
SELECTION-SCREEN:BEGIN OF BLOCK B1 WITH FRAME TITLE text-001.
PARAMETERS:Plant LIKE marc-werks DEFAULT '1023'.
select-options:Mat_Grp FOR mara-matkl,
Mat_Type FOR mara-mtart,
MATERIAL FOR MARC-MATNR,
Period FOR mydate.
PARAMETERS:Year LIKE mseg-mjahr DEFAULT '2007'.
SELECTION-SCREEN:END OF BLOCK B1.
I N I T I A L I Z A T I O N
INITIALIZATION.
MATERIAL-LOW = '100'.
MATERIAL-HIGH = '200'.
APPEND MATERIAL.
*MAT_TYPE-LOW = 'ABF'.
*MAT_TYPE-HIGH = 'FERT'.
*APPEND MAT_TYPE.
*MAT_GRP-LOW = '100'.
*MAT_GRP-HIGH = '200'.
*APPEND MAT_GRP.
*PERIOD-LOW = '20071001'.
*PERIOD-HIGH = '20071031'.
*APPEND PERIOD.
S T A R T O F S E L E C T I O N
start-of-selection.
PERFORM it_mara_data.
PERFORM it_marc_data.
PERFORM it_t001w_data.
PERFORM it_makt_data.
PERFORM it_mseg_data.
PERFORM it_mseg1_data. "CUMULATIVE CALCULATION
PERFORM it_mkpf_data.
PERFORM it_dept_data.
PERFORM it_dept1_data. "CUMULATIVE CALCULATION
PERFORM it_unit_data.
PERFORM it_unit_data1. "CUMULATIVE CALCULATION
PERFORM it_wip_data.
PERFORM it_wip_data1. "CUMULATIVE CALCULATION
PERFORM it_sub_contract.
PERFORM it_sub_contract1. "CUMULATIVE CALCULATION
PERFORM it_main_data.
T O P O F P A G E
TOP-OF-PAGE.
WRITE: /1 'INOX AIR PRODUCTS LTD',plant,it_t001w-name1,
/1 'TOTAL CONSUMPTION FOR THE PERIODE:',Period-low,'To',period-high.
skip 2.
FORMAT COLOR 1.
ULINE.
WRITE: /1'|','CODE ' ,
15 'MATERIAL' ,
30 'DESCRIPTION',
90'CONSUMPTION' ,
135'RETURN FROM DEPT.' ,
170'INTER UNIT' ,
210'W.I.P' ,
240'SUB-CONTRACTOR' ,
275'OTHERS' ,
310'TOTAL',345'|' ,
/1'|',15 'TYPE',
85'FOR PERIOD' ,
100 ' CUMULATIVE' ,
130'FOR PERIOD' ,
145 'CUMULATIVE' ,
165'FOR PERIOD' ,
180 'CUMULATIVE' ,
200'FOR PERIOD' ,
215'CUMULATIVE' ,
235'FOR PERIOD' ,
250'CUMULATIVE' ,
265'FOR PERIOD' ,
280 'CUMULATIVE' ,
300'FOR PERIOD' ,
315' CUMULATIVE' ,
345'|' .
ULINE.
E N D O F S E L E C T I O N
end-OF-SELECTION.
PERFORM display_data.
FORM it_mara_data.
SELECT matnr
mtart
matkl
FROM mara INTO CORRESPONDING FIELDS OF TABLE it_mara
WHERE matnr IN material AND
mtart IN mat_type AND
matkl IN mat_grp.
ENDFORM. " it_mara_data
FORM it_marc_data .
select matnr
werks
from marc
into CORRESPONDING FIELDS OF TABLE it_marc
FOR ALL ENTRIES IN it_mara
WHERE MATNR eq it_mara-matnr AND
werks eq plant.
ENDFORM. " it_marc_data
FORM it_makt_data .
SELECT
matnr
maktx
FROM makt INTO
CORRESPONDING FIELDS OF TABLE it_makt
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr.
ENDFORM. " it_makt_data
FORM it_main_data .
*BREAK-POINT.
loop at it_mara.
wa_main-matnr = it_mara-matnr.
wa_main-mtart = it_mara-mtart.
wa_main-matkl = it_mara-matkl.
READ TABLE it_marc WITH KEY matnr = it_mara-matnr.
wa_main-werks = it_marc-werks.
READ TABLE it_t001w WITH KEY werks = it_marc-werks.
wa_main-name1 = it_t001w-name1.
READ TABLE it_makt WITH KEY matnr = it_mara-matnr.
wa_main-maktx = it_makt-maktx.
READ TABLE it_mseg1 INDEX sy-tabix.
wa_main-mjahr = it_mseg1-mjahr.
wa_main-menge1 = it_mseg1-menge.
READ TABLE it_mseg WITH KEY matnr = it_mara-matnr.
READ TABLE it_mseg INDEX sy-tabix.
wa_main-mblnr = it_mseg-mblnr.
wa_main-menge = it_mseg-menge.
READ TABLE it_dept WITH KEY mblnr = it_mseg-mblnr.
wa_main-ret_qty = it_dept-menge.
READ TABLE it_dept1 WITH KEY werks = it_marc-werks.
READ TABLE it_dept1 INDEX sy-tabix.
wa_main-ret_*** = it_dept1-menge.
READ TABLE it_mkpf WITH KEY mblnr = it_mseg-mblnr.
wa_main-budat = it_mkpf-budat.
READ TABLE it_unit1 WITH KEY werks = it_marc-werks.
READ TABLE it_unit1 INDEX sy-tabix. "BINARY SEARCH.
wa_main-unit_*** = it_unit1-menge.
READ TABLE it_unit WITH KEY mblnr = it_mseg-mblnr.
wa_main-unit_qty = it_unit-menge.
READ TABLE it_wip WITH KEY mblnr = it_mseg-mblnr.
wa_main-wip_qty = it_wip-menge.
READ TABLE it_wip1 WITH KEY werks = it_marc-werks.
READ TABLE it_wip1 INDEX sy-tabix.
wa_main-wip_qty = it_wip1-menge.
READ TABLE it_subcon WITH KEY mblnr = it_mseg-mblnr.
wa_main-sub_qty = it_subcon-menge.
READ TABLE it_subcon1 WITH KEY werks = it_marc-werks.
READ TABLE it_subcon1 INDEX sy-tabix.
wa_main-sub_*** = it_subcon1-menge.
READ TABLE it_others WITH KEY mblnr = it_mseg-mblnr.
wa_main-oth_qty = it_others-menge.
READ TABLE it_others1 WITH KEY werks = it_marc-werks.
READ TABLE it_others1 INDEX sy-tabix.
wa_main-oth_*** = it_others1-menge.
APPEND wa_main to it_main.
CLEAR : wa_main,
it_mseg1,
it_main.
ENDLOOP.
LOOP at it_mseg1.
READ TABLE it_mseg INDEX sy-index.
MOVE-CORRESPONDING it_mseg1 to it_main.
append LINES OF it_mseg1 TO it_main.
IF sy-subrc <> 0.
exit.
ENDIF.
ENDLOOP.
ENDFORM. " it_main_data
FORM display_data .
SORT it_main by matkl mtart maktx.
LOOP AT it_main ."WHERE menge eq it_mseg1-menge.
at NEW matkl.
FORMAT COLOR 2 INTENSIFIED ON.
WRITE:/5 it_main-matkl." COLOR 2.
ENDAT.
at NEW mtart.
FORMAT COLOR 3 INTENSIFIED ON.
WRITE:/15 it_main-mtart." COLOR 3.
ENDAT.
at NEW maktx.
FORMAT COLOR 4 INTENSIFIED OFF.
WRITE:/ it_main-maktx UNDER 'DESCRIPTION'.
ENDAT.
FORMAT COLOR 2 INTENSIFIED ON.
WRITE:/75 it_main-menge, "it_main-maktx UNDER 'DESCRIPTION',
95 it_main-menge1,
125 it_main-ret_qty,
140 it_main-ret_***,
160 it_main-unit_qty,
175 it_main-unit_***,
195 it_main-wip_qty,
210 it_main-wip_***,
225 it_main-sub_qty,
240 it_main-sub_***,
255 it_main-oth_qty,
270 it_main-oth_***.
FORMAT COLOR 2 INTENSIFIED OFF.
at END OF mtart.
sum.
uline.
WRITE:/30 'MAT. TYPE WISE SUB TOTAL' COLOR COL_GROUP,
60 IT_MAIN-MTART COLOR 2,
75 '*',it_main-menge,'*' COLOR 4,
95 it_main-menge1,
125 it_main-ret_qty,
140 it_main-ret_***,
160 it_main-unit_qty,
175 it_main-unit_***,
195 it_main-wip_qty,
210 it_main-wip_***,
225 it_main-sub_qty,
240 it_main-sub_***,
260 it_main-oth_qty,
270 it_main-oth_***.
uline.
ENDAT.
at END OF matkl.
sum.
uline.
WRITE:/30 'GROUPWISE SUB TOTAL ' COLOR 5,
60 IT_MAIN-MATKL COLOR 2,
75 '*',it_main-menge,'*' COLOR 4,
95 it_main-menge1,
125 it_main-ret_qty,
140 it_main-ret_***,
160 it_main-unit_qty,
175 it_main-unit_***,
195 it_main-wip_qty,
210 it_main-wip_***,
225 it_main-sub_qty,
240 it_main-sub_***,
260 it_main-oth_qty,
270 it_main-oth_***.
uline.
ENDAT.
at LAST.
sum.
uline.
WRITE:/30 'GROSS TOTAL' COLOR 6,
60 IT_MAIN-MATKL COLOR 2,
75 '*',it_main-menge,'*' COLOR 4,
95 it_main-menge1,
125 it_main-ret_qty,
140 it_main-ret_***,
160 it_main-unit_qty,
175 it_main-unit_***,
195 it_main-wip_qty,
210 it_main-wip_***,
225 it_main-sub_qty,
240 it_main-sub_***,
260 it_main-oth_qty,
270 it_main-oth_***.
uline.
ENDAT.
per_qty = it_main-menge.
***_qty = it_main-menge1.
final_total = per_qty + ***_qty.
at last.
WRITE:/95 sy-uline(30).
write:/65 'Final Cumulative Qty >>>>>>>>>',final_total color 6.
WRITE:/95 sy-uline(30).
ENDAT.
FORMAT INTENSIFIED off.
ENDLOOP.
ENDFORM. " display_data
" it_mkpf_data
FORM it_mseg_data .
SELECT
mblnr
matnr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_mseg
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
bwart eq 261." AND bwart eq 262.
CLEAR it_mseg.
ENDFORM. " it_mseg_data
FORM it_mkpf_data .
SELECT
mblnr
budat
FROM mkpf INTO CORRESPONDING FIELDS OF TABLE it_mkpf
FOR ALL ENTRIES IN it_mseg
WHERE mblnr eq it_mseg-mblnr." AND
budat BETWEEN Period-low AND period-high.
ENDFORM.
FORM it_t001w_data .
SELECT werks name1 FROM t001w INTO CORRESPONDING FIELDS OF TABLE it_t001w
FOR ALL ENTRIES IN it_marc
WHERE werks eq it_marc-werks.
ENDFORM. " it_t001w_data
FORM it_mseg1_data .
SELECT
mblnr
mjahr
ZEILE
matnr
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_mseg1
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
mjahr eq Year AND
bwart eq 261." AND bwart eq 262.
CLEAR it_mseg1.
ENDFORM. " it_mseg1_data
FORM it_dept_data .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_dept
FOR ALL ENTRIES IN it_mseg
WHERE mblnr eq it_mseg-mblnr AND
werks eq it_mseg-WERKS AND
bwart ge 291 AND bwart le 292.
ENDFORM.
" it_dept_data
FORM it_dept1_data .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_dept1
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
mjahr eq YEAR AND
bwart ge 291 and bwart le 292.
ENDFORM. " it_dept1_data
FORM it_unit_data .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_unit
FOR ALL ENTRIES IN it_mseg
WHERE mblnr eq it_mseg-mblnr AND
werks eq it_mseg-WERKS AND
bwart ge 301 AND bwart le 302.
ENDFORM. " it_unit_data
FORM it_unit_data1 .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_unit1
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
mjahr eq YEAR AND
bwart ge 301 AND bwart le 302.
ENDFORM. " it_unit_data1
FORM it_wip_data .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_wip
FOR ALL ENTRIES IN it_mseg
WHERE mblnr eq it_mseg-mblnr AND
werks eq it_mseg-WERKS AND
bwart ge 301 AND bwart le 302.
ENDFORM. " it_wip_data
FORM it_wip_data1 .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_wip1
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
mjahr eq YEAR AND
bwart ge 301 AND bwart le 302.
ENDFORM. " it_wip_data1
FORM it_sub_contract .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_subcon
FOR ALL ENTRIES IN it_mseg
WHERE mblnr eq it_mseg-mblnr AND
werks eq it_mseg-WERKS AND
bwart eq 541." AND bwart eq 542.
ENDFORM. " it_sub_contract
FORM it_sub_contract1 .
SELECT
mblnr
mjahr
ZEILE
werks
menge
bwart
FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_subcon1
FOR ALL ENTRIES IN it_mara
WHERE matnr eq it_mara-matnr AND
werks eq plant AND
mjahr eq YEAR AND
bwart eq 541." AND bwart eq 542.
ENDFORM. " it_sub_contract1Hi,
When ever you are using a read statement check sy-subrc is initial or not then only you move the data
and clear the work area after use.
The mistake you have done is not clearing the work areas after use and sy-subrc check after read.
If you fail to do so the data will be clubbed and wrong data will be shown.
Regards,
Siva
Pls reward points if usefull . -
Conc Request to check the functionality
Hello ,
Is there any conc request which checks out the functionality of the whole application(All the implemented modules) post patching?
I believe i heard about this conc request in a webinar by oracle corp.
Regards,
SRKAfter applying family packs for any module , is there any conc request which will check the functionality of the application?No.
for e.g after applying the FIN.G family pack, we do have some test cases which will ensure the functionality of the application.we do test each and every test case manually.is there any conc request available in 11.5.10.2 to check the application's functionality automatically?This testing has to be done by the Functional Analysts.
You could also run the diagnostics scripts -- E-Business Suite Diagnostics 11i Test Catalog [ID 179661.1].
Thanks,
Hussein -
How to control automatic deletion of spool requests while check printing
hi friends
When i do cheque payment run (F-58), my spool getting deleted after printing. In my User setting SU01,
Delete after output is not selected, still it is getting deleted from spool. We have informed users to uncheck this option once the spool request is created at the end of this run. But our users feel there should be some way to disable/uncheck or save this option automatically rather than changing each spool request settings everytime the posting is run.
Please could you suggest me how to disable/uncheck this option 'Delete after printing if no errors' permanently. I have done the necessary settings in user master record but still it's the same.
please advice.
Regards,Hi Nathan,
Solution is only to maintain in SU01 , its picking from there only.
May be your user needs to log-off once status is changed in SU01, ask him to check what it is showing for him in SU3.
So if you deactivate option in SU01/SU3 , it should work as same is working in our environment.
You can test yuorself using below steps
1) Login with your ID , create one spool request
2) check the status in SP01 and check if its ticked or not
3) change the tick mark in SU01 , logoff. and login again .
4) create another spool request
5) check status now for new spool request in SP01 and check if it is ticked.
Regards,
Edited by: Gagan Deep Kaushal on Oct 31, 2010 5:00 PM -
Hello Everybody,
Please check my coding & solved my error.
CREATE OR REPLACE PACKAGE BODY DISA_OWNER.PS_MDM_STAGING_COLOR_C
IS
NAME: PS_MDM_INTERFACE_COLOR_C
PURPOSE: The package is used to process Merchandise Hierarchy into
DISA.XREF_LEGACY_GOLD_SUB_DEPT, DISA.XREF_LEGACY_GOLD_SUB_CLASS
and GOLD.INTOBJ
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this package body.
-- Global constants
gk_package_name CONSTANT VARCHAR2(30) := 'ps_mdm_staging_color_c';
-- Log information
lr_run_log_rec run_log%ROWTYPE;
ln_run_log_id run_log.run_log_id%TYPE;
ln_end_log_status NUMBER;
lr_error_log_rec error_log%ROWTYPE DEFAULT NULL;
v_log_success disa_params.char_val%TYPE := get_param_char ('RUN LOG SUCCESS');
v_log_failure disa_params.char_val%TYPE := get_param_char ('RUN LOG FAILURE');
BEGIN
PROCEDURE process_all
IS
NAME: PROCESS_ALL (Procedure)
PURPOSE: This is the driving procedure for processing Merchandise Hierarchy
into DISA.XREF_LEGACY_GOLD_SUB_DEPT, DISA.XREF_LEGACY_GOLD_SUB_CLASS
and GOLD.INTOBJ based on AUDIT_STATUS.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
-- Log information (seperate from package variables)
lra_run_log_rec run_log%ROWTYPE;
lna_run_log_id run_log.run_log_id%TYPE;
lna_end_log_status NUMBER;
lra_error_log_rec error_log%ROWTYPE DEFAULT NULL;
BEGIN
-- Set Run Log ID
BEGIN
lra_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.PROCESS_ALL';
lra_error_log_rec.specific_location := 'Creating RUN_LOG entry';
lna_run_log_id := ps_disa_log_util.log_run_start (lra_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
-- Load and process class
lra_error_log_rec.specific_location := 'Load and process class';
load_color;
-- Log Successful Run
lra_run_log_rec.end_code := v_log_success;
lna_end_log_status := ps_disa_log_util.log_run_end (lra_run_log_rec);
COMMIT;
EXCEPTION
WHEN OTHERS THEN
-- Set error Codes for Logging
lra_error_log_rec.run_log_id := lna_run_log_id;
lra_error_log_rec.module_name := lra_run_log_rec.module_name;
lra_run_log_rec.end_code := v_log_failure;
-- This line is used to notify the shell script of a failure.
DBMS_OUTPUT.put_line ('FAILED');
IF lra_error_log_rec.error_code IS NULL THEN
lra_error_log_rec.error_code := SQLCODE;
END IF;
IF lra_error_log_rec.error_text IS NULL THEN
lra_error_log_rec.error_text := substr (SQLERRM, 1, 255);
END IF;
IF lra_error_log_rec.specific_location IS NULL THEN
lra_error_log_rec.specific_location := 'When Others';
END IF;
-- Log Error
disa_err.handler (lra_error_log_rec,
pb_logerr => TRUE,
pb_reraise => TRUE,
pb_mark_end => TRUE
END process_all;
PROCEDURE load_COLOR_C
IS
NAME: load_prod_division (Procedure)
PURPOSE: This is the driving procedure for loading prod_division into
DISA.mdm_staging_proddiv_c staging table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_audit_log_id audit_log.audit_log_id%TYPE;
v_parent mdm_staging_proddiv_c.object_parent%TYPE;
v_line_seq INTEGER := 1;
CURSOR prod_COLOR_cur IS
SELECT color_code, color_desc
FROM item_COLOR;
CURSOR filter_prod_COL_cur IS
SELECT prod_COLOR_FILE_TYPE, prod_COLOR_AUDIT_STATUS
FROM product_COLOR_mst
WHERE prod_COLOR_FILE_TYPE in (0, 10);
BEGIN
TMR.CAPTURE(1);
dbms_output.put_line('load_prod_COLOR began.');
-- Set Run Log ID
BEGIN
v_audit_log_id := ps_disa_audit.create_audit_log('ITEM_COLOR', 'COLOR', null,
null, null, ps_disa_audit.FILE_LOADING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.LOAD_AUDIT_STATUS(' ||
v_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT load_AUDIT_STATUS_savepoint;
-- Load prod_division into mdm_staging_proddiv_c table
lr_error_log_rec.specific_location := 'Load prod_COLOR into DISA.mdm_staging_COLOR_C table.';
FOR pd_rec IN prod_color_cur LOOP
INSERT INTO mdm_staging_color_c(AUDIT_LOG_ID, LINE_SEQ, STAGING_STATUS_ID, COLOR_CODE, COLOR_DES)
VALUES (v_audit_log_id, v_line_seq, PS_DISA_STAGING.PROCESSING, pd_rec.COLOR_CODE, pd_rec.COLOR_DEC);
v_line_seq := v_line_seq + 1;
END LOOP;
END load_color_c;
PROCEDURE process_COLOR_C (
p_audit_log_id IN audit_log.audit_log_id%TYPE
IS
NAME: process_prod_division (Procedure)
PURPOSE: This is the driving procedure for processing prod_division into
GOLD.INTOBJ interface table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_rec_count INTEGER;
BEGIN
TMR.CAPTURE(2);
dbms_output.put_line('process_color_c began.');
-- Set Run Log ID
BEGIN
PS_DISA_AUDIT.set_audit_log_status(p_audit_log_id, ps_disa_audit.DATA_INTERFACING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.PROCESS_PROD_COLOR(' ||
p_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT process_pd_savepoint;
-- count the number of records we expect to insert
lr_error_log_rec.specific_location := 'Count records.';
SELECT COUNT(*)
INTO v_rec_count
FROM mdm_staging_color_c
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
-- Interface into GOLD.
lr_error_log_rec.specific_location := 'Process prod_color into GOLD.INTOBJ table.';
INSERT INTO INTVARIANTE
(VAFTYPEX,VAFUAREX,VAFCDI,VAFVALEX,VAFCIS,VAFLANGUE,VAFLIBC,VAFLIBL.VAFACT,VAFFLAG,VAFLGFI,VAFTRT,VAFDTRT,VAFDCRE,VAFDMAJ,VAFUTIL,VAFFICH,VAFNLIG,VAFNERR,VAFMESS)
SELECT PROD_COLOR_CODE, --OBFCEXTIN Object interface #
COLOR_DES --OBFCEXT Object #
1, --OBFIDSTR Merchandise structure #
2, --OBFIDNIV Object depth
'US', --OBFLANGUE Language #
DESCRIPTION, --OBFODESC Object description
OBJECT_PARENT, --OBFCEXTINP Parent interface #
1, --OBFPRINT Visible or hidden level
TO_DATE('01/01/2011', 'mm/dd/yyyy'), --OBFDDEB Link start date
5, --OBFFLAG Flag
v_rec_count, --OBFLGFI File total number of lines
0, --OBFTRT Processing indicator
TRUNC(sysdate), --OBFDTRT Processing date
sysdate, --OBFDCRE Date of creation
sysdate, --OBFDMAJ Date of last update
'PROD_COLOR', --OBFUTIL Last user
'PROD_COLOR_'||AUDIT_LOG_ID, --OBFFICH Filename
LINE_SEQ, --OBFNLIG File line #
null, --OBFNERR Error message #
null, --OBFMESS Error message
TO_DATE('12/31/2049', 'mm/dd/yyyy') --OBFDFIN Link end date
FROM mdm_staging_color_c
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
-- Mark the interfaced item as processed.
lr_error_log_rec.specific_location := 'Mark prod_division items as processed.';
UPDATE mdm_staging_color_c
SET staging_status_id = PS_DISA_STAGING.PROCESSED
WHERE audit_log_id = p_audit_log_id AND
staging_status_id = PS_DISA_STAGING.PROCESSING;
PROCEDURE load_color
IS
NAME: load_dept (Procedure)
PURPOSE: This is the driving procedure for loading department into
DISA.mdm_staging_dept_c staging table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_audit_log_id audit_log.audit_log_id%TYPE;
v_line_seq INTEGER := 1;
-- Load department into mdm_staging_dept_c table
lr_error_log_rec.specific_location := 'Load department into DISA.mdm_staging_color_c table.';
FOR dept_rec IN color_ccur LOOP
INSERT INTO mdm_staging_color_c(AUDIT_LOG_ID, LINE_SEQ, STAGING_STATUS_ID, COLOR_CODE, COLOR_DEC)
VALUES (v_audit_log_id, v_line_seq, PS_DISA_STAGING.PROCESSING, COLOR_CODE,COLOR_DEC);
v_line_seq := v_line_seq + 1;
END LOOP;
PROCEDURE process_color (
p_audit_log_id IN audit_log.audit_log_id%TYPE
IS
NAME: process_dept (Procedure)
PURPOSE: This is the driving procedure for processing department into
GOLD.INTOBJ interface table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_rec_count INTEGER;
BEGIN
TMR.CAPTURE(4);
dbms_output.put_line('process_dept began.');
-- Set Run Log ID
BEGIN
PS_DISA_AUDIT.set_audit_log_status(p_audit_log_id, ps_disa_audit.DATA_INTERFACING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.PROCESS_COLOR(' ||
p_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT process_dept_savepoint;
-- count the number of records we expect to insert
lr_error_log_rec.specific_location := 'Count records.';
SELECT COUNT(*)
INTO v_rec_count
FROM mdm_staging_color_c
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
-- Interface into GOLD.
lr_error_log_rec.specific_location := 'Process department into GOLD.INTOBJ table.';
-- Mark the interfaced item as processed.
lr_error_log_rec.specific_location := 'Mark department items as processed.';
UPDATE mdm_staging_color_c
SET staging_status_id = PS_DISA_STAGING.PROCESSED
WHERE audit_log_id = p_audit_log_id AND
staging_status_id = PS_DISA_STAGING.PROCESSING;
-- Set Run Log ID
BEGIN
v_audit_log_id := ps_disa_audit.create_audit_log('COLOR_CODE', 'COLOR_DEC', null,
null, null, ps_disa_audit.FILE_LOADING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.LOAD_SUB_DEPT(' ||
v_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT load_color_savepoint;
END LOOP;
FOR filter_subdept_rec IN filter_subclass_cur LOOP
INSERT INTO mdm_staging_subclass_c(AUDIT_LOG_ID, LINE_SEQ, STAGING_STATUS_ID, COLOR_CODE,COLOR_DEC)
VALUES (v_audit_log_id, v_line_seq, PS_DISA_STAGING.FILTERED, COLOR_CODE,COLOR_DECL);
v_line_seq := v_line_seq + 1;
END LOOP;
PROCEDURE process_COLOR_C (
p_audit_log_id IN audit_log.audit_log_id%TYPE
IS
NAME: process_sub_dept (Procedure)
PURPOSE: This is the driving procedure for processing sub-department into
GOLD.INTOBJ interface table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_rec_count INTEGER;
BEGIN
TMR.CAPTURE(6);
dbms_output.put_line('process_color began.');
-- Set Run Log ID
BEGIN
PS_DISA_AUDIT.set_audit_log_status(p_audit_log_id, ps_disa_audit.DATA_INTERFACING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.PROCESS_COLOR(' ||
p_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT process_color_savepoint;
-- Merge sub-department into DISA.xref_legacy_gold_sub_dept table
lr_error_log_rec.specific_location := 'Merge sub-department into DISA.xref_legacy_gold_color table.';
MERGE INTO xref_legacy_gold_color
USING (
SELECT COLOR_CODE,COLOR_DES;
FROM mdm_staging_color_c
WHERE staging_status_id = PS_DISA_STAGING.PROCESSING
) a
ON(xref_legacy_gold_color.color_code= a.color_code)
WHEN NOT MATCHED THEN
INSERT (COLOR_CODE,COLOR_DEC) VALUES (a.COLOR_CODE, a.COLOR_DEC)
WHEN MATCHED THEN
UPDATE SET
COLOR_CODE = a.COLOR_CODE,
LAST_UPDATE_SOURCE = user,
LAST_UPDATE_DATE = sysdate;
-- count the number of records we expect to insert
lr_error_log_rec.specific_location := 'Count records.';
SELECT COUNT(*)
INTO v_rec_count
FROM mdm_staging_color_c
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
PROCEDURE load_color
IS
NAME: load_clolor(Procedure)
PURPOSE: This is the driving procedure for loading class into
DISA.mdm_staging_color_c staging table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_audit_log_id audit_log.audit_log_id%TYPE;
v_line_seq INTEGER := 1;
CURSOR color_cur IS
SELECT DISTINCT a.color_code, a.color_des, c.sobcextin
FROM color_c a, xref_legacy_gold_color_code b, STRUCOBJ c
WHERE a.color_code = b.color_des
AND a.color_code not IN (0, 1169)
AND NOT EXISTS (SELECT 1 FROM class_mst WHERE class_des = a.class_des and color_des IN (0, 990, 993))
AND c.sobidstr = 1
AND c.sobidniv = 4;
CURSOR filter_color_cur IS
SELECT DISTINCT a.color_code, a.color_des
FROM color_code a, xref_legacy_gold_color_dec b
WHERE a.color_code = b.color_des
AND a.class_num IN (0, 1169)
OR EXISTS (SELECT 1 FROM color_mst WHERE class_des = a.color_code and color_des IN (0, 990, 993));
BEGIN
TMR.CAPTURE(7);
dbms_output.put_line('load_color began.');
-- Set Run Log ID
BEGIN
v_audit_log_id := ps_disa_audit.create_audit_log('COLOR_CODE', 'COLOR_DES', null,
null, null, ps_disa_audit.FILE_LOADING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.LOAD_CLASS(' ||
v_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT load_class_savepoint;
END LOOP;
PROCEDURE process_class (
p_audit_log_id IN audit_log.audit_log_id%TYPE
IS
NAME: process_class (Procedure)
PURPOSE: This is the driving procedure for processing class into
GOLD.INTOBJ interface table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_rec_count INTEGER;
SAVEPOINT process_color_savepoint;
-- count the number of records we expect to insert
lr_error_log_rec.specific_location := 'Count records.';
SELECT COUNT(*)
INTO v_rec_count
FROM mdm_staging_color_c
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
-- Interface into GOLD.
lr_error_log_rec.specific_location := 'Process class into GOLD.INTOBJ table.';
PROCEDURE load_color_des
IS
NAME: load_sub_class (Procedure)
PURPOSE: This is the driving procedure for loading sub-class into
DISA.mdm_staging_subdept_c staging table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_audit_log_id audit_log.audit_log_id%TYPE;
v_line_seq INTEGER := 1;
v_subclass_seq INTEGER := 10001;
CURSOR color_des_cur IS
SELECT DISTINCT a.class_code, a.color_des, b.sobcextin
FROM color_c a, STRUCOBJ b
WHERE a.color_code = b.sobcext
AND a.color_code not IN (0, 1169)
AND NOT EXISTS (SELECT 1 FROM color_mst WHERE color_des = a.color_code and color_des IN (0, 990, 993))
AND b.sobidstr = 1
AND b.sobidniv = 5 -- class level
ORDER BY a.class_code;
CURSOR filter_color_des_cur IS
SELECT DISTINCT a.color_code, a.color_des
FROM color_code a, STRUCOBJ b
WHERE a.color_code IN (0, 1169)
OR EXISTS (SELECT 1 FROM color_mst WHERE color_code = a.color_des and color_des IN (0, 990, 993));
PROCEDURE process_color_des (
p_audit_log_id IN audit_log.audit_log_id%TYPE
IS
NAME: process_sub_class (Procedure)
PURPOSE: This is the driving procedure for processing sub-class into
GOLD.INTOBJ interface table.
REVISIONS:
Ver Date Author Description
1.0 06/15/2011 Chada Changchit Created this procedure.
v_rec_count INTEGER;
BEGIN
TMR.CAPTURE(10);
dbms_output.put_line('process_color_des began.');
-- Set Run Log ID
BEGIN
PS_DISA_AUDIT.set_audit_log_status(p_audit_log_id, ps_disa_audit.DATA_INTERFACING);
lr_run_log_rec.module_name := 'PS_MDM_INTERFACE_COLOR_C.PROCESS_COLOR_DEC(' ||
p_audit_log_id || ')';
lr_error_log_rec.specific_location := 'Creating RUN_LOG entry';
ln_run_log_id := ps_disa_log_util.log_run_start (lr_run_log_rec);
EXCEPTION
WHEN OTHERS THEN
RAISE;
END;
SAVEPOINT process_sub_class_savepoint;
-- Merge sub-class into DISA.xref_legacy_gold_sub_class table
lr_error_log_rec.specific_location := 'Merge sub-class into DISA.xref_legacy_gold_color_des table.';
MERGE INTO xref_legacy_gold_sub_class
USING (
SELECT color_code, color_des
FROM mdm_staging_color_des
WHERE staging_status_id = PS_DISA_STAGING.PROCESSING
) a
ON(xref_legacy_gold_COLOR_CODE.COLOR_DES = a.COLOR_CODE)
WHEN NOT MATCHED THEN
INSERT (COLOR_CODE,COLOR_DEC) VALUES (a.COLOR_CODE, a.COLOR_DEC)
WHEN MATCHED THEN
UPDATE SET
COLOR_CODE = a.COLOR_DEC,
LAST_UPDATE_SOURCE = user,
LAST_UPDATE_DATE = sysdate;
-- count the number of records we expect to insert
lr_error_log_rec.specific_location := 'Count records.';
SELECT COUNT(*)
INTO v_rec_count
FROM mdm_staging_color_des
WHERE audit_log_id = p_audit_log_id
AND staging_status_id = PS_DISA_STAGING.PROCESSING;
END process_color_des;
END PS_ MDM_INTERFACE_COLOR_C ;Thank you,
Sam
Edited by: BluShadow on 07-Jul-2011 14:14
added {noformat}{noformat} tags.869574 wrote:
run script in Oracle toad 10.6
Thank you,
samNo. I, like most other people here, am busy working. If you have an issue, YOU run the script and YOU tell us what your issue is. This isn't a game where we are supposed to guess what the problem is. If you can't be bothered to post your question according the forum guidelines ({message:id=9360002}) then why on Earth should we bother to waste our time looking to help? -
HI All,
To fetch the fallowing required fields from the related tables by the selection criteria Material No and Posting dates. Using ALV.
I have written code for that but its not showing any results..plz go through my code and if possible rectify it.
I am also attaching the selection criteria details and table with required field.
Field Name Description Required level Reference Table
MATNR Material No. Selection Criteria. (MARC)
BUDAT Posting Date Selection criteria. (MKPF)
MAKTX material Description Layout (MAKT)
BEDAT PO Date Layout (EKKO)
EBELN Purchase Order No. Layout (EKPO)
MENGE Purchase Order Qty. Layout (EKPO)
BPRME Order Price Unit Layout (EKPO)
NETWR PO Net Value Layout (EKPO)
BSTMG GR QTY Layout (MSEG)
DMBTR GR Value Layout (MSEG)
BPRBM Invoice Qty Layout (EKBE)
REFWR Invoice value Layout (EKBE)
here is my code:-
TABLES: marc,
mkpf,
mseg,
ekko,
ekpo,
ekbe,
rseg.
TYPE-POOLS: slis.
DATA: BEGIN OF itab OCCURS 0,
matnr LIKE marc-matnr,
budat LIKE ekbe-budat,
maktx LIKE makt-maktx,
bedat LIKE ekko-bedat,
ebeln LIKE mseg-ebeln,
menge LIKE mseg-menge,
bprme LIKE mseg-bprme,
netwr LIKE ekpo-netwr,
bstmg LIKE mseg-bstmg,
dmbtr LIKE mseg-dmbtr,
bprbm LIKE rseg-bprbm,
refwr LIKE ekbe-refwr,
END OF itab.
DATA: i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA v_repid TYPE sy-repid.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR marc-matnr,
s_budat FOR mkpf-budat.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
v_repid = sy-repid.
START-OF-SELECTION.
SELECT werks smbln bstmg dmbtr matnr ebeln FROM mseg INTO
CORRESPONDING FIELDS OF TABLE itab
WHERE matnr IN s_matnr.
**ENDSELECT.
SELECT SINGLE lifnr FROM ekko INTO CORRESPONDING FIELDS OF itab
WHERE ebeln = mseg-ebeln.
SELECT ebeln menge FROM ekpo INTO CORRESPONDING FIELDS OF itab
WHERE ebeln = mseg-ebeln.
ENDSELECT.
SELECT ebeln belnr refwr budat FROM ekbe INTO CORRESPONDING FIELDS OF
itab
WHERE budat IN s_budat AND
ebeln = mseg-ebeln.
ENDSELECT.
SELECT SINGLE matnr FROM marc INTO itab
WHERE matnr = mseg-matnr.
**APPEND itab.
**END-OF-SELECTION.
SELECT matnr ebeln menge bprme bstmg dmbtr FROM mseg INTO
CORRESPONDING FIELDS OF TABLE itab
WHERE matnr IN s_matnr.
SELECT matnr maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE itab
WHERE matnr = mseg-matnr.
SELECT ebeln bedat FROM ekko INTO CORRESPONDING FIELDS OF TABLE itab
WHERE ebeln = mseg-ebeln.
SELECT ebeln netwr FROM ekpo INTO CORRESPONDING FIELDS OF TABLE itab
WHERE ebeln = mseg-ebeln.
SELECT ebeln bprbm FROM rseg INTO CORRESPONDING FIELDS OF TABLE itab
WHERE ebeln = mseg-ebeln.
SELECT budat ebeln refwr FROM ekbe INTO CORRESPONDING FIELDS OF TABLE itab
WHERE budat IN s_budat AND
ebeln = mseg-ebeln.
SELECT matnr ebeln menge bprme bstmg dmbtr FROM mseg INTO CORRESPONDING FIELDS OF TABLE itab WHERE matnr IN s_matnr.
SELECT matnr maktx FROM makt INTO CORRESPONDING FIELDS OF TABLE itab FOR ALL ENTRIES IN itab WHERE matnr = itab-matnr.
SELECT ebeln bedat FROM ekko INTO CORRESPONDING FIELDS OF TABLE itab FOR ALL ENTRIES IN itab WHERE ebeln = itab-ebeln.
SELECT ebeln netwr FROM ekpo INTO CORRESPONDING FIELDS OF TABLE itab FOR ALL ENTRIES IN itab WHERE ebeln = itab-ebeln.
SELECT ebeln bprbm FROM rseg INTO CORRESPONDING FIELDS OF TABLE itab FOR ALL ENTRIES IN itab WHERE ebeln = itab-ebeln.
SELECT budat ebeln refwr FROM ekbe INTO CORRESPONDING FIELDS OF
TABLE itab FOR ALL ENTRIES IN itab
WHERE budat IN s_budat AND
ebeln = itab-ebeln.
APPEND itab.
PERFORM build_fieldcatlog.
PERFORM display_alv_report.
LOOP AT itab.
*WRITE:/ itab-menge, itab-werks, itab-smbln, itab-bstmg, itab-matnr,
*itab-ebeln, itab-lifnr, itab-menge, itab-belnr, itab-refwr, itab-budat.
ENDLOOP.
*& Form build_fieldcatlog
text
--> p1 text
<-- p2 text
FORM build_fieldcatlog . "Form BUILD_FIELDCATLOG, Start
wa_fieldcat-fieldname = 'maktx'.
wa_fieldcat-seltext_m = 'maktx.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'bedat'.
wa_fieldcat-seltext_m = 'bedat.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'EBELN'.
wa_fieldcat-seltext_m = 'ebeln.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'MENGE'.
wa_fieldcat-seltext_m = 'menge.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'bprme'.
wa_fieldcat-seltext_m = 'bprme.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'netwr'.
wa_fieldcat-seltext_m = 'netwr.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'BSTMG'.
wa_fieldcat-seltext_m = 'bstmg.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'dmbtr'.
wa_fieldcat-seltext_m = 'dmbtr.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'bprbm'.
wa_fieldcat-seltext_m = 'bprbm'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-fieldname = 'REFWR'.
wa_fieldcat-seltext_m = 'refwr.'.
APPEND wa_fieldcat TO i_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. "build_fieldcatlog
" build_fieldcatlog "Form BUILD_FIELDCATLOG, End
*& Form display_alv_report
text
FORM display_alv_report. "Form DISPLAY_ALV_REPORT, Start
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = i_fieldcat[]
i_callback_top_of_page = 'TOP-OF-PAGE'
i_save = 'A'
TABLES
t_outtab = itab.
ENDFORM. "display_alv_report
TOP-OF-PAGE.
WRITE:/ 'Purchase request Print program'.
END-OF-PAGE.hi,
put a break point in ur select statement and check whether sy-subrc eq to 0 or 4. i think ur select staement is not executing.
and generally matnr is of 18 character length so use call FM 'CONVERSION_ALPHA_EXIT_INPUT' as
p_matnr like mara-matnr.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = p_matnr
IMPORTING
OUTPUT = matnr
use this for ebeln also if ur select statement doesn't work.
if helpful reward some points.
with regards,
Suresh Aluri. -
BELGIAN DOWN PAYMENT REQUEST --Need a feedback experience URGENT
Hi all,
The case concerns the down payment request in a belgian company code:
1/ The process begins with the posting of a FAZ document type from SD module (through transaction VF01) => Therefore a down payment request is posted in FI with special G/L account "F". This document is a statistical document.
2/ But in the belgian legislation this statistical document should be in program RFUMSV00 and therefore the VAT must be declared.
I found a program(RFUMSANF that SAP developped to create another document in reference of the down payment request document issued from SD but with a different numbering. The fiscalist told me that he can't accept because the belgian legislation said that it's the down payment request number that must appear in the declaration and in the solution provided by SAP we're obliged to create a new document number => Therefore there is a gap in the sequential numbering generated from SD.
If you have already faced this problem, thanks for telling me what were your answers and what kind of solutions have you implemented to solve this problems.
I take any help.
Thanks a lot for your help.Hi,
The concept of Downpayment is to have the advance payment received booked in the system by creating a downpayment request/invoice.
In your case the Downpayment Request is 100%, so it becomes difficult to apply the same to the Invoice in the Payment window.
Through Internal Reconciliation window, the same cannot be reconciled. Check Note no. : 1340606 regarding the system behavior.
The following options can be checked in the COPY of the database :
1) Option of applying the Downpayment Request and the Invoice and making a payment of 0.01 cent and then transfering the same to the Rounding account.
2) Checking the option of AR Reserve invoice in case there is 100% Downpayment.
Please check and consult the account of the company.
Kind Regards,
Jitin
SAP Business One Forum Team -
Transport request : tp check buffer for already imported requests
Hi,
I want to put a transport request on my prod. There was no problem on the quality. But on the prod, i have the message :
"tp check buffer for already imported requests"
and nothing appends.
Do you have any idea how i can unlock this transport request ?
Tx in advance.Hi,
Use table E070. and display the Transport reqeust and double click on the request row.and in command prompt enter ' /h '. change status as unreleased.
Regards
Jana -
CRM Request Download using Bdoc - material (urgent)
Hi all,
bdoc block size is of 100 and
i need to create one request download for all the materials in the bdoc not 100 request for 100 materials.
since there are 40 bdocs in error....
if any one know any function module or any other logic to fullfill the requiremernt please reply soon....its urgent.....
points will be rewarded.Hi Sudipta,
my email id [email protected]
[email protected]
thanks,
Aniket -
Delete request in red from ODS - urgente -
Good day,
I wanted to delete the last request of an ODS, and, after it tried to make rollback (dezactivate) it status changed in red. The informations of this request were deleted before with selective delete.
The problem now is that i cannot modify the status back in green, i cannot delete the request, i cannot activate or desactivate.
I have tried repair full but the request wont activate for the reason the last request is in red.
Any ideas?Gabriel,
Check this SAP <a href="https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=592620&nlang=EN&smpsrv=https%3a%2f%2fwebsmp104%2esap-ag%2ede">Note 592620 - BW 3.0B (SP10) ODS: Deletion fails: Data inconsistent</a>
Hope it Helps
Srini -
Help me check this coding!
The following is my coding which is my assignment. i doubt i have logic problem. So, help me check this about multi-thread.
if it's wrong which you find, help me correct.I have thought this several days, but till now, i have no any good idea to correct.
import java.io.*;
import java.net.*;
import java.util.*;
public class WebServer extends Thread{
public WebServer(int port,int timeOut,int maxUser){
public void run(){
for (int i=0;i<=maxUser;i++){
Thread t=new Thread(new HTTPRequest());
t.start();
while(true){
Socket connectionSocket;
try{
connectionSocket=server_Socket.accept();
HTTPRequest.processRequest(connectionSocket);
}catch (IOException e){}
public static void main(String args[]) throws Exception{
class HTTPRequest implements Runnable{
private static List pool= new LinkedList();
public static void processRequest(Socket v_socket) throws IOException{
synchronized(pool){
pool.add(pool.size(),v_socket);
pool.notifyAll();
public synchronized void run(){
while(true){
socket=null;
synchronized (pool){
while(pool.isEmpty()){
try{
pool.wait();
}catch(InterruptedException e){}
socket=(Socket)pool.remove(0);
try{
}catch (IOException e){}
finally {
try{
}catch (IOException e){}You don't have a specific problem right?
I don't see anything terribly wrong with it.
Other stuff:
Why is WebServer a thread? Will there be more than one?
Use notify() not notifyAll(). You are only adding one object so only one thread needs to service it.
The run() loop for HTTPRequest does not exit after serving a socket right. Hard to tell from your posting without code blocks.
Don't forget to close the sockets. -
Infopath Time Off Request For on Sharepoint Coding in C#
So I have created a Time Off Request form to put up on our internal company intranet sharepoint site.
I am trying to get this form to do several things.
First of all, after the user fills out the form they can click the submit button and it will email it to their manager. That part is working fine.
The other button is the one that I am having trouble with.
Once the Manager receives the request I want them to be able to click a 2nd "approve" button and make the following happen:
A calendar entry is automatically created in the managers calendar for the day/days requested off. It needs to be created as an All Day Event and Marked Private.
An appointment invitation needs to be sent to the requester so they can accept and the day/days will be added to their calendar as well.
An email needs to be sent to the Requester telling them their request has been approved.
Here is the code I have so far. It is in C#
using Microsoft.Office.InfoPath;
using System;
using System.Windows.Forms;
using System.Xml;
using System.Xml.XPath;
using mshtml;
using Outlook = Microsoft.Office.Interop.Outlook;
using System.Reflection;
using System.Net;
using System.Net.Mail;
namespace ITTimeOffRequest
public partial class FormCode
public void InternalStartup()
((ButtonEvent)EventManager.ControlEvents["CTRL10_2"]).Clicked += new ClickedEventHandler(CTRL10_2_Clicked);
public void CTRL10_2_Clicked(object sender, ClickedEventArgs e)
// Get a reference to the Main datasource
XPathNavigator root = MainDataSource.CreateNavigator();
// Create an Outlook application
Outlook.Application outlookApp = new Outlook.Application();
// Get NameSpace and Logon
Outlook.NameSpace outlookNS = outlookApp.GetNamespace("mapi");
outlookNS.Logon("arochelle", Missing.Value, false, true);
// Create a new AppointmentItem
Outlook.AppointmentItem appointmentItem =
(Outlook.AppointmentItem)outlookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
appointmentItem.Sensitivity = Microsoft.Office.Interop.Outlook.OlSensitivity.olPrivate;
appointmentItem.AllDayEvent = true;
appointmentItem.ReminderSet = true;
appointmentItem.ReminderMinutesBeforeStart = 5;
appointmentItem.BusyStatus = Outlook.OlBusyStatus.olBusy;
appointmentItem.IsOnlineMeeting = false;
appointmentItem.OptionalAttendees = root.SelectSingleNode("//my:field2", NamespaceManager).Value;
appointmentItem.Subject = ("Time Off Request");
appointmentItem.Body = ("Date of request") + root.SelectSingleNode("//my:field4", NamespaceManager).Value;
appointmentItem.Location = root.SelectSingleNode("//my:field13", NamespaceManager).Value;
//appointmentItem.Start.Day.ToString = root.SelectSingleNode("//my:field10", NamespaceManager).Value;
//appointmentItem.End.Day.ToString = root.SelectSingleNode("//my:field10", NamespaceManager).Value;
//appointmentItem.Start = DateTimePicker.("//my:field10");
//appointmentItem.End = DateTimePicker("//my:field10");
appointmentItem.Start = DateTime.Parse("//my:field10");
// Save to Calendar
appointmentItem.Save();
// Logoff
outlookNS.Logoff();
// Clean up
appointmentItem = null;
outlookNS = null;
outlookApp = null;
// Send Email Confirmation.
SmtpClient client = new SmtpClient();
client.Port = 25;
client.Host = "sw-exchange";
client.EnableSsl = false;
client.Timeout = 10000;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
MailMessage mm = new MailMessage("<manager email address here", "//my:field2", "Your Time Off Has Been
Approved", "Your Time Off Has Been Approved");
mm.DeliveryNotificationOptions = DeliveryNotificationOptions.OnFailure;
client.Send(mm);
Obviously i'm trying to get the code to pull in a lot of the information from the fields people have filled on on the form. For example in the send email confirmation section Field 2 is the choose emplayee email drop down box on the form. CTRL10_2
is the approve button. Field 10 is the day requested off. The form has five lines to request days off on it and each line has a date picker to choose the day. A text field for number of hours requested off, a Time field for Start Time, a
Time field for End Time and a Drop down box to pick Sick Leave or Annual Leave.
I'm having a problem with creating the appointment on the appropriate day in the managers calendar and then sending the appointment request to the requester. That is where the code errors out. This is only the coding for the first line of time
off requests as well, i'm not sure how to change the code so that it will include all 5 request lines unless I have to use some kind of Matrix or something.
I'm trying to get the appointmentitem.start and .end to pull from the date(s) that have been requested off but what happens so far is that when the approve button is clicked it just crates a private all day calendar entry for the current day on the managers
calendar and doesn't generate the appointment request for the requester or send the confirmation email.
Any help would be greatly greatly appreciated.for the electronic form:
since you're on Standard edition, I wouldn't recommend InfoPath... I'd start with standard SharePoint list (using attachments for scanned images)... if it needs to be customized, I'd use web dev approaches (HTML+JavaScript), since we've found this approach
to be VERY upgradable.
For the process:
Assuming the process is LINEAR, I'd use SharePoint Designer with an approval process activity and a task activity (for AP). If the process is NOT linear, I'd look into a third party component like Nintex or K2 (you may find some people who say "just build
it with Visual Studio"... don't. You'll regret it later, and the business will too).
Scott Brickey
MCTS, MCPD, MCITP
www.sbrickey.com
Strategic Data Systems - for all your SharePoint needs -
Javac not checking hard coded dir paths???
I'm a beginner java person...have 17 years in computers experience, most Unix admin. I've been through into a job of trying to troubleshoot someone else's code that is long gone. A GUI window is not displaying and I'm getting java errors in the log files. After going back and trying to recompile the offending .java file, I don't get any errors at all. But on further research, have found a hard coded directory path to a file that doesn't exist on the workstation. Does javac not check all it's directory pointers to outside files during compilation. My experience with C++ was that it did...but java code compiler must not be the same??? I'm using java 1.2 compiler on a Solaris 2.7 workstation.
Anyone have any suggestions??? I'm befuzzled. Would be greatly appreciated. Thanks, MelisaSo How will I find all the missing dirs?? I guess with C++ compiler it was the includes that it went out and checked for that I was thinking about. Sorry. I'm string searching the source for all dir paths to files and I'll just have to manually verify they are in existence I guess. Thanks for your answer.
-
Unknown Type of Request please check the url
Hi All,
I am using iis4.0 with iplanet sp4 on win nt 4.0 with sp6. I am getting the error: unknown type of request check the url with iplanet sample applications..
Any one know any work around or any solution for this problem????
Thanks,
Prashant DalalWhat browser are you using to access the sample applications. This seems like the web server is not parsing the request properly. Can you snoop the request/response and post that? I dont have the compatibility guide in front of me, are you confident that iis4.0 is compatible with iAS 6.0 SP4? Does this problem occur with all deployed applications or only the sample applications (does fortune fail to function?).
Maybe you are looking for
-
Hi, how can i create and delete a table in MS Access using labSQL?
-
Reason for rejection at line itme question - ?
Hi how the line item will pick reason for rejection automatically in the order -? Normally reason for rejection will enter manually for line items -? In my scenario when i create a order I am seeing reason for rejection at line item. what could be t
-
GRRR! 8.0.2 Causing Me Grief
I've been fighting the 8.0.2 upgrade for a day now and finally figured out what the problem is. I have ASP pages that hits a SQL Server database to display dynamic information. In my queries I have a request.querystring that grabs the month (numeric
-
I was looking at a trial version of CS3 and did not consider that I might want to export my MX site defintions (sitecach.dws) to the *.ste site export format. (For some reason, I didn't think it was necessary to do that). Since then, I've been trying
-
Hi, I managed to create the contact sheets in the print output section in LR, but I cannot find any way, or help topics on how to turn them into jpegs for outsource printing? I have CS4, bridge lightroom etc, any help is very much appreciated. Kevin