How to Verify the contents of the field is STRING
Hello All,
In START_ROUTINE of Tranfer routine:
I would like to verify that a field in DATA_PACKAGE-CUSTNM is string. Because, due to bad data I am finding numeric values, in this field.
I would like to remove that record from DATA_PACKAGE, if there is no STRING in this field.
How do I do it? Is there a function / code?
I promise to award points.
Thanks,
Pramod.
hi,
Try the following logic in object level (CUSTNM) routine instead of start routine.
IF COMM_STRUCTURE-CUSTNM CA '1234567890'.
ABORT = 1.
ELSE.
ABORT = 0.
ENDIF.
hope it helps..
regards,
raju
Similar Messages
-
How to access the field of String type?
My Database is Oracle 8.0.5,
client is JDK1.3 and classes12.zip.
the database table likes this:
CREATE TABLE T_KNIGHT
ID INTEGER,
NAME CHAR(20) NULL,
BIRTH DATE,
PRIMARY KEY (ID)
my java program likes this:
String SqlStr = "SELECT ID, NAME, BIRTH FROM T_KNIGHT";
Class.forName ("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@server:1521:orcl", "", "");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs = stmt.executeQuery (SqlStr);
rs.moveToInsertRow();
rs.updateInt(1, 4);
rs.updateString(2, "MyName");
rs.updateDate(3, new java.sql.Date (System.currentTimeMillis ()));
rs.insertRow();
rs.moveToCurrentRow();
while execute the line "rs.insertRow();", an exception is threw out :
java.sql.SQLException: unsupport character set: oracle-character-set-832
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:775)
at oracle.sql.CharacterSetUnknown.failCharsetUnknown(CharacterSetFactoryThin.java:118)
at oracle.sql.CharacterSetUnknown.convert(CharacterSetFactoryThin.java:82)
at oracle.sql.CHAR.<init>(CHAR.java:109)
at oracle.sql.CHAR.<init>(CHAR.java:133)
at oracle.sql.SQLUtil.makeDatum(SQLUtil.java:563)
at oracle.sql.SQLUtil.makeOracleDatum(SQLUtil.java:937)
at oracle.jdbc.driver.UpdatableResultSet.updateObject(UpdatableResultSet.java:1534)
at oracle.jdbc.driver.UpdatableResultSet.updateString(UpdatableResultSet.java:1345)
at TestOld.insert(TestOld.java:125)
at TestOld.main(TestOld.java:17)
How can I do to resolve that question? Help me, please!!What do you mean "can't access", check the API Javadocs.
The Field object is part of the Class object, so you have to supply the instance you want to extract the value from e.g.
Field f = FieldClass.class.getDeclaredField("z");
int value = f.getInt(a);(This is pretty nasty, 99 times out of 100 you'd be better to use a Map object). -
How to verify the status of lock object???
Hello,
How to verify the status of lock object???
I need to know the status of the lock object and put the user in list.
Exists a FM for this?
Thanks!You can check the list of lock objects for the ztable by this way....
Go to SE11, click the radibutton for lock object, then do F4 on the field. Click the "All Selections" icon, in the "Basis Table" field, put the table that you want the lock object for. click green check.
Regards. -
How to display the fields in ALV Output without using Field catalog?
How to display the fields in ALV Output without using Field catalog?
Could you pls tell me the coding?
Akshitha.Hi,
u mean without building field catalog. is it? I that case, we can use the FM REUSE_ALV_FIELDCATALOG_MERGE.
data: itab type table of mara.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = sy-repid
i_structure_name = itab
CHANGING
ct_fieldcat = lt_fieldcat[]
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
*Pass that field catalog into the fillowing FM
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_grid_title = 'REPORTING'
is_layout = gt_layout
it_fieldcat = lt_fieldcat[]
tables
t_outtab = itab. -
How to hide the field from the view in the webdynpro application?
Hi Gurus,
I got a requirement where in which ,default layout has the field name Time.......To......... which is (2 input box ) and one lable assigned to the container.........
Now my requirement is to hide this field from the layout for all cases of leave......(all types of leave)....
I got a few inputs from forum that we can achieve this by implementing the following steps..........
Create In context => Value attribute => Say Visibility
Go to its properties
Select com.sap.ide.webdynpro.uielementdefinitions.Visibility
In View Layout
Select UI Element Set Visible property to this context variable Visibility.
In wdDoModifyView() You can set this property to false
wdContext.currentContextElement().setVisibility(false);
Can you people tell me where to create the value attribute........
In the view context or in the component context...........
and field that am talking about is assign to the container you want me to assign this context variable property to all ......Like to input box ,label and the container..........
Please calrify this ASAP...........
Thanks in Advance,
DharaniHi Manoj......
Hi Murutuza,
As per your guidelines I have created the value attribute in View context (which has the field..... which needs to be hide)inside the value node say FieldVisibility.......and attribute name OldTimeDuration......and I set this value with uidefeneitions Visibility .......
and I bind this vaule with the field property visible(Time.......To..........)which I need to hide...........
Now in the view implementation tab ..........I have coded in the doinit method(since my requirement to hide the field from the layout in all cases).........
wdContext.currentFieldVisibilityElement().setOldTimeDuration(WDVisibility.NONE);
But if I deploy the application and see still am getting the same field dispalying in the screen.........
I even tried putting this code in wdmodifyview method.........same results........
Kindly tell me how to hide the field permenantly from the screen............(without any conditions.)
Thanks in Advance,
Dharani -
How to populate the field Discount Percent (DIS) in the outbound S1ORDEXC?
Hello all,
I am working with the Spec2000 to send out the IDOC S1ORDEXC.
Does anyone know how to populate the field Discount Percent (DIS)?
This field length of Discount Percent is 2 characters, but our customer discount in the Princing Conditions (Sales Order) is longer than 2 characters (ex: 7.500-%)
Thank youHello Thuan
I guess you are working with IS- ADEC and SPEC 2000. I am not an expert on this but leave you some hints from OSS notes I came across.
It appears like Discount Percent - DIS and Procurement Discount Percent -PDP are complementary and mutually exclusive. If one exists, the other need not.
Looks like DIS is computed as (100-PDP)/100 and it is just a 2- integer data (as in 20 Percent). It is a kind of multiplier (Factor), example if PDP discount is 10 percent, then DIS (Factor) is 0.9 and so final (net) price after discount = Price*0.9.
" If the discount comes in the S1BOOKED inbound into SD in the field DIS, then the discount has to be sent back in the DIS field .. if it came in the PDP field then it has to be sent back in the PDP field. If there was no discount in the incoming IDoc, then the discount has to be filled in the PDP if there was a change in the discount".
KDATE in SPEC 2000 file maps to DIS and KPERC to PDP.
PDP has 4 characters and per OSS note 440380, the point is ignored meaning you can work with 1225 instead of 12.25.
So may be you can work with PDP?
OSS notes: Apply to older releases but may still be applicable conceptually speaking.
456153 - S1ORDEXC does not send out Discount
440380 - PDP has only 4 characters in the SPEC IDoc instead of 5
596042 - Discount percent DIS not considered e processing S1ORDEXC
698668 - Incorrect calculation of unit price for PO item by S1ORDEXC
Let me know you final findings. -
How to determine the field size
I am going to make a multiplatform application that hopefully
will run on linux and windows 2000.If the os is 2000, then I will use
vb.net/aspx else I'll use java servlets. I make the connection
to the web server ( through HTTP) not directly to database server.
So, the resultset will be stored in the String object. The columns
will be separated by delimeter. Our problem is how to determine
the size and type of the fields of mssql,oracle and postgres database
so that we can include it in the String object.
Ex.
String sResultSet=new String();
ResultSet rs=statement.executeQuery(sSQL);
while(rs.next()){
sResultset=sResultSet + rs.getString(field1) + "||" + rs.getString(field2) + "||";
vertical bars acts as delimeter
supposedly this is the code:
sResultset=sResultSet + rs.getString(field1) +"_" + rs.getFieldType() + "_"+
rs.getFieldSize() + "||" + rs.getString(field2) +"_" + rs.getFieldType() + "_"+
rs.getFieldSize() + "||";
supposedly this is the code if rs.getFieldType() and rs.getFieldSize() methods are existing
Anyone can give me an idea how to get the field type and field size of the database?
thanks in advanceYes, but I dont know how to do it.
Can you give me an example of using it.
Thanks in advance -
How to get the field COMPLETION in extract layout
Hi,
Does anyone knows How to get the field COMPLETION in extract layout? i have not been able to find it and it is imperative to have it for implementing a new evaluation.
Thanks a lot for your help.
CAMILO URIBEHi Neil,
The following steps describe what we did to get the new evaluation:
1. Define Attributes and Object Types for Evaluations: here we added a new field for evaluation. The field was COMPLETION (degree of processing in percent), with relevant object "TASK". "No Summarization" was configurated as Rule for Summarization
2. Define Extract Layouts: here we created a new extract layout for evaluation. The objects and attributes to be used were defined (the field COMPLETION was defined as attribute).
3. Assign Extract Layouts to Project Types.
4. Define Evaluations: the new layout for evaluation were created using the attributes.
5. Define Severity.
6. Define Threshold Values. In the new evaluation the field COMPLETION was used in the formula.
After configurating and testing, we have noticed that the values of field COMPLETION are not taking into account. It does not matter which value it has, evaluation always take 0.
Thanks for your help,
CAMILO URIBE -
How to get the field name of an internal table during runtime?
How to get the field name of an internal table during runtime?
Hi Sudhir,
Declare and Use Get Cursor Field in Your Prm to get the field Name of the Intenal Table
Example Code:
<b> DATA: v_field(60). " Insert this code.
GET CURSOR FIELD v_field. " Insert this code.</b>
<b>CHECK v_field = 'ITAB-KUNNR'. " Insert this code. (or)
Write: v_field.</b>
Regards,
Ramganesan K. -
How to change the Field Symbol, so Adobe Forms takes it as a Table?
Hi guys,
I created an Field Symbol, in a Interface which I use for Adobe Forms. The type of the Field Symbol is STANDARD TABLE, and this field symbol I fill with data from another program.
But the problem is that in adobe forms, this Field Symbol is taken as TEXT FIELD and not as Table... and this shows me a Dump because it can't convert Internal Table to type C (the dump is like that).
What I need, is how to change the Field Symbol, so Adobe Forms takes it as a Table?
I looked at Adobe Form, and found this:
The Type Category of the Field Symbol is DICTIONARY TYPE and I think I need to change it to Internal Table as shown in the right picture.
Does someone have any idea?Hello Taly,
To what i understand your requirement, you need to pass data from Field symbol to internal table in Adobe form.
You have done it correct partially. I have replicated your scenario and steps are below -
1) Create a Z structure
2) Create Z Table Type
3) Create Adobe Interface with Table & Field Symbol. Also do coding as shown to assign the internal table populated in driver program to filed symbol.
4) Design Form as -
5) Code driver as -
*& Report ZR_AF_FS_1
REPORT zr_af_fs_1.
DATA: fm_name TYPE rs38l_fnam,
fp_docparams TYPE sfpdocparams,
fp_outputparams TYPE sfpoutputparams,
it_kna1 TYPE ztt_fs_1.
* Sets the output parameters and opens the spool job
CALL FUNCTION 'FP_JOB_OPEN' "& Form Processing: Call Form
CHANGING
ie_outputparams = fp_outputparams
EXCEPTIONS
cancel = 1
usage_error = 2
system_error = 3
internal_error = 4
OTHERS = 5.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME' "& Form Processing Generation
EXPORTING
i_name = 'ZAF_FS_1'
IMPORTING
e_funcname = fm_name.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*-- Fetch the Data and store it in the Internal Table
SELECT kunnr name1 name2 adrnr FROM kna1 INTO TABLE it_kna1 UP TO 15 ROWS.
* Language and country setting (here US as an example)
fp_docparams-langu = 'E'.
fp_docparams-country = 'US'.
*&--- Call the generated function module
CALL FUNCTION fm_name
EXPORTING
/1bcdwb/docparams = fp_docparams
it_data = it_kna1
* IMPORTING
* /1BCDWB/FORMOUTPUT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
*&---- Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
* IMPORTING
* E_RESULT =
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
* <error handling>
ENDIF.
6) Output -
BR. -
Hi gurus in ALV how to edit the fields on out put list
hi gurus in ALV how to edit the fields on out put list
hi
REPORT ZSB_ALV_EDITABLE_SAMPLE.
TABLES: SFLIGHT.
DATA: gc_container TYPE scrfname VALUE 'LIST_AREA',
gc_custom_container TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
gc_grid TYPE REF TO CL_GUI_ALV_GRID,
gs_layout TYPE LVC_S_LAYO,
gt_fieldcat TYPE LVC_T_FCAT.
DATA: ok_code TYPE SY-UCOMM.
DATA: gt_outtab TYPE TABLE OF SFLIGHT.
*DYNPRO
CALL SCREEN 100.
*& Module STATUS_0100 OUTPUT
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '100'.
CREATE OBJECT gc_custom_container
EXPORTING
container_name = gc_container
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
CREATE OBJECT gc_grid
EXPORTING
i_parent = gc_custom_container
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
OTHERS = 5 .
PERFORM prepare_field_catalog CHANGING gt_fieldcat .
PERFORM prepare_layout CHANGING gs_layout .
PERFORM get_alv_display.
ENDMODULE.
*& Module USER_COMMAND_0100 INPUT
MODULE USER_COMMAND_0100 INPUT.
OK_CODE = SY-UCOMM.
IF OK_CODE = 'BACK'.
SET SCREEN 0.
LEAVE SCREEN.
CLEAR OK_CODE.
ENDIF.
ENDMODULE.
FORM prepare_field_catalog CHANGING gt_fieldcat TYPE LVC_T_FCAT.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
I_BUFFER_ACTIVE =
I_STRUCTURE_NAME = 'SFLIGHT'
I_CLIENT_NEVER_DISPLAY = 'X'
I_BYPASSING_BUFFER =
I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fieldcat[].
ENDFORM.
FORM prepare_layout changing p_gs_layout TYPE lvc_s_layo.
p_gs_layout-zebra = 'X'.
p_gs_layout-edit = 'X'.
ENDFORM. " prepare_layout
FORM get_alv_display .
SELECT * FROM sflight INTO TABLE gt_outtab UP TO 10 ROWS.
CALL METHOD gc_grid->set_table_for_first_display
EXPORTING
I_STRUCTURE_NAME = 'SFLIGHT'
IS_LAYOUT = gs_layout
CHANGING
it_outtab = gt_outtab
IT_FIELDCATALOG = gt_fieldcat
ENDFORM. " get_alv_display -
How to display the field "Country" in the Address Book UI ?
How to display the field "Country" in the Address Book UI ?
Using an add-on, MoreFunctionsForAddressBook gives you that opportunity.
-
How to change the field length in standard sap program.
Hi All,
How to change the field length in standard sap program.
Urgent
Example:
Text1 type c length 75,
To change :
Text1 type c length 150,
Point will be rewarded..
Thank you,
Vikram.CIf the only solution is to change the sap standard program, simply change the program, it will prompt for an access key. This key can be retrieved in the SAP support portal (service.sap.com) at keys and requests, sccr keys, register object.
Sometimes these actions are outsourced to a competence center, so maybe youre not entitled to do this, in any case ask a resident senior developer for support.
regards, Rob -
How to pick the fields of ABC table in Payslip
How to pick the fields of ABC table in Payslip, So i want to add the calender days(absent days) in my payslip
You can do it through PE51_CHECKTAB
Yogesh -
How to declare the field if i want the output as 300.12,00
How to declare the fields if i want the output as 300.12,00
i have a quantity field so i need to place . in place of , and , inplace of .
please help mehi,
declare its as
CURR
field.
Regards
Anver -
How to validate the field when i am populating the data cursor to block
Hi,
I am populating data cursor to multi record block.
Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
If user enter negative values and decimal points in quantity filed i need to display message to user item level.
Please do the needful how to do it.902434 wrote:
Hi,
I am populating data cursor to multi record block.
Block contain 5 items. I am populating data cursor to block for 4 items. User will enter one item value that is quantity field.
If user enter negative values and decimal points in quantity filed i need to display message to user item level.
Please do the needful how to do it.If you want to validate at entry level then use When-Validate-Item trigger and check the input and show message. Like
If :quentity <0 then
message('do not enter negative value');
message('do not enter negative value');
raise form_trigger_failure;
end if;Why u open same thread again ? not closing one.. check this one
</a>
How to validate the field when i am populating the data cursor to block
Hopes this helps
If someone's response is helpful or correct, please mark it accordingly.
Maybe you are looking for
-
Error in Consuming Portal Webservice
Hi , I created a portal web service(RetrieveAndValidateUserService) and then consumed this portal service in an AbstractPortal Component application(RetrieveValidateUserComp). On deploying that application on portal I get the following error - #1.5#0
-
Why won't our brand new Mac spstay connected to wifi?
Our WiFi keeps failing on our new iMac!!!! It will work for a couple web pages then boot us off. What do we do?
-
Error about CHsxServer.cpp
When login smartview,show the error,"请求ConnectToProvider"的响应包括意外的标记属性clientExtVersion And hfmlog show the error: Error*11*hfm25*09/13/2011 10:21:46*CHsxServer.cpp*Line 2758*<?xml version="1.0"?> <EStr><Ref>{6342FD28-E9E0-43D7-AD40-B67A369529AD}</Ref>
-
Can you correct my unfunction my script?
Hi, everyone I made a script for add a continued at end of paragraph but unfunction, call you please help to fix it? var myDialog = app.dialogs.add({name:"add continueds",canCancel:true}); with(myDialog){ with(dialogColumns.add()){ with(d
-
Drag-drop video into iphone not working
All my music and video all of a sudden disappeared off my iphone (the video podcast still were there though). I was updating and poking around, but I really don't think I delete them accidentally. I've always just dragged and dropped videos from the