Value conversion according to User default

Hi,
I have a Problem in a BDC. I am trying to populate pick quantity filed in my BDC ( Tcode VL02N ) the BDC works fine for a particular user default setting( NNN,NNN.NN ). But is the same program is used by some other user whose Default settings are different ( NNN.NNN,NN ) BDC fails .
I need to convert the value based on user default before passing it to the field in BDC.
pl. suggest me the solution .
Thanks.
Hitesh

Hi
Try to use the WRITE command before transfering the value to BDC table
DATA: QUANTITY(20) TYPE C.
WRITE <QUANTITY> UNIT <UNIT> TO QUANTITY.
<BDC>-VALUE = QUANTITY.
APPEND <BDC>.
In this way the WRITE statament'll write the quantity in the format according to user default parameters.
Max

Similar Messages

  • Formatting a date according with user settings (user defaults)

    Hi All,
    I need to format a date I receive via JS in YYYYMMDD format according with user defaults <b>without</b> server side action (I know, this is not a good issue, but they want it).
    My solution is to write a JS function (there are a lot of it on WWW) which accepts two strings and formats the first according to the second, something like:
    userFormattedDate = formatDate('20060613','DD.MM.YYYY');
    paying attention to generate 'DD.MM.YYYY' string on server side, according to user settings.
    But if this isn't a weblog, where is the question? :-D
    The question is: is there a JS function (in DatePicker or dateNavigator BSP) provided by standard libraries which serves similar functionality?
    Does exist a JS public standard library?
    Thanks.
    Dany

    Hi Durairaj,
    Tags <% %> are for server side actions.
    The question is about obtaining the same effect, but client side.
    Thanks.
    Dany

  • User default settings and DI

    Dear all,
    I have created a delivery draft add-on using DI api.  Inside b1, each user account has its own defult for document numbering.  However, when using the add-on to post delivery draft, the document numbering series is not using the user default.  I am wondering if anyone knows how I can set the numbering series to the user default one?
    Regards.

    Hi Alan!
    I don't fully understand you are talking about, but probably HandWritten property is what you are lookin' for:
    -- DI Help snippet --
    <i>In case the value of the HandWritten property is tNO and you add a sales document, SAP Business One automatically assigns the next available number to the document, in accordance with the document numbering system defined during system configuration.
    When saving the document as a draft, this number is stored for the document draft only. So that the number of the draft is still available in the system for other new documents. The system may assign this number to a new document of the same type. When saving the draft as a document, SAP Business One assigns a new available number.
    In case the value of the HandWritten property is tYES, set a value (greater than 0) to the DocNum property and also verify that Printed property is tYES</i>
    -- DI Help snippet --
    HTH

  • Web Dynpro SRM 7.0 - Access Shopping Cart One Screen User Default Settings

    Hi all,
    In my current project I have a requirement which includes to validate the user default values on shop on one screen functionality, my question is, how can I access to this information? In web dynpro there's no reference to this information and in addition is not stored in the database as is only "available" during the current Shopping Cart creation.
    Many Thanks in Advance,
    Sara.

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Storing user defaults of Web Dynpro application on portal

    Hi folks,
    I am trying to develop Web Dynpro application that runs in an iView on a portal. I would like to remember certain user defaults for this application (e.g., user default plant). User also has control over this value, so whenever they change it, the value should be update on a backend as well.
    My first thought was to use PCD, but I am not sure how to do that - all the code examples for I found for PCD looked like they were created for portal application, not Web Dynpro ones.
    Anybody here actually done anything similar?
    Edited by: Alexei Isaev on Jan 29, 2008 8:20 PM

    Hi Alexei,
    If you need to store default values for a portal application, you may consider your development in Web Dynpro for ABAP.  I have not come across application level personalisation yet in Web Dynpro for Java, unless someone else can throw some light here.
    Regards,
    Subramanian V.

  • Value conversion

    Hi everybody,
    i need a small help reg value conversion.
    for suppose:
    1>a = 1.234.567,89 in sap format
          we need to convert this to a = 1,234,567.89 into flat file.
    2>date format is showing as DD.MM.YYYY in sap format
    we need to convert this to MM/DD/YYYY
    (no matter which user is used to run the program)
    please give me reply.

    Hi Sunil,
    To dispaly the Date form System Format to User Format the FM 'CONVERT_DATE_TO_EXTERNAL' is used.
    Consider this code.
    REPORT zztest_arun_2.
    DATA: e_date(10) type c VALUE '2/2/2006',
          i_date(10).
    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
      EXPORTING
        date_external            = e_date
      IMPORTING
        date_internal            = i_date
      EXCEPTIONS
        date_external_is_invalid = 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.
    WRITE : / 'CONVERT_DATE_TO_INTERNAL',
            / 'My   Date:' , e_date  ,
              'Conv Date:',  i_date.
              skip 2.
    CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
      EXPORTING
        DATE_INTERNAL                  = sy-datum
      IMPORTING
        DATE_EXTERNAL                  = e_date
      EXCEPTIONS
        DATE_INTERNAL_IS_INVALID       = 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.
    WRITE : / 'CONVERT_DATE_TO_EXTERNAL',
             / 'My   Date:' , sy-datum,
               'Conv Date:',  e_date.
    Thanks,
    reward If Helpful.

  • Deleting User Defaults (10.7 and 10.9)

    Hey folks -
    I have an application which looks for user defaults upon launch.  If the defaults don't exist, the application goes through a first-time launch.  If the defaults do exist, the application loads the user default settings.  Here is the issue:
    On 10.7, if I navigate to ~/Library/Preferences/ and delete the .plist file associated with my application user defaults ("com.application.abc.plist"), the application will recognize a first-time launch.  However, on 10.9, deleting the .plist is not sufficient.  In order for the application to recognize a first-time launch, I need to first open Terminal and run: "defaults delete com.application.abc" (notice this is the domain and not the .plist file).
    The weird thing is, after I delete the .plist file, running the command to delete the domain actually fails:
    2014-01-08 09:47:37.536 defaults[44170:707]
    Domain (com.application.abc) not found.
    Defaults have not been changed.
    But it is still a required step in order for my application to recognize a first-time launch.  My question is - what has changed in defaults from 10.7 and 10.9.  The man page reveals nothing that I can see.  Is the domain being cached somewhere?  Is there a command that I can run to delete/reset the cache?  I'd be happy to post any additional information, just let me know.

    r_s_h wrote:
    @etresoft: Could you explain that last command a bit?  It looks like it resets the user defaults but I can't find any more information.
    It kills the cfprefsd process that maintains those preferences. That process should immediately get respawned and read preference values from whatever is in the plist files. Logging out and logging back in is probably going to be more reliable.
    These days I have gone to maintaining a separate partition just for developer activities. It doesn't necessarily help anything but I feel better knowing whatever I have done is less likely to go scramble my personal data that is sitting in an unmounted partition.

  • User default setting for ME31K

    Dear SAP gurus
    Can you pls tell me the detail steps to set the default values for ME31K screen. Say for ex: i want to save the field values like Pur Orgn - 400 , Doc type ( Agreement type ) etc... to a particular user/user group...

    Hi,
    You can't use Default value setting in ME31K.
    insteed of default setting you can use varient creation for your requirement  through SHD0.
    There you can use the transaction ME31K. & set the default value & then assign to user id.
    Regards
    SAM

  • BRF+ For User Defaults

    Hi everyone,
    I followed the guide on setting up user defaults but I'm having some trouble with it. Basically, I followed this guide.
    User Defaults - GRC 10.0
    Now in that guide, it shows that a loop must be created as well as a ruleset, but it doesn't show what should go into the ruleset. 
    When I create the loop,  here's what happens.
    Do you have more information on getting this application for user defaults setup?
    Thanks,
    Santosh

    Hi Madhu,
    Thanks for that input.  I went through it all once again and I got it to work but I have an issue.
    Basically, in my decision table, if I remove the CONNECTOR (System), then I am able to get the application to return a value - but that's not going to work for me.
    I need the decision table to return a value based on the CONNECTOR input.
    However, despite my providing a valid value for CONNECTOR (System), the decision table seems to not match correctly.
    Here's a screenshot of a simulation.
    Clearly, my REQTYPE is being matched towards the bottom of the screenshot.  But the CONNECTOR variables is a blank, despite my having entered a value for it.  I'm not clear whether I missed a step, but it would seem that the loop and the ruleset are working as this will return a valid match if the CONNECTOR were to have a value.
    Any ideas?
    Thanks,
    Santosh

  • Doubt on User default

    Hi All,
    I have tried to understand and replicate the screenshots at User Defaults - GRC 10.0 , but could not understand Loop and Ruleset.
    - Function USER_DEFAULT_FUNCTION is calling Ruleset,and Ruleset has the operation " Change USER_DEFAULT_ID after processing expression LOOP_CONNECTOR_ITEMS.
    So, could you say to which value will USER_DEFAULT_ID be changed to, and what is meant by "after processing expression LOOP_CONNECTOR_ITEMS. "
    - I could not understand the logic of the loop.
    - Also George's screenshots are not in sequence. He first adds condition 'then'. why not 'if'
    Could you please suggest, as i have to review a User default setting.
    regards
    Plaban

    Hi Plaban,
    Since SYSTEM is not available under Request Header attributes, rather it is available as Role Attributes which are called as line-item fields while calling the BRF Rule. So, in such cases LOOP is a suggested solution, rather than using the Decision Table directly. Though within the LOOP, you can still call the Decision Table or implement IF/ELSE conditions.
    So, basically we have created a BRF+ rule for user defaults which will return User Default ID after looping through decision table entries based on SYSTEM as usually each SYSTEM will have different User Default ID.
    Regards,
    Madhu.

  • User defaults problem

    Hi,
    I have a couple of textviews and checkbox buttons in my interface and I would like to save their states in the user's preferences.
    I'm trying to do it for the first text view but it doesn't work. Here is what I do in Interface Builder:
    -Added a "User Defaults Controller" binding.
    -Selected the NSTextView, in "Bindings" selected "User Defaults Controller" and checked the "Bind to" box.
    -Changed the value transformer to "NSUnarchiveFromData".
    -Saved and run from Xcode.
    Now the application crashes on startup so I guess I must be doing something wrong...!?
    Thanks for the help,
    Smaon

    http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/UserDefaul ts/Tasks/UsingDefaults.html#//apple_ref/doc/uid/20000719-BAJFBAAH
    Give that a read over
    Is your app a Cocoa app or an AppleScript app?

  • Value Conversion Filters

    Hello,
    I am trying to meet the new business requirements for the client I am working at. They recentlyd decided to eliminate all company codes and condense to one purchase organization. I have my purchase org and company code data in a Tuple.
    Can I use the value conversion filter to all data in my repository to elimate company codes and condense the purchase orgs? I guess my question really is can you use the value conversion filter if the field values to be converted are in Tuples?
    Thanks experts!

    Hey ,
    if you apply value conversion filters at the field level, the conversions are applied sequentially to each converted value that has not been individually edited or converted at the value level, now when you first map a field, each value in the Converted Value column appears in gray to indicate that it is inheriting value conversion filters from the field level. When you apply a manual edit or a value-conversion filter to an individual value, the Converted Value then appears in black to indicate that you have overridden inheritance from the field level. You can use the Restore Converted Value command to restore inheritance for a value.
    Value conversion filters automate repetitive and error-prone transformations, eliminating manual typing and the possibility of user error. They also allow powerful reformatting algorithms to be applied to an entire group of values.
    No conversion filter is necessary to trim leading and trailing spaces from source values, as Import Manager does this automatically when importing values into an MDM repository.
    Hope it gives you clarity.
    Deep

  • User default format in printing

    Hi experts,
    I have a question about the user default print format.
    When I try to print out a output, the print format turn to be a format that I donu2019t want to use, I have to change the format manually everytime. Is there any method that I can set the user default print format for a specific output?
    Thanks,
    Nadali

    The right way to change the default print format
    1°) Display a printable data on the screen
    2°) Click on the Print icon
    3°) On the next screen, enter an Output device and click on the "Properties" button
    4°) Double-click on the parameter value of the line "Format"
    5°) In the field "Format" change the value of the print format and click on the "Specifications" button
    6°) On the next screen click on the "Copy settings" button
    That's it. Now the new value you enterred in 5°) is set as the default one for print format.
    Note that following this procedure you can set or change other printing default parameters.

  • CUP - Using several Parameters ID in User Default

    Hello everybody,
    I have a problem with using User Default section in CUP.
    In fact I want to use the User Default Mapping to define two different parameter ID in the SU01.
    For example: the Company Code (BUK parameter) and the Cost Center (KOS parameter).
    If I define two different User Default (one for the company code and the other for the cost center) with two different User Default Mapping Condition (Custom fields Company code with the good value for the first one and cost center custom fields for the second one) it doesn't works.
    It seems to use only one User Default even if the both User Default Mapping Conditions are different.
    Does anyone know how to define two different User Defaults that works together?
    Thanks in advance.
    BMW

    BEN,
       I have never tried this scenario. It seems to me that this might not work.
    Regards,
    Alpesh

  • Convert the date into user default date formate

    I am wrinting a bdc and i want to convert the date into user default date farmate ..please suggust the functiom module should i use...

    actually by using dats or d type you can get the user specific date itself.
    but if u have different dates format that need to be converted to the user specific date then you can follow below procedure
    1. retrieve the user format from usr01
        SELECT SINGLE datfm
          INTO w_datfm
          FROM usr01
         WHERE bname EQ sy-uname.
    pass w_datfm to the below FM (4th import parameter)
    2. create Z - FM and retrieve the user secific date
    FUNCTION ZFXX_USER_SPECIFIC_DATE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(IW_DAY) TYPE  CHAR2
    *"     VALUE(IW_MONTH) TYPE  CHAR2
    *"     VALUE(IW_YEAR) TYPE  CHAR4
    *"     VALUE(IW_DATFM) TYPE  USR01-DATFM
    *"  EXPORTING
    *"     VALUE(EW_USER_DATE) TYPE  CHAR0008
    *1  DD.MM.YYYY
    *2  MM/DD/YYYY
    *3  MM-DD-YYYY
    *4  YYYY.MM.DD
    *5  YYYY/MM/DD
    *6  YYYY-MM-DD
    CASE iw_datfm.
      when '1'.
        concatenate iw_day iw_month iw_year
               into ew_user_date.
      when '2'.
        concatenate iw_month iw_day iw_year
               into ew_user_date.
      when '3'.
        concatenate iw_month iw_day iw_year
               into ew_user_date.
      when '4'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when '5'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when '6'.
        concatenate iw_year iw_month iw_day
               into ew_user_date.
      when others.
        clear ew_user_date.
    endcase.
    ENDFUNCTION.

Maybe you are looking for