Set up or flag the field of attribute as mandatory or optional

Hi,
I’d like to know if it’s possible to either set up or flag the attribute fields as either mandatory or optional. Is it possible with Java API?
Thanks a lot.

Hi Thomas,
You have setting in the Console called Required that you can flag YES or NO to indicate whether the field is required or not.  However, this option setting does not actually enforce anything as of now.  In future releases of 2006, there is a proposal to enforce this.
For now, the way I worked around is:
1. I flag the field required YES in the console if I do NOT want NULL values in the field. (for the sake of setting).
2. Then, in data manager I write validation expression using IS_NOT_NULL function on those fields so that manual entry does not allow NULL values.  It throws an error.
3. Import Manager however cannot retrieve the validation expressions.  So, you can load null values in a field that has the expression written.  You will identify these if you manually run validation after the loads.
4. <b>JAVA API</b> lets you enforce this when you are using API programs to post the data.  You can write such that if the consoel is set to YES, then do not let NULL values to post.
I have some information around requried in fields in my blog:
/people/savitri.sharma/blog/2005/09/22/tips-and-hints-for-new-mdm-users
Is this helpful?
Good luck
Savi

Similar Messages

  • How to set white spaces between the fields in dataset??

    Hi all,
    I am writing a set on information to from infotypes to a text file. Its a fixed width file. How do set white spaces in the fields for dataset?
    Example:
    TYPES: begin of header,
                    filler(40)  type c,
                    id(3)        type c,
                    filler2(7) type  c,
                    delimiter  type  c,
                 end of header.
    DATA header type header.
    header-filler1 = ' '.
    header-id       = '100'.
    header-filler2 = ' '.
    header-delimiter = cl_abap_char_utilities=>newline.   ( do it to get a new line)
    my_table = header.
    append my_table.
    DATA: out_file(256) type C,
          codepage_ref type ref to CX_SY_CONVERSION_CODEPAGE,
          out_char type c,
          size type i,
          insert_string type string,
          insert_size type i.
      out_file = filename.
      open dataset out_file for output in text mode ENCODING NON-UNICODE.
      LOOP AT my_table.
        size = strlen( my_table ).
        insert_string = ''.
        DO size TIMES.
          offset = sy-index - 1.
          try.
              out_char = my_table+offset(1).
              IF out_char = SPACE.
                CONCATENATE insert_string '' INTO insert_string SEPARATED BY SPACE.
              ELSE.
                CONCATENATE insert_string out_char INTO insert_string.
                transfer insert_string to out_file NO END OF LINE .
                insert_string = ''.
              ENDIF.
            catch CX_SY_CONVERSION_CODEPAGE.
              insert_size = strlen( insert_string ) - 1.
              insert_string = insert_string(insert_size).
          endtry.
        ENDDO.
       transfer CL_ABAP_CHAR_UTILITIES=>NEWLINE TO out_file NO END OF LINE.
      ENDLOOP.
      close dataset out_file.
    How do I get to insert the space for filler1 and filler2?
    Edited by: Siong Chao on Oct 4, 2011 4:56 AM
    Edited by: Siong Chao on Oct 4, 2011 8:27 AM
    Edited by: Siong Chao on Oct 4, 2011 8:29 AM

    problem lies in the open dataset codes
    Used:
    open dataset out_file for output in text mode encoding non-unicode message msg.
    if sy-subrc= 0.
    loop at my_table.
    transfer my_table to out_file
    transfer cl_abap_char_utilities=>newline to out_file no end of line.
    endloop.

  • Need to set default values for the fields plant and location in ME21N

    Hi All,
    i need to set default values for the fields plant and location in ME21N tcode.
    In accout assignment if we give 'A' then we need to create asset by clicking the Asset tab,there you have the fields plant and location.
    How to resolve this?
    Thanks in Advance

    hi .
    i needed to set default strorage location and plant in personal setting  in me21n.
    i solve it with this way.
    go to program SAPLMEPERS in se38.
    create new function in output with the sample name :MODULE ZTEST_001 OUTPUT.
    in this module write:
    if MEPOITEM_PROP-WERKS is INITIAL and  MEPOITEM_PROP-LGORT is INITIAL.
    MEPOITEM_PROP-WERKS = '1000'.
    MEPOITEM_PROP-LGORT = '0032'.
    endif.
    this is the solution.
    best regards.
    maryam

  • Department Field in the Cost Center as a mandatory from optional.

    Hi,
    I need to make Department field in the Cost Center as a mandatory from Optional.
    Kindly suggest on making mandatory to Department field in the Cost Center.
    Regards,
    Anand Sheelavant,

    Anand,
    Go to IMG General settings and configure new transaction fields. Select the transaction codes to be adjusted, I think you should use KS01 (Creat Cost Center) and KS02 (Modify CostCenter) and create new transaction variants where deparment field is mandatory. Then use these newly created transactions variants to substitute the standard ones by assigning/activating them to transaction codes, KS01 and KS02.
    Hope this solve your issue.
    Regards,
    GG

  • User Exit for making the field Bill of Lading Mandatory in Delivery

    Please suggest an User Exit for making the field Bill of Lading Mandatory in the Delivery document when we create an inbound delivery.

    Hi,
    I'm not sure, pls check these
    USEREXIT_SAVE_DOCUMENT_PREPARE
    EXIT_SAPLV46H_001
    NOTIF_EVENT_SAVE
    thanks
    Mohanprabu C

  • Setting max length of the field when using Context Model Node

    I have created a model using Import Adaptive Web Service model option (a web service was a wrapper around SAP BAPI function module).
    There were no dictionary types created in the Local dictionary as a result of import.
    I have mapped the context of the controller to the model node.
    One of the fields in the model is name     CUSTOMER_NUMBER type string;
    Corresponding element in the wsdl of the web service is
    <xsd:element name="CUSTOMER_NUMBER" type="tns:char10" />
    I have created a view with the input filed mapped to the CUSTOMER_NUMBER field of the model node.
    When I type more than 10 chars into the field and hit the search button, I get a com.sap.dictionary.runtime.Ddcheck exception that the length of the field should be less than 10 chars.
    How can I set the max length of the field in design time to prevent runtime exception?
    Thanks,
    Julia

    Thank you for your reply.
    Java trim function will trim the white spaces only, not the characters.
    I can code check length functionality before calling execute function (the function that call the web service).
    I can also create a dictionary structure based on the model structure; create a context value node based on the dictionary structure and use WDCopyService API to move the data between value node and model node.
    I was looking for the best practice...
    When importing model based on Adaptive RFC, the dictionary structures are imported together with the model. This does not happen for Adaptive web service - hence there is a need to add coding for simple checks.
    Julia

  • Prod No validation at the field level attribute

    Hi,
    I have a qualifying table, whose field refers to one of the product number in main table. It means, I can have a product number linked to another product number defined in the main table. Hence, I have defined the text field in the qualifying table to capture this related product number.
    Now, how do I validate, if the product number entered is valid within Data Manager. Basically, it needs to validate if the product number specified is present in the main table.
    Please let me know, if any suggestions to define such validations on a free-form text field.
    Thanks,
    Surendra

    Hi Surendra,
    Make the prdt no as a unique field.If when ur gng to add any new record with the prdt no already in the main table then it will pop -up a message that record already present.
    I think this may solve the issue (acc to my understanding)
    If problem persists kindly explain the scenario in simple manner.
    Hope this amy help u.
    Rgds
    Ankit

  • Setting  Default values in the Field

    Hi all,
    In Purchase order document i want to display 99999 number in the quantity field as soon as i purchase order document is opened.
    can you please guide me how to do this through stored procedures...?
    Regards,
    Chetan

    Hi Chetan,
    You can create Formatted Search. Simply use this query,
    SELECT 99999 as Quantity
    and assign the query to the Formatted Search.
    Hope it helps.
    Cheers,
    Marini

  • How to Insert more than one record at a time- with fixed set of values in one field

    Can someone guide as to how to insert multiple records at a time using ASP VBScript in Dreamweaver CS4 or ADDT.
    If someone can guide then the exact problem is given below.
    I have a MS access database with one table. The table has three fields. The first field is an autonumber field for ID number.
    The second field contains string values- One out of 7 predefined values. One set of records consists of 7 records containing all the seven types of predefined values in fields no 1.
    The third field is a numeric field and can contain integers.
    I want that the user can enter data for the table using an ASP form in such a way that he enters one set of records at a time in one single screen. This way he will not have to remember that he has /has not entered all the seven set of values for the field no 1.
    I am not creating fields with the 7 types of field1value as their names as it will increase the number of fields drastically.
    Please help for dreamweaver ASP VBScript.

    I have successfully inserted seven records in one form submit operation by looping through the command object execute method.
    However, the data that is being inserted by the command object is repetition of the first record and the command object is not taking any data from the text boxes for the second record onwards. In this I had used the isert record behavious generated by DW CS4 and modified it to suit my requirement. However, the data inserted in the first row is getting repeated in all the seven rows.
    Please help.
    Also advise if there are any free dreamweaver server side validation extensions available.

  • How do I check Business object set type for a particular field

    Hi,
    I have a requirement to make the  DESCRIPTION field editable  for Internal Goods and Service .I have done it for Limit shopping cart with following details in the below configuration
    Goto SPRO->SAP Supplier Relation ship Management
                             ->SRM Server
                                 ->Coss applications and settings -> Extensions and Field Control
                                          ->Configure field control->configure control for fields substructure (in tabs field)
    Bus. Object Set Type  32  
    Structure Field Name   DESCRIPTION
    Bus. Object Type        BUS2121
    Set Level                    ITEM    
    field editable               checked
    But for  Internal Goods and Service which Bus. Object Set Type should i use to achive this
    Thanks
    Vivek

    Hello Vivek,
    Execute transaction SM30 and display the Table/View /SAPSRM/V_ACTSET. Here you will find set type of all the fields.
    Regards,
    Arun Singh

  • "Page" and "Rect" props of the Field prop in Javascript API

    Page property of the Field property in Javascript Acrobat API returns an array of pages that this field exists in. On the other hand, "rect" property returns just one set of coordinates of the field on a page.
    My questions are:
    1. Suppose field's "page" property returns two pages, 2 and 3, for a document in question. How I can use "rect" property of a field to determine position of the field on these pages?
    2. If "rect" property of a field is not the one to be used to determine position of a field on a page - then what property should I use?

    Aha! Thank you, guys! So, to summarize, at least in the case of "simple" field, the notation FieldName.PageIndex creates a fully qualified name for a field located on a specific page. Page index is an 0-base index to an array of pages that is returned for a generic FieldName.
    Example:
    Call getField("Test").page returns (4, 6, 8 ). It means that there are three fields in the document that start with "Test": "Test.0", "Test.1" and "Test.2" and these fields are located on pages 4, 6 or 8 but not necessarily in order.
    Calls to getField("Test.0").page, or getField("Test.1").page or getField("Test.2").page
    should _always_ return one page where this field is located and not an array of pages.
    Correct?

  • How can I set a description during the FI-TV posting (PRFI transaction)

    I would like to set a description in the FI text position field (BSEG-SGTXT) during the posting of travel management (PRFI).
    Thanks

    I've found  the implementation Z_TRIP_POST_FI_IT connected to the class ZCL_IM__TRIP_POST_FI_IT. Using the methods methods IF_EX_TRIP_POST_FIEX_SGTXT and IF_EX_TRIP_POST_FIMODIFY_PTRV_DOC_IT it's possible to set a description in the field SGTXT.

  • Subject: How menage the field "Srv.-based inv. ver." in create vendor MK01

    Hello,
    I need to set the field 'Srv.-based inv. ver.' optional during the creation of a vendor.
    In the Status Group of the vendor the field is set to optional, but it still remains
    invisible.
    I thank you in advace.                                              Regards,
                                                                                  Paolo.

    Hi Paolo,
    01. Use Tcode OMSG
    02.Select the account group with which u create the vendor(in MK01)
    03.Go to field status sub screen
    04.Click on purchasing data
    05.You will get a new screen, there again click on purchasing data
    06.Go to page no. 3 by using page down
    07.In page No.3, change the radio button to "Opt entry". Save the change.
    Now try again and let us know. All the best.
    Regards,
    Rams

  • Making the field "company code" mandatory

    Hi SAP experts,
    is it possible to make the field : company code, a mandatory one in the initial screen of XD01 transaction (create customer)? How?
    Best regards,
    Bahia.

    Hi Bahia
    How are you? Why no posts for a long time?
    Making COMPANY CODE as a mandatory entry i think it is not possible with customization
    This means you cant achieve this thro OBD2 or OB20 or OVT0
    It is because SAP has given the provision of creating CMR only with general data and sales area data
    With these two levels SD people can do most of their processes  (t codeVD01)
    Similarly SAP has given the provision of creating CMR only with general data and company code data
    With these two levels FI people can do most of their processes( like that FI people also has t code to create CMR only with general data and company code)
    These provisions where it  is applied practically,, i dont know?
    But thro development i think you can make each and any CMR you prepare it should be only with XD01 and that too in that Company code has to be made mandatory
    Check with your technical team
    Regards
    Raja

  • How to set the default values of the field of the context.

    Hi Experts ,
    I want to set the default value of the field of the context.
    Where and how this declaration should be done.
    Thanks in Advance.

    In the context tab of the view. Select the attribute for which you want to set the default value.it will show the properties at the bottom. set the Default value property to the value which you want to set as the default value.
    Regards
    Naresh

Maybe you are looking for

  • In Itunes 11 Podcast Settings?

    I can't find the settings for all podcasts. I want to stop my podcasts from automatically downloading. Any help anyone?

  • Inspire A500: Is there any adapter for the TV or DVD Player?

    I have recently bought the Inspire A500 and wanted to know if there was any possible way of connecting it to my TV or DVD Player?

  • Calls offered = Calls Handled & Abandoned in Q?

    I have produced a report that shows calls Handled and Abandoned in Queue, however they do not add up to the total calls offered, The report is showing Handled @ 329 & Abandoned in Q 273, where as calls offered is 524. The discrepancy is 48 calls! In

  • Query weird problem

    Dear all, 10.2.0.4 on solaris 10 We have a program which gives the error : Search Results ORA-00907: missing right parenthesis when I traced the session, we are getting the below error : PARSE ERROR #6:len=261 dep=0 uid=185 oct=3 lid=185 tim=11975472

  • Solman 7.1 - MOPZ

    Hi, We have installed and configured a new SolMan 7.1 . We are trying to run the MOPZ in order that the system automatically detects the lates patch version and the xml , but we are having these errors: and on the LDMB and SMSY , DB and message serve