Urgent: Field for doc currency?

Hi experts,
we have a generic extrator that brings in netwr(net value in document currency) also.
The infoobject 0net_value has document currency as its reference currency.
There is no field to map 0DOC_CURRCY in this extractor.
Is it necessary to change the extractor in R/3 to get a field for document currency??

Hi:
If the currency is going to be always the same, maybe you could fix it in the object definition.
Kind regards,

Similar Messages

  • Reference field for quantity/currency

    why s that we need to give a reference field for quantity and currency based fields alone

    hi,
    The reference field is used for the output, the output/input format of a currency field depends on the value of its reference field.
    For example if you create a screen using the field KONV-KBETR :
    the reference field is RV61A-AWEI1:
    if you set RV61A-AWEI1 = 3
    the value in KONV-KBETR is beeing shown with 3 decimals
    So you could see 3,000 but this value is automatically stored as 30.00
    if you set RV61A-AWEI1 = 2
    the value in KONV-KBETR is beeing shown with 2 decimals
    All this convertions are automatically made in according to the value setted in reference field.
    You can see this using the statament WRITE with options CURRENCY, try this:
    PARAMETERS P_KBETR LIKE KONV-KBETR.
    WRITE: P_KBETR CURRENCY '3'.
    WRITE: / P_KBETR CURRENCY '2'.
    WRITE: / P_KBETR CURRENCY '1'.
    Rgds
    Anver

  • Extractor 0EC_PCA_1: incorrect value for BALANCE field for USD currency

    Hi Gurus/Experts,
    We have a standard extractor in ECC side: 0EC_PCA_1 wherein USD currency (CURRTYPE/Currecny type = 30) is giving out a sum value for Accumulated Balance field of -300,962.66 for Plant A. I checked on its corresponding EUR value (CURRTYPE/Currency type = 10) it is giving out a sum value of +4,060,629.43 as shown below.
    Plant
    Fiscal year/period
    Currency Key / Type
    Accumulated Bal(BALANCE)
    Plant A
    2011/005
    EUR / 10
    +4,060,629.43 <--Balance is summation value
    Plant A
    2011/005
    USD / 30
    -300,962.66 <--Balance is summation value
    Logically thinking, if we sum up all of the accumulated balance and result is +4,060,629.43 in Euro, it should appear also as +USD after summing up the accumulated balance in the corresponding currency. But given this scenario, we are getting a negative result for USD value. I already checked the exractor on how is the Accumulated balance is being populated on ECC side but unfortunately, did not find any luck. I was not able to validate the records of Accumulated balance with the source table GLPTC as I don't have that much experience on the ABAP side.
    As for my questions:
    1. How is the currency conversion works on this extractor for Accumulated Balance field?
    2. How is the value for Accumulated Balance derived?
    Please take note also that isue rises at ECC side so I did not include the data flow on BW side.
    Thanks!

    Decided to use Generic Extractor on GLPCA

  • Need to populate text/ref fields for docs generated by allocation cycles

    When executing distribution or assessment cycles the doc header text, reference field and line item text are all left blank in the generated accounting document.  We would like to populate these fields with some reference to the cycle or segment names.  Is there any doc type or cycle setting or standard config that would allow us to populate these fields without the use of an exit?  Thank you in advance.

    Hi
    Goto GGB1 TCode
    under Cost Accounting you can find three allocation areas
    Find out right one and create new substitution rule to update text or ref
    Reg
    Vishnu

  • Dynamic input fields for Doc Props in Batch Mode; Acrobat Pro 9

    I'm using Acrobat Pro 9.  I'm looking for a way for Acrobat to automatically fill/replace the Title and Subject fields of the document properties with the file name of the PDF it is processing during batch mode.  Currently I have this step set to interactive and must type the name in for each file as it is processed.  Is there a script I can use? A macro? Heck! A Hack? It would literally take weeks off of my monotonous work load as the file names are long and there are thousnds of them to be processed.
    Thanks,
    Photonogon

    If you want the file name with the path, you could add the following JavaScript:
    title = path;
    subject = path;
    If you just want the file name:
    var filename = path.split("/").pop();
    title = filename;
    subject = filename;

  • AP Aging with Doc Currency?

    Dear Experts,
    I am trying to get the AP Aging by Document Currency (instead of Local Currency) using the format as per S_ALR_87012078 (instead of S_ALR_87012085). I have created a from copy from 0SAPDUEAN-01 but I could not find any characteristic that allow me to include Document Currency.
    Furthermore, my client is requesting the AP Aging by GL accounts (to be included in the report navigation).
    I notice that these items are available in the dynamic selections but my client prefer that the document currency or the GL accounts to be part of navigation for the report.
    Any idea how to go it? I have been trying to search for the solution for quite sometime but not available.
    Really appreciate your feedback. Thanks.
    Regards
    Fauzi

    Hi,
    Doing AP aging with doc currency is no possible. But with recon account is possible by the following option
    You can try the solution with T code S_ALR_87012077 - Vendor Information System.
    Evaluation need to be created in which the report can be generated for Recon account wise and the Aging can also be down by Recon GL account wise.
    For creating Evaluation use Tcode OBDF.. Standard SAP has Vendor evaluation with
    Evaluation Types  - 01 Due Date
    Select this and go to evaluations
    Create an evaluation by recon account with the following by creating the version with following program
    in the report tab
    selection - RFKRRE01 with the std variant SAP&K01E (LFB1-AKONT)
    Display - RFKRRI01
    But this has a limitation of up to three intervals only...
    For Doc currency you can use the Call report functionality, assign FLB1N tcode to it. and choose the layout from there.
    hope it could be of some help to you..
    Regards
    Seshadri

  • Value put in the maintenace view for field of DOC type gets divided by 100

    Hi all,
    We have a product table ZPROD_T which contains one quantity column (QUANT) of the data type DOC. We have also created a view and a maintenance view for this table.
    The problem is that when we add new values to the table using the maintenance view, the value that we add to the QUANT field gets devided by houndred. E.g. if we put in 4 in the QUANT field (type DOC), the value that we later see in the table is 0,04!
    How do we go about to solve this problem and get the correct value in the table? Should we change the maintenance view somehow or change the data type in the QUANT field from DOC to something else?
    All help is greatly appriciated!
    BR,
    Armin

    Yes, that would be an option, but I was kinda hoping there was another way to solve this problem. Namely, when we would like to have ability to have decimal values in that field, e.g. if we have quantity in sqr meters or meters. Also if we change data type to QUAN than we need to put values in the "Currency/Quantity fields" in the table ZPROD_T, and at the time we are not sure about what unit of measure we are gonna have!
    Is it possible to keep DOC data type and still get the correct values in the table?
    /Armin

  • Create WDA Input field for currency amount ref to curr key

    Hi Experts,
    Could the UI elements in WDA input fields have a key reference? If that possible, how to do that?
    For example: currency amount input field referenced to Curr key?or quantity ref to UoM field.
    Regards,
    Agnis Virtinova Avency

    Hello Agnis Virtinova Avency,
    WDA uses ABAP dictionary structures for this kind of linking - define your amount and currency as part of a standard ABAP structure - then link the two fields in the structure as per normal ABAP data dictionary . Then use this structure to define your context node.
    This is the same approach you should use if you have multiple fields that should input to or output from a DDIC search help.
    This means that if you choose - for example CLP (Chilean Peso) as the currency, then the decimal places on the amount field are removed.
    Hope this is what you were looking for.
    Cheers,
    Chris

  • ERROR: Select Currency/UoM field for the selected analyzed fields

    Hi all
    I am currently creating Business Rules in GRC PC 10.0 for the Automated Monitoring Framework.
    After completing the Basic Information page, I click [Next] and get to the Data for Analysis page.
    If ever I select any field that contains a value for Currency or Unit of Measure, I receive the following error and cannot proceed with creating the Business Rule:
    Select Currency/UoM field for the selected analyzed fields
    Does anyone have any information/SAP Notes/documentation on what this error is and how to solve it?
    Any help will be gratefully accepted.
    Kind regards
    Gregory Huddle

    http://service.sap.com/sap/support/notes/1904313

  • How do u handle the user parameters for a currency field.

    How do u handle the user parameters for a currency field.
       Decimal saperator and a hundreds saperator. (depending upon the user parametes set for the user the saperators may differ)
          Eg: currency field: 13.896,01 (In this case u2018,u2019 is a thousand saperator and u2018.u2019 is a decimal saperator) How to handle this one.
    Regards,
    Ram.

    Hi,
    Try this code....
    DATA: V_KURSF1 TYPE c LENGTH 10,
            v_kursf2 type c LENGTH 10,
            v_dcpfm    TYPE xudcpfm, "Decimal or Thousand Notation
            v_thousand TYPE char1,   "Thousands Notation
            v_decimal  TYPE char1.   "Decimal Notation
      CONSTANTS:    c_x      TYPE char1 VALUE 'X',
                    c_y      TYPE char1 VALUE 'Y',      "Value Y
                    c_comma  TYPE char1 VALUE ',',      "Comma
                    c_point  TYPE char1 VALUE '.',      "point
                    c_blank  TYPE char1 VALUE ' '.      "Blank
      IF v_dcpfm IS INITIAL.
        SELECT SINGLE dcpfm
        FROM usr01
        INTO v_dcpfm
        WHERE bname = sy-uname .
        IF sy-subrc = 0.
          CASE v_dcpfm.
            WHEN c_x.
              v_decimal  = c_point.
              v_thousand = c_comma.
            WHEN c_blank.
              v_decimal  = c_comma.
              v_thousand = c_point.
            WHEN c_y.
              v_decimal  = c_comma.
              v_thousand = c_blank.
          ENDCASE.
        ENDIF.
       ENDIF.
               Find c_point in  wa_segment-exchange_rate.  ( Eg:ield)
              if sy-subrc = 0.
                replace c_point in wa_segment-exchange_rate with v_decimal.
              endif.

  • Field Business Area is a required field for GL account  - urgent

    Hi all,
    we had created a new plant 3800. During configurations , business users created material for 3800 on 3000 and started purchase. Now after configurations, those materials had to be extended on plant 3800. Material have been extended but when the stock is transfered from 3000 to 3800 via MB1B , system says "
    Field Business Area is a required field for GL account ICI 2201001".
    Any idea that why this error comes? I have checked every thing, cudnt sought out.
    Kindly help.
    Regards,
    Aisha Ishrat
    ICI Pakistan Ltd.

    Hi
    When you are transferring the material from one plant to other plant using mvt type 301 or 303/305 etc.,
    there is a field selection variation between the mvt type and G/L account which was triggered for this Transaction.For mvt type 301, the filed Business area is not mandatory and for G/L account 2201001 the feild is mandatory.
    You can resolve this by changing one of the field selection group, i.e. either MVt type or G/L account.to do this follow the procedure.
    1.Go to SE38
    2.Type program RM07CUFA
    3.Execute the program
    4.It will ask for Mvt type nad G/L account number, give the details and execute
    5.System will display the difference between the two filed selection groups.
    6.From the same screen , you can change the fileds option by selecting the error log.
    Regards
    Ramakrishna

  • How2specify Amount in Doc Currency and Amnt in LOCL Curr4same item in FBB1?

    Hi Experts,
    I need to specify some amount (say, 100) in doc currency and some amount(say, 70) in Local currency for the same line item(say, 0001) of a acct doc in FBB1 transaction........so, let me know that, How proceed in FBB1 tx to meet above requirement? I mean, navigation......because, I hv FBB1 tx input screen, MENU, push buttons, but i did not find any such input fields!! if this is not supports, then Wht is the other tx to meet my requirememt?
    thanq

    ur correct......thats why am struggling from yesterday that, I hv requiremet that, in the input file, both AMOUNTS are providing, i mean, amount in doc curency and amount in local currency for the same line item.......so, i need to upload this input file to SAP, inturn both amounts to the same line item.....they dont want calculate by the system, they want to hv it explicitly, i was used couple of FMs, no use!! u might hv seen my posts, INTERFACE_DOCUMENT also not meeting my requirement!!
    any clue? appreciated.

  • F-47  Field for purcharse order

    Hi Friends,
                       F-47 screen while entering request for down payment , i am not geeting field for entering
    PO number.  how can i get that field on screen
    thanks

    hi
    its  SAP standard Screen if you enter the follownig fields
    Document Date                 Type       KA    Company Code    1000                    
    Posting Date     17.02.2009   Period     2     Currency/Rate   EUR                     
    Document Number                                Translation dte                         
    Reference                                                                               
    Doc.Header Text                                                                        
    Trading part.BA                                                                               
    Account                                                                               
    Trg.sp.G/L ind.                                                                       
    press enter
    in the next screen it will show the Purch. order number and ine item.

  • Doc Currency

    Hi,
    1)- I want to retrive all the sales orders as per the Currency wise(doc currency).
    2)- I have created one time customer using account group CPDa.
    n created order, while creating order system will prompt for entering address for that customer ,I entered, save the order. did the Del n PGI, n billing
    while releasing invoice to accounting,itz giving error
    as i havent maintain this data in XD01,(thru sales order- v can create customer data VD01).
             to release it to accounting,now i need extend this customer for that specific comany code.
    izt so?
    Plz correct me?
    How one time customers n New customers dealt with ?
    *Rewards ll b provided

    Hi Raj,
    1. Sales doc based on Doc Currency:
    Go to SE16, type VBAK. go to Settings - fields for Selection. Tick WERKS and Tick Right (Choose).
    Enter the Currency for which you want to display all sales documents. Systems will display all sales docs having that document currency.
    2. What is the exact error you r getting while dng invoice. To know this go to VF01/VF02 &  Go to EDIT - LOG
    OR
    Environment - Account determination Analysis - revenue Account determination and try to find out the error if it is related to account determination
    Reward if it helps
    Regards
    Srini

  • Regarding fields for Purchase order

    can any body help what are the fields reqiured to develop a p.o report to display the change date,user name,time,p.o name and vendor code.

    Hi
    see the sample report for the fieldnames and other logic
    all the PO info is there here.
    *& Report  ZMM_PO_REPORT
    REPORT  ZMM_PO_REPORT message-Id yb
           NO STANDARD PAGE HEADING
           LINE-COUNT 60(1)
           LINE-SIZE 230.
           D A T A B A S E  T A B L E S   D E C L A R A T I O N
    TABLES: lfa1,           " Vendor Master
            t161,           " PO Doc Types
            t024,           " Purchase Groups
            ekko.           " PO Header
                   T Y P E S  D E C L A R A T I O N S
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_po,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            bstyp TYPE bstyp,           " PO Category
            bukrs TYPE bukrs,           " Company Code
            bsart TYPE bbsrt,           " PO Type
            lifnr TYPE lifnr,           " Vendor No
            ekgrp TYPE bkgrp,           " Purchase Group
            waers TYPE waers,           " Currency
            bedat TYPE etbdt,           " PO Date
            txz01 TYPE txz01,           " Material Text
            werks TYPE ewerk,           " Plant
            lgort TYPE lgort_d,         " Storage Location
            matkl TYPE matkl,           " Material Group
            menge TYPE bamng,           " PR Quantity
            meins TYPE bamei,           " UOM
            bprme TYPE bbprm,           " Price Unit
            netpr TYPE netpr,           " Net price
            peinh TYPE peinh,           " Price Unit UOM
            pstyp TYPE pstyp,           " Item Category
            knttp TYPE knttp,           " Account Assignment Category
           END OF s_po.
    Purchase Orders History Structure
    TYPES: BEGIN OF s_account,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            gjahr TYPE mjahr,           " Fiscal Year
            belnr TYPE mblnr,           " PO Invoice No
            menge TYPE menge_d,         " PR Quantity
            wrbtr TYPE wrbtr,           " Price in Local Currency
            dmbtr TYPE dmbtr,           " Price in Foreign Currency
            waers TYPE waers,           " Currency
            shkzg TYPE shkzg,           " Dr/Cr Indicator
           END OF s_account.
    Purchase Orders History Structure(Item Sum)
    TYPES: BEGIN OF s_inv_sum,
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            menge TYPE menge_d,         " PR Quantity
            wrbtr TYPE wrbtr,           " Price in Foreign Currency
            waers TYPE waers,           " Currency
           END OF s_inv_sum.
    Purchase Orders Main Structure
    TYPES: BEGIN OF s_rep,
            lifnr TYPE lifnr,           " Vendor No
            ebeln TYPE ebeln,           " PO No.
            ebelp TYPE ebelp,           " PO Item
            bstyp TYPE bstyp,           " PO Category
            bsart TYPE bbsrt,           " PO Type
            ekgrp TYPE bkgrp,           " Purchase Group
            waers TYPE waers,           " Currency
            bedat TYPE etbdt,           " PO Date
            txz01 TYPE txz01,           " Material Text
            werks TYPE ewerk,           " Plant
            lgort TYPE lgort_d,         " Storage Location
            matkl TYPE matkl,           " Material Group
            menge TYPE bamng,           " PR Quantity
            meins TYPE bamei,           " UOM
            bprme TYPE bbprm,           " Price Unit
            netpr TYPE netpr,           " Net price
            peinh TYPE peinh,           " Price Unit UOM
            pstyp TYPE pstyp,           " Item Category
            knttp TYPE knttp,           " Account Assignment Category
            name1 TYPE name1,           " Plant
            orewr TYPE netpr,           " To be Invoiced Price
            curr  TYPE waers,           " Inv Doc Currency
           END OF s_rep.
               D A T A  D E C L A R A T I O N S
    DATA: gv_title1 TYPE sylisel,            " Report title
          gv_dial.                           " Color flag
                C O N S T A N T S  D E C L A R A T I O N S
    CONSTANTS: c_x                VALUE 'X',   " Flag X
               c_h                VALUE 'H',   " Debit
               c_vgabe TYPE vgabe VALUE '2'.   " Transaction Type
         I N T E R N A L  T A B L E S  D E C L A R A T I O N S
    DATA: i_po    TYPE STANDARD TABLE OF s_po WITH HEADER LINE,
                                 " Purchase Order
          i_inv   TYPE STANDARD TABLE OF s_inv_sum WITH HEADER LINE,
                                         " PO Invoice Values
          i_rep   TYPE STANDARD TABLE OF s_rep WITH HEADER LINE,
                                     " PO Invoice Values
          i_ekbe  TYPE STANDARD TABLE OF s_account WITH HEADER LINE.
                               " PO Invoice Values
                     S E L E C T I O N  S C R E E N                      *
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS: s_lifnr FOR lfa1-lifnr MATCHCODE OBJECT kred,
                    s_ebeln FOR ekko-ebeln MATCHCODE OBJECT mekk,
                    s_bsart FOR t161-bsart,
                    s_ekgrp FOR t024-ekgrp,
                    s_bedat FOR ekko-bedat.
    SELECTION-SCREEN END OF BLOCK b1.
                      I N I T I A L I Z A T I O N                        *
    INITIALIZATION.
                  A T  S E L E C T I O N - S C R E E N                   *
    AT SELECTION-SCREEN.
    Validate the screen fields
      PERFORM validate_screen.
                   S T A R T - O F - S E L E C T I O N                   *
    START-OF-SELECTION.
    Fetch main data
      PERFORM fetch_data.
                   T O P - O F - P A G E                                 *
    TOP-OF-PAGE.
    Header of the List
      PERFORM header.
                   E N D - O F - P A G E                                 *
    Footer
    END-OF-PAGE.
      ULINE.
                   E N D - O F - S E L E C T I O N                       *
    END-OF-SELECTION.
    Display the Report Output data
      PERFORM display_data.
    At Line-Selection
    AT LINE-SELECTION.
    When double clicked on EBELN display the details of Purchase Doc
      PERFORM line_sel.
    *&      Form  validate_screen
    Validation of Selection Screen fields
    FORM validate_screen .
    Validation of Vendor Number
      CLEAR lfa1-lifnr.
      IF NOT s_lifnr[] IS INITIAL.
        SELECT lifnr UP TO 1 ROWS
            INTO lfa1-lifnr
            FROM lfa1
            WHERE lifnr IN s_lifnr.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Vendor'(002).
        ENDIF.
      ENDIF.
    Validation of PO Number
      CLEAR ekko-ebeln.
      IF NOT s_ebeln[] IS INITIAL.
        SELECT ebeln UP TO 1 ROWS
            INTO ekko-ebeln
            FROM ekko
            WHERE ebeln IN s_ebeln.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Document Number'(003).
        ENDIF.
      ENDIF.
    Validation of PO Document Type
      CLEAR t161-bsart.
      IF NOT s_bsart[] IS INITIAL.
        SELECT bsart UP TO 1 ROWS
            INTO t161-bsart
            FROM t161
            WHERE bsart IN s_bsart.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Purchase Document Type'(004).
        ENDIF.
      ENDIF.
    Validation of Purchasing Group
      CLEAR t024-ekgrp.
      IF NOT s_ekgrp[] IS INITIAL.
        SELECT ekgrp UP TO 1 ROWS
            INTO t024-ekgrp
            FROM t024
            WHERE ekgrp IN s_ekgrp.
        ENDSELECT.
        IF sy-subrc <> 0.
          MESSAGE e000 WITH 'Invalid Purchasing Group'(005).
        ENDIF.
      ENDIF.
    ENDFORM.                    " validate_screen
    *&      Form  fetch_data
    Fetching the PO related data from Database Tables
    FORM fetch_data .
      CLEAR i_po.
      REFRESH i_po.
      SELECT a~ebeln            " PO No.
             b~ebelp            " PO Item
             a~bstyp            " PO Category
             a~bukrs            " Company Code
             a~bsart            " PO Type
             a~lifnr            " Vendor No
             a~ekgrp            " Purchase Group
             a~waers            " Currency
             a~bedat            " PO Date
             b~txz01            " Material Text
             b~werks            " Plant
             b~lgort            " Storage Location
             b~matkl            " Material Group
             b~menge            " PR Quantity
             b~meins            " UOM
             b~bprme            " Price Unit
             b~netpr            " Net price
             b~peinh            " Price Unit UOM
             b~pstyp            " Item Category
             b~knttp            " Account Assignment Category
        INTO TABLE i_po
        FROM ekko AS a JOIN ekpo AS b
        ON a~ebeln = b~ebeln
        WHERE a~ebeln IN s_ebeln AND
              a~lifnr IN s_lifnr AND
              a~ekgrp IN s_ekgrp AND
              a~bsart IN s_bsart AND
              a~bedat IN s_bedat.
      SORT i_po BY ebeln ebelp.
      break-point.
      IF NOT i_po[] IS INITIAL.
    Fetch the PO History/Invoice Details from EKBE Table
        CLEAR i_ekbe.
        REFRESH i_ekbe.
        SELECT ebeln           " PO No.
               ebelp           " PO Item
               gjahr           " Fiscal Year
               belnr           " PO Invoice No
               menge           " PR Quantity
               wrbtr           " Price in Local Currency
               dmbtr           " Price in Foreign Currency
               waers           " Currency
               shkzg           " Dr/Cr Indicator
         INTO TABLE i_ekbe
         FROM ekbe
         FOR ALL ENTRIES IN i_po
         WHERE ebeln = i_po-ebeln AND
               ebelp = i_po-ebelp AND
               vgabe = c_vgabe.
        IF sy-subrc = 0.
          SORT i_ekbe BY ebeln ebelp.
          LOOP AT i_ekbe.
            IF i_ekbe-shkzg = c_h.
              i_ekbe-wrbtr = i_ekbe-wrbtr * -1.
            ENDIF.
            MODIFY i_ekbe.
          ENDLOOP.
      break-point.
    Sum up the Item wise Invoice totals
          LOOP AT i_ekbe.
            AT END OF ebelp.
              READ TABLE i_ekbe INDEX sy-tabix.
              SUM.
              MOVE-CORRESPONDING i_ekbe TO i_inv.
              APPEND i_inv.
            ENDAT.
            CLEAR i_inv.
          ENDLOOP.
          SORT i_inv BY ebeln ebelp.
            break-point.
        ENDIF.
      ENDIF.
    Move the Vendor Name and Invoice Values to I_rep Internal Table
      LOOP AT i_po.
        MOVE-CORRESPONDING i_po TO i_rep.
        CLEAR i_inv.
        READ TABLE i_inv WITH KEY ebeln = i_po-ebeln
                                  ebelp = i_po-ebelp.
        IF sy-subrc = 0.
          i_rep-orewr = ( i_po-menge - i_inv-menge ) * i_po-netpr.
          i_rep-curr  = i_inv-waers.
        ELSE.
          i_rep-orewr = i_po-menge * i_po-netpr.
          i_rep-curr  = i_po-waers.
        ENDIF.
      break-point.
    Get the Vendor Name
        CLEAR lfa1-name1.
        SELECT SINGLE name1 FROM lfa1 INTO lfa1-name1
          WHERE lifnr = i_po-lifnr.
        IF sy-subrc = 0.
          i_rep-name1  = lfa1-name1.
        ENDIF.
        APPEND i_rep.
        CLEAR  i_rep.
          break-point.
      ENDLOOP.
      SORT i_rep BY lifnr ebeln ebelp.
      DELETE i_rep WHERE orewr LE 0.
      break-point.
    ENDFORM.                    " fetch_data
    *&      Form  display_data
    Display the Report Output data
    FORM display_data .
      DATA: lv_flag,               " New Flag
            lv_rec TYPE i.         " No of Records
      CLEAR lv_rec.
      IF i_rep[] IS INITIAL.
        MESSAGE e000 WITH 'No Data found'(022).
      ELSE.
        LOOP AT i_rep.
    Toggle Color
          PERFORM toggle_color.
          IF lv_flag <> space.
            NEW-LINE.
          ENDIF.
    At New Purchase Document
          AT NEW ebeln.
            WRITE:/1 sy-vline, 2(10) i_rep-ebeln INTENSIFIED OFF.
            lv_flag = c_x.
            lv_rec = lv_rec + 1.
          ENDAT.
          WRITE: 1 sy-vline,
                12 sy-vline,13(4)   i_rep-bsart,
                17 sy-vline,18(10)  i_rep-lifnr,
                28 sy-vline,29(35)  i_rep-name1,
                64 sy-vline,65(4)   i_rep-ekgrp,
                69 sy-vline,70(10)  i_rep-bedat,
                80 sy-vline,81(5)   i_rep-ebelp,
                86 sy-vline,87(40)  i_rep-txz01,
               127 sy-vline,128(9)  i_rep-matkl,
               137 sy-vline,138(1)  i_rep-pstyp,
               139 sy-vline,140(1)  i_rep-knttp,
               141 sy-vline,142(4)  i_rep-werks,
               146 sy-vline,147(4)  i_rep-lgort,
               151 sy-vline,152(13) i_rep-menge UNIT i_rep-meins,
               165 sy-vline,166(3)  i_rep-meins,
               169 sy-vline,170(15) i_rep-netpr CURRENCY i_rep-waers,
               185 sy-vline,186(4)  i_rep-waers,
               190 sy-vline,191(5)  i_rep-peinh,
               196 sy-vline,197(4)  i_rep-bprme,
               201 sy-vline,202(15) i_rep-orewr CURRENCY i_rep-curr,
               217 sy-vline,218(4)  i_rep-curr,
               222 sy-vline,223(7)  i_rep-bstyp centered,
               230 sy-vline.
          NEW-LINE.
          hide: i_rep-ebeln.
        ENDLOOP.
        ULINE.
        FORMAT COLOR OFF.
        WRITE : /2 'Total Number of Purchasing Documents:'(025) COLOR 3,
                    lv_rec COLOR 3.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  header
    Write the Report Header
    FORM header .
      FORMAT RESET.
    header
      WRITE:/1(230) 'LIST OF PURCHASE DOCUMENTS PER VENDOR'(006) CENTERED.
      SKIP.
      FORMAT COLOR COL_HEADING.
      ULINE.
      WRITE:/1 sy-vline,2(10)   'Pur.Doc.No'(006) CENTERED,
            12 sy-vline,13(4)   'Type'(007),
            17 sy-vline,18(10)  'Vendor'(008) CENTERED,
            28 sy-vline,29(35)  'Name'(009) CENTERED,
            64 sy-vline,65(4)   'PGrp'(010) CENTERED,
            69 sy-vline,70(10)  'Doc.Date'(012) CENTERED,
            80 sy-vline,81(5)   'Item'(011),
            86 sy-vline,87(40)  'Material Short Text'(024) CENTERED,
           127 sy-vline,128(9)  'Mat.Group'(013),
           137 sy-vline,138(1)  'I',
           139 sy-vline,140(1)  'A',
           141 sy-vline,142(4)  'Plnt'(014),
           146 sy-vline,147(4)  'SLoc'(015),
           151 sy-vline,152(13) 'Quantity'(016) CENTERED,
           165 sy-vline,166(3)  'UoM'(017),
           169 sy-vline,170(15) 'Net Value'(018) CENTERED,
           185 sy-vline,186(4)  'Curr'(019),
           190 sy-vline,191(5)  'Per'(020),
           196 sy-vline,197(4)  'Unit'(021),
           201 sy-vline,202(15) 'To be Invoiced'(023) CENTERED,
           217 sy-vline,218(4)  'Curr'(019),
           222 sy-vline,223(7)  'Doc.Cat'(026),
           230 sy-vline.
      ULINE.
    ENDFORM.                    " header
    *&      Form  toggle_color
    This routine alters the color of the records in the list
    FORM toggle_color.
      IF gv_dial = space.
        FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
        gv_dial = c_x.
      ELSE.
        FORMAT COLOR 1 INTENSIFIED OFF.
        CLEAR gv_dial.
      ENDIF.
    ENDFORM.                    " toggle_color
    *&      Form  LINE_SEL
    *When double clicked on EBELN field display the details of Purchase Doc
    FORM line_sel.
      CASE sy-lsind.
        WHEN '1'.
          DATA: lv_field(20),
                lv_value(10),
                lv_bstyp like i_rep-bstyp.
          clear: lv_bstyp,lv_value, lv_field.
          GET CURSOR FIELD lv_field VALUE lv_value.
          IF lv_field = 'I_REP-EBELN'.
            IF NOT lv_value IS INITIAL.
              READ LINE sy-index FIELD VALUE i_rep-bstyp
                                       INTO  lv_bstyp.
             READ CURRENT LINE FIELD VALUE i_rep-bstyp INTO lv_bstyp.
              if lv_bstyp = 'F'.
                SET PARAMETER ID 'BES' FIELD lv_value.
                CALL TRANSACTION 'ME23N' AND SKIP FIRST SCREEN.
              elseif ( lv_bstyp = 'K' or lv_bstyp = 'L' ).
                SET PARAMETER ID 'VRT' FIELD lv_value.
                CALL TRANSACTION 'ME33' AND SKIP FIRST SCREEN.
              elseif lv_bstyp = 'A'.
                SET PARAMETER ID 'ANF' FIELD lv_value.
                CALL TRANSACTION 'ME43' AND SKIP FIRST SCREEN.
              endif.
            ENDIF.
          ENDIF.
      ENDCASE.
    ENDFORM.                    " line_sel
    Regards
    Anji

Maybe you are looking for

  • How do I use Premiere Elements 9 to synch and mix 2 video feeds?

    I am trying to put together a wrestling television show using Premiere Elements 9. We use 2 different cameras, a stationary hard camera and a moving ring camera. In the past I have used an Avio system where I manually synched the 2 feeds and then I w

  • F110 clearing

    Hi, I have some vendors of which master data have a customer number and for these vendors customer clearing is acitve. In the F110 prorposal display I need to see the vendor account and customer account balances separately in the first screen without

  • Mass change in BOM status to inactive

    Hi, I want to change the status of BOM Alternate header to inactive. I want to do the same for some 1000 BOMs in one shot. Is there a way to do the same. Please suggest

  • Network Policy Server Two-factor authentication OTP

    Hello, I don't have much knowledge about the Network Policy Server so before digging into this; I would like to know if it offers two-factor authentication. If so, what are the possibilites? I'm looking for a validation based on a one-time password O

  • Stream aliases and dynamic streaming

    My recent tweets (@flashfreaker) have centered around getting dynamic streaming via RTMP working with my Wowza EC2 implementation on the cloud. While I'm a big fan of FMS/FMIS (I wrote some of the first Flash Communication Server coverage after all.