Adding zeros before quantity or price

hey can you people tell me how to add Zeros in front of quantity field or price field.
I used conversion_alpha_input FM before writing to file but its not writing with front zeros..
any alternatives.
Ambichan

Hi,
Please have a look, logic is quite simple.
REPORT  ZLEADQUANTZEROS                         .
DATA: L_MENGE(17).
DATA: L_DEC(13), L_FRACTION(3).
DATA: T_MSEG TYPE STANDARD TABLE OF MSEG WITH HEADER LINE.
SELECT * FROM MSEG
INTO TABLE T_MSEG
UP TO 100 ROWS.
LOOP AT T_MSEG.
  L_MENGE = T_MSEG-MENGE.
  SPLIT L_MENGE AT '.' INTO L_DEC L_FRACTION.
  CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
      INPUT  = L_DEC
    IMPORTING
      OUTPUT = L_DEC.
      CONCATENATE L_DEC L_FRACTION INTO L_MENGE
      SEPARATED BY '.' .
  WRITE: / L_MENGE.
ENDLOOP.

Similar Messages

  • Adding zeros before field.

    HI Experts,
    I have one requirement, which i need to add zeros before filed, if field length is less than 6 characters.
    Ex: 1005--> 001005
    12345--->012345
    like above.
    Please give me the code.
    Regards
    Rajini

    data: result(6).
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = <ur field>
    IMPORTING
       OUTPUT        =  result .

  • Adding leading zeros before data loaded into DSO

    Hi
    In below PROD_ID... In some ID leading zeros are missing before data loaded into BI from SRM into PROD_ID. Data type is character. If leading zeros are missing then data activation of DSO is failed due to missing zeros and have to manually add them in PSA table. I want to add leading zeros if they're missing before data loaded into DSO.... total character length is 40.. so e.g. if character is 1502 then there should be 36 zeros before it and if character is 265721 then there should be 34 zeros. Only two type of character is coming either length is 4 or 6 so there will be always need to 34 or 36 zeros in front of them if zeros are missing.
    Can we use CONVERSION_EXIT_ALPHPA_INPUT functional module ? As this is char so I'm not sure how to use in that case.. Do need to convert it first integer?
    Can someone please give me sample code? We're using BW 3.5 data flow to load data into DSO.... please give sample code and where need to write code either in rule type or in start routine...

    Hi,
    Can you check at info object level, what kind of conversion routine it used by.
    Use T code - RSD1, enter your info object and display it.
    Even at data source level also you can see external/internal format what it maintained.
    if your info object was using ALPHA conversion then it will have leading 0s automatically.
    Can you check from source how its coming, check at RSA3.
    if your receiving this issue for records only then you need to check those records.
    Thanks

  • Items with  zero stock quantity show negative stock value in Stock reports

    When running Stock reports for controlling the stock value towards the GL accounts, some items appear with zero stock quantity, but the report still shows a stock value  (negative value in my case)
    How can this happen, and how can I correct this situation ?
    System parameters are :   negative stock is not allowed, Items with zero cost price not allowed. On item level average cost price method is used.
    P.K.Johnsen

    Hi Johnsen,
    I believe you have checked the" Manage Inventory by warehouse". I have noticed this issue in SAP B1 2005B but this is rectified in 2007B. The system behaves in this way as the system maintains item cost for the item for all warehouses and even if the stock is not present in the warehouse, the system would still show you a value for the same. Hope this helps. please search the forum. You'll find related threads.
    Thanks,
    Joseph

  • Reconciliation difference must be zero before reconciling  [Message 3821-8]

    Dear Experts,
    Are there any possible solutions to retrieve the AP Invoice & CN that has been manually deleted from database? My backup database is not working and I have made mistakes by adding 2 invoices & 1 CN in the live system. 
    Problems:
    I have created AP CN 2872 by copying from AP INV 56482 with partial amount (Inv total =15345.77 while CN total = 11205.65). Then I cannot find that AP CN in the list available in Outgoing Payment as it’s already being knocked off by the AP Inv. I need to get the manual AP CN to make the payment. Also, I found that the balance due of AP INV 56482 was incorrect as it was being deducted by CN 2872. So we have tried to create another AP invoice to cancel that AP CN. Unfortunately the balance due in Outgoing Payment is not tally with BP balance. Then, I have deleted the wrongly created invoices & CN in database and recreate the CN using SQL. Now, I am getting this error message “Reconciliation difference must be zero before reconciling  [Message 3821-8]” when I tried to add the Outgoing payment.
    I have messed up the tables. I have gone through SAP Note 1258628 & 1264090 but still do not know how to solve my problems yet.
    Kindly assist me on the above issue.
    Thanks & BR,
    Leng

    Hi
    Check log tables: ADOC, ADOx - maybe you'll be able to find your data there. You'll still need to take care about lots of things: header and lines for docs, reconciliation, accounting etc.
    but this just as an emergency - as Frank stated: you broke the rules and cannot count on SAP support.
    Maybe your database's recovery model is set to 'Full' - in such case you could be able to make restore to point in time. Otherwise do what Frank suggested.
    Kind regards,
    Radek

  • How to validate the line item values in OFR - quantity , unit price and UOM

    Hi All,
    Is there any possibility to validate the line items like quantity, unit price and UOM against the DB and stops those invoices at verifier (1 batch =10 invoices) level  if yes could you please let me know the process how to proceed further.
    due to this some the invoices are coming to OFR is with incorrect quantity, UOM and unit price different from PO lines information like quantity , UOM and unit price and those invoices are not validating from the DB and these are processed to EBS and it's effecting the GL and reporting.
    Regards,
    Anil

    Hi ,
    I did not get the exact requirement.Let me bit:
    In standard AP project lines validation will try to compare the quantity , unit price and UOM of line against the database for match which actually performed on export.
    So even if match fails batch will be exported.Now if you want to correct it before EBS,i think you can do it in the business process easily that you are consuming whether BPEL/BPM process.
    We have done this in several projects
    =========================
    But If you want that to be done from OFR side i think we need to code  UserExitPONumberValidate event to  compare the line items values against database.I need to test this also.

  • Adding zeros to filenames when exporting in Lightroom "Filename-001" "Fliename-002" etc?

    Hi, does anyone know if it is possible to add zeros before numbers when exporting files eg: "Filename-001" "Fliename-002" etc? The default setting is "Filename-1" "Filename-2" ect. The reason I want to have zeros in the number sequence is that certain software will display files in the wrong numerical sequence eg: "Filename-1" "Filename-10" Filename-11" etc and then "Filename-2" after "Filename-19". If zeros are added the files will always be displayed in the correct sequence "Filename-001" "Filename-002"... "Filename-009" "Filename-010" "Filename-011" etc.

    Just customize the filename using the template editor, and use the Sequence token set to the number of leading zeroes you want, as shown.

  • Right alignment for Quantity and price

    Hi all,
    Iam downloading customer details into text file, in this the quantity and price are left justified but my requirement is the quantity and price should be right justified in the downloaded text file
    can anyone help me to get this.
    Thankyou
    Pradeep Reddy M.

    I got it, assigned to a chacter field and used condense to remove leading zeros
    Thank you,
    Narendra.
    Message was edited by:
            Pradeep Reddy Miriyala

  • How can we remove the following zeros from quantity field ?

    Hi All.
    how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
    eg:getting output zqty = 2.000
    but i need           zqty = 2.
    help me to reslove this issue.
    Regards.
    jay

    Hi,
      While populating the field catlog do the following thing to   avoid zeros.
      wa_fieldcat-tabname = 'I_OUTPUT'.    " Curr
      wa_fieldcat-fieldname = 'FWAER'.
      wa_fieldcat-seltext_l = text-023.
      wa_fieldcat-no_zero = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR  wa_fieldcat.
    Thanks,
    Khushbu.

  • Quantity and Price Totals on Sale Order and Delivery Order

    Dear ABAP Gurus,
    I want to add totals of line items (Quantity and Price) in sale order and delivery order screens. Can you please guide me how to do this. The price can be any from pricing procedure ie exclusive or inclusive price of sales tax.
    regards,
    RSA
    Moderator message : Requirements dumping not allowed, show the work you have already done, thread locked.
    Edited by: Vinod Kumar on Jan 28, 2012 9:23 PM

    Hi,
    Try this :
    IF @transaction_type in ('A','U') AND (@OBJECT_TYPE='22')
    BEGIN
    If exists (SELECT t3.docentry FROM OWOR T0  INNER JOIN WOR1 T1 ON T0.DocEntry = T1.DocEntry left join POR1 T2 on T2.[U_JONum] = T0.[OriginNum] and  T0.[ItemCode] =  t2.U_SubConItem] INNER JOIN OPOR T3 ON T2.DocEntry = T3.DocEntry WHERE T1.[PlannedQty] <> T2.[Quantity] and  T1.[ItemCode]  = 'subcon' and  T3.DocEntry = @list_of_cols_val_tab_del )
    Begin
    SET @error = 10
    SET @error_message = 'Not allowed to add more than planned'
    End
    End
    Thanks & Regards,
    Nagarajan

  • Display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price  against each line number

    hello all,
    i have an ALV report requirement like this,
    on the initial screen i have displayed(for a given agreement number like in ME33K )
    in the selection screen i have taken agreement number as EKPO-EBELN.
    purchase document number        item number        short text        target quantity      net price
    5400000019                                  1                      xxx                  1.000                  304300.00
                                                        2                     xxxx                 1.000                  500000.00
    the above fields i have taken from EKPO table.....
    and on double clicking the  item number i have displayed
    line number          service number       short text           quantity    units    gross price   quantity released
    1                           swr10                   xxxx                 2.00          kg          500             2
    2                           swr11                    xxxx                5.00          EA         500             2
    the above fields i have taken from ESLL (esll-extrow, esll-srvpos, esll-ktext1 , esll-menge  etc......)
    this i have done by passing EBELN to ESLH and getting PACKNO and passed this PACKNO to ESLL.
    now my question is i need to display  Purchase order, PO Item , Order Number ,entry sheet quantity ,entry sheet price ,invoice quantity, invoice price
    against each line number above.....
    from which table do i need to take these fields.....
    please guide me....
    thankq....

    Thanks Andra,
    The problem is the multiple invoices is for non goods receipt item so there will be no delivery.At the time of creating a PO the GR is not checked so there will be no delivery .
    Also this setting is for invoices which are comming from Vendors.But if we are genrating the invoices manually it is not blocking those invoices.Also i there is nowhere mentioned in Incomming invoice to set tolerence for incomming invoice.Are you talking about Vendor tolerences?
    Thanks in advance
    Edited by: Metroid01 on May 14, 2009 6:52 PM

  • Delivery Date with Zero Order Quantity in Sales Order

    Dear All,
    I have created a sales order in va01 with different delivery date in schedule lines. I want to save delivery date with zero order
    quantity because he has not delivery on time.

    Dear All,
    I have created a sales order in va01 with different delivery date in schedule lines. I want to save delivery date with zero order
    quantity because he has not delivery on time.
    Deatils :
    Delivery Date     Order Quantity  Delivery Qty
    02.09.2011       10                    10
    05.09.2011       10                    10
    09.09.2011       10                    10
    15.09.2011       10                    10
    21.09.2011       10                    0
    Now i want to insert a new schedule line 10.10.2011 with order quantity 10. or 21.10.2011 schdeule date with 0 quantity.
    Presently system can't save schdeule date 21.09.2011 with o quantity.

  • Adding zeros to the external material number

    Hello Friends,
    I needed your assistance with  a routine in BI 7, Infosource Transformations or in the Infoobject transformations (update Rules).
    I have data comming from a  flat file without the leading zeros for an infoobject.I need to have the leading zeros but i need a code that will do a record count and then accordingly add the zeros.
    EX:     1)  67909344 i need it to look  like  000067909344
              2) 505289 then i need it to look like 000000505289
    Basically, if its 8 digit number then i want 4 zeros before it and if its a 6 digit number then i need 6 zeros before it, those are the only tyoes ill have 6 and 8 digits
    Thanks alot.

    Hello Ronit,
    You can use FM CONVERSION_EXIT_ALPHA_INPUT.
    Declare a variable to contain that value, for example, 67909344.
    If you declare a variable like CHAR10, and use it like this:
    lv_variable = '67909344'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING                                  
      INPUT  = lv_variable                        
    IMPORTING                                  
      OUTPUT = lv_variable.                       
    The result will be 0067909344.
    If you declare the variable as length 12, the result will be 000067909344.
    And it goes on...
    See if this can be helpful to you.
    Kind regards,
    Bruno
    Edited by: Bruno Garcia on May 27, 2008 5:54 PM

  • Error AR Invoice add"Reconciliation difference must be zero before recon

    Dear Expert,
    We have smoothly process  with out error  @ SAP B1 8.8 PL 14.  But When we upgrade to SAP B1 8.81 PL 09 we are facing error. The process is
    1    A/R down payment request (independent), as payment is being received in advance (earlier than Sales Order creation).
    2.    Incoming payment against A/R down payment request.
    3.    Sales Order > Delivery Order> A/R invoice >> in A/R invoice (while invoice creation) we call the payment made (in step # 1 and 2).
    4.    While we add this A/R invoice, we get this Error: u201CReconciliation difference must be zero before reconcilingu201D.
    Please advice.
    Regards

    hi,
    please refer your issues to the ff. SAP notes
    1. [1586090 - System error when link Down Payment Request|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303135383630393026]
    2. [1580743 - Reconciliation difference must be zero before reconciling|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303135383037343326]
    3. [1553030 - Reconciliation difference must be zero before reconciling|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303135353330333026]
    4. [1534262 - Recocniliation Difference must be zero, manual journal|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3030303135333432363226]
    please note that you need to use your S-Account to access this note.
    regards,
    Fidel

  • Can a Purchase Order (PO) Be Created With Negative Quantity or Price?

    The object is to have a negative line on a PO? Is this possible?

    Hi,
    Oracle Purchasing does not provide functionality to create a Purchase Order with a negative quantity or price.
    Enhancement Request BUG 2457862 NEGATIVE QUANTITIES ON PO LINES has been logged to request this functionality.
    Thanks
    -Arif.

Maybe you are looking for