Field format

hi friends.
im formatting one field which is having 12 characters.
aufk-aufnr.
suppose in csv file if i  take more than 12 characters it should display message field format is incorrect.
but the length of the field is 12 characters.
it is not displaying message.
im taking in internal table as
begin of input,
aufnr like aufk-aufnr,
end of input.
begin of input,
aufnr(12),
end of input.
i have tested 2 cases but not working.
please give necessary suggestions.

Hi Vijay,
here you are talkin about two different cases altogether. these two are to be handled differently.
one is where your order number is correct but it lacks padding zeros, in that case.
if ( strlen(aufnr) lt 12 ).
  call the conversion routine.
elseif (strlen(aufnr) gt 12 ).
  write 'format of data is wrong'.
endif.
if the order number is right and there are no padding zeros you need not throw any error in any case. no scenario shall ask you to do that.
after conversion routine is performed and then if the resulting number is not available in the master data table then we should give an error saying that such an order number doesn't exist.
Reward points if this info helped,
Kiran

Similar Messages

  • Date Field Formatting

    Hi All,
    I'm back already! Learning Flash is beginning to get to me
    again so I returned for yet more help!
    I've written the following AS code to get tomorrow's date . .
    // Calculates today's date and tomorrow's date
    var dToday:Date = new Date();
    dToday.getDate()
    trace("today: " + dToday) //today's date
    myD = dToday.getDate() + 100; // plus one day
    var dTomorrow:Date = new Date();
    dTomorrow.setDate(myD)
    trace("new: " + dTomorrow) //tomorrow's date
    var strDate:String = new String();
    var strDate = String(dTomorrow);
    trace("String: " + strDate);
    The strDate string returns the following value . . . "Tue Jul
    11 16:19:57 GMT+0100 2006".
    That is all well and good but I want to convert it into the
    following format for comparison with another field . . .
    "200607111619" which is basically the same value in the following
    format . . . "yyyymmddhhmm".
    Does the only way of doing this involve using parsing logic
    to break down the original string and then reconstruct it in the
    required format using variables from the broken down original
    string?
    I have tried looking at the Date Field object notes in my
    book but it does not give me anything as regards this programming
    requirement. The only thing I can find that might suit this purpose
    is string parsing logic. Am I right or is there an easier way to
    set a date field format?
    Any help would as always be much appreciated!
    Thanks,
    Kevin.

    I'm working on an application which requires a valid Voucher
    Number to proceed. The Voucher number is based on a combination of
    'date/time/no of items' (e.g. 20060711095802 which is today at
    09:58 (on a 24 hr clock) for 2 (02) items).
    As this date this date/time Voucher Number logic is
    essentially sequential, in that each subsequent Voucher Number will
    be greater than the last good known Voucher Number entered into the
    application (which is already stored in a variable field for
    comparison). But it must also be less than tomorrow's date, for
    which the Voucher Number would always be tomorrow's date (e.g.
    20060712 at 00:00 hrs for 00 items, thus giving 20060712000000).
    This is the value that I'm trying to ascertain from the date field
    logic.
    It would thus be really handy for comparison if I could just
    format tomorrow's date and time in the format yyyymmddhhmm and just
    add '00' to the end of the string.
    I don't like the idea of using the milliseconds value as it
    will be necessary then to convert the Voucher Number entered to a
    date field for comparison.

  • How to copy paste a table structure from word document into Text Field [field format Rich Text]

    In our current implementation we have a Blank page with Text Field [field format Rich Text] on generated PDF Document.
    Once the PDF document is generated, user can copy paste content form any word/rtf document to into the Text Field.
    Pasted content retains all text formatting [Bold, Italic, Underline, Indentation] except the Table format. Text Field is removing table metadata from the content and converting it into plant text.
    Is there anyway to copy paste table structure as it is from word document into Text Field?

    Hi,
    I don't think you can! While you can paste formatted text into the rich text field, the table metadata means nothing to the textfield.
    Niall

  • View Field Formatting in the Active Studio:

    Hi
    View Field Formatting in the Active Studio:
    I need to format a date type using the Brazilian format: “dd/mm/yyyy”.
    How can I create this format? What do I do to show this format?
    Alexandre

    Any ideas?
    Thanks
    Alexandre

  • Whole number field formatted as timezone in CRM 2013 SP1UR1 gives error on saving

    Hi,
    I added a whole number field formatted  as time zone to the appointment form and when I save the record I get an error saying
    Crm Exception: Message: An unexpected error occurred., ErrorCode: -2147220970, InnerException: System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.OptionSetValue' to type 'System.IConvertible'.
    This error is coming from the timezone field and only happens when I have data in the field. Has anyone seen this?
    Thanks
    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    More info, the error occurs on pipeline stage 30 of the Book or Reschedule message and the same thing happens in CRM 2015. I've started a thread on connect with URL
    https://connect.microsoft.com/dynamicssuggestions/feedback/details/1128206/crm-2013-sp1ur1-cant-handle-the-timezone-field
    This must be rather new because I've tried it in CRM 2011 UR late and it did not occur there, I haven't tried CRM 2013 RTM though so I can't say if it's a CRM 2013 or a CRM 2013 SP1UR1 issue.
    BTW, the 2015 org was a complete vanilla so I've pretty much ruled out custom code as a culprit :)
    Regards
    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

  • Invalid field format (screen error) on Table Control

    Hello,
    When selecting a line or multiple lines on a screen made by me(using a Table Control), I get Invalid field format (screen error). Debugging the code it sends the message when looping the internal table on PAI to check if there were values changed. Is there a reason why this error appears on this?
      loop at it_values.
        chain.
          field pvalues-BEGDA.
          module CHANGE_QUEUE.
        endchain.
      endloop.
    Thanks.

    No need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
    So the following code is enough;
    IF SY-DATAR EQ 'X'.
       PERFORM SAVE_DATA.
    ENDIF.
    Regards
    Karthik D

  • Error in module program - Invalid field format( screen error )

    In the module program i have added 1  input field named gv_pallet of 1 character. while processing the transaction when i put value 1 in this input field and press a button i am getting error ' Invalid field format( screen error ) .
    I am not geting any clue whats the eror . can anyone able to tell me the error.
    Point will be guranted .
    Regards

    No need to loop to check whether data is changed after PBO, just check System Field SY-DATAR, it will be set to 'X' if any field was changed.
    So the following code is enough;
    IF SY-DATAR EQ 'X'.
       PERFORM SAVE_DATA.
    ENDIF.
    Regards
    Karthik D

  • Error Invalid field format (screen error) in module pool

    Hi
    experts i am doing module in whichi had many check boxes on screen and each check box has function code means i want to do some thing else . but as i click the first or any other check box i get a error message
    INVALID FIELD FORMAT (SCREEN ERROR).
    Can anyody help me with this asnwers will be rewarded points .
    regards

    Dear Farukh,
    can you please let me know how have you declared you check boxes.
    how did you handle the click or the function codes in the user command module in your PAI.
    The declaration of your fucntion codes can be done when you create your screen fields and then they need to be handled in the user command module i.e what you want to do when suppose you click on that particular check box.
    Thanks
    venugopal

  • Invalid field format (screen error)

    We are using custom module pool report for displaying information. Information display in Table control which has also Radio button option for the further processing. After unicode conversion we are getting error while accessing the screen as "Invalid field format (screen error)" when user select Radio button. In production environment we are not facing any issue, but in Dev + Qas we have this issue. Nothing is changed as all environment are sync. To solve the issue we re-defined the Radion screen element, but no success we are still getting same error. I am not sure whether it is related to Page Format or something else. Could you please let me know whether anybody faced this issue ? For the information, I already searched on SDN and SNote, but there is no post or SNote

    Have you checked if there are overlapping fields on the screen.
    I've seen simular errors and usually it was beacuse of some change by SAP that made it so that the defined length of the screen field was suddenly to small.
    I'm not saying that this is the case in your situation, but it never hurts to try and change the length of your screen field and see if that resolves the issue.
    Arthur

  • Determine Date field format dynamically

    Hello friends,
    I'm writing some database access code in java. The biggest problem I face is date fields. Because I don't know the date field format (For example, in SQL Sever we can have dd/mm/yy or mm/dd/yy, etc), I can't format dates for insert/update statements.
    Is there a way to determine the date field format dynamically? Regardless of database, for ex. MS SQL, Oracle?
    Thank you.

    Hey!
    There is a way to do this! The Oracle Database understands SQL92 Syntax. So you can use
    - {d ?yyyy-mm-dd?} for date representation,
    - {t ?hh:mm:ss?} for time representation,
    - {ts ?yyyy-mm-dd hh:mm:ss.f...?} for timestamp rep.
    Here is a small example:
    // Connect to the database
    // You can put a database name after the @ sign in the connection URL.
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@", "scott", "tiger");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select the ename column from the emp table where the hiredate is Jan-23-1982
    ResultSet rset = stmt.executeQuery
    ("SELECT ename FROM emp WHERE hiredate = {d ?1982-01-23?}");
    // Iterate through the result and print the employee names
    while (rset.next ())
    System.out.println (rset.getString (1));I hope this is what you wanted to know!

  • WLC "DHCP Option 82 Remote Id field format"

    On WLC, does "DHCP Option 82 Remote Id field format" show client hostname on wlc monitor

    Hi Jonathan with sub option 2, from your example D is the node identifier.
    When seeing the variable per connection type, I would give a safe assumption it is verbose padding the sub type 1.
    The verbose pad formatting for the packet should contain
    sub option
    length
    node identifier
    port type
    interface number
    vlan id
    For normal pad format it should contain
    sub option
    length
    circuit
    length
    vlan id
    interface number
    -Tom
    Please mark answered for helpful posts

  • It would be helpful if there was a field formatted to enter a telephone (i.e. (000) 000-0000). Am I missing this option somewhere?

    We collect telephone numbers on some of our forms.  Is there a field formatted for easy entry?  Don't see that this is a current feature in the text umber fields.

    Hi,
    Unfortunately, this option is not available with forms created through Forms Central.
    Regards,
    Nakul

  • Dialog Screen - Invalid field format (screen error)

    Dear all,
      I have developed a modal dialog screen and succesfully invoked it with CALL SCREEN command in the main screen.  Unfortunately, it always returns "Invalid field format (screen error)" when clicking on the dialog's GUI control such as button or radio button.  Anyone encountered this before??
    Regards,
    KK

    Hi KK,
    Just make sure that the fields take on the screen are also declared in the top module of your program.
    And also match their data-types and size i.e., declared in top module and on the screen in their respective attributes.
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • Search Help error : Invalid field format Screen error

    Hi All,
    I have attached a search help to contract field for contract no and item number. (in my own screen developed in a  report)
    The search help picks up data and assigns it to the fields,
    But after this when I click on any other button, I get error saying :
    <b>Invalid Field Format (Screen Error) !!!</b>
    Any pointers guys !!!
    Warm Regards,
    Girish

    screen checks in abapautomatically checks for format of field when u enter data....i.e date, integer etc...the problem in this case is that when u seelct a value using the help it is filling a value which is not the correct format...so check for the data types and test it again...this is definitely the problem.

  • How to maintain the amount field format after GUI_DOWNLOAD

    Hi everyone.
    I have this problem on my object.
    The format of field ERFMG in table AUFM is 3.921,569.
    After I SELECT it INTO an internal table it becomes like this 3921.569
    I would display this internal table in ALV and its ok. Its format is 3.921,569 The format is also not changed when I download it into an excel file using LIST -> EXPORT -> LOCAL FILE -> SPREADSHEET.
    However my program should automatically download to local if the user tick a checkbox in the selection-screen. It will use function module GUI_DOWNLOAD. When this is used, the format of ERFMG changes to 3921.569 again, since it is using my declared internal table.
    How will I use GUI_DOWNLOAD without changing the format of amount fields like ERFMG? What are my other options to do this?
    The Decimal Notation in my User Profile is already set to 1.234.567,89
    Thank you in advance.

    Hi Cris,
    To get the output in the user format for the decimals, try the following code.
    data: wg_dec(7) type p decimals 2.
    data: wg_dcp type usr01-dcpfm.
    data: wg_dec_str(10) type c.
    wg_dec = '111135.67'.
    select single dcpfm from usr01
            into wg_dcp
           where bname = sy-uname.
    move wg_dec to wg_dec_str.
    if wg_dcp ne 'X'.
      replace all occurrences of '.' in wg_dec_str with ',' .
    endif .
    write:/ wg_dec, wg_dec_str.
    I dont feel there is any other option where you can change the decimals format as per the user profile.
    While giving the output of decimal values in a list, the system automatically displays it in the profile set by the user.
    This code will help you to set the decimal value as '.' or ',' as per the user profile.
    Note: It wont add the unit separator for hundreds and thousands. Again you have to do that manually.
    Hope this proves of some help to you.
    Regards,
    Pulkit

Maybe you are looking for