Concatenating '-' sign to an number field in bw start routine

Hi Friends,
is there any chance to add a minus sign infront of the quantity field in the start routine.
if anyone have ideas please let me know.
Regards,
Ala.

Ala,
the code should work. don't assign length for type i.
data: qty1 type i,
qty2 type i,
quantity type i,
goodsreceipt(1) type c.
if goodsreceipt = 'S'.
qty1 = quantity.
qty2 = qty1 * -1.
quantity = qty2.
endif.
write qty2.
Message was edited by: ravi raj
Message was edited by: ravi raj

Similar Messages

  • Deleting  rows with missing values in field in start routine of update rule

    Hello experts,
    how can I delet rows with missing values in a specific field in the start routine of update rules?
    I think ABAP code should look something like this:
    delete ...  from DATA_PACKAGE where Z_NO = ''.
    thanks in advance for any suggestions!
    hiza

    Write:
    delete data_package where field = value.
    Hope it helps.
    Regards

  • Number Field - Decimal Sign

    Hi,
    i have a number field. When the user inserts a value for example 5,2 it should be automatically converted to 5.2 and inserted in the database. Instead it's inserted as 52.0
    When the user inserts 52,2 into the field, the error 'MTTRi [months] does not match number format 90D0 (Example: 3.5).' is shown. Why is this error not shown when the user is inserting the value 5,2?
    The format mask is 90D0.
    Has anybody an idea how to achieve this?
    Best Regards,
    Martin

    Hi Martin,
    the TO_NUMBER format mask conversion tries to fix user errors. If you want to have a more restrict format mask handling, try to use the FX prefix.
    From the online doc at http://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements004.htm#i170559
    FX Format exact. This modifier specifies exact matching for the character argument and datetime format model of a TO_DATE function:
    -) Punctuation and quoted text in the character argument must exactly match (except for case) the corresponding parts of the format model.
    -) The character argument cannot have extra blanks. Without FX, Oracle ignores extra blanks.
    -) Numeric data in the character argument must have the same number of digits as the corresponding element in the format model. Without FX, numbers in the character argument can omit leading zeroes.
    When FX is enabled, you can disable this check for leading zeroes by using the FM modifier as well.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Negative sign display for CURR field in ALV grid report

    I have a field BETRG defined as CURR field of length 15, decimal places 2. The value may be negative or positive. In case of negative values I am using EDIT_MSK option in the field catalog to bring the negative sign to the left of the value as shown below.
    Quote
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          i_program_name         = sy-repid
          i_internal_tabname     = 'LT_FINAL'
          i_inclname             = sy-repid
        CHANGING
          ct_fieldcat            = fieldcat[]
        EXCEPTIONS
          inconsistent_interface = 1
          program_error          = 2
          OTHERS                 = 3.
    LOOP AT fieldcat.
        CASE fieldcat-fieldname.
            WHEN 'BETRG'.
            fieldcat-ctabname = ' '.
            fieldcat-cfieldname = ' '.
            fieldcat-edit_mask = 'RRV_______________.__'.
        ENDCASE.
        MODIFY fieldcat.
      ENDLOOP.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_buffer_active    = 'X'
          i_callback_program = sy-repid
          i_grid_title       = 'ABCD'
          is_layout          = gs_layout
          it_fieldcat        = fieldcat[]
          i_save             = 'A'
          is_variant         = gs_save
          it_events          = gs_events
        TABLES
          t_outtab           = lt_final
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    Unquote
    On displaying the report using 'REUSE_ALV_GRID_DISPLAY' as shown above, when the value of BETRG is a smaller number like say 624, then the ALV output appears as '-            624.00' instead of '-624.00'.
    Is there any way that I can remove the space in between the negative sign and the number before displaying the ALV output using 'REUSE_ALV_GRID_DISPLAY'?

    Hi Deepak,
    I tried this and found that this doesn't work in case of currency field. Once you move back the char field (with negative sign to the left and condensed)  to the currency field, the negative sign again moves back to the right.
    I think that the only way a negative sign can be brought to the left of the currenct field is by using edit_mask of field catalog as I have shown above.
    Regards,
    Shayeree.

  • How to prevent users from entering '+' or '0' in front of country code in the phone number field?

    Requirement:
    How can I prevent guest users from entering '+' sign or '0' in front of country-code in the visitor phone number field during self registration?
    Few SMS service providers are not looking for '+' sign or '0' or '00' in front of the international phone numbers to trigger the sms. Providing these values in front of country code during self-registration may fail to deliver the sms to recipient.
    Solution:
    Using a simple regular expression, you can validate the entered phone number during the guest registration. 
    The below regular expression will help you to validate the phone number and allows to register only  when the phone number is not staring with '+' or '0'. 
    ^[1-9][0-9](\d{7}|\d{8}|\d{9}|\d{10}|\d{11}|\d{12})$
    It also performs the below validations.
    only numbers are allowed.
    first digit of the entered phone number should be 1 to 9, so '+' or '0' is not allowed. 
    numbers from 0 to 9 are allowed from the second digit.
    also validates phone number length, the length of the phone number should be 9 to 14.
    Configuration:
    To add the above regex in the visitor_phone number filed, please navigate to ClearPass Guest >> Configuration >> (Pages)Guest Self-Registration >> select the self-registration page and go to Edit >> Register Page >> Form >>  select the filed visitor_phone and set the Validator to " ISRegexMatch" and enter the above regex in the Validator Argument filed as shown below.
    Note:  Edit the Validation Error as per your requirement.
    Verification
    Adding the given regex will validate the phone number and prevent the guest user from registering the phone number starts with '+' or '0'.
    Please find below the sample outputs for your reference.
    Result when phone number starts with '+' or '0'.
    Successful registration.

    Is this a Mac Preview issue?

  • # sign in postal code field.

    Hi Experts,
    In ADRC table entry for an addr number, there is # sign in postal code field (NG26BJ#).
    And due to this incorrect # sign, there are issues occuring in the system.
    Can you suggest where do I search for this # sign in the system?
    I mean I searched for customer master, vendor master, etc but could not find out # sign in any partner data postal code field.
    Please suggest.
    -Chetan.

    Check all the tables that are on 'where used' list for ADRNR data element in dictionary (SE11).
    If it is an "orphaned" record, BW interface should not be actually pulling it in. I would recommend to base the interface on the main table (e.g. KNA1) and only pull ADRC records that are referenced.
    The easiest solution would be to write an ABAP report to update the record directly in the database. I wouldn't delete it though, just removed the # sign. Also check the OSS notes or send a message to SAP and they might provide such report for you.

  • How convert number field (floating) to text

    I have this field number. When I use function Cstr or ToText, alway display on reporte on floating format. Ex. 5e+018. How I do display real number 512121221458478514.

    Hi,
    I had a similar issue before. So i discussed that in the same forum, Here is the conclusion i got.
    Crystal reports is built with C++ and the numeric field type used is limited to 15 digits plus 1 for the sign of the number.
    Only option is to use a stored procedure and break that field into 2 parts and put them back together in a text object by
    dropping the fields in next to each other.
    And here is the LInk: Decimal Value is not displaying properly.
    Regards,
    Salah

  • Filter Accounts With Required Personnel Number Field

    Hello, SAP experts.
    I have a task to make a report which will list all the G/L accounts which have required Personnel Number field.
    I know one way to do this:
    First of all, I run SE16N , enter table name T004F, and then I can see all the field status groups.
    My company has a field status variant with 3 field status groups which have mandatory Personnel Number field - Z040, Z073 and Z074
    I can see that all the three groups have the + sign at the 18th place in the Field Selection field. This marks the Personnel Number field.
    Then I go back to the beginning of SE16N, choose the table SKB1, enter those three groups in the Field Status Group multiple selection screen, and hit the Execute button. Now I have the list of the accounts that I was looking for.
    I was wondering if there is simpler way to do this. It would be perfect if I could make a custom report (using SQVI for example) with the algorithm which will do something like this:
    FOR ALL G/L ACCOUNTS
         GET THE ACCOUNT'S FIELD STATUS GROUP
         IF FIELD_SELECTION[18]=='+' THEN
              ADD THE ACCOUNT TO THE LIST;
         END IF;
    END FOR;
    Thank you very much for any help you can provide

    Thanks for your answer, Vikas.
    Of course, I don't insist on using SQVI. I could as well make a custom report using SQ01..03, but I'm not sure how to check if a particular field_selection character is equal to '+'. To be more precise, I would like to know how to translate the pseudo-instruction...
         IF FIELD_SELECTION[18]=='+' THEN
              ADD THE ACCOUNT TO THE LIST;
         END IF;
    ...into "real" ABAP instructions.
    If you or anybody else can help me with that ABAP part, I'd be grateful

  • Prefix Negative sign in type P field in an ALV report

    Generally, -vs sign appears after the number in an ALV report. I have a type P field where I want to prefix the -ve sign ( before the number ). I donot want to convert it to C type as I want the sorting feature. Is there any other way ?

    U can do as per the suggestion given by Raja
    or
    U can copy the fm CLOI_PUT_SIGN_IN_FRONT to CONVERSION_EXIT_SIGN_OUTPUT and activate it. Then in edit mask use this '==SIGN' or u can create one domain and refer the domain to that field. In that domain u set the convertion routine = SIGN.
    regards
    gv

  • Address Book/iSync - email addresses moving to phone number fields

    I'm not sure what is causing this, but I'm noticing that email addresses in my cards are moving to phone number fields. I originally thought this had something to do with cards that had no phone number in them, only an email address, but now I"m realizing that's not the case.
    I fixes all cards last night and just a minute ago, when I was in Address Book I noticed some or all of the email addresses had moved again. I reverted to my backup from last night and it fixed things, but I'm wondering what's going to cause those addresses to move again.
    I do use iSync to sync my AB contacts to my Motorola phone (I think I have it set up where it's one way, computer to phone) and I have Entourage that's using my AB contacts to populate its address book.
    Any thoughts about what in my environment is causing this?
    -John

    Thank you for the suggestion. I did this, but noticed that some cards were still messed up. So I reverted back to a clean copy of my address book from last night. Then I went to iSync and synchronized with my Motorola phone. That's when iSync says that it's going to modify over 5% of my contacts in AB (122) at which point I said okay. Problem appears to be that the cards it modifies is random.
    Now to make matters worse, it appears that if I repeat this process over and over (revert, iSync, look through cards), there is no pattern to which cards are changing. I don't even know how to troubleshoot this. I'd love make iSync go one way - computer to phone - so that the phone can never write information to the computer. Is that possible?
    I'm sure this needs to go to a different section...
    -John

  • MIGO tr Serial number field and table?

    Hi guys,
                  can anybody tell me how to find the field name and table for Serial number in MIGO tr Code?
                     in MIGO the Serial number field and Structure are GOSERIAL-SERIALNO.but i was not able to find the Actucal Field name and table where i can get the values based on PO and Asset Number's?
    Thanks,
    Gopi.

    Hello,
    I'm looking at the same problem here. I found the table SER03 in which you can enter the the material document. This returns 1 line in this table and from this one you need the OBKNR element
    You can copy this data and paste it into table OBJK element OBKNR and this returns all serialnumbers for the relevant material document.
    My problem is that i can't get these items on the sapscript. (WESCHEINVERS 1,2 or 3)
    Greetings
    Edited by: Lode Vandecruys on Apr 9, 2008 11:04 AM
    Edited by: Lode Vandecruys on Apr 9, 2008 11:09 AM

  • Serial number field and table

    Hi,
    I want Serial number field and table,
    Scenario like this,for returnable packging material we have assigned serial numbers,mtrl type is LEIH,so for tracking of RTP material now we are going to Develop one Report for this i need ur Help.
    Logic is:1)Matrl doc at the time of Delievery.
                Qty,Posting Date,Customer,Mvt type,Serial numbers for all.
                 Beacause at the time of Del we are mentioned all serial numbrs.
                2)Material Document at the time of GI.
                Same field as mentioned as above.
    After that,3)System is to Calculate How many Matrl are deliever to Custmer upto current  Period.Say  10.
    4)Calculte  How many Matrl are Recieved from the Custmer upto current  period.say 5
    5)Del - Issue=Total Number of Material is in Customer side.Say 5
    6)According to the Serial Number wise system has to calculate in which month delieverred matrl is in still customer side.
    (Ex PGI date 20.02.2007  3 qty
    Serial Number    1,2,3
    Issue date    20.03.2007   2 qty
    Serial Number    2,3
    Serial number  1 still is in Customer side.
    Age is 2 month)
    I am giving simple ex.
    so pls any body is having this idea pls Shared with me.
    Thanks
    Raghu

    Hi Raghu,
    Check table SER01(Document Header for Serial Numbers for Delivery).
    OBJK is the object table and you will have SERNR as serial number in this table.
    check table EQUI
                          EQUI -SERGE
                          EQUI-GERNR.
    EQUI-SERGE is Manufacturer serial number.chk if this is the one u r looking for.
    MARC-SERNP.
    key in plant and material in this table to fetch the Serial number profile of the material.
    Check in IKPF AND ISEG Tables... ( inventory )
    MSEG~EQUNR
    Hope it will hep u
    Regards
    Hareesha

  • Delivery Schedule Number or Delivery Plan Number field

    Hi,
    In MM which field refers to Delivery Schedule number (or Delivery Plan number)
    Advance Thanks
    Aadarsh

    Hi Sanjeev,
    Sorry. That is not the one. ETENR is of NUMC 4. But the field I am seeing is atleat 8 characters (maybe 10).
    I dont have any further information than the name given :
    Delivery Schedule Number or Delivery Plan Number field.
    I can further say to you that this is being used in Vendor Decleration
    Regards
    Aadarsh

  • How to prevent a number field from getting summed?

    I want to display the # of clients per a certain ID number. (In order to show the duplicate records by setting a filter in the # of clients field). However, this works if the ID number is a text field... but it doesn't work if the ID number is a metric of client... or number. It gets summed up, I get the total, and the % of clients turns to be 1.
    Any ideas?
    Thanks

    Example:
    I have 3 clients:
    Column A
    55
    55
    44
    21
    I want the following output:
    55 | 2
    I get the desired result by adding a second column (# of clients) and creating a filter to get results only if the value is > 2.
    The problem is when "Column A" is a number field. If it is a number field, I get total sum of the records (55+55+44+21) and a value of "1" if I add the # of clients column.
    Is it clearer now? ideas?

  • Assigning a value to a number field through a button

    11gxe , apex 4.x ,
    hi all ,
    i am trying to assign value to a number field through a button ,
    i created a button , then a dynamic action for this button , when it is clicked ,
    the dynamic action is based on Pl\Sql code , and the code is
    begin
    :p2_assign := 455 ; -- where the page is "p2" and the number field is "assign"
    end ;
    but it does not work , why ?

    I can see the toolbar now from the last link you provided me with ,
    but you showed me the way to use the static assigning , and assigning with sql , and i want to do it with "Pl\Sql"
    in order to know why my way of writing the code does not work , although it is written properly , and should work .
    every input item is a variable , and i am doing so
    begin 
    :p2_assign := 455 ; -- where the page is "p2" and the number field is "assign" 
    end ;
    to assign a value to a variable ,
    and
    doing this
    begin 
    select 455 into :p2_no from dual ; 
    end ;  
    to select a value into a variable , then
    why does not it work ??
    and how to do it with pl\sql ?
    thanks

Maybe you are looking for