Deriving Planning Folder Technical Name From User-Exit

Dear Colleagues,
For those of you who know ABAP, do you know if it is possible to determine the technical name of a planning folder from within a user-exit (i.e. planning function that has been executed from within a planning folder)?
Customer states: They would like to use a Planning Folder, and invoke a planning function of type user-exit (i.e. via button in folder), which will execute an ABAP that has a case statement for conditional execution of steps, based upon the technical name of the planning folder that invoked the call.
Thank you in advance for any guidance or feedback you may be able to offer.
-M

Hi Michael,
Write this code in the exit function
FIELD-SYMBOLS: <fsl_class> TYPE REF TO cl_upb_pm_applc.
  DATA:          name(50),
                 plan_folder TYPE upb_y_ps_name.
  name = '(SAPLUPB_PM)gr_applc'.
  ASSIGN (name) TO <fsl_class>.
  IF sy-subrc = 0.
    CALL METHOD <fsl_class>->get_active_pm
      RECEIVING
        r_pm = plan_folder.
  ENDIF.
Glad I could be of help to the mastero.
Let me know if it worked.
thanks

Similar Messages

  • Sending mail to external mailid from user exit EXIT_SAPLEBNF_005

    Hai ALL,
    iam facing problem with sending mail to external id from user exit exit_saplebnf_005 , this user exit for ROLE Determination of releasing of PO .
    in this user exit i passed a user name for this role from one z table.
    through workflow the mails are send to workplace of resposible person maintained in ztable.
    now user requirement is they want some intimation in their outlook for they got mail in workplace .
    can anybody help me.
    Thanks .
    sushmita.k

    they can either define automatic forwarding in their SAP office to external e-mail OR they can set their external e-mail as preferred method of communication and they should receive mail to their external mailbox assuming that sending to external mail is supported in your system (check with BASIS folks).

  • Table for Valuation Price from USER EXIT - Cost Estimation

    Hi All,
    Can you let us know from where the system picks the price for VALUATION PRICE from USER EXIT when we have following setting in valuation variant
    1.Valuation Price from USER EXIT
    2.Price from Purchasing Info Records
    3. Planned Price 1
    Sub Stratergy.
    1.Effective Price from Purchase Order
    2. Net Quotation Price
    3. Gross Quotation Price.
    Now when we execute CK11N for a material, the system displays a cost price as 316 Euro/ unit.
    But Standard price is 290 euros, info record price is 294 euros & planned price 304 euros.
    Our previous cost estimation ( period 1, current period is 5) was 316 euro/unit (which was not correct), so deleted the cost estimation with CKR1 and try to rerun the cost estimation to update the value (new price), but still the system is picking the old price.
    Can you let us know from where does(transaction code & table) the system is picking the old values.
    In CK11N Material valuation (Valuation tab) its showing as Valuation Price from USER EXIT.
    We have activated Material Ledger with price control "s"and we in ECC 6.0.
    Do suggest.

    Hi,
    Where & how can i find the exit.
    Do suggest.
    Regards,

  • Service name from user level through any query

    Hi
    One of my user want to find the oracle service name through SQL query from user level. This user is not a DBA.
    With DBA privs this querry
    SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME = 'service_names';
    brings the correct result. But user he will not have the access to read the V$PARAMETER table which is part of sys object.
    select sys_context('USERENV','SERVICE_NAME') from dual;
    SYS_CONTEXT('USERENV','SERVICE_NAME')
    SYS$USERS
    this query is not giving my the correct result. Is there any way we can grab the service name from user level.
    Your cooperation is highly appreciated.
    Rao

    select sys_context('USERENV','SERVICE_NAME') from dual;You need to note that the result of the above depends on how you connect to the database. If you connect using NET Service, it should give you the SERVICE_NAME.
    SQL> conn sys as sysdba
    Enter password:
    Connected.
    SQL> show parameters service_name
    NAME TYPE VALUE
    service_names string testdb
    SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
    SYS_CONTEXT('USERENV','SERVICE_NAME')
    SYS$USERS
    SQL> conn sys@testdb as sysdba
    Enter password:
    Connected.
    SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
    SYS_CONTEXT('USERENV','SERVICE_NAME')
    testdb
    SQL> conn scott@testdb
    Enter password:
    Connected.
    SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
    SYS_CONTEXT('USERENV','SERVICE_NAME')
    testdb
    SQL> conn scott
    Enter password:
    Connected.
    SQL> select sys_context('USERENV','SERVICE_NAME') from dual;
    SYS_CONTEXT('USERENV','SERVICE_NAME')
    SYS$USERS
    SQL>
    So you need to understand the use of sys_context

  • Client proxy from user exit

    I am invoking a client proxy from user exit (user exit is invoked in update task). Is there any red flags I need to be aware of.
    Proxy takes a while to execute and till that time, My original document does not get updated.

    Hi Kris,
    If it gives u Timeout error then only data will not be posted and it will  be an issue.
    If data posted from proxy then check in SXMB_MONI in Ecc side.
    Regards,
    Phani

  • How does the production system take the benefit from user-exits.

    How does the production system take the benefit from user-exits.

    and it is not the production system that benefits. its the company and the people working with SAP that benefits from the user exits which allow SAP to be altered for the company specific situations.

  • IDoc from User Exit

    Hi,
    Can you please give some idea or some useful links for information on generating IDocs from User Exits.
    For example, while creating a Sales Order I need to trigger an IDoc with the document number, plant, partner functions, and netvalue to the PI system. Please give some inputs for the same.
    Regards,
    Renjith

    Make the settings for IDoc processing (partner profiles, ports, destination, etc) fill the IDoc structure and call function module master_idoc_distribute  
    Also have a look at documentation:
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/78/21783151ce11d189570000e829fbbd/frameset.htm

  • How to call custom screen from User exit?

    Hai,
    I have to call a custom screen from user exit include after the delivery save.
    Depends on the data in the delivery,
    if the data satisfies certain conditions I will call the screen otherwise no.
    Could any one please tell me how to do this?where to create screen & how to link it here?
    Regards,
    Bhaskar.

    Hi,
    Please check with the following Enhancements -
    V50PSTAT  - Delivery: Item Status Calculation 
    V50Q0001   - Delivery Monitor: User Exits for Filling Display Fields
    Rewards if it helps
    Regard
    Goutham

  • Get hierarchy name in user-exit from variable

    Hi everybody
    I have a WebTemplate with different queris. The user can select the costcenter in the beginning. In a further query of the template I show all the orders regarding that costcenter. But with this concept I block all the orders with one user executing the template.
    So now I want to select the orders that belong to the selected costcenter in a user exit (with a variable). This works fine when the user selects a costcenter.
    But it is also possible that the user selects a higher node of the costcenter hierarchy. How can I get all the orders that are connected to a costcenter node?
    So far I thought that I have to get all costcenter nodes that have the selected node as a parent (etc..) in the hierarchy table. But how do I find out which hierarchy is used by the query? I get the Variable name loc_var_range-vnam. And I know which table the hierarchy is in. But how do I find the correct HIEID?
    or does anybody have a better suggestion to solve my problem?
    Thanks in advance.
    Christophe

    Hi Christophe,
    I've written a code for finding the name of hierarchy using the node.
    It's little bit big code, if send ur email id i can pass it to you.
    hope that helps you.
    regards
    rajesh

  • How can I get the No. of package and requesting system name in user exit?

    Dear all,
    Is there anybody knowing how to obtain the extracting package number and requesting system name in the user exit "EXIT_SAPLRSAP_002" ? here is detail on my questions as below:
    For package number. If extracting 100,000 records of 0MATERIAL_TEXT , and the package size is 20,000, then there are 10 packages, when executing the user exit, how can I know which package I am extracting on?
    For requesting name, when executing the user exit, how can I know the logical system name from which the extraction request is sent?
    Thanks.
    best regards
    Patrick

    Hi Mansi,
    Thanks for your quick response.
    The background of this requirement is, in the datasource 0material_Plant_Att, we added two fields in the extraction structure, one is variable price, another is previous year's variable price, which need to be obtained by searching data KEKO & CKIS in the user exit, these tables have the huge data volume, in each data package, the user exit needs to be executed once, so the heavy searching needs to be done once, consequently, the total running time of this request including several data packages is very long. In order to improve the performance, we design the following logic:
    1. Create the temporary tables YCKIS & YKEKO in R/3.
    2. Run BW request in BIW.
    3. In R/3, If this is first data package of this request, delete all data in YCKIS & YKEKO, then search the data from CKIS & KEKO ( Average 20 million records), then insert these data into YCKIS & YKEKO ( Average 0.2 million records). 
    4. In R/3, if this is not first data package of this request, then search the data directly from YCKIS & YKEKO.
    You can see in the above, in the step 4, the data searching performance can be improved significantly due to reading data from temporary table, this is why I need to know the No. of data package. In addition, apparently, it can not be done in BIW side since the performance issue is in the user exit rather than in BIW. Also it is very difficult to setup one counter to deliver this since we do not know when to reset the counter. For example,
    - Assuming there are 3 data packages.
    - 1st day, we schedule one request from BIW, in R/3,
       -> At 1st package, counter = 0+1=1
       -> At  2nd package, counter =1+1= 2.
       -> At 3rd package, counter = 2+1= 3, then reset counter = 0 for next request.
    Question 1:  How can we know the 3rd package is last one?
    Question 2: If during the 2nd package, the extraction job is cancelled exceptionally, the counter value is 2 not 0, then for the next request, the data searching is not correct, right.
    Hope the above is clear, and apology this email is too long.
    Thanks.
    best regards
    Patrick

  • Passing data from user exit to workflow.

    HI,
    Please consider the below scenario.
    In the user exit 'MV50AFZ1' I have created an include in the form 'USEREXIT_SAVE_DOCUMENT_PREPARE.'.
    In this include based on some certain conditions a workflow is triggered.
    I am using the function module 'SWE_EVENT_CREATE' to trigger the workflow.
    Now the requirement is to pass some data from this user exit ('USEREXIT_SAVE_DOCUMENT_PREPARE') into the workflow.
    Could someone please explain me how to pass this data from the user exit into the workflow ?
    Thanks in advance.
    With regards
    Abhishek

    Hello everybody,
    Thanks a lot for your responses.
    I am using the fuction module 'SAP_WAPI_CREATE_EVENT' to trigger the workflow, I am also able to pass the delivery number through the paramater 'OBJECT_KEY' of the function module in to the workflow container.
    But I am unable to pass the line item number and the material number into the workflow.
    I am following the below process:
    I have defined a stucture ZST_DELIVERY containing the POSNR and MATNR in the data dictionnary.
    I have pouplated the internal table of this structure inside my user exit.
    Then I m passing the values of the above internal table into another internal table - 'Container''which is of structure type 'SWR_CONT'.
    And I am passing the internal table 'Container' into the paramater 'INPUT_CONTAINER' of the function module 'SAP_WAPI_CREATE_EVENT'.
    And in the workflow I have created a container 'ST_DELIVERY' which is of the structure ZST_DELIVERY and I have made it 'import', 'export.'
    And in my business object ZLIKP in the custom event CheckPrice I have defined a paramater 'ST_DELIVERY' of the structure  ZST_DELIVERY and I have made it multiline.
    And in I have binded my workflow container 'ST_DELIVERY' and the ZLIKP paramater with the same name.
    Please do let me know if the above steps that I have followed is correct.
    Please do let me know if any further information is required.
    Thanks in advance,
    ~Regards
    Abhishek

  • Triggering a smart form from User exit

    Hi Gurus,
    I need to trigger a smart form from a user exit.
    The tcode name is COR1.there is a exit for this tocde.
    This exit should be used to trigger the smart form.
    User exit to be executed upon saving the Process order number.
    Thanks in advance.
    Edited by: vinay raj on Apr 13, 2009 9:38 AM

    Hi,
    You can write a Custom program i.e. the driver program for your smart form.
    And submit that program in the exit. i.e. use the submit statement to run that program.
    I hope this might help you.

  • Help on how to assign a field as mandatory in MIRO and name of user exit

    Hi all,
    the requirement is...
    In MIRO,the Incoimg invoice should not be posted without an empty field of amount(WRBTR) in the Basic Data.Currently as per std,it's not a mandatory field and can be posted by not entering any amount in that.So, either we have to make it as a mandatory field or should restrict not to saving the data if posting of empty field.(Not giving any amount)***seems,it tells the user to give the amount as mandatory.
    How to do this.....if its coming under the USER Exit object...pls post both how to get the std program and enhancement assignment(it asks while creating user exit in CMOD) also for user exit.
    thanks & regards
    sankar.

    Hi,
    Double click the screen number in the table maintainece generator for which you want to make the field mandatory. Goto element list tab, in that goto the special attributes tab, there you change the input column value of the field to required from the drop down list and save, activate. Now the field will be mandatory in the table maintainence screen.
    OR
    1) Make the field as a KEY field in the table, If Possible.
    2) If the field can't be made as a part of the key field, then you have to create Event for the Table. Goto the table maintenance generator. Goto Environment->Modification->Event and add your logic in the required event.
    Make change in the Screen will not help i think because whenever the Table maintenance is regenerated, the changes will be reverted back.
    Reward points if found helpful...
    Cheers,
    Chandra Sekhar.

  • Inbound idoc values when updated from user exit not saved

    I'm trying to process some user exits of an inbound idoc from WE19.
    The values get correctly populated to IDOC_DATA internal tables of IDOC_INPUT_ORDRSP function module in debug kode
    but when the new idoc is generated from WE19 , those segment values (populated by exit) are not shown/saved.
    The user exit is EXIT_SAPLEINM_007.
    Is it not possible to populate segment values of inbound idocs from using user exits. If yes , then during testing using WE19 , every time a new idoc is created it should display those values into the concerned segments. Please help.

    Hello,
    yes is possible it ...
    I think the problem is:
    or
    you have something wrong when to append the new line on internal table
    or
    the exit used is not correct: read the documentation on EXIT_SAPLEINM_0**

  • Update infotype from user exit

    Hi,
    My requirement is to update a infotype from a user exit. I have a internal table with some records created in the user exit pbas0001. Now i need to update these records in the infotype 2001(absences). I tried using HR
    INFOTYPEOPERATIONS directly from the user exit and it didn't work. If i create a include program and create a subroutine within the include program and call it in the user exit still i am getting a error message. How can update the infotype from the user exit.
    Can someone send the example code for how to export the internal table from the user exit and import it in another program and update the infotype from that prgm.

    Put the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
    ~Suresh

