Data Validation on QBE report
When allowing updates from QBE report, how can you validate the data being entered. I need to make sure that the 'deptno' entered is valid in the dept table. The LOV's only show on the customization form, so you cannot use a LOV for this.
Hi,
You can use portal forms to do this. Here you can define a LOV for a field.
Thanks,
Sharmila
Similar Messages
-
Date Validation problem in form with report
Hi,
I am stuck on this date validation issue in a form with report that I am working on-
I have an Active_date_start and an Active_date_end field. I want to validate the form in such a way that if the user enters the Active_date_end < active_date_start then it should error out appropriately asking to change the active_end_date . Also another problem is that the changes are made to the active_date_end they should reflect in the table. How do I accomplish this.
Appreciate all the help offered.
Thanks.Hi,
Thanks for the code.Now the APPLY CHANGES works fine except that it throws an error when I change the end date to a date which is less than the start date . So it does show me my error and does not go further but also shows me the error -
Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306: wrong number
or types of arguments in call to 'NVL' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored Invalid PL/SQL expression condition: ORA-06550: line 1, column 29: PLS-00306:
wrong number or types of arguments in call to 'NVL' ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I looked up the error number and it says its a generic error type where the error can be found on the line number specified. But in this case how and where do I look for the error line?. This is the code I am using-
DECLARE
vACTIVE_DATE_START DATE;
vACTIVE_DATE_END DATE;
BEGIN
vACTIVE_DATE_START := TO_DATE(:P4_ACTIVE_DATE_START, 'DD/MM/YYYY');
vACTIVE_DATE_END := TO_DATE(:P4_ACTIVE_DATE_END, 'DD/MM/YYYY');
IF vACTIVE_DATE_END < vACTIVE_DATE_START THEN
RETURN 'End date is before start date';
ELSE
RETURN NULL;
END IF;
END;
My base table has the active_date_start as NOT NULL. Now I have the exact same code for APPLY CHANGES
in other form and it works fine not giving the above error. I am at a loss to know how I can get rid of the error.
Any suggestions!.
Thanks in advance,
A -
Data validations in XI or ABAP report
Hi All,
What kind of data validations should be done in XI and what kinds should be left for ABAP team to handle in the report or proxies?
Regards,
XIerIt depends on your message definitions.
For example, if you have external .xsd definitions and you basically want to check if the input XML is valid for that schema, you can easily achieve that in java coding (within a java mapping or a module).
Other than that, if you want to really validate the field values (validation against some possible values, expected formats, etc.) you have some alternatives. If it is only in a few fields and the logic is really simple, you could do it in mapping. But the recomendation would really to code the validation in the sender system itself (or create an application specific for that).
Regards,
Henrique. -
Dynamic data source on 10g requires valid data source associated in report
I'm currently using the dynamic JDBC data source feature of PublicReportService_v11 in BI Publisher 10.1.3.4.1 (March 2011 patch applied) and it seems that the BIP report still requires a valid JDBC data source associated with it before the specified dynamic one can be properly used.
Using SoapUI, I tried sending a runReport request with a dynamic JDBC data source for a BIP report that is associated to an invalid/dummy JDBC data source and got the following fault string:
oracle.apps.xdo.webservice.exception.OperationFailedException: PublicReportService::generateReport failed: due to java.sql.SQLException: ORA-01017: invalid username/password; logon deniedAssociating the BIP report to a valid JDBC data source but different from the specified one on the runReport request does make this feature work - data in the BIP report does come from the specified dynamic JDBC data source. I'm just wondering if this is the right behavior for this feature? It seems a little counter intuitive because you already specified a JDBC data source in the request message which I'm assuming will be used by the report you're requesting instead of whatever is the currently associated data source on the report.If it is open, then try
Named range: ConsolLink = Range("Consol File.xlsm'!Source_OpexConsol")
And if it is not currently open, then try
Dim W As Workbook
Set W = Workbooks.Open("R:\Root\Sub1\Sub2\Consol
File.xlsm")
Named range: ConsolLink =
Range("Consol File.xlsm'!Source_OpexConsol")
W.Close False -
Date validation in ALV Grid output
Hi Experts,
I have created an OOP ALV output. There are a couple of date fields on the report output which are editable. I have referred the standard DATS type and hence I ma getting F4 help for date on the report output.
Now, If the user enters an invalid date manually (without F4), the CHECK_CHANGED_DATA method of the CL_GUI_ALV_GRID does not read this invalid value and hence I am not able to validate the date.
I do not want to create a custom search help for date.
Please suggest how to validate the date in this case.
Thanks.
Regards,
RudreshHi Rudresh,
In PBO module, set handler for event 'DATA_CAHNGED'
In PAI module always call 'check_changed_data( )' after a custom button click like below.
Inside handler method of event 'DATA_CAHNGED' do validation for date.
*PBO
module status_0100 output.
*Setting handler for event data_changed
set handler g_o_main->data_changed for g_o_grid.
endmodule.
*PAI
module user_command_0100 input.
clear: ok_code.
ok_code = sy-ucomm.
case ok_code.
when 'SAVE'. " Function code of ur custom button
g_o_grid->check_changed_data( ). " Raises event 'DATA_CAHNGED'
endmodule.
*Class method
method data_changed. " Handler method
" Use table er_data_changed->mt_good_cells[] or er_data_changed->mt_mod_cells to get entered date
endmethod.
Thanks
Edited by: Sap Fan on Sep 29, 2009 8:51 AM
Edited by: Sap Fan on Sep 29, 2009 9:46 AM -
Hi friends i am new to abap.i am doing some validation in my report .my program is executing properly but i need some modification.... its alv report on bapi for GOODS MOVEMENT TYPE For tht i am uploading a flat file using gui_upload.but i need some modification on validation..this program is abt goods transfer from one plant to another plant,s location .so in my flat file i am having material,from plant ,from location,to plant,to location and quantity .here is the code:
*& Form VALIDATE_DATA
1.Check Material in Table MARC >> Material Plant Validation
If not found, Fill Remarks with 'Material Not Found in Plant'
2.Check Plant is Assigned to POrg in Table T024W >> Plant POrg Validation
If not found, Fill Remarks with 'Invalid POrg for Plant'
3.Check Location for Plant and Location in Table T001L >> Plant SLoc Validation
If not found, Fill Remarks with 'Invalid Storage Location for Plant'
FORM validate_data .
DATA: lv_ekorg TYPE t024e-ekorg.
Get POrg for CompanyCode
SELECT SINGLE ekorg INTO lv_ekorg FROM t024e
WHERE bukrs EQ p_bukrs.
LOOP AT it_final.
Check-1
SELECT SINGLE * FROM marc
WHERE matnr = it_final-matnr
AND werks = it_final-f_werks.
IF sy-subrc = 4.
it_final-remark = 'Material Not Found in Plant'.
MODIFY it_final.
ELSE.
Check-2
SELECT SINGLE * FROM t024w
WHERE werks = it_final-t_werks
AND ekorg = lv_ekorg.
IF sy-subrc = 4.
it_final-remark = 'Invalid POrg for Plant'.
MODIFY it_final.
ELSE.
Check-3
SELECT SINGLE * FROM t001l
WHERE werks = it_final-t_werks
AND lgort = it_final-t_lgort.
IF sy-subrc = 4.
it_final-remark = 'Invalid Storage Location for Plant'.
MODIFY it_final.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " VALIDATE_DATA
for this code i am getting output as if plant value is wrong then there will be a remark in the output as material is 'Material Not Found in Plant'....and as same for location n purchase organization....
But in my output i want ,if there is plant n location is wrong the then 2 remarks should display in 2 rows but like wise now i am getting only one remark for 2 errors also..........getting remark based on first condition....
can any one help me hw to solve ...*& Report YSG_IM_F2_002 *
*& This object is for goods transfer from one plant to another *
*& plant using FM-BAPI_GOODSMVT_CREATE *
REPORT YSG_IM_F2_002 .
TABLES: marc, t024w, t001l.
TYPE-POOLS:slis.
TYPES: BEGIN OF i_list,
matnr LIKE mard-matnr,
f_werks LIKE mard-werks,
f_lgort LIKE mard-lgort,
t_werks LIKE mard-werks,
t_lgort LIKE mard-lgort,
labst LIKE mard-labst,
remark TYPE c,
END OF i_list.
TYPES: BEGIN OF i_mara,
matnr LIKE mara-matnr,
END OF i_mara.
TYPES:BEGIN OF i_marc,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
END OF i_marc.
TYPES: BEGIN OF i_mard,
matnr LIKE mard-matnr,
f_werks LIKE mard-werks,
f_lgort LIKE mard-lgort,
t_werks LIKE mard-werks,
t_lgort LIKE mard-lgort ,
labst LIKE mard-labst,
END OF i_mard.
TYPES: BEGIN OF i_t001l,
bukrs TYPE t001l-werks,
lgort TYPE t001l-lgort,
END OF i_t001l.
TYPES: BEGIN OF i_t024e,
ekorg TYPE t024e-ekorg,
bukrs TYPE t024e-bukrs,
END OF i_t024e.
TYPES: BEGIN OF i_mkpf,
xblnr type mkpf-xblnr,
END OF i_mkpf.
TYPES: BEGIN OF i_final,
matnr LIKE mard-matnr,
f_werks LIKE mard-werks,
f_lgort LIKE mard-lgort,
t_werks LIKE mard-werks,
t_lgort LIKE mard-lgort,
labst type c ,
remark(50) type c,
END OF i_final.
DATA : filename TYPE string,
title type c.
DATA: it_list TYPE STANDARD TABLE OF i_list WITH HEADER LINE,
it_mara TYPE STANDARD TABLE OF i_mara WITH HEADER LINE,
it_marc TYPE STANDARD TABLE OF i_marc WITH HEADER LINE,
it_mard TYPE STANDARD TABLE OF i_mard WITH HEADER LINE,
it_t001l TYPE STANDARD TABLE OF i_t001l WITH HEADER LINE,
it_t024e TYPE STANDARD TABLE OF i_t024e WITH HEADER LINE,
it_mkpf TYPE STANDARD TABLE OF i_mkpf WITH HEADER LINE,
it_final TYPE STANDARD TABLE OF i_final WITH HEADER LINE.
DATA: fs_fldcat TYPE slis_fieldcat_alv , "Structure for Field catalog
it_fldcat LIKE TABLE OF fs_fldcat,
layout TYPE slis_layout_alv,
V_REPID LIKE sy-repid.
DATA: GT_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER,
EVENTS TYPE SLIS_T_EVENT,
GW_EVENT TYPE SLIS_ALV_EVENT,
GI_LISTHEADER TYPE SLIS_T_LISTHEADER.
DATA: lv_matnr TYPE mara-matnr,
lv_ekorg TYPE t024e-ekorg.
DATA: BEGIN OF gmhead.
INCLUDE STRUCTURE bapi2017_gm_head_01.
DATA: END OF gmhead.
DATA: BEGIN OF gmcode.
INCLUDE STRUCTURE bapi2017_gm_code.
DATA: END OF gmcode.
DATA: BEGIN OF mthead.
INCLUDE STRUCTURE bapi2017_gm_head_ret.
DATA: END OF mthead.
DATA: BEGIN OF itab OCCURS 100.
INCLUDE STRUCTURE bapi2017_gm_item_create.
DATA: END OF itab.
DATA: BEGIN OF errmsg OCCURS 10.
INCLUDE STRUCTURE bapiret2.
DATA: END OF errmsg.
*data: wmenge like iseg-menge,
errflag.
*Selection Screen Declaration
SELECTION-SCREEN BEGIN OF BLOCK blk WITH FRAME TITLE text-001.
PARAMETERS: p_bukrs LIKE t024e-bukrs OBLIGATORY,
ekorg LIKE t024e-ekorg,
f_file LIKE ibipparms-path OBLIGATORY,
xblnr like mkpf-xblnr,
Doc_Post type checkbox.
SELECTION-SCREEN END OF BLOCK blk .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR f_file .
CLEAR f_file.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = .
DYNPRO_NUMBER = SYST-DYNNR
IMPORTING
file_name = f_file.
START-OF-SELECTION.
filename = f_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = filename
filetype = 'ASC'
has_field_separator = 'x'
TABLES
data_tab = it_final
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
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 validate_data.
PERFORM bapi_goods_mvt.
PERFORM alv_grid_display.
endif.
PERFORM BAPI_GOODS_MVT.
*& Form VALIDATE_DATA
1.Check Material in Table MARC >> Material Plant Validation
If not found, Fill Remarks with 'Material Not Found in Plant'
2.Check Plant is Assigned to POrg in Table T024W >> Plant POrg Validation
If not found, Fill Remarks with 'Invalid POrg for Plant'
3.Check Location for Plant and Location in Table T001L >> Plant SLoc Validation
If not found, Fill Remarks with 'Invalid Storage Location for Plant'
FORM validate_data .
Get POrg for CompanyCode
SELECT SINGLE ekorg INTO lv_ekorg FROM t024e
WHERE bukrs EQ p_bukrs.
LOOP AT it_final.
Check-1
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_final-matnr
IMPORTING
output = lv_matnr.
SELECT SINGLE * FROM marc
WHERE matnr = lv_matnr
AND werks = it_final-f_werks.
IF sy-subrc <> 0.
it_final-remark = 'Material Not Found in Plant'.
append it_final .
endif .
SELECT SINGLE * FROM marc
WHERE matnr = lv_matnr
AND werks = it_final-t_werks.
IF sy-subrc <> 0.
it_final-remark = 'Material Not Found in Plant'.
append it_final .
endif.
Check-2
SELECT SINGLE * FROM t024w
WHERE werks = it_final-t_werks
AND ekorg = lv_ekorg.
IF sy-subrc <> 0.
it_final-remark = 'Invalid POrg for Plant'.
append it_final .
Endif.
SELECT SINGLE * FROM t024w
WHERE werks = it_final-f_werks
AND ekorg = lv_ekorg.
IF sy-subrc <> 0.
it_final-remark = 'Invalid POrg for Plant'.
append it_final .
Endif.
Check-3
SELECT SINGLE * FROM t001l
WHERE werks = it_final-t_werks
AND lgort = it_final-t_lgort.
IF sy-subrc <> 0.
it_final-remark = 'Invalid Storage Location for Plant'.
append it_final .
ENDIF.
SELECT SINGLE * FROM t001l
WHERE werks = it_final-f_werks
AND lgort = it_final-f_lgort.
IF sy-subrc <> 0.
it_final-remark = 'Invalid Storage Location for Plant'.
append it_final .
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " VALIDATE_DATA
*& Form ALV_GRID_DISPLAY
text
FORM alv_grid_display.
DATA:l_edit TYPE lvc_s_glay.
PERFORM build_fieldcat.
PERFORM layout_build USING layout.
PERFORM fill_list_header USING gi_listheader.
v_repid = sy-repid.
gw_event-name = slis_ev_top_of_page.
gw_event-form = 'TOP_OF_PAGE'.
APPEND gw_event TO events.
l_edit-edt_cll_cb = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = V_REPID
i_callback_pf_status_set = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
i_grid_title = title
I_GRID_SETTINGS =
is_layout = layout
it_fieldcat = it_fldcat
i_save = 'x'
IS_VARIANT =
IT_EVENTS = events
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 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.
ENDFORM. "ALV_GRID_DISPLAY
*& Form build_fieldcat
text
FORM build_fieldcat.
PERFORM fieldcat USING: 'IT_FINAL' "Internal table name
'MATNR' "CREDIT CONTROL AREA
'10' "length
'MATERIAL' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'IT_FINAL' "Internal table name
'F_WERKS' "CREDIT CONTROL AREA
'10' "length
'FROM PLANT' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'IT_FINAL' "Internal table name
'F_LGORT' "CREDIT CONTROL AREA
'10' "length
'LOCATION' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'IT_FINAL' "Internal table name
'T_WERKS' "CREDIT CONTROL AREA
'10' "length
'TO PLANT' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'IT_FINAL' "Internal table name
'T_LGORT' "CREDIT CONTROL AREA
'10' "length
'LOCATION' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'I_FINAL' "Internal table name
'LABST' "CREDIT CONTROL AREA
'10' "length
'QUANTITY' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
PERFORM fieldcat USING: 'I_FINAL' "Internal table name
'REMARK' "CREDIT CONTROL AREA
'50' "length
'REMARK' "Description
'L' "Dictionary long text
' ' "Database table name
' ' "Database tab' field name
' ' "Justification R/M/L
' ' "To do total
' ' "emphasize
' ' "emphasize
' ' "emphasize
' ' "Data type
' ' "edit.
' '. "round
ENDFORM. "build_fieldcat
*& Form fieldcat
text
FORM fieldcat CHANGING value(p_tname)
value(p_fname)
value(p_length)
value(p_ltext)
value(p_typet)
value(p_rtab)
value(p_rfield)
value(p_just)
value(p_dosum)
value(p_emphasize)
value(p_datatype)
value(p_no_zero)
value(p_hotspot)
value(p_edit)
value(p_round).
fs_fldcat-tabname = p_tname.
fs_fldcat-fieldname = p_fname.
fs_fldcat-outputlen = p_length.
fs_fldcat-seltext_l = p_ltext.
fs_fldcat-input = p_typet.
fs_fldcat-edit = p_rtab.
fs_fldcat-ref_fieldname = p_rfield.
fs_fldcat-just = p_just.
fs_fldcat-do_sum = p_dosum.
fs_fldcat-emphasize = p_emphasize.
fs_fldcat-datatype = p_datatype.
fs_fldcat-lzero = p_no_zero.
fs_fldcat-hotspot = p_hotspot.
fs_fldcat-edit = p_edit.
fs_fldcat-decimals_out = p_round.
APPEND fs_fldcat TO it_fldcat.
ENDFORM. "fieldcat
*& Form fill_list_header
text
-->FV_I_LISTHEADER text
FORM fill_list_header USING fv_i_listheader TYPE slis_t_listheader.
DATA: lw_line TYPE slis_listheader,
l_date(10),
l_time(10).
DATA : p_date LIKE sy-datum.
DATA : p_time LIKE sy-uzeit.
DATA : ztext(17).
DATA : ztext1(80).
p_date = sy-datum.
p_time = sy-uzeit.
CLEAR fv_i_listheader.
CONCATENATE p_date6(2) '.' p_date4(2) '.' p_date+0(4) INTO l_date.
CONCATENATE p_time0(2) ':' p_time2(2) ':' p_time+4(2) INTO l_time.
IF doc_post = 'X'.
ztext = 'Execute Mode'.
ELSE.
ztext = 'Update Mode'.
ENDIF.
CLEAR lw_line.
lw_line-typ = 'H'.
lw_line-info = sy-repid.
APPEND lw_line TO fv_i_listheader.
CLEAR lw_line.
lw_line-typ = 'H'.
lw_line-info = l_date.
APPEND lw_line TO fv_i_listheader.
CLEAR lw_line.
lw_line-typ = 'H'.
lw_line-info = l_time.
APPEND lw_line TO fv_i_listheader.
CLEAR lw_line.
lw_line-typ = 'H'.
lw_line-info = sy-uname.
APPEND lw_line TO fv_i_listheader.
CLEAR lw_line.
lw_line-typ = 'H'.
lw_line-info = ztext.
APPEND lw_line TO fv_i_listheader.
endform. "fill_list_header
*& Form top_of_page
text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gi_listheader.
ENDFORM. "top_of_page
*& Form layout_build
text
-->LAYOUT text
FORM layout_build USING layout TYPE slis_layout_alv.
layout-box_fieldname = 'BOX'.
layout-zebra = 'X'. " STRIPED PATTERN
layout-numc_sum = 'X'. " TOTALS FOR NUMC-FIELDS
layout-no_keyfix = ' '. " DO NOT FIX KEYCOLUMNS
layout-colwidth_optimize = ' ' .
layout-flexible_key = ' '. " KEY COLUMNS MOVABLE,...
layout-detail_popup = ' '. " SHOW DETAIL IN POPUP
ENDFORM. "layout_build
*& Form BAPI_GOODS_MVT
text
FORM bapi_goods_mvt.
DATA: dc_numner TYPE bapi2017_gm_head_ret-mat_doc,
dc_year TYPE bapi2017_gm_head_ret-doc_year.
clear: dc_numner, dc_year.
if doc_post = 'X'.
gmhead-pstng_date = sy-datum.
gmhead-doc_date = sy-datum.
gmhead-pr_uname = sy-uname.
gmhead-REF_DOC_NO = it_mkpf-xblnr.
gmcode-gm_code = '04'. "04 - MB1B - Transfer Posting
LOOP AT it_final.
itab-move_type = '301'.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = it_final-matnr
IMPORTING
output = itab-material.
itab-plant = it_final-f_werks .
itab-stge_loc = it_final-f_lgort .
itab-MOVE_PLANT = it_final-t_werks .
itab-move_stloc = it_final-t_lgort .
itab-entry_qnt = it_final-labst .
APPEND itab.
ENDLOOP.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = gmhead
goodsmvt_code = gmcode
TESTRUN = ' '
IMPORTING
goodsmvt_headret = mthead
materialdocument = dc_numner
matdocumentyear = dc_year
TABLES
goodsmvt_item = itab
GOODSMVT_SERIALNUMBER =
return = errmsg.
IF errmsg[] IS INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
LOOP AT it_final.
it_final-remark = dc_numner.
MODIFY it_final.
ENDLOOP.
endif.
ELSE.
clear errflag.
LOOP AT errmsg.
IF errmsg-type EQ 'E'.
WRITE:/'Error in function', errmsg-message.
errflag = 'X'.
ELSE.
WRITE:/ errmsg-message.
ENDIF.
ENDLOOP.
endif.
ENDFORM. "BAPI_GOODS_MVT -
Hi,
Can anyone explain how to do data validation for the i/p fields in the WD View???Pleasegive an example with coding.
Thanks!Hi,
As Thomas pointed out in his reply that do the validation at WDDOBEFOREACTION method
say you have a date to validate:
DATA lo_nd_importing TYPE REF TO if_wd_context_node.
DATA lo_el_importing TYPE REF TO if_wd_context_element.
DATA ls_importing TYPE wd_this->element_importing.
DATA lv_startdate LIKE ls_importing-startdate.
navigate from <CONTEXT> to <IMPORTING> via lead selection
lo_nd_importing = wd_context->get_child_node( name = wd_this->wdctx_importing ).
get element via lead selection
lo_el_importing = lo_nd_importing->get_element( ).
get single attribute
lo_el_importing->get_attribute(
EXPORTING
name = `STARTDATE`
IMPORTING
value = lv_startdate ).
if lv_startdate is initial.
get message manager
DATA lo_api_controller TYPE REF TO if_wd_controller.
DATA lo_message_manager TYPE REF TO if_wd_message_manager.
lo_api_controller ?= wd_this->wd_get_api( ).
CALL METHOD lo_api_controller->get_message_manager
RECEIVING
message_manager = lo_message_manager
report message
CALL METHOD lo_message_manager->report_error_message
EXPORTING
message_text = 'Please input start date'
params =
msg_user_data =
is_permanent = ABAP_FALSE
scope_permanent_msg = CO_MSG_SCOPE_CONTROLLER
view =
show_as_popup =
controller_permanent_msg =
msg_index =
cancel_navigation = 'X' "this parameter will stop the program at the same view
endif.
this will stop the user at the same view and will give the error message out.....
you can also check the code wizard and try different type of methods to give out the error messages....the code wizard is right beside the external break point button...
Thanks...
AS. -
How to Insert using QBE report in portlet?
[This is using the latest version of Portal, 9.0.2]
I have created a portlet which is based on the Report QBE.
It displays fine, with Update and Delete columns/links for each row.
However...
When I created the portlet, I specifically said I wanted to display the Query, Reset and Insert buttons in the "Customization Form Display Options" Button Options. When I click on "Customize" from the Develop tab for my portlet, it shows the full page customize, which includes these buttons. But when I add the portlet to a region, and then click on its Customize link (to the right of the portlet's navbar), the resulting customize page does NOT show these buttons.
How do I get Insert functionality working from a portlet? Do I have to do something more to make the portlet customize page show the necessary buttons?
I feel like I may be missing something obvious (again!), but I can't figure it out, and I've looked in all the places I can think of.
Help much appreciated...
Regards
BryanYou are not 'missing something obvious' , this is how it works. The insert option is not available for qbe reports as a portlets. Reason being that you may not want all users who are able to customize the report to insert data into the base table.
For insertion of data use a form portlet or a link on one of the qbe columns.
Sunil. -
Adding validations to interactive report contents
Hi
I have a feature by which i can upload a csv file and after uploading, it will be displayed in an interactive report.Is there any way i can provide validations for the data in the interactive report.Hi,
Refer:
http://avdeo.com/2008/05/21/uploading-excel-sheet-using-oracle-application-express-apex/
http://oraexplorer.blogspot.com/2007/11/apex-to-upload-text-file-and-write-into.html
Regards,
Kartik Patel
http://patelkartik.blogspot.com/
http://apex.oracle.com/pls/apex/f?p=9904351712:1 -
Dell PowerVault MD3600f - Unable to upgrade firmware - Data validation error
Upgrade Controller Firmware wizard reports the following error.
1 problem detected.
Data validation error: The storage array cannot be upgraded as host port type representation in Controller A did not match with those of Controller B. Contact a technical support representative to resolve this issue.
What does this mean? and how to fix it.Hi,
yes 100% the error is reported from the dell mdsm software.
steps.
1. open mdsm application
2. right click on powervault md3600f
3. select upgrade raid controller module firmware
4. upgrade raid controller module screen apears and refreshes unit(s) status changes to no upgradeable.
5. error apears in the details window.
6. press view log.
[May 17, 2013 9:25:15 AM] [MD3600] [pre-upgrade tests] [pre-upgrade tests start]
Pre-upgrade tests started
[May 17, 2013 9:25:37 AM] [MD3600] [pre-upgrade tests] [check RAID controller module state]
Test passed - RAID controller module 1
[May 17, 2013 9:25:37 AM] [MD3600] [pre-upgrade tests] [check RAID controller module state]
Test passed - RAID controller module 0
[May 17, 2013 9:25:38 AM] [MD3600] [pre-upgrade tests] [check spm database]
Test passed - RAID controller module 1
[May 17, 2013 9:25:39 AM] [MD3600] [pre-upgrade tests] [check spm database]
Test passed - RAID controller module 0
[May 17, 2013 9:25:39 AM] [MD3600] [pre-upgrade tests] [Physical Disks Unavailable]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check configuration database]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check physical disks]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check disk groups and disk pools]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check hot spares]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check current operations]
Test passed
[May 17, 2013 9:25:42 AM] [MD3600] [pre-upgrade tests] [check virtual disks]
Test passed
[May 17, 2013 9:25:43 AM] [MD3600] [pre-upgrade tests] [check internal data validity]
Data validation error: The storage array cannot be upgraded as host port type representation in Controller A did not match with those of Controller B. Contact a technical support representative to resolve this issue.
[May 17, 2013 9:25:44 AM] [MD3600] [pre-upgrade tests] [check event log]
The event log was cleared within the last 24 hours (event type: 100).
[May 17, 2013 9:25:45 AM] [MD3600] [pre-upgrade tests] [check event log]
Test passed
[May 17, 2013 9:25:45 AM] [MD3600] [pre-upgrade tests] [pre-upgrade tests complete] [0h 0m 30s]
Pre-upgrade test(s) failure - the storage array cannot be upgraded in its present state -
Find Latest Date(Valid To Date)
Hi all!
How do I find the latest Date(Valid To Date)?
If there is a way with Replacement Path or User Exits, How do I do it?
Regards,
Shreei have a query with characterstic ZDATETO (Valid To Date).
I have to implement a condition on ZDATETO so that only Latest Valid To Date is displayed in my Report.
I also have a Key Figure Amount. A condition on it is to display only when the Amount is Negative.
These two conditions are to be implemented on the Report.
They Keyfigure part I could do it, but how do I find the Latest Valid To date to implement the condition?
Shree -
Valid Records Update, Reporting Possible (Request Green)
Hi, My company operates change run every night.
Yesterday, an error occured when loaded data from DSO to cube.
I guess that there was strange character BW can't recognize.
Because error had been handled too late, a whole chain was delayed.
I don't want that this situation happen again.
I want to skip the error records so that change run can be operated on schedule.
As I know, It is possible by using "Valid Records Update, Reporting Possible (Request Green)" option on DTP.
But, I heard that when I apply this option, there will be no error logs. Is it right?
I think It can cause the problem of data consistency.
So, I have question.
1. Can I get error logs using "Valid Records Update, Reporting Possible (Request Green)" option?
2. Is there any other way to know existence of invalid records (even if chain skip that record)
3. If question 1 or 2 are not possible, can an customizing abap program perform this action?
Thank you.Hi,
can you discribe what's your master data check is like. Propably not your skip record exception is rissen but another exception by sap standard masterdata check. It's behviour may differ from the skip record exception you are expecting.
Check http://help.sap.com/saphelp_nw70/helpdata/en/42/fbd598481e1a61e10000000a422035/content.htm for other types of exception by SAP errorhandling.
Regards Michael -
Display data in smartforms using report
hi,
i want to display data from smartform using report.
i have a preview buttons in report when i select preview buttons displays in smarts
regards
amitdesign the smartform as per ur need and get the function module generated by smartform and pass it to ur report programas below..
case sy-ucomm.
when 'smartform'.
pass the f.m that is generated by system in smartforms
CALL FUNCTION '/1BCDWB/SF00000265'
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
DATE_L = s_fkdat-low
DATE_H = s_fkdat-high
PLANT_L = s_werks-low
PLANT_H = s_werks-high
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
IFINAL = ifinal1[]
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 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.
endcase. -
How to create a report with data using the Crystal Reports for Java SDK
Hi,
How do I create a report with data that can be displayed via the Crystal Report for Java SDK and the Viewers API?
I am writing my own report designer, and would like to use the Crystal Runtime Engine to display my report in DHTML, PDF, and Excel formats. I can create my own report through the following code snippet:
ReportClientDocument boReportClientDocument = new ReportClientDocument();
boReportClientDocument.newDocument();
However, I cannot find a way to add data elements to the report without specifying an RPT file. Is this possible? I seems like it is since the Eclipse Plug In allows you to specify your database parameters when creating an RPT file.
is there a way to do this through these packages?
com.crystaldecisions.sdk.occa.report.data
com.crystaldecisions.sdk.occa.report.definition
Am I forced to create a RPT file for the different table and column structures I have?
Thank you in advance for any insights.
Ted JenneyHi Rameez,
After working through the example code some more, and doing some more research, I remain unable to populate a report with my own data and view the report in a browser. I realize this is a long post, but there are multiple errors I am receiving, and these are the seemingly essential ones that I am hitting.
Modeling the Sample code from Create_Report_From_Scratch.zip to add a database table, using the following code:
<%@ page import="com.crystaldecisions.sdk.occa.report.application.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.document.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.definition.*"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.lib.*" %>
<%@ page import = "com.crystaldecisions.report.web.viewer.*"%>
<%
try {
ReportClientDocument rcd = new ReportClientDocument();
rcd.newDocument();
// Setup the DB connection
String database_dll = "Sqlsrv32.dll";
String db = "qa_start_2012";
String dsn = "SQL Server";
String userName = "sa";
String pwd = "sa";
// Create the DB connection
ConnectionInfo oConnectionInfo = new ConnectionInfo();
PropertyBag oPropertyBag1 = oConnectionInfo.getAttributes();
// Set new table logon properties
PropertyBag oPropertyBag2 = new PropertyBag();
oPropertyBag2.put("DSN", dsn);
oPropertyBag2.put("Data Source", db);
// Set the connection info objects members
// 1. Pass the Logon Properties to the main PropertyBag
// 2. Set the Server Description to the new **System DSN**
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_LOGONPROPERTIES, oPropertyBag2);
oPropertyBag1.put(PropertyBagHelper.CONNINFO_CRQE_SERVERDESCRIPTION, dsn);
oPropertyBag1.put("Database DLL", database_dll);
oConnectionInfo.setAttributes(oPropertyBag1);
oConnectionInfo.setUserName(userName);
oConnectionInfo.setPassword(pwd);
// The Kind of connectionInfos is CRQE (Crystal Reports Query Engine).
oConnectionInfo.setKind(ConnectionInfoKind.CRQE);
// Add a Database table
String tableName = "Building";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
catch(ReportSDKException RsdkEx) {
out.println(RsdkEx);
catch (Exception ex) {
out.println(ex);
%>
Throws the exception
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: java.lang.NullPointerException---- Error code:-2147467259 Error code name:failed
There was other sample code on SDN which suggested the following - adding the table after calling table.setDataFields() as in:
String tableName = "Building";
String fieldname = "Building_Name";
Table oTable = new Table();
oTable.setName(tableName);
oTable.setAlias(tableName);
oTable.setQualifiedName(tableName);
oTable.setDescription(tableName) ;
Fields fields = new Fields();
DBField field = new DBField();
field.setDescription(fieldname);
field.setHeadingText(fieldname);
field.setName(fieldname);
field.setType(FieldValueType.stringField);
field.setLength(40);
fields.add(field);
oTable.setDataFields(fields);
oTable.setConnectionInfo(oConnectionInfo);
rcd.getDatabaseController().addTable(oTable, null);
This code succeeds, but it is not clear how to add that database field to a section. If I attempt to call the following:
FieldObject oFieldObject = new FieldObject();
oFieldObject.setDataSourceName(field.getFormulaForm());
oFieldObject.setFieldValueType(field.getType());
// Now add it to the section
oFieldObject.setLeft(3120);
oFieldObject.setTop(120);
oFieldObject.setWidth(1911);
oFieldObject.setHeight(226);
rcd.getReportDefController().getReportObjectController().add(oFieldObject, rcd.getReportDefController().getReportDefinition().getDetailArea().getSections().getSection(0), -1);
Then I get an error (which is not unexpected)
com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The field was not found.---- Error code:-2147213283 Error code name:invalidFieldObject
How do I add one of the table.SetDataFields() to my report to be displayed?
Are there any other pointers or suggestions you may have?
Thank you -
Hi,
One of my user is facing issue in creating new time sheet,
"The time sheet creation failed, because of problems with the project server or with data validations".
This issue is coming to only few members out of 10000 members.
Note: For the same user, can able to do in other machines. only the problem in his machine. Have ran the office diagnostics, but still the problem persists.
Is any add-on's/any settings need to update in IE. Could any one please help me on how to fix this issue?
Many thanks in advance.I would check the compatibility settings in IE etc, or try another browser (chrome, safari etc.)
Ben Howard [MVP] | web |
blog | book
Maybe you are looking for
-
[SOLVED] Mounting USB drive in Gnome
I just got a brand new music player (USB, HD-based) and try to mount it in Gnome. Of course i want it to automount, and tried to enable the gnome-volume-manager, which i finally managed. But nothing happens when i plug in the USB. I also created a /m
-
Panic after boot in page_retire_thread Solaris 10 update 8
Hi, I am using Solaris 10 update 8 on a T5120. There was a HW problem that required a new motherboard. Afterward, the system reboots but within a minute of the login prompt the system panics with: panic[cpu10]/thread=2a100527ca0: BAD TRAP: type=31 rp
-
Any Explanations y this query is not ordering ?
SELECT dept_id, salary, job_id FROM employees ORDER BY ( SELECT dept_id FROM departments WHERE last_name='Abel'); Assumptions: 1. The inner subquery gives a value of 10 only. 2. There is no 10th column in the Table Employees. 3. There is only 1 emplo
-
Why do App downloads for iphone 5s remain in "waiting" state?
What's causing the following problem? I have tried to download the following apps Dinner Recipies Eat at Home Pepper plate Recipe, Menu & Cooking Planner The downloads never complete, Under each grayish incomplete icon is the word "Waiting". I have w
-
It is the BIGGEST ripoff EVER. I paid $99 for my iPhone 2 years ago on a promotion, and I have been paying Asurion $10 a month for insurance very since. When my phone was stolen and I made a claim, the deductible is $199. The brochure is the Verizon