Coding to calculate net purchase order value against the contract?.

Hi ,
Please help.
Can any one send me the coding to calculate net purchase order value against the contract?.
Thanks

I got the below coding and information from SDN, would you please help me to fix this coding
infomation from SDN
For the above requirment I have coded a program in Endroutine but it is not populating cummulative Order value against Contract.
DATA:
WA_ty_t_TG_1 TYPE tys_TG_1.
data: netsum type char15.
types:begin of ty_net,
netsum type /BI0/OINET_PO_VAL,
V_EBELN TYPE /BI0/OIOI_EBELN,
end of ty_net.
data:t_net type standard table of ty_net .
data:wa_net type ty_net.
SORT RESULT_PACKAGE BY CONTRACT.
loop at RESULT_PACKAGE INTO WA_ty_t_TG_1.
WA_NET-V_EBELN = <RESULT_FIELDS>-CONTRACT.
AT END OF CONTRACT.
netsum = WA_ty_t_TG_1-NET_PO_VAL + NETSUM.
ENDAT.
WA_NET-netsum = NETSUM.
APPEND WA_NET TO T_NET.
CLEAR:T_NET,NETSUM.
ENDLOOP.
loop at RESULT_PACKAGE assigning <RESULT_FIELDS> .
READ TABLE T_NET INTO WA_NET WITH KEY
V_EBELN = <RESULT_FIELDS>-CONTRACT
<RESULT_FIELDS>-/BIC/YNET_VAL = NETSUM.
CLEAR: WA_NET-NETSUM.
endloop.
<RESULT_FIELDS>-/BIC/YNET_VAL = netsum.
CLEAR:NETSUM,<RESULT_FIELDS>-/BIC/YNET_VAL.
ENDLOOP.
I have coded above one..let me know what mistake I have done.in the bolded loop I have given INTO instead of Assigning, because I need all records which assigns to WorkArea, but while executing DTP its leading to shortdump.if I replace Assigning statement,its working fine. but zero values in output( I think wrong in logic part)
Let me know the brief coding part if I am wrongly coded.

