Adding  values in query for like materials.

Greetings Gurus,
I am very new to ABAB. I recently made a query attached to an infoset, that lists the amount received from a purchase order and compares the amount that was ordered (overdelivery allowed). With this I added a custom field and and in the Extras/Code tab I added (for "Record Processing")
IF MSEG-BPMNG > EKPO-MENGE.
ZCUSTOMF = 'OVERDELIVERED'.
ELSE.
CLEAR CUSTOMFIELD.
ENDIF.
This compares the amount received vs the amount ordered and gives a new field value if overdelivery occured. However it occurred that there may be multiple batches of the same material when received. When this happens the query displays multiple lines (same material document number) with each amount and does not add the value of the different batches of the same material. Is there any additional code that could be added that  'When the same material document number and same material' appear more than once to add the quantity received together and view it on one line? Any kind of help (especially with ABAP explanations) at all is greatly appreciated.
Thank You

Hi,
You have to Loop at the itab which you are processing in the same code  tab with looping at itab at the material document you are processing at that moment. then sum up the Qty and Amount at the end of the loop and then check the amounts and then update the custom field for that PO or material document.
As this code will be repeated for all the items of the document every time when you loop for that specific document just check whether the custom field is empty or not . Process the loop if empty only. As if i t is not empty then it is understood that thsi item has been processed earlier.
Regards, Shakeel.

