FM to fetch the BOMs

Hi ,
I have requirement to fetch the BOMs for a particular material, plant, BOM usage, date range(valid from and valid to date), change number combination. I am using the FM CSAP_MAT_BOM_READ where i am able to give the above conditions but it is not considering the date range.
Is there any other FM which i can use with these conditions???
Regards,
Shobana.K

Hi Shobhana,
CSAP_MAT_BOM_READ
You can use this function module to display simple material BOMs. You cannot display BOM groups (for example, all variants of a variant BOM). as in transaction CS03. Current restrictions: You cannot display long texts. You cannot display sub-items. You cannot display classification data of BOM items for batches. You can only display one alternative or variant. You cannot enter an alternative for module CSAP_MAT_BOM_READ, so you always see alternative 01. The following example came from a posting on the SAP-R3-L mailing list.
For Example.
data: begin of tstk2 occurs 0.
          include structure stko_api02.
data: end of tstk2.
data: begin of tstp2 occurs 0.
          include structure stpo_api02.
data: end of tstp2.
data: begin of tdep_data occurs 0.
         include structure csdep_data.
data: end of tdep_data.
data: begin of tdep_descr occurs 0.
         include structure csdep_descr.
data: end of tdep_descr.
data: begin of tdep_source occurs 0.
         include structure csdep_source.
data: end of tdep_source.
data: begin of tdep_order occurs 0.
         include structure csdep_order.
data: end of tdep_order.
data: begin of tdep_doc occurs 0.
         include structure csdep_doc.
data: end of tdep_doc.
data: flg_warning like capiflag-flwarning.
   call function 'CSAP_MAT_BOM_READ'
        exporting
             material   = 'MAT100'
             plant      = '0001'
             bom_usage  = '1'
             valid_from = '20.12.1996'
           valid_to
        importing
             fl_warning = flg_warning
        tables
             t_stko       = tstk2
             t_stpo       = tstp2
             t_dep_data   = tdep_data
             t_dep_descr  = tdep_descr
             t_dep_source = tdep_source
             t_dep_order  = tdep_order
             t_dep_doc    = tdep_doc
        exceptions
             error      = 1.
Regards,
Amit.

