How to find the profit center group for a profit center?

How to find the profit center group for a profit center?

Hi,
try this also
In order to pass the setid parameter of the FM, you have to concatenate the following things
Setid + KOKRS (Controlling area) + Profit Center Group into one variable.
In my example below, I have declared as constants and concatenating to gv_setid.
gc_01016 is the set id for profit centers
gc_kokrs is the controlling area
gp_pprct is the Profit Center group entered in the selection screen.
You will get KOKRS value from the cepc-kokrs.
data :   gc_0106(4)   TYPE c VALUE '0106',
           gc_kokrs      LIKE cepc-kokrs VALUE 'ABCD'.
           gv_setid          LIKE sethier-setid,
           gt_set_values_1   LIKE setvalues OCCURS 0 WITH HEADER LINE.
  CONCATENATE gc_0106  gc_kokrs gp_pprct INTO gv_setid.
  CONDENSE gv_setid.
  CALL FUNCTION 'G_SET_TREE_IMPORT'
    EXPORTING
      client                    = sy-mandt
      fieldname                 = 'RPRCTR'
      langu                     = sy-langu
      setid                     = gv_setid
      tabname                   = 'GLPCT'
      no_table_buffering        = 'X'
    TABLES
      set_values                = gt_set_values_1
    EXCEPTIONS
      set_not_found             = 1
      illegal_field_replacement = 2
      illegal_table_replacement = 3
      OTHERS                    = 4.
By using the above FM you will get the values into gt_set_values1 once sys-subrc value eq 0, it is internal table which consists of all the profit centers for the proft center group.
Regards,
Venkatesh