Similar Messages

  • TDS Amount on Vendor Advance Shows positive value in *QUERY* for TDS Report

    Hi Everybody,
    I have made a query for List of TDS Report with Vendor informations as required by my client. In which the value of TDS on Vendor Advance Payment appears as positive value instaead of negative value. Please suggest how to rectify.
    Thanks,
    Paul

    Dear,
    If you have cleared the advance in F-54, then this will reverse the tax amount. That could be the reason for tax amount in debit.

  • Excise Values in MIGO For MPN Materials

    Hello,
    While capturing the excise invoice for the MPN materials system is not picking the excise values. We are using the TAXINN procedure and i have maintianed the condition records for the Key combination country/Plant/Control Code/Taxcode (WE have created a condtion table for this key combination) and we also maintained the MPN materials in the J1ID also but it is not picking the values in the item tab. Taxes are caluclated in the Purchase order.
    Note:
    For the MPN Materials we have only three views maintained in the material master and it is not extended to any of the plant.
    I have noticed that if use the other tax code which i maintained the condition records for Conidtion table 651 (key Combination of Country/Tax Code) the excise values are flowing in MIGO but if i use the tax code  EA (Condition table 652 Key Combination: country/Plant/Control Code/Taxcode) we are not getting the excise values in MIGO
    Please let me know if there is any configuration is missing.
    Regards,
    Kumar Rayudu
    Edited by: Kumar Rayudu on Oct 1, 2009 2:10 PM
    Edited by: Kumar Rayudu on Oct 1, 2009 5:19 PM

    >
    cnranjith wrote:
    > Dear all
    >
    > When doing MIGO for Import PO excise tab is not appearing for the material
    >
    > I have maintained all the data in J1ID for the material and plant
    >
    > already we use to capture EI for the same material and plant but this time this is creating issues
    >
    > We have posted an inoice of  planned delivery costs but no excise tab in MIGO
    >
    > What might be the reason
    First you have to post the Customs MIRO in case of import purchase...then go for MIGO...you will find excise tab will follow....
    Regards,
    Indranil

  • Free Characteristic, range value, filtering query for iveiw in WAD

    Using the web application designer I am adding a query (BW 3.5) to a sales portal (EP 6.0) of all projected wins (custom characteristic on opp header).  Sales has requested I provide in by mth and by qtr.  I created value ranges in my projected win characteristic in the query of 4/1-4/30,5/1-5/31 etc. and have attempted to use the
    Filter
    Navigation block
    and
    Drop down and radio were I get every date of the month and not just the ranges I created.
    Can I do this through a query and and the WAD or do I have to do some custom work.
    Will award points!
    Maggie

    Hi,
    the feature you are requesting is called "Master Data Planning". Unfortunately it is not supported by SAP. Please use the term "master data planning " to search this forum and you will find some threads about this issue.
    Hope this helps
    Matthias Nutt
    SAP Consulting Switzerland

  • Need sql query for like operation.

    Hi All,
    i have table like name column and contain the data like
    ibm 100
    ibm 200
    ibm 300
    a2b
    a
    b
    c
    like this ....
    but sql query need search using like or any regular expression---
    select * from table where name like (ibm 200 and ibm 300).
    and i don't want use like this select * from table where name like' ibm 200' or name like 'ibm 300').
    can you please any body help to correct the above query...
    Edited by: anbarasan on Oct 16, 2011 10:02 PM

    WITH t AS
         (SELECT 'ibm 100' NAME
            FROM DUAL
          UNION ALL
          SELECT 'ibm 200' NAME
            FROM DUAL
          UNION ALL
          SELECT 'ibm 300' NAME
            FROM DUAL
          UNION ALL
          SELECT 'a2b' NAME
            FROM DUAL)
    SELECT *from t where    REGEXP_LIKE (name, 'ibm')
    and REGEXP_LIKE (name, '100|200')

  • Applying functions to database fields when querying for a form field

    Hi,
    how is it possible to apply trim() or another method to the content of a database field when a query is initiated?
    The actual problem is that there are entries in the database which are entailed by a blank and, because the user is not aware of this fact, he cannot be forced to add a blank or % to the form field he is querying.
    Does anyone have an idea how to solve this issue?
    Thank you very much in advance.
    Message was edited by:
    user492074
    null

    The where clause is built that way:
    WHERE (ETN.trim(ETN_PLZ)=:1)
    The error message:
    ORA-00904: "ETN"."TRIM": invalid identifier
    Actually, I guess that the trim statements should surround ETN.ETN_PLZ but that is obviously not the case.
    Apart from that I did not enter 1 as the value to query for.
    Nevertheless, thank you for your help. Forms version is 10.1.2 by the way.

  • Char Values on query

    On left hand side of query designer what are the char values on query for an infoobject is it master or transaction data.
    Regards,
    Manish

    Hi,
    On Left hand side we have Key Figures, Dimensions which contain Characteristics ,Calc KF, Restricted KF and Time Characteristics. We can see Master data for the Characteristics here but it is suggested to Drag particular Char to Rows and see desired master data attributes here in the Report.
    Hope This Helps,
    Regards,
    rik

  • Wrong result for query with like and %

    I have a strange problem with query with like and %.
    When I run this script:
    ALTER SESSION SET NLS_SORT = 'BINARY_CI';
    ALTER SESSION SET NLS_COMP = 'LINGUISTIC';
    -- SELECT * FROM NLS_SESSION_PARAMETERS;
    -- drop table test1;
    CREATE TABLE TEST1(K1 NVARCHAR2(80));
    INSERT INTO TEST1 VALUES ('gsdk');
    INSERT INTO TEST1 VALUES ('ąxyz');
    INSERT INTO TEST1 VALUES ('ŁFa');
    INSERT INTO TEST1 VALUES ('ła');
    INSERT INTO TEST1 VALUES ('Śab');
    INSERT INTO TEST1 VALUES ('Śrrrb');
    commit;
    select * from TEST1 where k1 like N'Ł%';
    I get this:
    K1
    ŁFa
    ła
    Śab <- WRONG
    Śrrrb <- WRONG
    4 rows selected
    When i change datatype to varchar2 this code work correct.
    Is this a bug or what ?
    The execution plan:
    PLAN_TABLE_OUTPUT
    SQL_ID d3d64aupz4bb5, child number 2
    select * from TEST1 where k1 like N'Ł%'
    Plan hash value: 4122059633
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | | | 2 (100)| |
    |* 1 | TABLE ACCESS FULL| TEST1 | 1 | 82 | 2 (0)| 00:00:01 |
    Predicate Information (identified by operation id):
    1 - filter((NLSSORT("K1",'nls_sort=''BINARY_CI''')>=HEXTORAW('014200'
    ) AND NLSSORT("K1",'nls_sort=''BINARY_CI''')<HEXTORAW('01610100') ))
    Note
    - dynamic sampling used for this statement (level=2)

    DATABASE NLS CONFIGURATION:
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET     AL16UTF16
    NLS_COMP     BINARY
    NLS_SORT     BINARY
    Oracle version 11.2.0.2.0

  • Input Value long enough for date format ,Error in executing parallel query

    Hi,
    My Table: ANML( ID, STATUS,B_DATE,B_MONTH,B_YEAR, DEATH_DATE)
    status 1 for alive and 2 for dead.
    i wrote a view to get age.
    as
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top
    when i tried to fetch all values from view its working fine.
    But when i tried to fetch values based on condition like as follows,
    select * from view1 where anml_age > 20 and anml_age<30
    I am getting error like:
    Input Value long enough for date format and Error in executing parallel query
    Please tell me wht is wrong.

    Here is your formatted code
    create or relace view view1 as
    select top."ID",top."STATUS",top."DOB",top."DEATH_DATE",top."ANML_AGE",top."DAYSDIFF",
    CASE
    WHEN anml_age < 1
    THEN 'D'
    ELSE 'M'
    END age_unit,
    CASE
    WHEN anml_age < 1
    THEN TO_CHAR (daysdiff || ' Day(s)')
    WHEN anml_age < 12
    THEN TO_CHAR (anml_age || ' Month(s)')
    WHEN MOD (anml_age, 12) = 0
    THEN TO_CHAR (ROUND (anml_age / 12, 0) || ' Year(s) '
    ELSE TO_CHAR ( ROUND (anml_age / 12, 0)
    || ' Year(s) '
    || MOD (anml_age, 12)
    || ' Month(s)'
    END age_string
    from
    (SELECT a.*,
    CASE WHEN status IN ( 1)
    THEN FLOOR(MONTHS_BETWEEN(TRUNC(SYSDATE),dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(MONTHS_BETWEEN(death_date,dob))
    END anml_age,
    CASE WHEN status IN (1)
    THEN FLOOR(TRUNC(SYSDATE)-TRUNC(dob))
    WHEN death_date IS NOT NULL AND status IN (2)
    THEN FLOOR(TRUNC(death_date) - TRUNC(dob))
    END daysdiff
    from (
    SELECTanml.id, status,
    TO_DATE ( DECODE (b_date,
    NULL, 1,
    b_date
    || '-'
    || DECODE (b_month,
    NULL, 1,
    b_month
    || '-'
    || b_year,
    'dd-mm-yyyy'
    ) DOB,
    death_date
    FROM anml
    WHERE b_year IS NOT NULL
    ) a) top

  • Using Broadcaster to run a query for sequential Variable Values

    Hi SDN Community
    I came across a powerpoint slide regarding broadcasting which i hope to use in one of our reports.
    We are on SAP BW 35.
    Broadcaster has been used
    Your opinion would be greatly valued in regards to the direction i should proceed for our particular purpose.
    We basically have a report which is a web report.  This contains much html and javascript enhancements.
    But it essentially has queries with a series of variables.
    The customer would like the Queries to be cached for each variable value for performance reasons, on a daily basis.
    eg. Run the same query for Variable value BMABRM, then BMASRM, etc...
    In a loop fashion.
    Do not need to set a process chain to trigger broadcaster, or rather simply to schedule the broadcaster to run daily.
    I would basically then want to run this (cache) query in an iterative fashion, ie. rerun it for all the sites.
    Can you please make a recommendation to which is the best approach, whether a process chain should be set up, and any experience you may have had setting up a query to rerun for different variable values.  We would of course want the query to run successfully before rerunning it for the next variable to avoid locks, etc.
    Thank you in advance.
    Simon

    Hi Rahul,
    i have been trying to use the process chain functionality to do this but unsure how to do it.
    Which objects do you use in the process chain:
    Trigger Event Data Change (for Broadcaster)
    or Execute APD Model
    or Precalculation of Web Templates
    i am unsure how to incorporate the queries into the process chain.
    If you have any steps , it would be much appreciated.
    Thank you.
    Simon

  • Quantity and Value consumption for Packaging Materials

    Dear Experts,
    My client having retails stores all over India and there is problem in packaging materials consumption. Now we are followed below mentioned process. We have created STO supplying site is ABC to receiving site is 9999.After PGI the same one accoutning entry is posted like
    Packaging Consumption account Dr.....
    Packaging material......................Cr...
    Here value is nulfying.Quantity is updated in 9999 Plant;Business need that same quanityt also nulify at the time of PGI automatically.
    Please suggest
    Best Rgds
    SumaMani

    Dear Praveen,
    Packaging material getting credited in ABC distribution channel and also Consumption account getting debited in my store 9999.However there is no value in my store for packaging materials,but quanity is showing is showing in 9999 books. (MB52)
    That is not required to business. Business would like to treat quanity is consumed at PGI
    This internal report purpose
    Best Rgds
    SumaMani

  • 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

  • Querying for custom picklist values

    Hello all,
    I have created a new field on my opportunity type called "Industry" and gave it picklist values. However, the system is not allowing me to query for the values using the Picklist web service. Am I missing a step here, or does the system not allow querying for custom picklist field values? I can get to certain lists of picklist values for Opportunity (Type, Probability, some others) but not the picklist I created. Am I doing something wrong?
    Thanks!
    -Kevin Green

    Hi,
    Find integration tag for custom field in Field Setup. When you call getPicklist method, pass three values like Object type(ex: Lead), integratin tag for the custom field, "" ( this is language, this field is no need for English languague)
    Hope this willl work
    Raja Kumar Malla
    [email protected]

  • How to query for a NULL value?

    Hi all,
    how can I query for a NULL value in a ViewObject. I tried to set null as where-clause param [setWhereClauseParam(0, null)]. But the created statement looks like this:
    SELECT ...
    FROM ...
    WHERE param = null
    I would expect it to create something like WHERE param IS NULL. I hope anybody has a solution for this.
    Thanks,
    Axel

    I think you should use setWhereClause("COL_NAME IS NULL")
    You could use setWhereClauseParam(0, "NULL"), but only if you have a predefined query similar to: "SELECT X, Y, Z FROM A WHERE X IS :0" (which is a pretty useless query, as you can ONLY set "NULL" as the value for ":0").

  • Standard Report to check consumption values for multiple materials

    Hi,
    Is there any standard report to check "consumption" values for multiple materials? The user needs to check the consumption values over a period of time for multiple materials (VERP, ROH) before deciding the re-order and safety stock values for them. Any help on this will be greatly appreciated.
    Thanks,
    Swapnil

    Dear Swapnil,
    Report MCRE is widely used for the material cosnumption than checking in COOIS.
    Also these reports can help you.
    MCPF                 Material analysis: Dates                
    MCPO                 Material analysis: Quantities           
    MCPW                 Material analysis: Lead time            
    Regards
    Mangalraj.S

Maybe you are looking for

  • Add an old hard drive to H535

    Hello: I just bought a Lenovo H535, win. 8 after my old Dell Dimension 3000 died and want to place the Dell hard drive into my H535 cabinet but it seems the electrical connections are very different on the H535.  The Dell hard drive lines up with the

  • Has anyone noticed a massive battery drain problem after the iOS 6.1 update on the iPhone 4s?

    I updated my iPhone 4s last night with iOS 6.1 update.  This morning, the battery percentage has been falling at an alarming rate while in standby, and the phone seems to be heating up and staying at an elevated temperature while in standby.  Has any

  • How to find which Badi Implementation is causing Short Dump

    Hi Experts, We are getting short dump on IW32 transaction when the users hit SAVE button. The Dump Details: Runtime Errors SYNTAX_ERROR Short text Syntax error in program "WORKORDER_UPDATE==============CP ". What happened? Error in the ABAP Applicati

  • Error while upgrading to OS 3.0 GM seed

    Hi, I wanted to upgrade to the OS 3.0 GM seed. I opened Xcode, opened Organizer and choose the new OS file. Suddenly while starting to restore it gave an error: Connected to device, path does not exist. It now only gives that error. My iPhone only sh

  • OHJ Default Window Size

    I have set specific dimensions for an Oracle Help window to be displayed and have amended the *.hs file of the wintype from "False" to "True". When a context sensitive topic is launched from a Help button the OHJ window is displayed the correct size.