Similar Messages

  • Purchase orders manily against the sales orders

    My client do purchase orders manily against the sales orders... but to meet the minimumn purchase order quantity or value they club many sales orders in a single purchase order... now is there any way to track for what sales-order-item what purchase-order-item made?? (in SAP B1 2007 B PL7)

    Hi
    By Design ,SAP creates link between SO to PO when you create PO based on SO .
    Then you can use TargetDoc  which is PO  Number and can be seen in row level
    If it is disabled , you can enable it through form setting .
    I usually ask my user to start with SO . When they are ready to make purchase , they can click on purchase check box on SO and create PO based on SO . This way the link stay as B1design .
    The reason of this you can see the PO and (orrange arrow link) which can let you navigate your PO  from AR module .
    An other workaround  ,user defined field can be used at row level and manually link
    Hope this helps
    Bishal

  • PO Order value against Contract

    Hi,
    I am loading data from 2lis_02_hdr, 2lis_02_itm, 2lis_02_scl datasources in to cusotmized cube.
    In the ITM datasource we have fields EBELN(PO Number), KONNR(Agreement number), and we have a filed NETWR(Net Order value) against the PO number.
    Here requirement is they want report which contain Target value(KTWRT), Order Value(NETWR) against Agreement no(KONNR).
    In the customized cube I consider Agreement and Agreement Item fileds as per requirment
    I have created query with the following navigations:
    I restricted PO number with Doc type=WK (for Agrement number)
    selcted PO number in Rows
    selected Target value and Order value in columns.
    In Query Output it is not showing Order value against the Agreement number,
    As we know One Agrement number can have more than One PO's but in datasource level he maintains Order value against PO number.
    So How will I get the Order value against Aggrement number..what calculations are required at what level..if routines required let me know the code in brief
    Thanks in Advance
    I will assign points for each reply..please help out this problem immediately..

    hi,
    Wht exactly do you need??
    yes, once you use del. comp. indicator and then you post the doc. later, the qty remains same it doesn't get updated bcoz by default system updates it in PO History...
    Why do you want same with GR?? Why you wanna keep GR histories?? it'll increase complications and will create problem while invoicing and that the reason sap has not provided it...
    Regards
    Priyanka.P

  • Purchase Order value rounded to a single number

    How is the Purchase Order value rounded to a single number ?
    Ex: Example - 100.51 to be rounded to 101 OR
    100.49 to be rounded to 100 
    It is required at PO - Price conditions . (Item details----material net price )
    (and also in PO output screen which can be done with the help of developer)
    regards,
    ck

    Hi,
    Go to
    SPRO - > MM -> Purchasing -> Define price detmination process -> define condition types -> go for define condition type ->  select any condition type -> go to details -> inside it you will see the Rounding rule -> choose 'A'
    Save your enteries...and check..
    Hope it helps..
    Regards,
    Priyanka.P
    AWARD IF HELPFULL

  • Purchase Order values are not reflecting in MIGO

    Dear Experts,
    I have changed standared Pricing Procedure from TAXINN to TAXINT because excise calculation was wrong. Now I have assinged new pricing procedure & reflecting in Purchase order & working as per requirement also.But when we are doing MIGO, excise values are not automatically coming in MIGO. So Is there any configuration or missing copy control because i have changed pricing procedure?
    Also I want to put a check, if purchase order value is not matching with vendor invoice value then stores person can't do the MIGO.
    Could any body guide me?
    Thanks
    Trupti

    Hi,                                                                               
    It is not like that you have to mandatory use the TAXINN rather it is recommended by SAP to use but if some business requirement doesnu2019t meet up with what is recommended that its business call to go TAXINJ from TAXINN, but right now we don't know at what circumstances they moved to TAXINJ but question is what are the settings missing while moving from TAXINN to TAXINJ and because of that system is not picking the Tax Values at the time of MIGO in excise capture & posting.
    So I have several questions in mind in order to understand your system behaviour.
    1) Are you using the correct Tax code at PO level?
    2) If using the correct Tax code then is't correct value maintained in FTXP for the Tax code used in PO.
    3) If correct Value maintained in Tax code then by clicking on Taxes button mentioned under PO item level details are you able to see the correct value against each applicable condition type in next screen by clicking over Taxes button in PO?
    4) if not then first check J1id - Material Chapter Id combination, vendor excise indicator mentioned, correct duties maintained in excise duty so check all master data related to CIN maintained in J1id
    So first give answer to above mentioned questions then we procees further but I am sure I can make your system to picked  the correct duties don't worry Just answer my questions hope things become fine in your system.
    Best Regards,
    Silky
    Note: Please assign valuable points in order to encourage contributors to each answer to queries...

  • KEY FIGURE: Effective purchase order value & K.F "No. of Purch.Orders"

    Yo my fellow Gurus,
    Got a problem, when executing listcube on the Info-Cube 0PUR_C01 - I see the data/amounts in the column for "Effective purchase order value" / 0ORDER_VAL. But when running the query with the Key Figure I just get "0"
    I tried the option of adding the Process Keys not allocated in the Routine list of keys, yet still nothing has popped in the query, and heres the routine after  additonal keys added:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    INCLUDE RS_BCT_MM_UPDATE_RULES.
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_SCL
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-ORDER_VAL
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
    IF ( COMM_STRUCTURE-PROCESSKEY = '001' or     "Bestellung
        COMM_STRUCTURE-PROCESSKEY = '011' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '015' or
        COMM_STRUCTURE-PROCESSKEY = '005' or
        COMM_STRUCTURE-PROCESSKEY = '025' or
        COMM_STRUCTURE-PROCESSKEY = '041' or
        COMM_STRUCTURE-PROCESSKEY = '051' or
        COMM_STRUCTURE-PROCESSKEY = '061' or
    *change of keys
        COMM_STRUCTURE-PROCESSKEY = '021' or
        COMM_STRUCTURE-PROCESSKEY = '004' or       "LP
        COMM_STRUCTURE-PROCESSKEY = '014' or
        COMM_STRUCTURE-PROCESSKEY = '024' )
        AND COMM_STRUCTURE-BWAPPLNM EQ 'MM'
        AND COMM_STRUCTURE-ORDER_VAL <> 0.
        perFORM LOC_CURR_CONVERT
               USING    COMM_STRUCTURE-ORDER_VAL
                        COMM_STRUCTURE-DOC_DATE
                        COMM_STRUCTURE-ORDER_CURR
                        COMM_STRUCTURE-LOC_CURRCY
                        COMM_STRUCTURE-EXCHG_RATE
               CHANGING RESULT.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
    else.
        RETURNCODE = 4.
    endif.
    if abort is not equal zero, the update process will be canceled
    This seems to be also the issue with my other Key Figure "No. of Purch. Orders" except here it the just comes up blank / 0 . This is to some the number of pos per plant for the month. So it's not storing anything but running via an interface and then with the aid of the routine loading the count into the cube:
    PROGRAM UPDATE_ROUTINE.
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    FORM compute_data_field
      TABLES   MONITOR STRUCTURE RSMONITOR "user defined monitoring
      USING    COMM_STRUCTURE LIKE /BIC/CS2LIS_02_HDR
               RECORD_NO LIKE SY-TABIX
               RECORD_ALL LIKE SY-TABIX
               SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS
      CHANGING RESULT LIKE /BI0/V0PUR_C04T-NO_PUR_ORD
               RETURNCODE LIKE SY-SUBRC
               ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update
    $$ begin of routine - insert your code only below this line        -
    fill the internal table "MONITOR", to make monitor entries
      if COMM_STRUCTURE-HDRPROCESS = '01'         "Bestellung
         AND COMM_STRUCTURE-no_hdr <> 0.
    result value of the routine
        RESULT = COMM_STRUCTURE-no_hdr.
    if the returncode is not equal zero, the result will not be updated
        RETURNCODE = 0.
      else.
        RETURNCODE = 4.
      endif.
    if abort is not equal zero, the update process will be canceled
      ABORT = 0.
    $$ end of routine - insert your code only before this line         -
    ENDFORM.
    Please advise the way forward.
    Thanks,
    Ishaam

    what do u want?

  • Requirement Standard SAP Report on Total Purchase Order Value

    Dear Friends,
    Could u please suggest is there any standard SAP report. Requirement has given belwo.
    I required if we have account assignment  Category A as one of inputs, we will get the reqd output  " Total Purcchase order value."
    Note 1) Total Purchase Order Value means - Basic price + taxes + Charges (Freight + Other charges - Discounts etc)
    Note 2) My requirement standard SAP report only.
    Thanks and regrds,
    Vijay Kumar TVN

    Hi,
    T code : ME80FN
    Select :Edit->Dynamic selections>Purchasing document item> Acct. assignment cat.>select A(f4)->execute
    select Material no., PO Number in program selections
    Hope it shall resolve your query....
    regards
    rahul

  • Total purchase order value

    sir,
    is there any std report available wherein i can get total purchase order value inclusive of all taxes(excise,vat,octroi). pl tell me any possible source to get the same.

    HI
    RM06EBWA     Report for Analysis of Purchase Order Values
    RM06EESF     Analysis of Exported Purchase Orders
    Check these it may help you.
    Reward if useful
    Thanks n Best Regards,
    Kiran

  • Date Deviates from permissible range [Purchase Order - Value Date]

    hello all,
    i want to add a Purchase Order (Services) Posting date 05/07/2008 and Delivery Date is 09/30/2008, it prompts me the Error "Date Deviates from permissible range [Purchase Order - Value Date]", now this is my question.
    what is the date range for PO posting date and delivery date that the system will allow(date difference)? can i set this one?
    Note: we need to make an advance PO for this since our BP required this time period for them to accomplished.
    Please help.
    Thanks.
    FIDEL

    FIDEL,
    All documents have 3 dates DocDate, DocDueDate, TaxDate.  The date ranges for these dates are taken from the Active Posting period definition.
    Open Administration  > System Initialization  > General Settings > Posting Periods
    Click on the Yellow link arrow next to the current posting period and check the Due Date From and To Range and expand the To date to cover 09/30/2008
    Posting Date From
    Due Date From
    Document Date From
    Suda

  • Purchase order Value  Restrict

    Dear All
    How to Restrict the Field of Purchase order value we want to restrict it for X value sothat check will be there for Not more then that PO made by Any one.
    Second Thing how we can put in Material master that whenever we r putting PO qty then it will check stk and then confirm that stk is there , no PO is required.
    Rgds
    Pankaj Agarwal

    1.     You can use the standard SAP functionality of release strategy, where you can maintain your maximum PO value. If PO is created for the value higher than this, it will be stopped for output & has to be released or has to be cancelled.
    2.     For second point also, you can use SAPu2019s standard functionality of PTO (Purchase to stock) , Here you can use MRP type u2018VBu2019 for the material, maintain lot size, safety stock, reorder level quantity. So that whenever you will run the MRP, system will generate requirements.

  • Purchase Order created against sales order.. report

    Hi Folks!
    I want to see purchase orders created against sales orders.
    Is there any report?
    Regards

    Hi,
    You can develop your own report by using table VBAK-VBELN(sales document),VBAK-BSTNK(Customer purchase order number).
    Just try....
    Hope it helps you...
    Regards,
    Jaheer.

  • "cheapest purchase order value"  in SOCO

    Dear helper,
    Where is this field "cheapest purchase order value" read from?. Steps:
    - At SOCO add any item to the workarea
    - Press "propose source of supply"
    - The vendor list has two price fields:
      "current purchase order value"
      "cheapest purchase order value"
    Where are these fields read from?
    Which table should be maintained?
    Thanks in advance for your help!
    Guillermo

    Hi
    I suppose (not sure) these fields are read from the table BBP_PDHGP (check for field TOTAL VALUE).
    Current Purchase order value will be the current SC value to be converted to PO, and the cheapest will be the relative value of the old PO's for that vendor(may be so).
    Regards
    Reddy

  • How to get the Purchase order Qty in the object dependency

    Hi,
    We are using variant pricing in the purchase order. I have condition type say u201CZVBPu201D for Pallet cost. I defined Pallet cost as 5 USD per each (pallet). I have to calculate Number of pallets = Purchase order Qty/ 5. The number of pallets should be rounded to nearest integer.
    My question is how to get the Purchase order Qty in the object dependency?
    Is there any reference table and field can be used to get Purchase order Qty just like we use MMCOM-VKOND for variant pricing.
    Appreciate your help
    Thanks,
    Srini

    Hi,
    1. I do not have system now so I can not conclusively tell about table field .
    2. Since I did it long back so I also do not exactly remember it, there are more than one place where PO qty appears for example Item overview and Item details - one of the PO qty when used in the characteristic do pull the PO qty which can be used for variant pricing (so request to please update the forum with the correct table and field once you find it - in the meantime if I get opportunity to get to system I will also try and find out ).

  • A report which shows the purchase order MM and the linked vendor invoice

    Hi All,
    I wonder if ther's a SAP standard report which shows the purchase order MM and the linked vendor invoice (the FI document)  with the Net due date.
    Could anyone help me?
    Thanks
    G.Rossi

    Hi,
    ME80FN with PO History View
    ME2N with Scope of List "ALLES"

  • Problem in Purchase Order Printing in the TCODE ME9F

    Dear Experts,
    I am workning in the Upgrade Project from SAP 4.6C to ECC6.0.
    When i change the Line items of the Purchase order in SAP 4.6C and take the print out in ME9F it shows all the Changed line items and Unchanged line items.But in ECC 6.0 if i change the Line item of the Purchase order and take the print out in ME9F Transaction it shows only the Changed line items and it is not showing the Unchanged line items.
    Can anyone help me why this problem occurs in  ECC6.0 and How to solve this problem
    Please Help me it is Very Urgent
    Thanks & Regards
    Ashok.

    Hi Asok
    Is your problem resolved?  I am currently facing the same problem.