Maybe you are looking for

  • Using a dynamic variable in the Import command of a Method call

    Hi, I am trying to make a Method call fully dynamic. I have found out how to make the Method name dynamic, but I am having trouble figuring out how to make the Importing statement dynamic. in my code below:       CALL METHOD o_main->(v_call)        

  • How to set a different smtp in and out on the same server

    Hello, I got an xserve on 10.5.6 and the ethernet ports are connected to two differents networks. One is on the local network (192.168.0.5) and the other on a wan. The lan is on ADSL box that is also the router. I would like to receive my email from

  • Does a flex ios app support international characters?

    does a flex ios app support international characters? i just built an app using flash builder 4.6 and the ios 5.1 sdk... and my text fields won't show international characters. is this supported? Also... i'm embedding the arial unicode font... and it

  • Exit or BADI when Tax Calculation in MIRO from Purchase order

    Hi Gurus, I Need a Exit or BADI when Tax Calculation in MIRO from Purchase order. The problem is the tax is automatically calculated from tax code in PO but I want it to be calculated from PO condition. Is there any exit available by which I can modi

  • Wrt400n to get third party ddwrt support

    Since this router is simlar to the 160 /610 models and proven to be a fast and hardy model  the brain at ddwrt has decided to look into making it run on this model. Porting it over shouldn't be too hard because of simlatries in the models and the fir