How to extract this criteria? Logic For material Extraction?

Hi,
If we specify, say, 3 raw materials, we only want a listing of products that contain all three raw materials.
I know by FM CS_WHERE_USED_MAT we get list for single material.
But How Do I Achieve it in report which has all three materials?
Basically Cs15 Fullfills their criteria but they need it for range of materials now..
regards
Kumar

I tried exactly like that but my requirement is I should display only
the products which has all three of them( entered via slection screen).
right now it is displaying all products..irrespctive of 1,2 or 3 materials.
Check my code.
SELECT matnr FROM mara
INTO TABLE itab
WHERE matnr IN s_matnr.
  IF sy-subrc IS INITIAL.
    LOOP AT itab.
      MOVE itab-matnr TO p_matnr.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = p_matnr
        IMPORTING
          output = p_matnr.
      CALL FUNCTION 'CS_WHERE_USED_MAT'
        EXPORTING
          datub                      = p_datub
          datuv                      = p_datuv
          matnr                      = p_matnr
          postp                      = p_postp
          stlan                      = p_stlan
          werks                      = p_werks
          stltp                      = stltp_in
        IMPORTING
          topmat                     = selpool
        TABLES
          wultb                      = ltb
          equicat                    = equicat
          kndcat                     = kndcat
          matcat                     = matcat
          stdcat                     = stdcat
          tplcat                     = tplcat
          prjcat                     = prjcat
        EXCEPTIONS
          material_not_found         = 02
          no_where_used_rec_found    = 03
          no_where_used_rec_selected = 04
          no_where_used_rec_valid    = 05.
      IF sy-subrc IS INITIAL.
        LOOP AT ltb.
          MOVE ltb-matnr TO t_data-matnr.
          MOVE ltb-idnrk TO t_data-idnrk.
          MOVE ltb-stlan TO t_data-stlan.
          MOVE ltb-werks TO t_data-werks.
          MOVE ltb-ojtxb TO t_data-ojtxb.
          MOVE ltb-postp TO t_data-postp.
          WRITE ltb-menge TO t_data-menge.
          WRITE ltb-meins TO t_data-meins.
          WRITE ltb-bmein TO t_data-bmein.
          SHIFT t_data-matnr LEFT DELETING LEADING '0'.
          SHIFT t_data-idnrk LEFT DELETING LEADING '0'.
          SELECT SINGLE maktx FROM makt
          INTO t_data-maktx
          WHERE matnr = ltb-idnrk
          AND spras = 'EN'.
          APPEND t_data.
        ENDLOOP.
      ENDIF.
    ENDLOOP.
  ELSE.
    MESSAGE 'No data exists for chosen selection' TYPE 'I'.
    SUBMIT (sy-repid) VIA SELECTION-SCREEN.
  ENDIF.
regards
Kumar
Message was edited by:
        praveen kp

