Function module to get the details from table COEP

hi all,
I have to select the data from COEP table based on OBJNR.i don't have  any other key information.so i have to select the data based on OBJNR only.
can any one please tell me is there any function to get the data from this table.
Thanks.

Hi
Try the fun module
K_CO_OBJECT_BALANCE_GET
see the sample select statement for COEP
clear cobrb_tab.
  refresh cobrb_tab.
  select objnr            " Object No
         rec_objnr1       " Ref Object No
         bureg            " Dostribution Rule
         lfdnr            " Sequence No
         perbz            " Settlement Rule
         konty            " Acct Assign Category
         bukrs            " Company Code
         kostl            " Cost Center
     into table cobrb_tab
     from cobrb
     where kostl in rn_kostl.
  sort cobrb_tab by objnr rec_objnr1.
  delete adjacent duplicates from cobrb_tab comparing objnr.
Get the Settlement Costs from COEP Table
  clear it_set_tab.
  refresh it_set_tab.
  if not cobrb_tab[] is initial.
    select kokrs            " Controlling Area
           belnr            " Acc Document
           buzei            " Line Item
           perio            " Period Block
           wkgbtr           " Value in CO Curr
           lednr            " Ledger No
           objnr            " Object No
           gjahr            " Fiscal Year
           wrttp            " Actuals
           versn            " Version
           kstar            " Cost Element
           beknz            " Dr/Cr Indicator
           parob1           " Partner Object
       into table it_set_tab
       from coep
       for all entries in cobrb_tab
       where lednr = c_lednr  and
             wrttp = c_wrttp2 and
             versn = c_versn  and
             gjahr = p_gjahr  and
             objnr = cobrb_tab-objnr and
             parob1 = cobrb_tab-rec_objnr1 and
             beknz in (c_o, c_a).
  endif.
Reward points for useful Answers
Regards
Anji