Similar Messages

  • How to find suitable( existing) function group for a Function Module ?

    How to find suitable( existing) function group for a Function Module to be created?
    This is FM for converting amounts to text.

    Hi,
            If you are not sure into which Function group your FM should go in then its advised to create a Function group of your own. Its not advised to create a function module in any other function group unless its owned by you since your FM can get deleted by others or it can get changed.
    Create your own Function group. But if you want to create in an existing FG then best way is to find out the Function Group by searching for suitable existing Function module then see their function group
    Regards,
    Sesh

  • How to find the exact user exit for our requirement?

    Dear Mr. keerthi,
    can you please explain me how to find the exact user exit for our requirement?

    Hi sandip
    There is more than one method in which you can check for user-exits.The following method is used very often.
    <b>How to find the exact user-exit for your requirement.</b>
    1.     You can check the user exists using transaction SE85.
    2.     Repository Information System -> Enhancements -> Customer exits
    3.     You can search the user-exits by package name.
    4.     Double click on each exit name to check the function module exits.
    <b>The procedure to find the package name.</b>
    Execute transaction SE93 
    Enter the tcode of the transaction for which you want to check the user exit.
    Example: if you want to find the user-exit for purchase orders while changing, enter ME22n  and press display.
    You will get to see the package name
    But you need to confirm that the user exit will get triggered at the appropriate event.
    ( example: you might want some validations to be done ON SAVE of a purchase order)
    <b>Checking if the user-exit is getting triggered or not.</b>
    1.     Open the user exit function module (that you have got in step 4) in Tcode SE37.
    2.     Click on where used button. In the pop up that immediately appears choose only programs .
    3.     You will get a list of programs. Double click on the program name.
    4.     You will get the list of location where this function module user exit is used.
    5.     Place session break points at each of these location ( at each CALL FUNCTION statement)
    6.     Now go to your transaction ( say change purchase order tcode:Me22n) and check if the user exit is getting triggered on appropriate event.
    regards,
    Prasad

  • How to find the appropriate user exit for invoic02 idoc in idoc_output_invo

    Hi all,
    I am new to this community p
    i have issue regarding  the How to find the appropriate user exit for invoic02 idoc in idoc_output_invoic function module.........
    thanks,

    Hi ,
    welcome to SDN.
    You can select the appropriate Customer exit accrding to the available parameters .
    The list of exits available are 
    EXIT_SAPLVEDF_001
    EXIT_SAPLVEDF_002
    EXIT_SAPLVEDF_003
    EXIT_SAPLVEDF_004
    For Example , if you want  to modify the Idoc data(EDIDD) you have to use the EXIT_SAPLVEDF_002. accodingly you can select the user exit according to the avaialable parametres.Use Table MODSAP fto get the Enhancement name.
    Hope this Helps
    Rgds
    Sree
    Edited by: Sree on Jul 23, 2010 12:11 PM

  • How to find the existing request no for Smart form

    Hi Experts,
    plz tell me how to find the existing request no for Smart form in ABAP.
    thanks in advance.
    regards,
    radhika.

    Radhika,
    Choose Goto > Object Directory Entry> Lock Overview On the Initial screen of the "smartforms" transaction, after entering the actual smartform. This would give you the request number for the smartform.
    Regards
    Narasimhan

  • How to find the E-Mail address for my HP 6700? Printer shows E-Print connected.

    I got help on the board about getting a new printer code and the Home Printer page shows that it is on, but now I don't know how to find the E-Mail address for my computer -
    This question was solved.
    View Solution.

    Hi,
    From the printer Front panel, navigate to Setup. Locate and enter Web Services. Aprove any of the steps to enable the service... allow the device several minutes to complete the registration, a page will print automatically with the printer code and the directions to select the email address from hpeprint.com.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to find the right primary key for DSO from Business Content

    According to best practice design, it is reccomended to make a  DSO where all fields from Business COntent Datasources are transferred.
    But, how to find the right primary indeks ?
    Any good suggestions ?
    For many of the Business Content dataflows there are not DSOs present, so ther e is no tip to get from the dokumentations as gfar as I have found.
    best Regards
    Ingrid

    Hi Ingrid,
    Your question will be perfect in case if you are going for a Custom cube.
    You will not have any problem when you create a Datasource in R/3 level even if it is been built on a single table or on view.
    Only point that you want to know how to design my Key fields in ODS.
    This will be purely depends at what level that you want to bring the data.
    Egg:-
    If you run the data source in RSA3 and check for Each GL if you have 10 liine items and you want all the 10 line items to be transfered to BW.
    In this case you need to check what is the unique combination of fields that is making this lineitems to exists as 10.then include all those fields into Your ODS Key Fields.
    This way you can have 10 records for that perticular GL in both sides, by which u will make sure that the data is been completely transfered.
    If in case if you clude your own Key fields then you will get the correct Total in report for each GL but you can't see all those 10 line items.
    For any case you need to figureout how many records that you want to take into BW based on that check the fields that makes it unique and then add them to ODS Keyfields that will solve your requirement.
    I think this will clear your doubt.
    Best Regards,
    VNK.

  • How to find the Adobe barcode name for its corresponding SAP Script barcode

    Dear All,
    We are doing conversions from SAPScript to Adobe forms.
    The barcode used in two sapscript forms are 'BC_CD39' and 'ARTINR' respectively .
    I would like to know the corresponding barcode name to be assigned to Adobe forms as the above barcode names are not present in the Object Library-> Barcode section of Adobe forms.
    regards,
    PP

    >
    Muralidhar Medisetty wrote:
    > Hi,
    >
    > I had an issue, in the transaction F110  Payment advice. They need to adjust the spacing on the cheque printing, which is overlapping the names on the cheque and hence I have forgotten how to find the form name and the driver program of the script. Can anybody suggest me how to find those. Your help will be appreciated.
    >
    > Thanks in advance.
    hey
    NACE is the transaction ..for this u must know the output type..
    Script for Cheque Printing and Payment Advice can be known from Transaction FBZP...
    FBZP -> paying Company Codes -> u will get Script used for Payment Advice
    FBZP -> Pmnt methods in company code -> u will get Script used for Cheque Print
    ....Give points if useful.....
    Edited by: Satyabrata sahoo on Oct 14, 2008 4:42 PM

  • How to find the list of Queries for that have statistics enabled in the sys

    Hi ,
    How to find the list of Queries  that have statistics enabled on them in the system.
    Please help me in this regard
    Thanks
    Maruthi

    hi ,
    I found three options there like
    X - on
    D - Default
    off
    can you please expalin the difference between on and Default
    Thanks in Advance
    Maruthi

  • How to find profit center group for any profit center

    Hello,
    KCH3 is the transaction code.
    When you select ant profit center group and hit enter you will see the entire hierarchy, profit center groups and profit centers belonging to the group.
    Now my question is i have a report where i need to display the hierarchy of the profit center that is fetched, i.e. i am getting the profit centers from FLAGFLEXT (data base) table.
    Now i need to display the hierarchy from the top node till the profit center that is fetched in the report.
    Please suggest, BAPI_PROFITCENTERGRP_GETDETAIL only gives all the profit center groups in one internal table and all the profit centers in one internal table.
    I am looking for a place/ function module or a table that returns the relation between the profit center group and profit center.
    Thank you.

    Hi,
    In Table SETLEAF,
    1. Pass in field SETCLASS as '0106'.
    2. Pass in field SUBCLASS with controlling area.
    3. Pass Profit center in Field VALFROM.
    4. You will get Group name in Field SETNAME.
    Regards,
    Ashok.

  • How to find the maximum of group sums within a specific column using report builder 3.0

    Hi
    For each part number I am trying to find out in which week of a month did the largest daily shipment occur... so using report builder 3.0
    in SSRS 2012 I can find daily, weekly and monthly totals for the units shipped but I am having a hard time thinking through the logic to find the daily max for each week.
    in my data I can have multiple orders/shipments for the same product on the same day.
    The ultimate goal is to set inventory levels
    So..
    In my matrix report I have
    Row groups:
    Classid => Product class
    InvtID => Item Part Number
    Column Groups:
    FiscYr=> Fiscal Year
    PerPost => Month or period the transaction occurred
    Week_period => the week the transaction occurred
    Day_period => The day that the transaction occurred
    The aggregations are 
    Sum(case_shipped) 
    Max(case_shipped)
    The Sum(case_shipped) is working as desired but the Max(case_shipped) is picking out the max amount shipped on any one order when looking
    at the week, month or fiscal period and that is not what I need.
    I have attached a screenshot since a picture is worth more than my words. I have also included some sample data
    I would very much appreciate any thoughts on this. I am guessing that the solution has something to do with using the inscope function but
    I can't wrap my head around how to use it
    Thank you 
    Tom D
    Here is some sample data for Product A
    Invtid Case_ship Trandate    FiscYr   PerPost   week_period        day_period
    A         10           1/1/2104    2014        1    
              1                           1
    A           3           1/1/2014    2014        1  
                1                           1
    A         50           1/2/2104    2014        1    
              1                           2
    A         30           1/3/2014    2014        1    
              1                           3
    A         20           1/9/2104    2014        1    
              2                           2
    A          5            1/9/2104    2014        1  
                2                           2
    A        20          1/10/2014    2014        1    
              2                           3
    A        60          1/10/2104    2014        1    
              2                           3
    On 1/1/2104 I shipped a total of 13 cases
    On 1/2/2104 I shipped a total of 50 cases
    On 1/3/2104 I shipped a total of 30 cases
    On 1/9/2014 I shipped a total of 30 cases
    On 1/10/2014 I shipped a total of 80 cases
    On 1/9 I shipped a total of 25 cases
    I would like to show that in week 1 the maximum number of cases shipped on any day is 50 (1/2/2014)
    I would like to show that in week 2 the maximum number of cases shipped on any day is 80 (1/10/2104)
    I would also like to show that in perpost (month) 1 the maximum
    number of cases shipped on any day is 80 (1/10/2104)

    Hi
    I was able to find a solution
    I built a new dataset in report builder using the same table as before but tried out the "Group and Aggregate" function and for the case_ship
    field I chose "Sum" as my aggregate.... In essence this gave me a very cool and easy daliy sum of the shipped cases. 
    When I used this new dataset and built my matrix report I was able to easily get the max daily shipment for each product by week, month and
    year.
    Tom

  • How to find the name of query for a given report

    Hi All,
    I am having the name of a report and i need to find out the name of query for that report . Plz tell me how to find out the name of the query for a given report.
    Thanks.
    Regards,
    Pooja Joshi.

    Use this FM
    RSAQ_DECODE_REPORT_NAME
    This FM takes program name as I/P and gives Query Name as O/P.
    This FM uses the structure AQADEF to fetch the data.
    Hope this helps.
    Regards
    Vinayak

  • ** How to show the master query group for once in Report??

    Hi
    I've developed a master-detail groups at a report
    The master one has it's repeating frame and the detail one has another repeating frame and put at another page at the layout.
    The porblem is that the master one is shown (the same record) in pages for times equal to the number of the detail records which is own for that master record!
    Example:
    if the master record has got three details then the master data will be show for three times (three pages) at run time and then the page number 4 will show the three detail records.
    How to make the master data to be shown only for once (page number 1 only) and then show the detail three records at the next page (page number 2) at run time???

    Hi,
    the question back is, what you've done for this. At default the master record is only shown once. Could it be, that the master-fields are inside the repeating frame for the details?
    Regards
    Rainer

  • How to find the list of WDAs for IS Retail?

    Hi all
    I did some basic search on SDN to find all WDA components SAP will predeliver on the installation of IS-Retail. I could not find useful links. Does anyone know how to find it? Also would like to know the SAP roadmap on the WDA apps that will be built in the future.
    The idea is when I go to a customer for IS Retail implementation I should be able to tell him if he can get out of the box browser based UIs. Please let me know a way to find it.
    Regards
    LNV

    Hi
    Thanks. Not exactly that I wish to see. Yes I would need to know the technical components but only after understanding at a more broader level what SAP offers in terms of pre built UI (WDA) for retail scenarios. Do you see what I want? SAP offers pre built UI for ESS MSS, what is available similarly for Retail?
    Thanks.
    Regards
    LNV

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

