Negative symbol/value in SAP Tables

Hi All
I am trying to import data into a database and i am having a problem with Negative symbols. ie: I have imported data from VBAK and when i come accross a negative net value, the symbol is on the right hand side. eg: 100.00-. The database dosent recognize this as a negative value. In order to get the database to recognize it as a negative value, i need to have the negative symbol on the left hand side. eg: -100.00. Is this possible?
Any help will be appreciated
Thanks
Avi

Hi,
You can write a small program and change the symbol as follows :
Loop at it_vbak.
if it_vbak-netpr cs '-'.
Shift Right it_vbak-netpr.,
modify it_vbak transporting netpr.
endif.
endloop.
This would do the needful.
Thanks.
Lalit Kabra

Similar Messages

  • Need Help in Field Symbol for Dynamically passing  table field value

    Hi All,
    In my internal table I am having data.
    I am dynamically forming table field name and substitute for the another table field name to pass DATA.
    but I am getting the Variable name insted of Value ie Data.
    I am using Field Symbol for this.
    data:
    Field-symbols <TS> type any.
    field1 type string.
    LOOP AT TABLEFIELDS INTO WA_TABLEFIELDS.
                READ TABLE  TEST  WITH KEY NAME = WA_TABLEFIELDS-FIELDNAME.
                IF SY-SUBRC = 0.
                  CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO  Field1.
                  Assign Field1 to <TS>.
                    ALL_VAL-VALUE = <TS>
    "After substituting the <TS>  into ALL_VAL-VALUE  field I need a DATA to be passed but the variable name is appending"*    
             APPEND ALL_VAL.
                ENDIF.
              ENDLOOP.
    kindly how to pass the value into the table.
    Thanks in advance.
    San

    Hi,
    pls assign a break point in
    CONCATENATE 'WA_' WA_TABLEFIELDS-TABNAME '-' WA_TABLEFIELDS-FIELDNAME INTO Field1.
    Assign Field1 to <TS>.
    ALL_VAL-VALUE = <TS>
       " Put a break point here and check for the value in <TS>.
    if <TS> contains value then create a work area for ALL_VAL AND PASS the Field-Symbol to that and then  append thw wa into the table...
    Hope this works out!!
    thanks

  • FIELD-SYMBOLS validation with MARA Table values

    Hi,
    FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE.
    I want to validate mara-matnr with <itab>. The values in <itab> is coming at runtime, so i want to validate first field values in <itab> for all the records with mara-matnr.
    The values which are coming at runtime in <itab> is matnr, bukrs, lgort. I want to validate only matnr with mara-matnr.
    I don't know about field-symbols validations?
    anybody has an idea?
    Thanks in advance,
    Fractal

    Hi,
    use ASSIGN COMPONENT OF STRUCTURE.
    Example.
    LOOP AT <FS> ASSIGNING <FS_STRUCT>.
    <b>  ASSIGN COMPONENT 'MATNR' OF STRUCTURE <FS_STRUCT>
                    TO <FS_RESULT>.</b>
      IF SY-SUBRC = 0.
        SELECT SINGLE * FROM MARA WHERE MATNR = <FS_RESULT>.
        CHECK SY-SUBRC = 0.
      ENDIF.
    ENDLOOP.
    Thanks,
    Naren

  • What SAP table houses the Material Classification values?

    I cannot for the life of me figure out what SAP table actually stores the material classification characteristic values. These are the related tables I have found so far but none of them link the information to a material number:
    TABLE: CABN
    ATINN (characteristic ID)
    ATNAM (characteristic name code)
    MSEHI (UoM associated with characteristic)
    TABLE: CABNT
    ATINN (characteristic ID)
    ATBEZ (characteristic full name)
    TABLE: KLAH
    KLART (class type)
    CLASS (class name code)
    CLINT (class id)
    TABLE: KLAT
    CLINT (class id)
    TXTBZ (class full name)
    TABLE: KSML
    CLINT (class id)
    IMERK (characteristic id)
    POSNR (characteristic positional location for class)
    TABLE: CAWN
    ATINN (internal char.)
    ATZHL (int counter)
    ATWRT (char. value)
    TABLE: CAWNT
    ATINN (internal char.)
    ATZHL (int counter)
    ATWTB (description)
    I have also identified these structures, but I am no good at finding where values from a structure actually reside.
    STRUCT: RMCBC "I/O field for include screens from classification"
    contains MATNR, KLART, CLASS, KLTXT, ATWRT
    STRUCT: RMCLF "Classification I/O structure for Assgmt of Object to Class"
    contains KLART, CLASS, KLTXT
    Can anyone please help me and advise where the actual relationship between material number and classification information is? I'm trying to import this information from MDM to R/3 but I have no idea what to map it to or what Idoc segment to use.
    Thanks!

    Have a go with below table joint in SQVI or SQ01:
    KSSK (Allocation Table: Object to Class), joint together with KLAH (Class Header Data).
    Link will be field CLINT.
    Choose the below from KSSK:
    Key of object to be classified - KSSK-OBJEK: you will enter the material number here. Watch out - you have to add 10 leading zeros before your material number, eg. number 40524281 will be altered to 000000000040524281.
    Class Type - KSSK-KLART: here you can specify the class type which is 001 for material master.
    Choose the below from KLAH:
    Class number - KLAH-CLASS: this field will return the class number you assigned to your material in Classification view.
    HTH,
    Laszlo

  • Copying Batch Characteristics Value from Standard SAP Table Field

    Dear Experts,
    1. While creating a user-defined Batch Characteristics 'CREATED_BY' using ct04,  on the Additional Data tab, I filled  the following fields as follows:  Table Name = MCHA,  Field Name =ERNAM.
    'CREATED_BY' was then assigned to a batch Class TRIMMED (of class type 022).
    TRIMMED  was assigned to a batch managed material ADE245DD.     
    After posting co15 (confirmation of production order) for material ADE245DD, the value in table MCHA & field ERNAM is automatically copied into the Batch Characteristics value field of u2018CREATED_BYu2019  for the generated batch.
    2. But I am unable to achieve the same result when I create another Batch Characteristic with similar settings in the Additional Data tab as follows: Table Name = MARC, Field Name = DISPO.
    After doing co15, the value stored in table MARC and field DISPO does not get copied into the Batch Characteristics value.
    Please what do I need to do in Scenario 2 above to achieve the same result as in Scenario1?
    Regards

    Hi,
    Table and field used in additional data table should be related to the object than only it will work, for e.g. MCHA and ERDAT will work if you create a characteristcis and assign it to class type Batch (022/023) because MCHA table has Batch no. as primary key,
    this implies for using material specific table e.g. MARA , you should use characteristics with class type 001 (Material class) , try using with table MARC also
    Cheers
    Dheeraj

  • How to revaluate negative closing stock value in SAP B1?

    Hi all,
    I am trying to revaluate those items with the negative closing stock value using Inventory Revaluation. I choose Inventory Debit/Credit for the revaluation type and key in the item code, quantity, +ve value in debit/credit, G/L increase and decrease account.
    After I added the Inventory Revaluation successfully , I go and check in the Inventory Audit Report for the specified item but found that the item still with the negative closing stock value.
    My major concern here is the items with negative closing stock value do not have any in stock quantity. Can I adjust the negative closing stock value of the items with zero quantity?
    Thanks.
    Best Regards,
    Xavier

    Hi all.
    Just found out why I cannot do the negative stock value revaluation. When I want to do the inventory revaluation for the items of negative stock value with zero quantity, the journal entry will debited to the wrong account, that is 507040-00-000 (Price Difference Account).
    Inventory Revalution for item with zero quantity:
    [http://img33.imageshack.us/img33/6596/invrevaluation.jpg]
    Journal Entry:
    [http://img84.imageshack.us/img84/879/81238835.jpg]
    Sample of Charts of Accounts:
    [http://img31.imageshack.us/img31/2078/coaq.jpg]
    When I do the inventory revaluation for the items where the in stock quantity is greater than zero, the journal entry will debited to the correct account, that is 105011-00-000 (Consumables account).
    Inventory Revaluation for item with quantity greater than zero:
    [http://img819.imageshack.us/img819/5711/invrevalution.jpg]
    Journal Entry:
    [http://img24.imageshack.us/img24/7136/80015631.jpg]
    The items are under the same item group - Consumables
    [http://img543.imageshack.us/img543/2347/itemgrp.jpg]
    I do not why this will happen when I try to revaluate the items with negative stock value of zero quantity?
    Kindly share with me your opions.
    Thanks,
    Xavier

  • SAP Java Connector: Is it possible to cut field values of extracted table?

    I am extracting some SAP tables using the SAP Java Connector (via RFC_READ_TABLE or similar). Is it possible to pass some kind of maxlength for some fields of a table, e.g. if we have a field with size 3750 (like PROFS in table USH04) but I only want the first 100 chars - something like LEFT(PROFS, 100) in SQL?
    Thank you for your helpful response!

    Hi.
    The point is that PROFS has a size of 3750 - but RFC_READ_TABLE will only extract data up to 512 chars per row.
    Kind regards

  • Pass value in SAP Script

    How can u pass value in SAP Script?& where?

    Hi,
    PASSING TABLE VALUES AS AN ARGUMENT TO SAPSCRIPT:
    In the line editor, specify the table field arguments enclosed by '&' symbol as follows:
    /E  ELEMENT
         &KNA1-KUNNR& ,, &KNA1-NAME1& ,, &KNA1-LAND1&
    Save -> Activate.
    In the Print Program, specify following code:
    TABLES KNA1.
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       FORM                              = 'ZSHABFORM1'
       LANGUAGE                          = SY-LANGU.
    SELECT * FROM KNA1.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'ELEMENT'
       WINDOW                         = 'MAIN'.
    ENDSELECT.
    CALL FUNCTION 'CLOSE_FORM'.
    Save -> Activate -> Execute.
    Regards,
    Priya.

  • To get a row of value by taking table name and primary key value

    i can't find out what's wrong.. pliz help.. m a fresher in SAP.
    code is here
    PARAMETER tname(10) TYPE c.
    PARAMETER pkv(10) TYPE c.
    DATA:
    lt_dd03l TYPE STANDARD TABLE OF dd03l,
    ls_dd03l TYPE dd03l.
    DATA: my_table TYPE REF TO data,
    wa_ref TYPE REF TO data.
    FIELD-SYMBOLS: <it_tname> TYPE STANDARD TABLE,
      <tname_wa> TYPE ANY,
       <primary_key> TYPE ANY,
      <is_tname>.
    SELECT * FROM dd03l INTO TABLE lt_dd03l
                 WHERE tabname EQ tname.
    LOOP AT lt_dd03l INTO ls_dd03l.
      IF ls_dd03l-fieldname NE 'MANDT' AND ls_dd03l-keyflag = 'X'.
    WRITE:/ ls_dd03l-fieldname.
       primary_key = ls_dd03l-fieldname.
        EXIT.
      ENDIF.
    ENDLOOP.
    CREATE DATA my_table TYPE STANDARD TABLE OF (tname).
    ASSIGN my_table->* TO <it_tname>.
    CREATE DATA wa_ref LIKE LINE OF <it_tname>.
    ASSIGN wa_ref->* TO <tname_wa>.
    WRITE: / ls_dd03l-fieldname.
    ASSIGN ls_dd03l-fieldname TO <primary_key>.
    SELECT * INTO TABLE <it_tname>  FROM (tname)
    WHERE <primary_key> =  pkv.
    WRITE sy-subrc.
    *WRITE : /   primary_key,
    kv .
    LOOP AT <it_tname> INTO <tname_wa> .
      DO.
        ASSIGN COMPONENT  sy-index
                 OF STRUCTURE <tname_wa> TO <is_tname>.
       WRITE:/ <is_tname>-(primary_key).
        IF sy-subrc <> 0.
          WRITE :/ 'sy-subrc is not zero'.
          EXIT.
        ENDIF.
    IF ls_dd03l-fieldname = pkv.
        WRITE: <is_tname>.
    ENDIF.
      ENDDO.
    ENDLOOP.
    *ASSIGN <t_itab> TO <t_isturct>.
    *SELECT * FROM (tname) INTO TABLE <t_itab>.
    *LOOP AT <t_itab> INTO <t_isturct>.
    WRITE :/
      <t_isturct>.
    *ENDLOOP.

    Please check whether bname has any conversion exits.
    try hardcoding the value like '0000105397' and passing into the query.
    SELECT * FROM (tname) INTO table <it_tname>
    where <primary_key> = '0000105397'.  "If it works then use conversion exit.
    or try like this
    types : begin of ty_where,
            line type char100,
            end of ty_where.
    data:it_where type table of ty_where.
    data:wa_where type ty_where.
    data:val type char100.
    concatenate <primary_key> 'EQ' into wa_where-line seperated by space.
    concatenate `'` pkv `'` into val. condense val no-gaps.
    concatenate wa_where-line val into wa_where-line seperated by space.
    append wa_where to it_where.
    SELECT * FROM (tname) INTO table <it_tname>
    where ( it_where ).

  • Import of SAP table t681y_bmen

    I want to try some developing on the netweaver trial system. I exported the table t881y_bmen in our normal (productive) system and imported it with saplink. Afterwards the table was correct imported to the system. i can look at it with se11.
    But when i try to activate the table, i need to register the object (because it´s in the sap namespace). Is there an possibility to activate the table?

    Hi Thomas,
    Sorry, I have never installed the IDES system, so I cannot really answer any questions about it. 
    If you want to continue to use the trial system and then use your applications in another system, maybe you could use custom tables in your trial system and then change the program to use the SAP tables in your other system.
    If you do something like that, you would probably want to use variables for your table names in your select statements to make it an easier switch.  In the example below, you would only have change your table name from zt681y_bmen to t681y_bmen in the first two lines.
    CONSTANTS:  bmenTable TYPE STRING VALUE 'ZT681Y_BMEN'.
    DATA: myTable TYPE STANDARD TABLE OF ZT681Y_BMEN.
    DATA: myLine LIKE LINE OF myTable.
    SELECT * FROM (bmenTable) INTO TABLE myTable.
    LOOP AT myTable INTO myLine.
      EXIT.
    ENDLOOP.
    If you really want to get fancy, you can use runtime type services and only have to change your first line of code
    CONSTANTS:  bmenTable TYPE STRING VALUE 'ZT681Y_BMEN'.
    DATA: myTableRef TYPE REF TO DATA.
    DATA: myLineRef TYPE REF TO DATA.
    FIELD-SYMBOLS: <myTable> TYPE STANDARD TABLE.
    FIELD-SYMBOLS: <myLine> TYPE DATA.
    CREATE DATA myTableRef TYPE STANDARD TABLE OF (bmenTABLE).
    ASSIGN myTableRef->* to <myTable>.
    CREATE DATA myLineRef LIKE LINE OF <myTable>.
    ASSIGN myLineRef->* to <myLine>.
    SELECT * FROM (bmenTable) INTO TABLE <myTable>.
    LOOP AT <myTable> ASSIGNING <myLine>.
      EXIT.
    ENDLOOP.
    Maybe this isn't the best solution or even what you are looking for, but I hope it helps. 
    Regards,
    -ewH

  • Getting values from a table without any type

    Hi,
    I am having problem accessing the values of a table which does not have a type. When we go and check the type of the table, it is not mentioned.
    While debugging we found that the type of this particular table is deep structure. I tried using ASSIGN COMPONENT using field symbols, but reference is not getting assigned. The sy-subrc becomes 4.
    Is there any way to access the data in this table?
    Regards,
    Rishav

    It is actually a function module which is having this table in the TABLE declaration.
    Table Name : T_OUTTAB
    Long text :
    Interne Tabelle beliebiger Struktur, die die in Listenform auszugebenden Daten enthält.
    Diese Tabelle kann mehr Felder beinhalten als letztlich für die Listausgabe (Anzeigefelder u. Feldvorrat) relevant sind.
    Nur die im Feldkatalog und ggbf. in der Layoutstruktur genannten Felder werden für die Listausgabe herangezogen. Weitere Felder der internen Tabelle werden ignoriert.
    Im Feldkatalog kann dann über die Ausprägung des Feldes FIELDCAT-NO_OUT entschieden werden, ob ein Feld direkt auf der Liste ausgegeben wird oder ob dieses Feld zunächst in den Feldvorrat gestellt wird.
    Aus diesem Feldvorrat kann der Benutzer interaktiv die Anzeigefelder der Liste erweitern (und umgekehrt Anzeigefelder ausblenden).
    Wird die interne Tabelle im aufrufenden Programm ohne Kopfzeile definiert, so ist auf dem Listenkörper keine F1-Unterstützung möglich.

  • Values from CRCO Table.

    Hi all ,
    I need to retreive some values from CRCO table based on the balues fetched from AFRU table. I am writing a select like this
    select single KOKRS KOSTL into table itab from CRCO
              where OBJTY = 'A'
                 and OBJID  = AFRU-ARBID
                 and ENDDA >= AFRU-BUDAT
                 and BEGDA <= AFRU-BUDAT.
    As I need to retreive a single record from above select, but as a result i am getting multiple records.
    Can anybody tell me what other keys from AFRU I can specify in the select in order to fetch only a single record.
    Thanks,
    Mungala.

    Object ID you can get from ARBID from AFRU Table. Put value of ARBID in OBJID in table CRCO & get values of KOKRS & KOSTL. That value will be unique for an work center But if ARBID values are many for an AUFNR(order no.) that mean you are using different work center where in may be you are using different cost center(i think controlling area will remain same). & hence SAP creates different records.
    Regards
    Prashant Jaiswal

  • How to retrieve the values from a table if they differ in Unit of Measure

    How to retrieve the values from a table if they differ in Unit of Measure?

    If no data is read
    - Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
    If no quanity in result internal table
    - There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
    - - Remove the CORRESPONDING, so quantity will fill the first field adqntp1.  ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
    - - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
    * Fill the internal table
    SELECT msehi adqntp
      INTO TABLE internal table
      FROM lipso2
      WHERE vbeln = wrk_doc1
        AND msehi IN ('KL','K15','MT').
    * If required move the read quantity in the appropriate column.
    LOOP AT internal_table ASSIGNING <fs>.
      CASE <fs>-msehi.
        WHEN 'K15'.
          <fs>-adqnt2 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
        WHEN 'MT'.
          <fs>-adqnt3 = <fs>-adqnt1.
          CLEAR <fs>-adqnt1.
      ENDCASE.
    ENDLOOP.
    - You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
    Regards,
    Raymond

  • Open delivery values in S067 table showing as -ve

    Hi All
    Open delivery values in S067 table showing as -ve.
    Could u please explain , what are the reasons!
    Regards
    Raj

    You can check the data in S067 by running the SAP report RVKRED88, this re-evaluates the credit data after update errors. If you find differences between S067 and the result of RVKRED88, you can correct S067 using SAP report RVKRED77. But note as this requires a table lock on various SD tables, you may have to run this report when users are out of the system.

  • Issues in exporting data from SAP tables in SE16 to excel

    1.How can I save an sap table (displayed through SE16) in ECC6 into a pivot table in excel. [ I have seen this option in R/3 4.7, but do not see it in ECC.]
    2.How can I copy all the rows of a 3000 row SAP table in SE16 and paste the values into excel. I need to do this in one shot and not page by page.
    3.What option do I need to select inorder to preserve the formating of the values while saving as a local file in a spreadsheet format. All the values with leading zeros,like company codes gets saved with only their numeric portion when I save a SAP table as a local file. for eg company code 0001 gets saved in excel as just 1,company code 0056 gets saved as 56 etc. How do I prevent this? What option do I need to set in SAP in order for the values to be downloaded as is, without any truncation of leading zeros.

    1.  I don't know.  How about creating a pivot after exporting data
    2. System->List->Save->local file->clipboard
    Then paste whole lot in Excel
    3. This is a problem with Excel, not SAP.  SAP exports with leading zeroes.
    You could export as flat file & import into Excel into a spreadsheet with an appropriate numbering format.

Maybe you are looking for

  • Tranport Request

    Hi, please tell me Wat is the entry created in request when we transport menus ? Rhea.

  • Problem In EDI

    Hi all , i need to built a Interface program for Uploading a Invoice (as a IDOC file) , we r geting a file in IDOC format from Vendors , we need to update this file into Inbound Side By using EDI Scenario , pls help me out step by step procedure for

  • Getting JMS Exception while starting the managed servers

    Hi , I have Savvion BPM tool hosted on WebLogic server 10.3 version.Before the manage servers coming to Running state its throwing the below mention warning message.Can anybody help me to identify what could be the reason the managed server the below

  • Feathers TextInput with AIR 3.9

    With the latest 3.9 Beta I'm seeing the Feathers TextInput field unmasked when it's set to 'password'. Has anyone else seen this? It worked fine under 3.8. It's possible it's a Feathers issue in combination with recent 3.9 updates.

  • Reg j1iex capturing excise

    Hello All, While capturing excise for a particular chapter id if a mention some amount in duty rates>specfic tab>field BED(basic excise duty) then its taking double of this amount in duty values section. for eg if i mention amount 500 in bed field in