Similar Messages

  • How to setup a company code for material management

    Hi,
    While creating material in MM01, in sales org tab, when I gave plant XXXX, it is giving an error "Company code YYYY is not setup for material management".
    So can you help me , how to setup a company code for material management
    Help is appreciated
    thanks
    DIL

    Hello Sendil,
    You can maintain it with trns code OMSY or MMPI/MMPV.
    Hope this helps
    Regards
    Arif Mansuri

  • Hi, While installing XQuatrz-2.7.7, the installation blocks at the "destination" level. It asks how to install this soft, "Install for all users" is shadowed, but frozen: i cannot select anything and move on. Any idea how to get that fixed? Thanks!

    Hi,
    While installing XQuatrz-2.7.7, the installation blocks at the "destination" level. It asks how to install this soft, "Install for all users" is shadowed, but frozen: i cannot select anything and move on. Any idea how to get that fixed?
    Thanks!

    It says above 2 relevant and 1 correct answere available .............
    I'm new here so could anyone direct me to these answeres?

  • How to implement this aggregate logic at target column in odi inteface mapp

    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    how to implement this aggregate logic at target column in odi inteface mappings

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • How to consider internal transfer movement for material aging Z report

    Hello Expert ,
    we are developing Z repot for material ageing .
          In this we are using BSIM table  but in our case internal transfer movement such as ( 411 ,412 ,413 ,etc.) create debit credit entry in BSIM for this reason value of material getting correct but age of material get disturbed .
    we are having sale order stock (E), WBS stock(Q) , Collective stock , Vendor Stock (o) & stock transfer between stock type possible.
    For all above consideration how to calculate material Age.

    Dear experts
    i have the same issue, could you pls advise the answer?
    another question; how to unify the stock locations rather than maintaining different locations such as sales order stock, free goods, commercial stock and in the same time the margin reporting to be based on transaction/line item in sales invoice?
    thanks

  • How to do this with Logic?

    Hy!
    Any ideas how i can realize this with Logic?:
    http://www.youtube.com/watch?v=tE7GHgbmlP0
    Are there any (freeware) loop plug ins or something else I could use?

    Yea, but what if we want to make our own loops, instead of using what apple is providing?
    If you're questioning whether you can make your own music loops in Logic as opposed to just using Apple Loops, then you're totally misunderstanding some of the most basic functioning of Logic. That's like asking whether you car will drive you around the block. Logic is a very complex multi track audio and midi sequencing program. Not only can you make any type of sound or audio or midi sequence and loop it to your heart's delight, you can make multi track sequences, songs, complex orchestral arrangements, movie scores, soundscapes .... shall I go on?
    I just got LP8, and I'm just learning it too. Are you really saying that you can't do anything similar to that video with Logic?
    Absolutely not!! In fact, SC's post 4th down tells you how to do something similar. Not EXACTY what's in the video, but SIMILAR.
    Here's the difference: You can't record a single measure drum beat and then have it automatically loop indefinitely *in real time* while you layer more drum beats onto it, each one being recorded after a single measure and played back without stopping. In Logic, you can record a measure, then tell Logic to loop it, and then create another, loop that one, etc etc. The only difference is you're not doing it in 'real time' without stopping, you're building a sequence of looped sounds manually in the arrange. The OP seems to want to do it live, without the beat stopping. For that you need Ableton or another program with 'real time looping' capabilities. The only reason you'd want to do this would be if you A) want to impress your friends, or B) are trying to create beats in a live situation, like a club or something. If that's what you're after, other programs like Ableton Live are better suited for that.

  • How to Implement Dynamic Modification Rule for Material & multiple vendor Combination

    Hi Team,
         In dynamic modification rule for Material &  vendor combination, i have maintained material & vendor in Inspection plan at Material Assignments
    1.If i purchase same material from different vendors then how to implement ?

    Hi Balaji,
    I am not sure if i have followed your requirement.
    What do you want to do with Vendor Z? Do you want to inspect each lot from Z?
    If yes:
    Then Create 2 Inspection plans with same Operations and Same MICs, In Material Assignment, mention Vendor as Z so that 1st inspection plan will only be for Vendor Z. Do not enter DMR in Header.
    In 2nd inspection plan Enter DMR and do not mention any vendor so this plan will be applicable for all vendors except Z.
    If No:
    Then create Qm info record for vendor Z with "No inspection" set in QI06.
    Amol.

  • How to implement the Tax Data for Material Master IN MDM

    Hello  Experts,
    The MDM 7.1 standard business content does not ship the content required for TAX data implementation. We need to include this however for Material/Vendor/Customer.
    We have alraedy tried the approach of a multivalued lookup table for TAX fileds (Plant,Country,Tax Type, Tax Category, Tax Classfn) and linked it to the Sales DAta Qualified Table.
    but this does not satisfy the interdependencies of SAP ERP  i.e Sales Org-> Distribution Channel-> Plant-> Departure Country-> Tax Type-> Tax classification. We intend to implement this same relation in MDM.
    Kindly guide as to what would be the right approach. Can a qulalified lookup for Tax data be helpful for this scenario?
    Also can anyone secify the correct table or T-Code where we can find this entire dependency in ECC?
    Thanks in advance,
    Elizabeth.

    Hi Elizabeth, hi Shiv,
    as long as you're using MDM for consolidation and harmonization only, you could add the tax information. As for customers (for example), you maintain tax indicators as a child of the sales area. This means for MDM that you need to include the tax indicators in the sales data tuple. As tax indicators are repeatable records, you need to create a nested tuple for that.
    But as Shiv has correctly mentioned, the tax information itself is quite complex in regards to which tax information must be maintained depending on e.g. the country and/or sales area. In MDM it is hardly possible to predefine any mandatory values like it is possible in ERP. So if you plan a central creation of data, you'll most probably have to invest a lot into the correct validations to ensure that you create correct data. Still it needs to be closely investigated if you can do this with the MDM functionality or if you need some external API programming to do the job.
    Best regards
    Michael

  • How to implement this complex logic on rpd

    How to implement following sql logic on OBIEE 10g RPD...whole thing to be implemented as single column on presentation layer.
    to calculate numerator===
    select sum(flag) as ap_account_no,exp from                                                                                           
    (select a.invoice_id as invid,a.payment_no, max(a.payment_dt) as payment_dt,max(a.due_dt) as due_dt,b.expenditure_type as exp,                                                                                          
    case when max(a.due_dt)+ 3 > max(a.payment_dt)                                                                                           
    then 1                                                                                           
    else 0                                                                                           
    end As Flag                                                                                          
    from Supplier_inv_pymt_map a, po_invoice_map b                                                                                          
    where a.invoice_id= b.invoice_id and a.invoice_dt!=a.due_dt and a.usd_gross_AMOUNT >0 and a.PAYMENT_STATUS!='VOIDED' and to_char(a.payment_dt,'MON-YYYY')='JUN-2011'                                                                                          
    group by a.invoice_id, a.payment_no,b.expenditure_type) GROUP BY exp                                                                                          
    to calculate denominator===
    select count(invid),exp from                                                                                      
    (select a.invoice_id as invid,a.payment_no, max(a.payment_dt) as payment_dt,max(a.due_dt) as due_dt, b.expenditure_type as exp                                                                                     
    from Supplier_inv_pymt_map a, po_invoice_map b                                                                                     
    where a.invoice_id= b.invoice_id and a.invoice_dt!=a.due_dt and a.usd_gross_AMOUNT >0 and a.PAYMENT_STATUS!='VOIDED' and to_char(a.payment_dt,'MON-YYYY')='JUN-2011'                                                                                     
    group by a.invoice_id, a.payment_no,b.expenditure_type) GROUP BY exp                                                                                     
    tables n column used in sql r available on physical layer....
    can anyone help

    Hi
    if you don't want to aggregate try to define a user function
    analytic_sum($(value))
    implémented by
    sum($(value))
    after that
    replace your
    sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)
    by
    analytic_sum(NOTICES) over ( partition by property order by RELAVANTDATE range between interval '30' day preceding and current row)

  • How to view the code/logic for the built-in oracle functions

    Hi,
    How can we view the logic behind the oracle supplied built-in functions like LAST_DAY , MONTHS_BETWEEN etc.,
    I tried to view the same using the sys.STANDARD package , the observations are given below
    function LAST_DAY(RIGHT DATE) return DATE;
    pragma BUILTIN('LAST_DAY',38, 12, 12); -- PEMS_DATE, DATE_LAST_DAY
    pragma FIPSFLAG('LAST_DAY', 1450);
    Regards
    Lok

    How can we view the logic behind the oracle supplied built-in functions like LAST_DAY , MONTHS_BETWEEN etc., You cannot. These built-ins, are 'built-in'.... As far as I know they are implemented in Oracle's kernel, as C code.

  • How to implement this: Exception handler for managed bean

    Hi, i'm using jdev 11g rel 1 , and i know i can use custom java class to extends DCErrorHandlerImpl, and override some method to customize the output or other info of my exceptions.
    And then config it for databindings.cpx to make it available. But i found that this is only available for JboExceptions which are thrown from BC layer and through databindings.
    If my exceptions are from managed bean, or just use application module to use the methods in it, while encounter exceptions, there's no way to handle it.
    How can i handle it in managed bean in just one place(for architecuture layer)? <I just want to define a method to handle all managed bean's exceptions and use dcContainer.process it>,
    who can give some suggestion?

    If my exceptions are from managed bean, or just use application module to use the methods in it, while encounter exceptions, there's no way to handle it.
    How can i handle it in managed bean in just one place(for architecuture layer)? <I just want to define a method to handle all managed bean's exceptions and use dcContainer.process it>,
    who can give some suggestion?If you use application module methods in the managed bean, then use them through methodAction bindings so that the standard error handling works as expected.
    See: http://blogs.oracle.com/smuenchadf/no_createrootappmodule_in_backing_beans.html
    If you need to do a whole lot of error handling in the bean (instead of just showing a message once in a while), you might be putting too much business logic where it doesn't belong. Consider moving that logic to the AM

  • How to get alert in P6 for material procurement two weeks before and track the status of procurement of material?

    I want P6 to alert me two weeks before for procurement of specific material resource related to an activity going to be performed. If this is possible then what are the steps to use it and how can we manage it.

    Hi Srinivas,
    I think you must use Restricted Key Figures and Formula.
    Do not introduce CALMONTH in columns, but restrict 12 times the Key Figure Qty with 0CALMONTH3, that is 01-02-03-...
    Then create a Formula that is the Sum of all Restricted KF and call it SUM.
    Then copy the previous Formula (SUM) and call it AVG and give the option of Average of all Values <>0.
    Try.
    Ciao.
    Riccardo.

  • How to calculate the Processing time for material based on its route ?

    Hello experts,
    I would like to calculate the Scheduled in-house production time based on route.
    Actually this is done in the prod. route in tcode CA02. (via menu Extras => scheduling => schedule).
    After getting the schedule table press the 'scheduling results' button I received the Processing time, Setup and teardown time,... Scheduled in-house production time.
    So I'm looking for a function or any tool to use it in report.
    thanks,
    Eli

    hi,
    from routing screen,extras>scheduling>schedule(give a variant name)>scheduling results>update material master.this writes the info in the temp file.use tcode CA96 to update material master.this updates lot size dependent in house production time in work scheduling view of material master and  deletes the lot size independent inhouse prod, time in MRP2 view.this tool gives more accurate results  for your  inhouse prod. time.
    > Hello experts,
    > I would like to calculate the Scheduled in-house
    > production time based on route.
    > Actually this is done in the prod. route in tcode
    > CA02. (via menu Extras => scheduling => schedule).
    > After getting the schedule table press the
    > 'scheduling results' button I received the Processing
    > time, Setup and teardown time,... Scheduled in-house
    > production time.
    > So I'm looking for a function or any tool to use it
    > in report.
    >
    > thanks,
    > Eli

  • How to use copy default values for material from vendor master in Account Group

    Dear all:
       In define AccountGroup for vendor ,there is a field named DURAS which means default values,who can tell me how to use it?
       Any informations are appreciated!

    Hi Katherine,
    I have tried using default value as B in the customizing
    If i maintain default values in the vendor master record, it will automatically adopt in the purchase info record.
    Here i tried using sales person & telephone no field in vendor master record & it automatically adopts to purchase info record.
    Region sales person and telephone no i have maintained in vendor master record, it automatically fetches to info record for the particular account group. I am not sure if there is any relation between vendor master and material master record.
    Regards
    Subbu.

  • Logic for materia Vs workcenter

    Can some body help to fetch the best table to get the below report with given selection fields.
    Create a report to Display material, material description, work center
    and plant.
    The selection should have the material type(mtart) the material
    pricinggroup(kondm) and plant.
    Capture the work center from the routing. These should only be active
    materials.
    as we can get from below tables  and expecting a logic to get the work center with respective mateial.
    Material : MARA, MACR, MAKT,
    -Work Center :CRHD
    -Tasklist : MAPL, PLKZ, PLKO, PLFL,PLAS,PLPO.

    Hi Srinivas,
    The following tables will help you in APO to fetch the required data.
    1)  Location details:- /sapapo/loc
    2)  Material details:- /sapapo/matloc
    3)  PPM details:- (Bom, routing, work centre, tasklist)  /sapapo/ppmt
    Hope this helps.
    Please confirm.
    Regards,
    R. Senthil mareeswaran.

