How to set Character field's Format Mask?

dear all,
how to set Character field's Format Mask?
i searched the forum and found the following, where can i use this code and how to change and set its format mask.
SRW.SET_FORMAT_MASK('mask');
Thanks
Muhammad Nadeem

Nadeem,
If you have database 10g, look into function REGEXP_REPLACE. Otherwise you can also try this (you might already know).
SELECT SUBSTR('CHHOCMIPO07020001', 1,2)||'-'||SUBSTR('CHHOCMIPO07020001' ,3,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 5,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 7,3)||'-'||
SUBSTR('CHHOCMIPO07020001' , 10,2)||'-'||SUBSTR('CHHOCMIPO07020001' , 12,2)||'-'||
SUBSTR('CHHOCMIPO07020001' , 14,4)
FROM dual
CH-HO-CM-IPO-07-02-0001
If you have to use this at many places, create a function, pass the raw value, manipulate the string and return.
FS

Similar Messages

  • How to set datetime field display format in a jspx page

    hi, jdev 11.1.2.3
    have a field in EO/VO being set to DateTime format, and can see the right display in the Oracle ADF model tester.
    but only displayed in Date format even had been set to "javax.faces.DateTime" for Converter attributes in Property palette for the field.
    what should i do?
    thanks.

    at the first glimpse when i set the Control Hints section there are two choices for FORMAT TYPE: none, and simple date.
    and the FORMAT field is disabled. so, i just skip the FORMAT TYPE(none, simple date) choice.
    in fact after make the choice of simple date for the FORMAT TYPE, then FORMAT can be set to:
    ...dd-MMM-yyyy hh:mm:ss a
    and it works now.
    Puthanampatti, thank you once more!

  • How to set key fields in a Database view

    Hi guru's
    iam balaji,plz guide me with how to set key fields in a view.......that field is a non key field in the base table....
    thanks in advance,
    Balaji.S

    take a look at this:
    Diagnosis
        In the view, not all of the mandatory fields were included as key
        fields. The key of the view therefore is not unique.
    System Response
        All the fields are regarded as key fields in order to guarantee that th
        key lengths are unique.
    Procedure
        For views with a large number of fields, this could have a negative
        effect on the performance for the language construction described below
        In this case, all the mandatory key fields should be included in the
        view.
    regards

  • How to set the field SKB1-FDLEV as requestred-entry in G/L Master data?

    Hi All,
    Could anyone tell me how to set the field SKB1-FDLEV as requestred-entry in G/L Master data?
    Thanks
    Gandalf

    hi
    Go to OB26
    select Your criteria ( create, change or display)
    double click on it
    again double click on Bank/financial details
    there you will find the Planning level make it require entry
    save
    with regards
    ramanuja chary

  • How to set the field non-editable in the classical report..

    Hi..
              How to set the field non-editable in the classical report..

    Hi experts,
    For the component 'ICCMP_EMP_SRCH' there is a view 'BUPAEMPSEARCH' , which has 2 context nodes 'CUSTOMER' AND 'SEARCHEMPLOYEE' , i need to add the field 'NICKNAME' which is part of the 'CUSTOMER' context node on the search screen. Currrently all the fields on the screen screen are from the 'SEARCHEMPLOYEE' context node. when i did the configuration , the 'NICKNAME' field is greyed out . I have already generated the Getter ,Setter , GET_I, GET_M methods for the 'NICKNAME' field and the context node and controller class and context class are all active .
    on debugging the GET_I method, i see that rv_disabled = 'TRUE' and the current = collection_wrapper->get_current( ) is returning empty value .
    for this rv_disabled to be set false , the code below is not triggered since there is no value in current.
    IF current->is_property_readonly(
    'NICKNAME' ) = abap_false. "#EC NOTEXT
    rv_disabled = 'FALSE'.
    ENDIF.
    when i check for other search fields of context node 'SEARCHEMPLOYEE' , all the fields are set to rv_disabled = 'FALSE'.
    can anyone suggest how to approch this. iam i missing any binding between context nodes or any activations ?
    The field properties are set as Input field and the display checkbox is not checked.

  • How to set the field size in rule file.

    i have to map total 30 fields in a rule file while by default it allows only 20 fields. so how can we set the fields as per our need?

    Hi Dharmendra Ojha,
    Essbase rule file does not constrain you with only 20 fileds.
    When you click on 'create a rule file', by default it ll show you 20 fileds .But , when you open a data file ( in your case , you data file has 30 columns i.e 30 fields) in the data prep editor , you ll see all 30 fileds .
    So ,you have to do nothing to increase the filed count , rule file will automatically show all fields .
    Revert back for further clarity
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • How to set default field values in customer master data.

    hi,
    I want to set default values in customer master data (account group wise).
    but
    I don't know how to set it .
    please help me.
    (I don't want to change field status in account group rather than I want to set default values for field. )
    thank you.

    hi,
    this is to inform you that,
    in SAP there is no such a provision.
    but
    in LSMW there is an option of CONSTANT VALUES.
    check in SHD0 - also
    please check and confirm
    balajis\a

  • How to set User-field in Plan order

    Hi
    could you tell me please how to set a user-filed in plan order. when I run MRP planing, I can write some data in this filed.
    thanks
    henry

    Hi,
    Actually these user defind fields are used/assigned in the routing.
    Initially u have to define your own user defind profile through OPEC transaction.
    Assign this profile in the routing.
    So when ur executing Mfg activities, suppose if ur using some high materials like silver...etc.
    Then after executing the particular operation some amount of silver chips or silver scrap will generated .
    To keep chip/scrap qty operation and date which user defind is used.
    Once u have assigned this profile to routing, then it will be automatically copied in the planned order/production order.when ur confirming the order then u have to enter the all related data.
    Regards
    Vijay

  • How to set a Default date format.

    I would like to know if it's possible to set a default date format (b.e. dd/mm/yyyy) for new date object and not for the current object?
    Thanks

    default date format (b.e. dd/mm/yyyy) for new date objectI would guess not, and that is regardless of how they format it.
    Consider the java.util.Date.toString() method. There is no way to change the behaviour of that unless you want to derive a class from Date.
    At least not in 1.3.0 it isn't. The java.util.Date class uses a private data member called simpleFormatter which it hard codes to
    formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US)
    If however the time was formatted using the defaults from java.text.DateFormat then you could set the TimeZone. However, that doesn't impact formatting, it merely changes the offset (and daylight savings.)
    You could set the Locale in java.util.Locale. That looks like a real possibility. But the documentation doesn't really provide anything that suggests how you provide your own and impact the time stuff. For example, Date which uses static finals for the time stuff - which suggests Locale can't impact it. And of course changing the Locale would impact your entire application, so you would have to make sure all threads were blocked while it was changed.

  • How to set "like" field of the query in statements

    Hi,
    Im trying to set the "like" field of the statement.but it is not executing as expected.Could anybody please tell me,"how to set the like field in statements.
    Here is my code.
    PreparedStatement psum=con.prepareStatement("select count(bill_amount) from master where bill_date like ? and whos_bu=?");
    String myStr=month+"/??/"+year;
    psum.setString(1,myStr);
    psum.setString(2,employeeTray[1]);
    ResultSet rs=psum.executeQuery();

    Tnx a lot vidyut .using % is working.
    Could you plz tell me why the previous one using question mark is not
    working. using quesion mark is correct as per the query syntax.and also i tried with asterisk,it is also not working.
    ps:have some duke dollars.

  • How to set table field mantatary in data dictinary?

    how to set the table field mantatary in data dictinary?
    exampl
    null value not allowed.

    hi,
    check this.
    [https://forums.sdn.sap.com/click.jspa?searchID=19187532&messageID=2575276]

  • How to set screen field in ME_PROCESS_PO_CUST?

    Dear all,
    I need to set this field 'MEPO1317-MWSKZ' to display only by some criteria. I want to know HOW to do it in ME_PROCESS_PO_CUST
    Thanks for your kindly helpful.

    Hi Esaki,
    1) Define new field selection in configuration "Define screen layout at Document level"
    2) write code in fieldselection_item_refkeys as follow
    get item data
    if your condition
      ch_key0 = new field selection
    endif
    Hope it can help u.
    Grace

  • How to set summable field in ALV

    Dear ABAPers,
    I find report that use ALV to show the output. Using my id the field with number type is summable (using ALV sum functionality) but using other id, it can't. Does anyone know how to set this functionality? I read several posting that this one is achieveable by setting up t_field_cat-do_sum = 'X'. But with this set up, it shouldn't have difference when I run by my id and other. I suppose there is something in ALV setting that need to be configured. Please let me know if there are any idea about this issue.
    Thanks a lot.
    Regards
    Hadi

    Hi Karthik,
    We don't set user specific layout. I am afraid there is some authorization code set in the program and it determine ALV activities on different user. Are there possibility of it in ALV?
    However thanks alot for your suggestion.
    Regards
    Hadi

  • As a webservice client, how to set character encoding for JAX-WS?

    I couldn't find the right API to set character encoding for a webservice client. What I did is
    1, wsimport which gives me MyService, MyPortType...
    2. Create new MyService
    3. Get MyPort from MyService
    4. Call myPort.myOperation with objects
    Where is the right place to set character encoding and how to set it? Thanks.
    Regards
    -Jiaqi Guo

    The .js file and the html need to have the same encoding. If
    your html uses iso-8859-7, then the .js must also use that. But if
    the original text editor created the .js file using utf-8, then
    that is what the html needs to use.

  • How to SET CHARACTER SET UTF8

    I am looking to execute something like the stmt "SET CHARACTER SET UTF8"
    However if i put the above stmt in a SQLDBC_Statement_execute call, i get fail message.
    I should also mention here that, SQLDBC_Connection_connect call provides a way to provide the character set as one of the parameter. Is that the only way we can set character set from an application while using SQLDBC ?
    Regards
    Raj

    Hi Lars,Elke and Thomas,
    Thanks to all of you for your valuable input. Honestly speaking i'm little lost on how to go about this requirement of unicode support for my application. Please allow me some more time to investigate this and then get back to you.
    In my application for all other databases a simple execution of "SET CHARACTER SET UTF8" is all that's been done to set the support for UTF-8. So, I really need to figure out what all changes needs to be done in the app if this is not going to work.
    In the meantime something more caught my attention while i was using this command:
    sqlcli MAXDB1=> \dc domain.columns
    Table "DOMAIN.COLUMNS"
    Column Name
    Type
    Length
    Nullable
    KEYPOS
    SCHEMANAME
    CHAR UNICODE
    32
    YES
    OWNER
    CHAR UNICODE
    32
    YES
    What does the type  'CHAR UNICODE' for Type means here?
    Regards
    Raj

Maybe you are looking for

  • Error while executing in the DB adapter

    hi When i register some service in the ESB console. i get this error when the Db adpater try executing the stored procedure. stored procedure is not getting executed through the DB adapter, but when it is checked individually it works. but in the ESB

  • Assassin's Creed2

    Hi I have  HP  Pavilion g6-1048se Notebook When i play Assassin's Creed2   A little slow   This is normal, with the ability of the device???

  • Disabled combo boxes don't display properly after loading a movie.

    Hi, I have a main movie that contains some combo boxes. Some of them may be disabled. By pressing a button I load another movie using loadMovie. The loaded movie also contains combo boxes. When the button is pressed, the clip that shows the combo box

  • Enabling screen sharing through .mac or VNC

    I want to enable screen sharing on my desktop computer from another network (so I can connect to my home machine from the office, or on the road). I have successfully enabled my router to allow VNC traffic, and have been able to connect from my lapto

  • Can i use Access 2000 for my JDBC program?

    I tried to run a JDBC program from a book and it worked. The problem is, it uses an outdated "Informix" database. I want to do it in Access 2000. Is it possible? Please give me a sample code if you have guys. Thanks Moses