Similar Messages

  • Function module to get the dates from the year and the period

    Is there a function Module to get the dates from the year and the period

    Check with :
    To get last day of period use .
    LAST_DAY_IN_PERIOD_GET.
    To get last of month Use :
    RE_LAST_DAY_OF_MONTH
    HRVE_LAST_DAY_OF_MONTH
    LAST_DAY_OF_MONTHS
    ISB_PREVIOUS_PERIOD_DATE_GET
    Thanks
    Seshu

  • Function module to get the details (WTGBTR) from table COEP

    Hi all,
    I have to select the data from COEP table based on OBJNR, KSTAR and KOKRS.I want  WTGBTR from COEP Table.
    Right now Iam using select query.But i want to use function module.
    Can any one please tell me is there any function module to get  WTGBTR from COEP table.
    Thanks.

    This'll work:
    SELECT objnr bukrs wtgbtr
      INTO CORRESPONDING FIELDS OF TABLE gt_coep
      FROM coep
      WHERE lednr = '00'                               "<========
        and kokrs = '1000'
        AND kstar IN ('0000810001' , '0000830001')
        AND objnr IN s_objnr
        AND bukrs IN s_bukrs.
    Rob

  • Functional module to get the File from a given Directory

    Hi all,
    I am using a FM name 'subst_get_file_list' to get the file from a given directory but it is accepting only 40 Character length file only my requirement is to accept file name other than 40 char,
    give me good sugestion
    regards
    paul

    Hi Paul,
    Check the Function Module Gayathri has given. ie. 'SO_SPLIT_FILE_AND_PATH'.
    In the exporting parameter FULL_NAME , give the path name and in the importing parameter stripped_name , you will get the filename.
    Check this code.
    REPORT ZSHAIL_SPLITFILE.
    data: it_tab type filetable with header line,
          gd_subrc type i.
    tables: rlgrap.
    data: path type string,
          file_name type string.
    parameters file_nam type rlgrap-filename .
    data: user_act type i.
    at selection-screen on value-request for file_nam.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
      EXPORTING
        WINDOW_TITLE            = 'select a file'
       DEFAULT_EXTENSION       = '*.txt
        DEFAULT_FILENAME        = ''
        FILE_FILTER             = '*.txt'
        INITIAL_DIRECTORY       = ''
        MULTISELECTION          = abap_false
       WITH_ENCODING           =
      CHANGING
        file_table              = it_tab[]
        rc                      = gd_subrc
        USER_ACTION             = user_act
       FILE_ENCODING           =
      EXCEPTIONS
        FILE_OPEN_DIALOG_FAILED = 1
        CNTL_ERROR              = 2
        ERROR_NO_GUI            = 3
        NOT_SUPPORTED_BY_GUI    = 4
        others                  = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    if user_act = '0'.
    loop at it_tab.
    file_nam = it_tab-filename.
    endloop.
    endif.
    path = file_nam.
    CALL FUNCTION 'SO_SPLIT_FILE_AND_PATH'
      EXPORTING
        full_name           = path
    IMPORTING
       STRIPPED_NAME       = file_name
      FILE_PATH           =
    EXCEPTIONS
      X_ERROR             = 1
      OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    at selection-screen.
    message i001(zmess) with file_name.
    Regards,
    SP.

  • Function Module to get  hierarchy details from a customer account

    Hi Experts,
    There is certain hierarchy maintained among Business partners. We can see that in transaction BPH.
    Now What I require is a function module which takes BP number as input and gives output the
    BP number of child nodes of it . Is there a standard function module for it ?
    Please help me move ahead.
    Thanks in advance

    Hi ram.mahaseth ,
    There are several tables:
    BUT_HIER_NODE
    BUT_HIER_NODE_BP
    BUT_HIER_NODE_D
    BUT_HIER_STRUCT
    BUT_HIER_TREE_D
    BUT_HIER_TREE
    Hope this helps.
    Regards, Kostya Khveshchenik

  • Is there any function module to get the data from st06?

    Hi,
    I'm new to this forum.
    I would like to know if there is a way (maybe some function modules) to collect information like system architecture, and databases as displayed in transaction st06?
    I would like to call it from external program in order to view part of the data available in st06.
    Thanks,
    Erez Gordon.

    have a look at function group SMON.
    Not sure if these are remote enabled, otherwise create a wrapper function module (RFC).
    Edited by: Micky Oestreich on Dec 11, 2008 9:37 AM

  • Urgent: Function module for getting the input from user  using a pop up

    Hi all,
    My requirement at user commmand a pop up should appear asking the user to enter the session name for the bdc session to be created.
    My report allows the user to enter the session name of his choice.
    I need the name of the function module which can do this.
    Thanks
    Pritish

    better to create one FM  to pop-up.
    check this :
    function y_pop_up_get_distributor_time.
    *"*"Local interface:
    *"  IMPORTING
    *"     REFERENCE(W_ROUTE) LIKE  VBAP-ROUTE
    *"     REFERENCE(W_VBELN) LIKE  VBAK-VBELN
    *"     REFERENCE(W_VGBEL) LIKE  VBAK-VGBEL
    *"     REFERENCE(W_VSTEL) LIKE  VBRP-VSTEL
    *"     REFERENCE(W_AUART) LIKE  VBAK-AUART
    *"  EXPORTING
    *"     REFERENCE(W_FROM_DATE) TYPE  SY-DATUM
    *"     REFERENCE(W_FROM_TIME) TYPE  SY-UZEIT
    *"     REFERENCE(W_TO_DATE) TYPE  SY-DATUM
    *"     REFERENCE(W_TO_TIME) TYPE  SY-UZEIT
    *"     REFERENCE(W_TKNUM) TYPE  VTTK-TKNUM
    *"     REFERENCE(W_RC) TYPE  SY-SUBRC
    *"     REFERENCE(W_DEPT_DATE) TYPE  SY-DATUM
    *"     REFERENCE(W_DEPT_TIME) TYPE  SY-UZEIT
    *"     REFERENCE(W_REPO_DATE) TYPE  SY-DATUM
    *"     REFERENCE(W_REPO_TIME) TYPE  SY-UZEIT
    *"     REFERENCE(W_PLNT_DATE) TYPE  SY-DATUM
    *"     REFERENCE(W_PLNT_TIME) TYPE  SY-UZEIT
    *"     REFERENCE(W_TRUCK_NO) TYPE  YW2_TIMEENTRY-TRUCKNO
    *"     REFERENCE(W_LIFNRN) TYPE  YW2_TIMEENTRY-LIFNR
    *  SET PF-STATUS 'STATUS_100' OF PROGRAM SAPLZ2SLS.
    *CLEAR:W_DATE_FROM, W_DS_TIME_1, W_ADATE,
    *      W_ATIME,W_BDATE,W_BTIME, W_CDATE, W_CTIME.
    clear : w_route1, w_vbeln1,w_vgbel1,
            w_vstel1,w_auart1.
      w_route1 = w_route.
      w_vbeln1 = w_vbeln.
      w_vgbel1 = w_vgbel.
      w_vstel1 = w_vstel.
      w_auart1 = w_auart.
      clear: w_date_to, w_date_from, w_adate,w_atime,
             w_ds_time_1, w_ds_time_2,
             w_bdate, w_btime, w_cdate, w_ctime.
      call screen 100 starting at 10 2 ending at 115 13.
      if w_ok_code = 'SAVE'.
        w_rc = 0.
        w_from_date  = w_date_from.
        w_from_time  = w_ds_time_1.
        w_to_date    = w_date_to.
        w_to_time    = w_ds_time_2.
        w_tknum      = w_tknum.
        w_dept_date  = w_adate.
        w_dept_time  = w_atime.
        w_repo_date  = w_bdate.
        w_repo_time  = w_btime.
        w_plnt_date  = w_cdate.
        w_plnt_time  = w_ctime.
        w_truck_no   = sg_truckno.
        w_lifnrn     = w_lifnr.
      else.
        w_rc = 1.
      endif.
    *  IF w_ok_code = 'CANC'.
    *    W_rc = 1.
    *  ELSE.
    *    W_rc = 0.
    *    W_FROM_DATE  = w_date_from.
    *    W_FROM_TIME  = w_ds_time_1.
    *    W_TO_DATE    = w_date_to.
    *    W_TO_TIME    = w_ds_time_2.
    *    W_TKNUM      = W_TKNUM.
    *    W_DEPT_DATE  = W_ADATE.
    *    W_DEPT_TIME  = W_ATIME.
    *    W_REPO_DATE  = W_BDATE.
    *    W_REPO_TIME  = W_BTIME.
    *    W_PLNT_DATE  = W_CDATE.
    *    W_PLNT_TIME  = W_CTIME.
    *  ENDIF.
      clear w_ok_code.
    endfunction.
    Regards
    Prabhu

  • Function Module to get the data like in LS26

    Hi Gurus,
    We are designing a new program and we need to get information about the "available stock", "putaway stock" and "pick quantity" for some storage types. So this is exactly what the LS26 shows.
    Do you know any Function Module that can extract or calculate this information?
    I would really appreciate any suggestion.
    Thank you in advance
    Edited by: Abel Raya on Jul 4, 2011 11:39 AM

    I don't think there is a function module exists. But you can get the details from table LQUA for item details and LEIN for header records.

  • Any Function Module For getting Shipment Details

    Hi All,
    I want to get all details of shipment. i tired , but unable to get any function? I was able to find the creation or change shipment function modules, but not able to find the function module for getting the details for Shipment.
    like BAPI_SHIPMENT_CHANGE           Change Shipment
    BAPI_SHIPMENT_CREATE           Create Shipment
    similary
    Do you have any idea for getting (display)the details of Shipments?
    Regards,
    Raju

    hi,
    you can use
    VTTP,VTTK
    or
    RV_SHIPMENT_READ

  • Function module to get the BOM details for a material-plant combination

    hi
    Is there any function module to get the BOM details such as
            BOM Usage       -STLAN
            Alternative BOM -STLAL
            Items                -POSNR
            Required Quantity-EMENG
            Resulting Quantity-MENGE
            Unit of measure    -BMEIN
            Base unit of measure-MEINS
    for a given material-plant combination
    if so please suggest me some FMs.................
    Awaiting for ur reply..............

    try the below fm it may be useful for you
    DATA : BEGIN OF I_BOM OCCURS 0.
            INCLUDE STRUCTURE STPOX.
    DATA : END OF I_BOM.
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
        EXPORTING
          CAPID                 = 'PP01'
          DATUV                 = SY-DATUM
          MEHRS                 = 'X'
          MTNRV                 = P_MATNR
          WERKS                 = P_WERKS
        TABLES
          STB                   = I_BOM
        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
          CONVERSION_ERROR      = 8
          OTHERS                = 9.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    just befor use it check your application area.for my case it is PP01. you can find it in CS12 when you are exploding the bom the value you are giving in BOM application that is the value for CAPID.
    Just go to se37 and checkout the fm it has lot of options here I am using the minimum things.
    regards
    shiba dutta

  • I need a Functional module to get the header material from the component .

    Dear Guru's
    Please help me .
    I need a name of the Functional module to get the header material from the component .
    As in if I put the Component in the Input I should get ALL the Main header materials using this Component.
    Regards,
    Roshan Lilaram Wadhwani.

    This was not answered

  • Function Module to get the Screen

    Hello All,
    Can anybody provide me a Function Module to get the Screen by giving Program Name and Screen Number.
    Thanks,

    Hello
      check FM  RS_IMPORT_DYNPRO
       CALL FUNCTION 'RS_IMPORT_DYNPRO'
          EXPORTING
            dylang = pmlang
            dyname = programname
            dynumb = screen
          IMPORTING
            header = header
          TABLES
            ftab   = ifields
            pltab  = iflowlogic.
    or you have to create join b/w table reposrc and tadir .
    Thanks
    Anirudh

  • Is there any function module to get the variables used in a query?

    Hi experts
    Please, do you know if is there any function module to get the variables used in a query?
    Thanks and regards
    Luis

    Hi Srini
    Yes, I have checked the tables but I need a function module
    Thanks anyway!
    Luis

  • Function module to get the sequence numbers based on PERNR & payroll period

    Hi,
        Right now i am using the function module 'CU_READ_RGDIR' to get the sequence number based on the PERNR. Once i get the data i am filtering based on payroll periods (begin date and end date). Is there any function module to get the sequence number directly based on PERNR and payroll period dates? if so could you let me know.
    Thanks
    Satya

    I think thats the only way
    CALL FUNCTION 'CU_READ_RGDIR'
        EXPORTING
          persnr          = p0001-pernr
        TABLES
          in_rgdir        = it_rgdir
        EXCEPTIONS
          no_record_found = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    check whether "Pay date for payroll result" with in Start Date and
                  End date, and "Reason for Off-Cycle Payroll" is initial
      LOOP AT it_rgdir WHERE paydt >= v_begda
                             AND paydt <= v_endda AND
                             void IS INITIAL
                             AND ocrsn IS INITIAL
                             AND srtza = 'A'.
        v_seqnr = it_rgdir-seqnr.
    ENDLOOP.
    Hope this helps.
    Thanks
    Kiran

  • Function module to get the configuration of Individual objects

    Hi all,
    Is there is any std function module to get the data of individual object configuration.
    In table COM_TA_R3_ID, I can able to get the PRODUCT_GUID (for material and serial number) and I dont know how to get the configuration of the product by using the PRODUCT_GUID.
    Pl  through some light on this.
    Regards
    A.Sureshbabu.

    Hi,
    You can get the item configuration using FM CRM_CONFIG_READ_OW.
    This is used to read the product configurations for IPC calls.
    Just pass the configured item guid and it will return the configuration data.
    Use FM CRM_PRODUCT_I_READ_OW to get the product configurations but this FM checks whether any item has this product guid.
    Regards,
    Arun Kumar
    Edited by: Arun Kumar on May 12, 2010 10:20 AM