Maybe you are looking for

  • N96 V 30.0.33 Unstable,frequent restarts, lock ups...

    Hi all. Upgraded my firmware using FOTA the day the V30 firmware was released. Ever since though I have had major issues with my N96. The previous version 20 and version 12 were stable enough and I had minimal issues with them. I have not installed a

  • Recurring bootup issues on Macbook Pro

    I have a 2012 Macbook Pro running OS X (10.7.5)  The last two mornings it has failed to boot. I managed to boot it into recovery mode both times and run a disk repair. After that, it booted up fine, both times. However, it concerns me that this is a

  • Posting Cash Payments and Clearing Invoices

    Hi everybody, Can anybody suggest a transaction to post payments (money) and clear FI invoices. I am looking for a transaction where the user can pull an invoice by doing a search by invoice number, or by PO number, and to post a payment against the

  • Creating multiple datasets using mulitple select statements as part of one macro / stored procedure

    Hi, I am working on a report what has 10 datasets derived from 10 different select statements. Is it possilbe to save those 10 select statements as a macro / stored procedure and then use that macro to generate those dataset in the ssrs report builde

  • Google Hangouts 2.0.122

    Google Hangouts is updating with something neat  SMS  Intergration have a look at it through the Google Playstore and here Via Droid life:. b33 http://www.droid-life.com/2013/11/07/google-hangouts-2-0-122-with-sms-integration-rolling-out-to-all/