Similar Messages

  • How to fetch the Reqd. Quan & Result Quan for a Z-report w.r.t. tcode CS15

    Hi Group,
    I have a requirement to develop a Z-report depending on the o/p of the tcode CS15.
    The result should be same as that of the CS15 with the a few additions:
    (1)Providing option to accept multiple Materilal Numbers
    (2)Filtering out the selection criteria on the fileds MRP Controller, Profit Center and etc.,
    my queries are:
    (1)In the Standard report, I was getting the fields Required Quantity and Result Quantity in the output. Whereas for me
        I was using a fm 'CS_WHERE_USED_MAT' to fetch the BOM items but whereas in the return parameter (STPOV) does not
       contain these fields(Result Quan and Reqd. Quan). 
    (2)I have to show the Material Type in the output. But when I fetch the records from the above FM, I was getting the Component
        details but not the Materials.  - the user wants the Material Type to be shown for each record.
    Kindly provide me inputs on the above queries.
    Regards,
    Vishnu.

    Hi,
    You can refer my wiki which i posted long back.
    link:[Inverse BOM Explosion|http://wiki.sdn.sap.com/wiki/display/Snippets/InverseBOMExplosion-ABAP] . Please note that the coding is not so good. If its today i could have wriiten it better
    In case of quantities you will not get it directly . filrtering the material type is really  easy comparing the result with MARA-MTART.

  • After getting the bom ,find routing,workcenter,how to get component routing

    hi experts.
              the requirement is find the find the routing details of the given materials.
    input is
    material using select-options.
      plant
    out put
    1.operator
    2.material
    3.material description
    4.workcenter
    5.vendor
    6.operation description
    7.uom
    8.qty
    9.uom
    10.setuptime
    11.processingtime
    12.deliverytime
    example.
           materials t4595959----this materials bom is give below
           3939393----
    procurement type is f
           3393939 -
    procurement type is e
           3939393------- procurement type is x
        i explanied what i tried.
       tables : marc,mapl,plpo,crhd,eord,eina,eine.
        1. using cs_com_expl_mat_v2  to get the bom explosion
       2. after got the materials with bom
       <b>MARC </b>                                  <b>MAPL</b>                  MATNR                                             MATNR               
      WERKS                1                         WERKS
    BESKZ        =======> E OR x          PLNTY
                                                             PLNNR
                2                                              3
    <b>MAPL</b> =====>  <b> PLPO</b>      =====> CRHD
                             PLNTY                                  OBJID
                            PLNNR                                   ARBPL
                           VORNR
                            ARBID
                            LTXA1
                            VGE01
                            VGW01
                             VGW02
    <b>                   1                         2                     3
    MARC</b>      ==>     <b>EORD</b> =>   <b>EINA</b> =>     EINE
    BESKZ == 'F'              MATNR             MATNR          INFNR
                                       LIFNR               LIFNR             APLFZ
                                      FLIFN = 'X'          INFNR
    followed this method to explode the bom and got the operation.
    but its only fetch the header materials operation ,not component operaion
    h we get the opeations of the component
    thanks in advance
    Regards
    ds

    hI,
           Yes i checked the debugging mode ,its only fecthed the header materials
    but not component materials,
    i here give the query for ur review ,pl give me a solution
    START-OF-SELECTION.
      CLEAR ISTPO. REFRESH ISTPO.
      LOOP AT ITAB.
      CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
          EXPORTING
            CAPID                 = 'PP01'
            MEHRS                 = 'X'
            MMAPS                 = ' '
            MDMPS                 =  ' '
         BREMS                  = 'X'
         DISMM                 = ' '
         LIFNR                 = ' '
         WEBAZ                 = ' '
            DATUV                 = SY-DATUM
            MTNRV                 = ITAB-MATNR
            WERKS                 = P_WERKS
            EMENG                 = '1'
            STKKZ                 = ' '
            FBSTP                 = ' '
            FTREL                 = ' '
          IMPORTING
            TOPMAT                = W_TOPMAT
           DSTST                 = DSTST
          TABLES
            STB                   = ISTPO
            MATCAT                = MATCAT
          EXCEPTIONS
            ALT_NOT_FOUND         = 1
            CALL_INVALID          = 2
            MATERIAL_NOT_FOUND    = 3
            MISSING_AUTHORIZATION = 4
            NO_BOM_FOUND          = 5
            NO_PLANT_DATA         = 6
            NO_SUITABLE_BOM_FOUND = 7
            OTHERS                = 8.
      WRITE: / W_TOPMAT-MATNR UNDER TEXT-H00 COLOR COL_HEADING,
               W_TOPMAT-MAKTX UNDER TEXT-H01 COLOR COL_HEADING.
        SELECT MATNR WERKS OBJID BESKZ FROM MARC INTO CORRESPONDING FIELDS OF TABLE IT_ITAB_IDEL
      WHERE MATNR = ITAB-MATNR  AND BESKZ = 'X' OR BESKZ = 'E' OR BESKZ = 'F'.
    SELECT MATNR WERKS PLNTY PLNNR LIFNR FROM MAPL INTO CORRESPONDING FIELDS OF TABLE IT_MAPL_IDEL
                                                WHERE  MATNR = ITAB-MATNR AND
                                                         WERKS = 'IN01' .
    SELECT PLNTY PLNNR ZAEHL VORNR  ARBID OBJTY LTXA1 VGE01 VGW01 VGW02 PLIFZ FROM PLPO INTO CORRESPONDING FIELDS OF TABLE IT_PLPO_IDEL
                                            FOR ALL ENTRIES IN IT_MAPL_IDEL
                                             WHERE PLNTY = IT_MAPL_IDEL-PLNTY AND
                                                  PLNNR = IT_MAPL_IDEL-PLNNR AND
                                                   WERKS = 'IN01' AND ARBID <> 0.
        SELECT OBJTY OBJID ARBPL FROM CRHD INTO CORRESPONDING FIELDS OF TABLE IT_CRHD_IDEL
                                                              FOR ALL ENTRIES IN IT_PLPO_IDEL
                                                              WHERE OBJID = IT_PLPO_IDEL-ARBID.
    LOOP AT ISTPO.
      IT_FINAL_IDEL-POSNR  = ISTPO-POSNR.
      IT_FINAL_IDEL-IDNRK  = ISTPO-IDNRK.
      IT_FINAL_IDEL-OJTXP  = ISTPO-OJTXP.
      IT_FINAL_IDEL-MENGE  = ISTPO-MENGE.
      IT_FINAL_IDEL-MEINS  = ISTPO-MEINS.
    LOOP AT IT_PLPO_IDEL.
        IT_FINAL_IDEL-VORNR = IT_PLPO_IDEL-VORNR.
        IT_FINAL_IDEL-ARBID = IT_PLPO_IDEL-ARBID.
        IT_FINAL_IDEL-OBJTY = IT_PLPO_IDEL-OBJTY.
        IT_FINAL_IDEL-LTXA1 = IT_PLPO_IDEL-LTXA1.
        IT_FINAL_IDEL-VGE01 = IT_PLPO_IDEL-VGE01.
        IT_FINAL_IDEL-VGW01 = IT_PLPO_IDEL-VGW01.
        IT_FINAL_IDEL-VGW02 = IT_PLPO_IDEL-VGW02.
        READ TABLE IT_CRHD_IDEL WITH KEY OBJID = IT_PLPO_IDEL-ARBID.
        IT_FINAL_IDEL-ARBPL = IT_CRHD_IDEL-ARBPL.
        APPEND IT_FINAL_IDEL.
        CLEAR : IT_FINAL_IDEL,IT_PLPO_IDEL,IT_CRHD_IDEL,ISTPO.
      ENDLOOP.
       ENDLOOP.

  • 'Valid to' dates for both the Header & the components in the BOM report.

    Hi Experts,
    My Requirement:
    Need to display the 'Valid to' dates for both the Header & the components in the BOM report.
    Right now we are using the Functional modules 'GET_STKO' & 'GET_STPO' for the header
    & the components respectively. The report gives the correct output for the all the BOM alternatives
    which exist. But for the BOM alternatives which have been deleted(updated in STKO-LKENZ)
    'Valid to' dates are displayed as'00/00/0000'.
    (Note:ECM is used for BOMs)
    Is there any Logical Database that I can fetch the 'Valid to' dates of both BOM Header & components
    which are deleted?
    Regards,
    Mahesh

    Dear Mahesh,
    In my understanding I dont think you cannot get the valid to date for BOM header,unless a ECN,(engineering change number) is
    used to set the deletion flag.In otherwords none of the business sets for all these BOM's the valid to date(which means the
    default valid to date 31.12.9999 is taken).
    Check with this FM, CS_BOM_EXPL_MAT_V2 whether can you get the valid to date for the components(infact here also the
    valid from date given in the input screen impacts the report output).
    Check and revert back.
    Regards
    Mangalraj.S

  • Regarding fetching a BOM's top level material

    Hi friends,
    We have a requirement wherein we are supposed to fetch the top most level material of a component. I am aware that to do the reverse process i.e. to find the component BOMs for a material we have the FM "CS_BOM_EXPL_MAT_V2".
    But here our input is the component number and its corresponding plant. For this component we need to fetch the top most level material by looping at stpo and mast tables.
    Also I would like to know if there is a direct function module available to get the top most level materials.
    If anybody has worked on this logic/requirement before kindly provide your valuable inputs.
    Thank you all in advance.
    Regards,
    Gayathri N.

    Hai Gayathri
    Check the following Links
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    Thanks  regards
    Sreenivasulu P

  • In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.

  • Not able to fetch the data by Virtual Cube

    Hi Experts,
    My requirement is I need to fetch the data from Source System (From Data base table) by using Virtual Cube.
    What I have done is I have created Virtual Cube and created corresponding Function Module in Source System.
    That Function MOdule is working fine, if Data base table is small in Source System.But If data base table contains huge amount of data (millions of record), I am not able to fetch the data.
    Below is the code I have incorporated in my function module.
    c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
      DATA:
        l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
      l_s_map-iobjnm = '0PARTNER'.
      l_s_map-fldnm  = 'PARTNER'.
      insert l_s_map into table l_th_mapping.
    create object l_r_srv
        exporting
           i_tablnm              = '/SAPSLL/V_BLBP'
          i_th_iobj_fld_mapping = l_th_mapping.
      l_r_srv->open_cursor(
        i_t_characteristics = characteristics[]
        i_t_keyfigures      = keyfigures[]
        i_t_selection       = selection[] ).
       l_r_srv->fetch_pack_data(
        importing
          e_t_data = data[] ).
      return-type = 'S'.
    In the above function Module,Internal table L_TH_MAPPING contains Info Objects from Virtual Cube and corresponding field from Underlying data base table.
    The problem where I am facing is, in the method FETCH_PACK_DATA, initially program is trying to fetch all the recordsfrom data base table to internal table.If Data base table so lagre, this logic is not working.
    So would you please help me how to handle these kind of issues.

    Hi Experts,
    My requirement is I need to fetch the data from Source System (From Data base table) by using Virtual Cube.
    What I have done is I have created Virtual Cube and created corresponding Function Module in Source System.
    That Function MOdule is working fine, if Data base table is small in Source System.But If data base table contains huge amount of data (millions of record), I am not able to fetch the data.
    Below is the code I have incorporated in my function module.
    c_th_mapping TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_TH_IOBJ_FLD_MAPPING.
      DATA:
        l_s_map TYPE CL_RSDRV_EXTERNAL_IPROV_SRV=>TN_S_IOBJ_FLD_MAPPING.
      l_s_map-iobjnm = '0PARTNER'.
      l_s_map-fldnm  = 'PARTNER'.
      insert l_s_map into table l_th_mapping.
    create object l_r_srv
        exporting
           i_tablnm              = '/SAPSLL/V_BLBP'
          i_th_iobj_fld_mapping = l_th_mapping.
      l_r_srv->open_cursor(
        i_t_characteristics = characteristics[]
        i_t_keyfigures      = keyfigures[]
        i_t_selection       = selection[] ).
       l_r_srv->fetch_pack_data(
        importing
          e_t_data = data[] ).
      return-type = 'S'.
    In the above function Module,Internal table L_TH_MAPPING contains Info Objects from Virtual Cube and corresponding field from Underlying data base table.
    The problem where I am facing is, in the method FETCH_PACK_DATA, initially program is trying to fetch all the recordsfrom data base table to internal table.If Data base table so lagre, this logic is not working.
    So would you please help me how to handle these kind of issues.

  • Query on fetching the no.of days between Invoice date and due date in rtf template embedded BI Publisher Report

    Hi Experts,
    We have a requirement to fetch the value of 'No of days' between Invoice date and due date (Two variable date fields on the template) in an Analysis.
    Please let me know the procedure of how to achieve the same.
    Regards,
    Rev

    it's good for ideas but implementation a bit different
    Oracle Business Intelligence Publisher Report Designer's Guide
    This function provides a method to get the difference between two dates in the given locale. The dates need to be in "yyyy-MM-dd" format. This function supports only the Gregorian calendar. The syntax is as follows:
    <?xdoxslt:date_diff(‘format’, ‘YYYY-MM-DD’, ‘YYYY-MM-DD’, $_XDOLOCALE, $_XDOTIMEZONE)?>
    where
    format is the time value for which the difference is to be calculated
    Example:
    <?xdoxslt:date_diff(‘d’, ‘2006-04-08’, ‘2006-04-01’, $_XDOLOCALE, ‘America/Los_Angeles’)?>
    returns
    -7

  • Material in two plants, I run MRP with the BOM is not found in prod plant

    Hi all,
    I have plant 1020 material 12345
    Plant 1020 is the production plant for material 12345
    The material 12345 exists in plant 1070.
    The material 12345 in plant 1070 has no MRP.
    Plant 1020 material 12345 config in MM03
    MRP1 --> MRP Type = PD
    MRP1 --> MRP Controller = G03
    MRP3 --> Planning material = PLAN_1020_GR03
    MRP3 --> Planning plant = 1020
    Plant 1070 material 12345 config in MM03
    MRP1 --> MRP Type = P3
    MRP1 --> MRP Controller = 017
    MRP3 --> Planning material = empty
    MRP3 --> Planning plant = empty
    The BOM in cs11 for plant 1020 material 12345
    has 3 components
    Comp#1
    Comp#2
    Comp#3
    The Dependency is code
    TABLE TB_1020_SUPERBOM (PP_nuance_interne = $ROOT.PP_nuance_interne,
    PP_dim_billette_bom = $ROOT.PP_dim_billette_bom,
    PP_CODE_LONG_BILL = $ROOT.PP_CODE_LONG_BILL,
    pp_component_bom =$self.pp_component_bom).
    The dependency is not found because it is looking for it in the plant 1070 and not the plant 1020.
    When the MRP runs for a Delivery type stock transfer order I get
    CONFIG_1020_BILLET <---- This is the BOM item component field in CS11 in the Basic data tab
    Comp#2
    Comp#3
    instead of
    Comp#1
    Comp#2
    Comp#3
    When I run MRP for the same material, if there's no
    "Delivery based on Stock transfert orders" the MRP associates the correct components
    Hope this explains m'I situation.
    Regards!
    Curtis

    Hi,
    If you want a reply in one line, it would be SAP R/3 does not supoort this feature.
    You will have to go for APO module.
    There are few things which can be done in R/3 side, as in maintaining a scope for MRP run in OM0E, maintaining special procurement key etc etc, but all these will not do any check of stock in another plant & can only help in a very limited way if all any for your specific need.
    But SAP R/3 provides a cross plant evaluation via MD48 to know the stock & demands at all plants, this can help only for evaluation purpose.
    Hope it clarifies.
    Regards,
    Vivek

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Reg: fetch the data by using item_id which is retuned by In line View Query

    Hi all,
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items1(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items1 values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_quantity(item_id number);
    insert into xxc_quantity values (123);
    create table xxc_quantity_1(item_id number);
    insert into xxc_quantity_1 values (123);
    SELECT union_id.item_id,
           b.org_id,
           e.name,
           fun1(union_id.item_id) item_no
    FROM   xxc_transactions a,
           xxc_items1 b,
           xxc_headers c,
           xxc_lines d,
           xxc_types_tl e,
           (SELECT item_id
            FROM   xxc_quantity
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_quantity_1
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_transactions
            WHERE  item_id = 123) union_id
    WHERE  a.type_id = 6
           AND a.item_id  = b.item_id
           AND union_id.item_id = b.item_id
           AND a.org_id = b.org_id
           AND c.header_id = d.header_id
           AND d.line_id = a.trx_line_id
           AND d.item_id = b.item_id
           AND c.order_id = e.transaction_id
           AND b.org_id = 12
    GROUP  BY union_id.item_id,
              b.org_id,
              e.name
    ORDER  BY union_id.item_id;
    create or replace function fun1(v_item in number)
    return varchar2
    is
    v_item_no
    Begin
       select item_no from xxc_items1
       where item_id=v_item;
       return v_item_no ;
        Exception
         When Others Then
          v_item_no := null;
          return v_item_no;
    END fun1;
    I  need  fetch the data by using item_id which is retuned by In line View Query(UNION)
    item_id  org_id  name    item_no
    123        12        abc       book
    Version: 11.1.0.7.0  and 11.2.0.1.0
    Message was edited by: Rajesh123 Added test cases script
    Message was edited by: Rajesh123 changed Question as fetch the data by using item_id which is retuned by In line View Query(UNION)

    Hi Master , sorry for the late reply and can you please help on this?
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_uinon_table(item_id number);
    insert into xxc_types_tl values(123);
    SELECT   union_id.item_id,
             b.org_id ,
             e.name ,
             fun1(union_id.item_id) item_no   --> to get item_no
             FORM xxc_transactions a,
             xxc_items             b,
             xxc_headers           c,
             xxc_lines             d,
             xxc_types_tl          e,
             ( SELECT item_id
                 FROM   xxc_uinon_table ) union_id
    WHERE    a.type_id= 6
    AND      a.item_id = b.item_id
    AND      union_id.item_id = b.item_id
    AND      a.org_id = b.org_id
    AND      c.header_id = d.header_id
    AND      d.line_id= a.trx_line_id
    AND      d.item_id= b.item_id
    AND      c.order_id= e.transaction_id ---106
    AND      b.org_id = 12
    GROUP BY union_id.item_id,
             b.org_id ,
             e.name
    ORDER BY union_id.item_id;
    Note: xxc_uinon_table is a combination of UNION's
    select 1 from dual
    union
    select 1 from dual
    union
    select no rows returned  from dual;
    I will get 1 from the above Query
    Thank you in advanced

  • Fetch the values from internal table inside an internal table (urgent!!)

    data : BEGIN OF PITB2_ZLINFO occurs 0,
             BEGDA LIKE SY-DATUM,
             ENDDA LIKE SY-DATUM,
             PABRJ(4) TYPE N,                       "Payroll Year
             PABRP(2) TYPE N,                       "Pay. Period
             ZL LIKE PC2BF OCCURS 0,
           END OF PITB2_ZLINFO.
    I have a internal table like this,
    How to Fetch the values from internal table inside an internal table.
    Kindly Help me on this..
    Regards,
    Ram.

    Hi,
    Try this....
    Loop at PITB2_ZLINF0.
    Loop at PITB2_ZLINF0-ZL.
    endloop.
    Endloop.
    Thanks...
    Preetham S

  • Report to fetch the text information from customer master sales data

    Dear Experts,
    We have come up with a requirement where the business want a report/list of the customers for whom a particular text is not maintained in customer master -sales data.
    There are many Z text id are configured and are maintained in Sales data- extras- text. In addition, business also need some key fields from the customer master such as name, city, delv plant, payment terms, sales off, sales grp etc.
    I could not get any standard table where the text is maintained with the customer numbers. Table STXH can give the customer numbers for a particular text id type but what is maintained against the given text id is not fetched from the table.
    So we need the valuable inputs to realize the requirement.
    As an proposal, we are aiming to develop custom Z report with the FM READ_TEXT to get the text information with the customer no ( object type KNVV and text id ). But for the additional information, what should be the actual logic for fetching the data. say if this FM is used, what should be the sequence of the logic and ideal selection parameters.
    In addition, we aim to use BAPI BAPI_CUSTOMER_GETDETAIL2 to fetch some of the customer ifnormation but many fields are not found in this . can we use some other bapi which can provide the complete general/sales data of customer ( delv plant, sales off, sales grp, custo grp, incoterms, payment terms etc)
    Kindly suggest accordingly.
    Many thanks in advance.

    Hi Dharmendra Kumar,
    I guess the best would be to check in ABAP General forum on the READ_TEXT sequence/ logic etc..
    For customer details, the available BAPIs are:
    BAPI_CUSTOMER_GETDETAIL
    BAPI_CUSTOMER_GETDETAIL1
    BAPI_CUSTOMER_GETDETAIL2
    However, you might have to check classes in SE24 to find any existing classes and its method yo give you all the information of a customer. Also check this thread: [BAPI for customer details like in IDoc DEBMAS;
    Regards,
    Raghu.

  • Comparing the BOM usage with the actual usage for materials.

    Hi All
    My client want to compare the BOM usage with the actual usage and have a report for this within a period? More specified they want to calculate the BOM usage, based on the requirement quantity from confirmation - but with out the scrap %. mulitplied with the confimed quantity of the header material.
    The actual usage should be based on  goods issuing from stock, either as goods issue to order (backflushing) or as goods issue to cost center. 
    I havent been able to indentiy a standard report for doing this - does some of you know a standard report?
    -  I was thinking of the following method:
    Look at  tabel RESB and compare it  with MSEG, but I have some diferent problems with this.
      - In resb there is no qty before scrap. 
      - The data amount from MSEG, is so huge so it is not possible to make a data search for a whole period (eg. month)
    Br. M

    There is one std report MCRX which gives a comparison of quanity in order and actual consumption,
    if it doesnt meet your need, you may have to create a custom report.
    logic can be find the quantites as per BOM for the produced quantities
    issued quantities to the order
    tables you may need are AUFK AUFM
    AFKO, STAS STPO
    MSEG, MKPO
    JEST ( if you want to filter using order status)

  • How to do Query optimization?It takes more time to fetch the record from db. Very urgent, I need your assistance

    Hi all
                                     I want to fetch just twenty thousands records from table. My query take more time to fetch  twenty thousands records.  I post my working query, Could you correct the query for me. thanks in advance.
    Query                    
    select
    b.Concatenated_account Account,
    b.Account_description description,
    SUM(case when(Bl.ACTUAL_FLAG='B') then
    ((NVL(Bl.PERIOD_NET_DR, 0)- NVL(Bl.PERIOD_NET_CR, 0)) + (NVL(Bl.PROJECT_TO_DATE_DR, 0)- NVL(Bl.PROJECT_TO_DATE_CR, 0)))end) "Budget_2011"
    from
    gl_balances Bl,
    gl_code_combinations GCC,
    psb_ws_line_balances_i b ,
    gl_budget_versions bv,
    gl_budgets_v gv
    where
    b.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID and bl.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID and
    bl.budget_version_id =bv.BUDGET_VERSION_ID and gv.budget_version_id= bv.budget_version_id
    and gv.latest_opened_year in (select latest_opened_year-3 from gl_budgets_v where latest_opened_year=:BUDGET_YEAR )
    group by b.Concatenated_account ,b.Account_description

    Hi,
    If this question is related to SQL then please post in SQL forum.
    Otherwise provide more information how this sql is being used and do you want to tune the SQL or the way it fetches the information from DB and display in OAF.
    Regards,
    Sandeep M.

Maybe you are looking for

  • Posting date as selection criterion in COOIS

    HI Is there any way to bring posting date (afru-budat) on the standard selection screen of COOIS? cheers matej

  • Issue in if Statement

    Dear gurus im having a problem in if statement problem is that we have SAP ID on which we do multiple logins. i have made an application and written below code in that application. IF user-bname EQ 'MLABTPFL'.       IF p_name EQ 'AK' AND p_pass EQ 'A

  • Compensation Model for Benefits

    Hi All, I am new to benefits. I would like to know, some information about compensation model in benefits. We have 401k salary,hourly,catchup,Deferredcompensation Bonus and Salary Plans in infotype 169. I am  using /102 wagetype as Technical base. Ca

  • Drag clips to timeline 1 in PRE7

    I simply want to have some clips on time line 1. But when I drag the file from my folder to the timeline it always appears on the most upper one. Also an improvement I missed in version 4? I found no threads on this issue, so it should be a minor ite

  • HT201335 can`t found the icon of airplay on IOS X

    i can`t see the icon of the airplay mirroring in safari or documents or upper bar. just in itunes. also in display setting i can`t found the icon i update the apple tv and the mac ios, i reset all devices including the routing .what can i do ?