Maybe you are looking for

  • SL-510 - TYPE 2847-BWG memory support 8GB dual , With windows 7 64-bit

    hello all i am new on this site and i want to ask about my lenovo thinkpad SL-510 TYPE 2847-BWG  . i have read Detailed specifications  in  the  site of lenovo about my  laptop model  ( i attch the link ) http://support.lenovo.com/en_US/product-and-p

  • Macbook pro heats up after installing lion

    Hi My macbook pro 15 inch 2,66 Ghz 4 gb 1067Mhz DDR3. makes al lot of fan noise since i've installd os lion. Im sure it was absolutely scilent before. If i run just safari and mail it makes a lot of noise as if im working on a heavy file in Photoshop

  • Computer running really fast - eats up battery

    I am having a problem with my mac every Monday - It begins to run very fast and the fan starts running and then what was a full battery (5+ hours) drains to 1 yo 2 hours and the entire computer slows down. Could there be a program set to run at this

  • Updates not work through app store

    SINCE UPDATING TO MOUNTAIN LION , WHEN I UPADTE SOFTWARE THROUGH THE APP STORE IT ALWAYS COMES UP NO UPDATES AVAILABLE......BUT I KNOW THEY ARE AVAILABLE....please help

  • Attachment for Euipment

    Dear All, Can anyone tell me how to add attachment to an equipment via IE02? I didn't have much time to search for it. Best regards,