Maybe you are looking for

  • Should Apple punt with RAW and/or DNG support ?

    It seems that Apple is taking a very detailed approach to profiling cameras before adding support to Aperture. Consequently Aperture may always be later than others apps to add new camera support. Also there will always be legacy or specialty cameras

  • Skype for Business groups

    My company uses Office 365 and Skype for Business.  We have several Groups defined in Exchange.  We can add those groups to Skype, but when the groups are updated as a result of turnover, those changes we do in the Exchange group do not flow down to

  • Forms Personalization for multiple Functions

    Hello, I am looking to make a forms personalization to the FORM FNDRSRUN (The standard Submit/View Request Form). This is generally no problem to set up the personalization itself, however FNDRSRUN is referenced as many different FUNCTIONS. It's my u

  • .mov files on ipad1

    my camera takes hd video 1920x1080 24fps this doesnt seem to work on the ipad when i download the video. Is there an app that would allow me to donwload / view this or will i have to change the video mode setting on my camera thanks Ian

  • How is SWAP space and Oracle's Shared Memory related ?

    Platform: RHEL 5.4 Oracle Version: 11.2 I was trying to increase MEMORY_TARGET to 15g. Then I encountered the following error SQL> alter system set memory_max_target=20g scope=spfile; System altered. SQL> alter system set memory_target=15g scope=spfi