Maybe you are looking for

  • Firefox Doesn't display correctly and is very laggy on sites with CloudFlare DDoS Protection

    Since 35.0 and above i have been getting weird behaviour on sites with CloudFlare DDoS protection. When i open the site in a new window, it takes a really long time and sometimes doesn't display at all and gives me a blank page. and now it just start

  • How to display forum content in another web page

    Hi, Anybody has idea if the forum provides some API/ snippets which can be used to show the contents from forum (latest threads, announcements, polls) in a simple HTML page The fields required from API to be displayed are: Subject of the thread Some

  • When changing parameters in a disco workbook portlet provider refresh fail

    Hi, When changing input parameters in a discoverer workbook the automatic portlet provider refresh routine fails. We have published a report in Discoverer portal using portlet provider. When we change a parameter in the discoverer workbook and save i

  • TextArea style won't print

    I have set border and background styles on all my textarea components with _global.styles.TextArea.setStyle("backgroundColor", "red"); _global.styles.TextArea.setStyle("borderColor", "blue"); and everything looks fine before I try to print it. The ba

  • Windows XP SP 2 / iTunes 7.7.1.11 runs perfectly, but...

    I want to know how if there are serious problems upgrading to iTunes 8.0.2. Furthermore, I want to upgrade to XP Service Pack 3, but am concerned about interoperability. Ideally I want to upgrade to the latest iTunes version and SP 3, but dread somet