ABAP code in to JAVA for overwritting condition value for IPC pricing

Dear experts i am an IPC JAVA developer and i am trying to translate an ABAP Routine in to JAVA code for overwriting condition value in the pricing user exit of IPC
Here is the ABAPcode segment i am trying to transulate
  DATA: l_kdkg1  LIKE komk-kdkg1,
        l_work TYPE f,
        l_umren LIKE marm-umren,
        l_umrez LIKE marm-umrez.
  SELECT SINGLE peinh FROM mbew INTO mbew-peinh         
  WHERE matnr = komp-matnr
  AND bwkey = komp-werks.
  I need some  help in the following things
  1. I don't know how to transulate the following Line of ABAP code into JAVA
     " AND bwkey = komp-werks."
Bwkey stands for plant details. I don't know how to get plant details from  Pricing Item.
  2. Someone please tell me weather the following JAVA transulation is correct
  Vector x = prItem.getUserExitConditions();
  db database = pricingEngine.getDatabase();
     // set table name
  String tableStart = "mbew";                                             
     // set query parameters
  sys_query_pair[] queryPair = null;
  //matnr = komp-matnr . Getting the material Number
  String materialNo= prItem.getProduct().toString();
  //bwkey = komp-werks.Getting plant.
  // TODO: werks stands for plant. Not sure how to get it from prItem
   String plant = "";
   queryPair = new sys_query_pair[2];                    
   queryPair[0] = new sys_query_pair("matnr", materialNo);
   queryPair[1] = new sys_query_pair("bwkey", plant);
  // set query columns
   String ZZFIELDStart = "peinh";
   String ZZFIELD_VALUEStart;                   
   String[] projectionStart;
   projectionStart = new String[];
   BigDecimal pricingUnit = null;
   try{     
      // execute query
      res resultSetStart = database.db_read_table(tableStart, queryPair,projectionStart) ;
      if (!res.db_empty_results_p(resultSetStart))
     ZZFIELD_VALUEStart = resultSetStart.db_get_row_element_string(0);
     pricingUnit = new BigDecimal(ZZFIELD_VALUEStart);
     resultSetStart.db_finish();
   else
     System.out.println("Coudn't find a value of field peinh in table mbew!");
   catch (exc_database_error e)
     e.printStackTrace();

Please login to the server where IPC is installed. In the IPC folder u find libs folder  or search for docs in IPC folder. There it is dealt how ABAP routines are mapped to  user exits in java coding
Thanks
Surya

Similar Messages

  • T code for maintaing condition record in MM pricing

    Hiii ..MM GURUS...
    Can anyone let me know the transaction code for maintaing condition records for condition types in MM pricing .
    Regards
    SARFRAZ..

    MEK1 with appropritate key combination

  • T.code/Report for calculate received values for a subcontract

    Hi Experts,
    Can you any one help on this issue.
    u201CIs there a T-code/report that will calculate the received values for a subcontract  broken out by code - or remaining values per code - even when the contract has non-valuated GR lines?
    MATDOCS does not capture the dollar value of non-VAL GR lines - only the qty. It captures the dollar values of valuated GRs only.
    ME2N - captures the total remaining value at the Item level only - not at the code level; the codes are all listed but as in the initial account assignment tab ME23N with the original percent assignment.  It does not determine remaining value per code.u201D
    Thanks in advance.
    Mohammad Jeelan

    hi
    try MBLB

  • Transaction used for maintaining condition record for contract

    Hi All,
    In one of the issue user is not able to print contract,we have noticed that default printer is set for user.I need to check what condition record is maintained for user.
    Can anyone let me know what is the transaction used for maintaining condition record for contract output.
    Regards,
    Dharmesh

    Hi
    MN01 Create Message: RFQ
    MN04 Create Message: PO
    MN07 Create Message: Outline Agreement
    MN10 Create Message: Schd. Agmt. Schedul
    MN13 Create Message: Service Entry Sheet
    MN21 Create Condition: Inventory Mgmt
    MN24 Create Message: Shipping Notif.
    MN27 Create message: rough goods receipt
    MN10 / MN11 - Scheduling Agreement Delivery Schedule
    Vijay

  • Getting header data (condition values) for shipment

    For the shipment VI03, the user wants the header Condition values(KWERT) corresponding to condition values(KSCHL).
    Some of the condition type having values in item level but these condition types are not maintained in header level, so they want for these condition types values should be Zero.
    As I am taking condition values for PRICING function module, it will display at sub-item level values depending on condition values.
    Please let me know is there any functiona module or table exist where header data is directly mainatined(Condition values & Condition type).
    Thanks & Best Regards,
    Mahesh

    First find the related salesorder using:
    VBFA
    VBAK-VBELN = VBFA-VBELV
    LIKP-VBELN = VBFA-VBELN
    VBFA-VBTYP_N = 'J'.
    or
    LIPS
    VBAK-VBELN = LIPS-VGBEL
    After that, with the order, get condition number in VBAK and then search KONV.
    VBAK-KNUMV -> KONV-KNUMV.
    Regards.
    Valter Oliveira.

  • Table name for storing condition value determined for Transactions

    Hi,
    For a routine that we need to write for pricing procedure, we need to pick up the value of the condition record that gets determined in any order.
    We were not able to find this table name.
    Any pointers?
    regards,
    Jaya

    >
    Jaya Nigam wrote:
    > Hi,
    > For a routine that we need to write for pricing procedure, we need to pick up the value of the condition record that gets determined in any order.
    >
    > We were not able to find this table name.
    > Any pointers?
    > regards,
    > Jaya
    Hi Jaya,
    It will be really helpful if you tell the business requirement.
    However you can use the following code snippet to loop the conditions.Hope this helps.
    IPricingItemUserExit prItem
    used in method calling as an parameter
    java.util.Vector conditions =prItem.getConditionsWithoutInvisible();
    for (int i = 0; i < conditions.size(); i++)
    IPricingConditionUserExit cond =
                                       (IPricingConditionUserExit) conditions.get(i);
    Warm Regards,
    Sumit

  • Condition Records For Tax Condition types for SAP 4.7

    Dear Experts,
    What is the procedure to maintain condition records for tax condition types like CST , VAT and Service Tax. We are not using CIN. In MM01 and XD02 tax classifications i have maintained UTXJ condition Type and also maintained the above mention tax condition types.. But when i create condition records for UTXJ in VK11 the sysytem is asking for Tax code. In FTXP when i defined Tax code A1 for Tax ProcedureTAXIN1 where i maintained all the Tax condition types there.But i am unable to save the Tax % in FTXP.When i try to save the tax code it is not saving.
    Is there any other procedure to maintain Tax condition types for SAP4.7.
    My Pricing procedure that i maintained in V/08 is Z00001.
    Regards
    Jyoti

    Hi Jyoti
    Since you are not using CIN, you can do the follwing for tax conditions
    Check the assignment of the TAx procedure to country
    once u do this , you will be able to maintin the vendor and customer records for MWST  type for taxes
    then create condition records for MWSt with access sequence MWST in condiution type or design one suited to your needs
    alternatevely in the current procedure you can change access sequence for condition type UTXJ form the current one to MWST and then maintain condition records
    hope this helps
    thanks
    Akasha

  • Listing Conditions Values for all materials

    Hi SAP Experts,
    We need the SAP Tables which store the Conditions data like Condition types, Condition Values, Validity from date, Validity to date,   and Materials for pulling a conditons Report for all materials.
    We have checked the pricing report t-code : V\LD . But this does not give all data (it does not show all conditions).
    Appreciating your quick reply.
    Thanks and Regards,
    Umesh Karane.

    Hi,
    It is totally depend in the pricing configuration you have done for your client.
    What you can do is create a new Pricing report for your requirement.
    Follow these steps to create a Pricing report.
    To create the Pricing Report
    Tx: V/LA
    u2022 Enter Name for the List (Starting from a letter) & a Title
    u2022 Press "Forward Foot Print"
    u2022 In the new screen you have to select all key fields that should be taken into consideration in the pricing report.
    u2022 Highlight all relevant fields
    u2022 Press AND or OR appropriately
    If you select OR ; all condition tables are evaluated, that contain at least one of the selected key fields.
    If you select AND; all condition tables are evaluated, that contain all selected key fields.
    u2022 Now youu2019ll be directed to condition table list that are to be evaluated. Highlight relevant condition tables (Which you have created for your customers requirement)
    u2022 Select "Forward Foot Print" to define the screen structure for the pricing report.
    u2022 You can configure the report layout here.
    u2022 Once everything is done, save the report.
    To run a pricing report
    Transaction: V/LD
    u2022 Enter pricing report number
    u2022 Press EXECUTE
    u2022 Execute it by giving relevant data.
    You can get all values in one screen.
    Alternative option
    As an alternative to your question, you can use "Condition Information" Button option in the VK11, VK12 & VK13 transactions.
    But there you cannot see the value in the same screen.
    To view those, go to "Condition Information" button.
    BLANK All fields.
    Then Execute.
    You have to double click and go in to see the value.
    Best regards,
    Anupa

  • Exclusion item condition value for header condition

    Dear All,
    I explained my problem with example scenerio.
    Sales Order Total Net Amount = 1.500 EUR
    SO Item-10 = Advance Payment Sales = 500 EUR >> for first invoice
    SO Item-20 = Sales from stock with HAWA material - 1 = 300 EUR  >> for second invoice
    SO Item-30 = Sales from stock with HAWA material - 2 = 1.200 EUR >> for second invoice
    SO Header condition > ZAP1 = Advance payment decrease = - 500 EUR
    System divided Advance Payment amount to all items.
    Item-10 = - 125 EUR
    Item-20 = -   75 EUR
    Item-30 =  -300 EUR
    My request is on below;
    Item-10 =      0 EUR
    Item-20 = - 100 EUR
    Item-30 = - 400 EUR
    Is calculation possible with zero value for item-10 ?
    Thanks for your helps.
    Gulay Celik

    Hi Gulay
    System cant divide the advance payment to all items ,System can divide the advance payment for one item  .
    But assign a billing plan at header level and just check , if it works then your requirement can be fulfilled.But generally it is done at item level only 
                            Make the following down payment configurations
    item category group - 0005
    item category - TAO
    for this TAO item category a billing plan 01 (milestone billing plan -01) will be assigned and its billing relevance should be I which is order related billing .
    billing doc type - FAZ
    cancellation billing doc type - FAS
    maintain a condition type AZWR which is down payment settlement , it has requirement as 2 and calc type as 48 acct key as ERL
    Now when you enter a material in line item 10 and go to item data , you can see the billing plan tab.
    now go to billing plan tab and enter the start date and enter the dates on which billing has to be done and then in billing request enter 0009 which is for down payment.once u press enter automatically it all the dates get blocked and billing request by default you get as 1 , that you change it to 4 or 5 . 4 is for down payment at value basis and 5 is for down payment at percentage basis. and beside that there will be a billing type .assign billing doc type as FAZ. to all dates
    check the copying requirements are there at VTFA as 20 and for item category TAO copying requirements 23 is maintained or not
    now do the cycle OR - LF - FAZ (billing doc type)
    Regards
    Srinath

  • Looking for document condition value

    Hi All,
    I have order from transaction jha3x and i am looking for document condition of that order so that i'll get condition value from table KONV....so can anyone please tell me where i'll find this document condition value from order number.
    Thanks.

    Hi,
    I searched the the tcode in google but it's not a tcode in ECC, but in Media Industry solution.
    JHA3X - Display IS Media Order
    This is really new for us. Can you try the following?
    0ME_ISM_SD_ORD_ITEX               IS-M/SD: Subscription Order Item
    I haven't found a IS-M DataSource that contains condition data. Maybe you have to append structure and enhance.
    Maybe you need to first activate it in RSA5 and then test in RSA3.
    At last, all order related DataSource are here, for your reference:
    0ME_ISM_SD_ORDST_1                IS-M/SD: Orders on Hand on Key Date
    0ME_ISM_SD_ORDTR                  IS-M/SD Transactions Affecting Live Subscriptions
    0ME_ISM_SD_ORD_ACC                IS-M/SD: Liability Account
    0ME_ISM_SD_ORD_ADDR               IS-M/SD: Address Data for Subscription Order
    0ME_ISM_SD_ORD_ITEM               IS-M/SD: Subscription Order Data
    0ME_ISM_SD_ORD_ITEX               IS-M/SD: Subscription Order Item
    0ME_ISM_SD_ORD_PROM               IS-M/SD: Subscription Promotion Data
    0ME_ISM_SD_ORD_REM                IS-M/SD: Renewal Payment
    Regards,
    Frank

  • Different execution plan for same query but for different condition value

    Hi All,
    I'm facing a strange situation where same query for different condition not working.
    1--
    Select  top 10 * from revenuefact(nolock) 
    where feecode ='OW4'
    2--
    Select  top 10 * from revenuefact(nolock)
    where feecode ='BTE'
    1st query is returning result easily but 2nd query is taking too long. Column
    feecode has already Non-clustered index and Clustered index is also available for another col RevenueSID.
    I was surprised when checked the query execution plan for both the above queries  which is quite different (as per attached below). Can anyone suggest me the reason behind it.
    And solution for the same. One more thing that data for feecode BTE is inserting through different source instead of others feecode and table contains more than 300 million rows.

    When I speak with people inside Microsoft who work with the optimizer, the refuse to accept the work "bug" when a query produces the correct result, but with a suboptimal plan. They prefer to use the word "limitation".
    The limitation here is that when the optimizer compares two plans, it only looks at the estimated cost. As far as I know, it does not perform any analysis from the perspective "what if the statistics are wrong"? They do provide the hint OPTIMIZE
    FOR UNKNOWN, but that does not work then there is a constant as in this case.
    The optimizer will surely distinguish between TOP 10 and TOP 10000000. With the latter, you have all reason to expect a Clustered Index Scan no matter which value you search for - unless you pick a value for which the histogram indicates that there are no
    rows.
    Interesting enough, I was able to reproduce the situation in my Northgale database, which is an inflated version of Northwind, and where statistics should be accurate.
    SELECT TOP 10 * FROM Orders WHERE EmployeeID = 8
    results in a CI scan, and so does also EmployeeID = 7, and even 5. There are only 2292 rows out of a total of 344305 rows. If I try EmployeeID 808 for which there are 1797, the optimizer goes for the index seek.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • FM for item condition values in RFQ

    Hi,
         I have a RFQ number. now the i want a function module which will return me the item condition values ( eg freight,gross price etc).
         i have gone through a FM named 'PRICING' but thats not helping me
          any help

    Hi,
         I have a RFQ number. now the i want a function module which will return me the item condition values ( eg freight,gross price etc).
         i have gone through a FM named 'PRICING' but thats not helping me
          any help

  • How to get xkomv-kwert (condition value) from a pricing condition ZZP1

    Hi experts,
       I have a pricing condition zcust that I need to modify in the sales order.   The calculation of ZCUST is dependent on the condition value in another price condition ZZP1.   The price for ZZP1 is a fixed amount of $6 which is split among line items in the order.    In sapmv45A, when the code hits userexit_save_document_prepare, the value of xkomv-kwert (condition value) exist.   In other user-exits in sapm45A, I was unable to find xkomv-kwert.  My question is:  How can I find the value of xkomv-kwert  as i don't  know how ZZP1 is calculated ??  There is no routine attached to ZZP1.
        THE ZCUST has a routine 993 which is similar to 3.   Here in program saplv61A, i was trying to get xkomv-kwert for ZZP1 but unable to get any data.   Can anyone suggest where i can get the data (xkomv-kwert) for ZZP1 in saplv61a ?
    I looked at userexit_xkomv_bewerten_end in saplv61a but it does not help.
    XKomv-kbetr  always has data.    If i have ZZP1 data, then i can modify ZCUST.
    Many thanks.
    Joyce

    Hi Jelena,
      In VOFM, it is Formula/Condition Base Value for routine 993.   In Pricing Procedure, it falls in column "Base Type" for 993.
    Let's see if i can simplify this: In a sales order with 2 line items:
                   prices                    Amt                      Condition Value (USD)
    Line 10     ZS1   sell price     2.30                                 1150
                     ZPP1 charge        6.36                                 3.40  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            11.50
                    ZR2                      0.01                                   5
                    Suggested price =  2.35                             1172.90
                      ZCUST               2.34                                1170
                      total price            2.34                               1170  
    Note:  The ZCUST price is wrong.  It is missing the ZPP1 charge which is 3.40.  Zcust should be 1170 + 3.40 = 1173.40
    Line 20     ZS1   sell price     25                                 1000
                     ZPP1 charge        6.36                                 2.96  (note the distribution **)
                     ZL1                      3                                      3
                    ZR1 %                  1.000%                            10
                    ZR2                      0.01                                   0.6
                    Suggested price =  25.41                              1016.56
                      ZCUST                   25.34                           1013.60 (should be 1013.60 + 2.96)
                   Total price                25.34                            1013.60
    You can see the ZCUST is calculated incorrectly.  The routine calculate zcust as $1170 and $1013.60 for each item which did not include the distribution amount of  ZPP1 ($3.40 and $2.96).  
    When i debug the routine, the xkomv-kwert is zero.   I  am trying to get $3.40 and $2.96 so i can add to to zcust in the routine.
    Am trying to determine in saplv61A at which include that i can see #3.40 and $2.96 for both line items in xkomv-kwert.
    Then maybe i can modify the routine or saplv61A so it shows the correct zcust price  after entering the 2 line items in the sales order  create (VA01) ?     Can you pls suggest  ?
    If i make the changes in USEREXIT_SAVE_DOCUMENT_PREPARE, then user cannot see the correct zcust until the order is saved.  This would be too late to know the zcust price ahead of time.
    Pls view in the Edit mode... i see my texts have been compressed.
    Many thanks
    Joyce
    Edited by: Joyce Chan on Jul 9, 2009 10:24 PM
    Edited by: Joyce Chan on Jul 9, 2009 10:25 PM

  • Cluster trees: suppressing counts for docs without value for metadata attr?

    Hi,
    Using metadata cluster trees on 11g in the SES standard UI, has anyone tried to either not show rows without the metadata value or to change the standard value "Miscellaneous" to something else? If so, could you provide some details on how you did this?
    An quick example of what I would like to accomplish. Let us say I have 100 documents in my result set, and 30 of them are without a value for "Author". If I create a cluster tree on metadata attribute Author, I would like to configure whether or not the 30 documents without author shown in the Author cluster tree. Secondly, I don't like the term "Miscellaneous", so I would like to change the value to "Missing value" or something like that if I decide to show the docs without value in the cluster tree.
    regards,
    Rune

    Hi,
    Using metadata cluster trees on 11g in the SES standard UI, has anyone tried to either not show rows without the metadata value or to change the standard value "Miscellaneous" to something else? If so, could you provide some details on how you did this?
    An quick example of what I would like to accomplish. Let us say I have 100 documents in my result set, and 30 of them are without a value for "Author". If I create a cluster tree on metadata attribute Author, I would like to configure whether or not the 30 documents without author shown in the Author cluster tree. Secondly, I don't like the term "Miscellaneous", so I would like to change the value to "Missing value" or something like that if I decide to show the docs without value in the cluster tree.
    regards,
    Rune

  • Possi. for ABAP code instead of JAVA Script for creating searachhelp in BSP

    Hi Consultants i have a doubt that is there a possibility to use ABAP coding in BSP object for creating search help
    instead of JAVA Script if so please reply me with the procedure or else with some sample coding.

    Hi Consultants i have a doubt that is there a possibility to use ABAP coding in BSP object for creating search help
    instead of JAVA Script if so please reply me with the procedure or else with some sample coding.

Maybe you are looking for

  • Is there a way to control the video's speed in VideoDisplay?

    What I actually planned was to create a slow-mo feature on my players. Basically, reducing the movie speed by half (or by .25X the actual speed). Video's are on SWF format. Is there a way to do it? Thanks in advance. Any help would be appreciated.

  • Best way of Using Index on a Table.

    I am trying to understand the phenomena of using INDEX on a Table need some guidance!!! Let us take this scenario I have a table "MYRECORD" which has 4 attributes(or coulombs) 1. "STATE" (varchar) // this can have 49 different values like newyork, de

  • Set unique file name for document library in SharePoint 2013

    Hi, I have document library in the sharepoint 2013 with two dropdown fields-dept name,dept id. My requirement is to create a namiing convention for each file uploded in the document library. So the naming convention should be "deptname-deptid-filenam

  • Wrong command button background color on web

    Hello. We have a problem with background color of command button. If we set background color to lime, only upper line of button is in lime color. Rest of the button is in default color. This happens when user runs application on web (standalone serve

  • ABAP Access on Solution Manager

    Hi,        Is that possible for ABAP Work Bench Access ( se38 and se80  ) on Solution Manager where i can develope RFC ( enable functional module ) interface on solution manager 4.0 and also want to develop web service for those interfaces so that  t