Looking for a sort of "activity code" in transactions ME51N/ME52N/ME53N

Hi all experts, got an - I hope - interesting question to ask you.
I have an user exit that is executed on every step done in creation/modify of a Purchase requisition. In this code (custom), executed from the transactions ME51(n)/ME52(n) and ME53(n) there's something like:
GET PARAMETER ID 'BAN' FIELD r_banfn. "Purchase Requisition number
GET PARAMETER ID 'BFC' FIELD r_frgab. "Release strategy
r_banfn should contain the number of the purchase requisition I'm working on. So far, so good.
The problem is that if in ANY transaction I press the New Document button, I can notice in debug that r_banfn contains the number of the purchase requisition that WAS active before pressing the "create new" button.
That's not good because that r_banfn value is then used to some checks, and should then be blank in case of creation of a new purchase requisitions.
I'm then asking you if there's a way in my user exit to distinguish between the two cases, which are:
-1- I'm modifying an existing purchase requisition (so, the field in r_banfn IS correct);
-2- I'm CREATING a new document (so, r_banfn value is NOT correct and should be set to blank).
This distinction must be coded into the previously cited user exit and should affect ME51(n), ME52(n) and ME53(n), from which the user can either create a new RdA or modify an existing one.
We tried to manage the situation as follow, but without success:
IF NOT r_banfn IS INITIAL.
  CALL FUNCTION 'ENQUEUE_EMEBANE'
       EXPORTING
            banfn          = r_banfn
       EXCEPTIONS
            foreign_lock   = 1
            system_failure = 2
            OTHERS         = 3.
  IF sy-subrc NE 0.
* Can't lock --> means I'm actually working in modify mode on it
* leave it as is
  ELSE.
* locked --> that means I'm not working on this purchase requisition
* first dequeue the locked purchase req, then set r_banfn to blank.
    CALL FUNCTION 'DEQUEUE_EMEBANE'
         EXPORTING
              banfn = r_banfn.
*   clear the variable -> I'm in CREATE mode.
    CLEAR r_banfn.
  ENDIF.
ENDIF.
The code is quite self-explaining but doesn't work because it seems that the "enqueue" phase goes ok even tho we're working on modification on the purchase requisition.
I'm guessing if there's a sort of "activity code" (create? modify? view?) I can catch @ runtime to solve this task.
Thanks in advance, as usual
Matteo
Edited by: Matteo Montalto on Mar 19, 2009 5:15 PM
Sorry, I edited the title in order to make it more explicative. :-P

>
Hi Sandipan, sorry for the late, I tried to manage this task but without success.
The user exit I'm working on in EXIT_SAPLBBPK_001.
FUNCTION EXIT_SAPLBBPK_001.
*"*"Lokale Schnittstelle:
*"  IMPORTING
*"     VALUE(IM_BBPDECDATA) LIKE  BBPDECDATA STRUCTURE  BBPDECDATA
*"     VALUE(IV_MANU_PROF) TYPE  MANPRC OPTIONAL
*"  CHANGING
*"     VALUE(CH_PROFILE) LIKE  T160EX-EPROFILE
  INCLUDE ZXBBPU04.
ENDFUNCTION.
It includes ZXBBPU04, in which I have to understand if I'm working on a Purch. requisition in MODIFY mode or in CREATE mode.

Similar Messages

  • Screen exit MEREQ001- for Transactions ME51N/Me52N/ME53N

    Hi,
      I have implemented the Enhancement MEREQ001 to add a new tab for Purchase Requistion screen.
    Requirement for me is to show the same data in the newly added tab for all line items and also to save the same data in EBAN table.
    I am facing a problem while saving the data. In EBAN table, the data was saved for all line items. But the custom added field values are saved for only the line item displayed.
    I ll explain with an example for better understanding.
    I have created a PR with 2 line items ITEM1 and ITEM2
    When i saved the data when ITEM1 is displayed, EBAN have custom added field values for ITEM1 but not for ITEM2.
    The same way, if I save data when ITEM2 is displayed, EBAN has custom added field values for ITEM2 but not for ITEM1.
      Now, my requirement is to get the both line items ITEM1 & ITEM2 updated with custom added field values in EBAN.
    Has anyone faced this kind of issue.
    Please reply back.
    Regards,
    Sreekanth.G

    Hi,
    Use BADI 'ME_PROCESS_REQ_CUST' to copy item 1 custom fields data to item 2 custom fields data.
    Regards,
    Hemanth

  • I'm looking for examples of CAN control code with LabWindows CVI

    I'm looking for examples of CAN control code with LabWindows CVI.

    Hi,
    The NI-CAN driver installs some examples for both the frame API and Channel API (NI-CAN 2.0).
    The typical installation directory is:
    C:\Program Files\National Instruments\MeasurementStudio\CVI\samples\nican.
    It might change depending on where you installed CVI.
    DiegoF

  • Activate text for Cost Center for ME51N, ME52N, ME53N

    Hi, experts
    As a requirement on T/C ME51N, ME52N, ME53N is needed to activate on "Account assignment" tab, the text for Cost Center field, how can I do this?
    Thanks in advance.
    Is there any path or exit could help with it?

    I need to add on Tabstrip "Account assignment" for fields
    CO Area and Cost Center text field description ( right side ) for each one.
    How can I do this? Thanks in advance.

  • Looking for Web2Py or Python interfacing code to DI Server

    Dear All,
    I am looking for a Web2Py (python) code sample that can interface or talk with DI Server of SAP B1 say through win32 python API SOAP interface.
    Some sample to get me started in the right path to connect to DI server, login and access simple SAOP service.
    Thank you very much.

    I don't know if you'll find an exact sample here - you might be lucky of course, but I think it's a bit specific.
    Instead, I would focus on learning the two separately; look on google for some examples of writing SOAP interfaces using Python and then also do some DI server examples.
    The Python I can't help with, but for DI server you can check the SDK helpfile and go to Developers Guide -> DI Server and then under this you have lots of good sections:
    System Messages: Shows how to login and get the session ID
    Data Manipulation Messages: Shows how to add/update/remove objects in the DB
    DI Server application gives instructions on how to set it up.
    Hope it's useful, might be worth keeping thread open to see if anyone has done this before though

  • Looking for best jQuery.ajax & JSON code validators for VStudio 2013 SP Dev

    Hi All,
    As a new SharePoint 2013 developer I’m looking for the best Visual Studio 2013 Intellisense Extensions or code validators for:
    1. jQuery.ajax
    2. JSON
    3. JSON.stringify
    The reason for this is I sometimes make silly syntax mistakes that take hours to correct. For example the text marked in green below show
    the small errors I made yesterday, and got no help from Visual Studio.
    ************************Start Of Code************************
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/SP.WebProxy.invoke",
    type: "POST",
    data: JSON.stringify(
    "requestInfo": {
    "__metadata": {
    "type":
    "SP.WebrequestInfo"
    },        //should be R
    "Url":
    "http://services.***********/?$format=json",
    "Method":
    "GET"
    heaaders:             
    //two a's{                                                                                                       
    "Accept":
    "application/json;odata=verbose",
    "Content-Type":
    "application/json:odata=verbose",   
       //should be ;    
    "X-RequestDigest": $("#__REQUESTDIGEST").val()
    call.done(function
    (data, textStatus, jqXHR) {                   
    if (data.d.Invoke.StatusCode == 200) {                          
    var categories = JSON.parse(data.d.Invoke.Body);
    var message = jQuery("#message");
    message.text("********* service:");
    message.append("<br/>");
    jQuery.each(categories.value(
    function (index, value) {     //should
    be ,    
    message.append(value.*********);
    message.append("<br/>");
    } else {
    var message = data.d.invoke.body;   
                //should be capital letters
    alert("Call failed. Error: " + message);
    //should be errorThrown
    call.fail(function
    (jqXHR, textStatus, errorThrow) {                     
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    ************************End Of Code************************
    Visual Studio didn’t highlight any of the errors I made. The only help I got was from a message
    box with the message “invalid character” (see screenshot below).
    Even with Fiddler it was impossible to see where the errors were. Last week I had a similar problem with a much larger block of code. One syntax mistake that was not highlighted by Visual Studio cost me hours of lost time.
    I hope you can help
    CEStar

    Hi,
    As this question is more relate to Visual Studio, I suggest you post it to Visual Studio Development Forum, you will get more help and confirm answers from there.
    What’s more, I have seen a similar post from you in the link below, please check whether Crystal’s post is helpful:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/dbde39a0-18a5-4e15-9b5b-6b41cc4350d0/help-finding-the-best-intellisense-extensions-or-code-validators-for-visual-studio-2013?forum=visualstudiogeneral
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • Look for JDeveloper Tutorial with samples code

    Hello All ,
    my name is Ron ,
    i'm new user of JDeveloper i'm looking for a place to start a tutorial "How to use
    the JDeveloper ? " with samples code .
    from very basic use ( Hello world program ) to addvanced programming ( Like GUI Forms and Database )
    please show me links where to start learning from
    thanks in advance

    The tutorials in the JDeveloper help system are a very good place to start. Choose Help | Help Topics from the JDeveloper menu then click the Tutorials book in the Help navigator. The tutorials are also available on OTN, see:
    http://otn.oracle.com:8877/jdeveloper/help/
    You may also find the 'how to' documents and samples on OTN helpful:
    Oracle9i JDeveloper How To Documents
    http://otn.oracle.com/products/jdev/howtos/content.html
    Oracle9i JDeveloper Sample Code
    http://otn.oracle.com/sample_code/products/jdev/content.html
    Hope this helps.
    - jon

  • Primavera P6.70 - Group & Sort by activity codes

    I have two activity codes(Area/Department & Step) to my project and assinged all activities under each of these codes. but when i do organize, activities are organized only against Area/department and not against Step. what could be the reason? Area/department is Level 2 & Step is Level 3

    In the Group and Sort menu do you have it grouped by:
    Project
    Area/department
    Step
    When you highlight an activity and go to the codes tab, do both activity codes show up?
    Have you hit F5 to refresh?
    Michael

  • Obrigatory  Number Service  on ME51N,ME52N,ME53N for company or plant

    Staff
    I wonder if it is possible to make the number of mandatory service as a company or plant in transaction ME51N and ME52N and ME53N.
    I used trransação OLMSRV - Set Screen Layout but it makes the number of mandatory service for all the company's and plans.
    Sorry for my english

    >
    Hi Sandipan, sorry for the late, I tried to manage this task but without success.
    The user exit I'm working on in EXIT_SAPLBBPK_001.
    FUNCTION EXIT_SAPLBBPK_001.
    *"*"Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(IM_BBPDECDATA) LIKE  BBPDECDATA STRUCTURE  BBPDECDATA
    *"     VALUE(IV_MANU_PROF) TYPE  MANPRC OPTIONAL
    *"  CHANGING
    *"     VALUE(CH_PROFILE) LIKE  T160EX-EPROFILE
      INCLUDE ZXBBPU04.
    ENDFUNCTION.
    It includes ZXBBPU04, in which I have to understand if I'm working on a Purch. requisition in MODIFY mode or in CREATE mode.

  • Looking for list of standard Active Directory attributes

    Hey all,
    where can I find a standard list of active dir attributes? I'm not too familiar with AD, so I'd like to know my standard options which I can query.
    I'm going to read all the adler_steven posts, so that should get me a little more aquatinted with JNDI, but I'll be back to ask some more questions!
    Thanks,
    ryan

    Thanks all.
    I got all the info I need.
    A main point to keep in mind is that connecting & searching through a OpenLDAP server is much different than connecting to an AD server.
    I couldn't find much info on the major differences, so it was tough for me to figure.
    A good adsi browser helps more than the typical LDAP browsers that are available. Also, make sure you know of the out-of-the-box settings for AD win 2003 server.
    thanks again all!
    ryan.

  • Look for visual basic 6.0 code for measuring audio signal in PCI 6052E card,such as THD(total harmonic distortion),signal-to-noise etc.

    Hope receive NI measurement studio with visual basic engineer's favor in a early date!

    This is just the nature of the while loop in the VB code. The processor is going to execute this loop as fast as possible. The DoEvents in the loop allows the processor to perform other operations if needed. Try opening MAX or some other program and drag windows around at the same time the code is executing. You will notice that the processor load will shift away from the VB6 program to other processes.
    If you want to avoid this try adding a function similar to sleep in the while loop. However, this will slow the speed of your program and I would not recommend it, because the program is designed to run as fast as possible, but still allow other programs to execute.
    I hope this helps.
    Joshua

  • SOS:     Exit for ME51n/ ME52n/ ME53n/

    hello erverybody,
    at First i would like to implement the exit mm06e007 but i have no idea how to do it!!
    have someone an example, coding or Tips,... ??
    Second Problem :
    how can I Overwrite the <u>Tapstrips name</u> using exit MEREQ001 ??
    please i need a help!!
    best regard
    dani.

    Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:
    1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.
    2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.
    BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)
    Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.
    Please go through the following link which will help you understand the exits in a much better way:
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm
    http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
    http://sap.niraj.tripod.com/id21.html
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
    http://www.sap-img.com/ab038.htm
    User Exits.
    http://www.erpgenie.com/sap/abap/code/abap26.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    customer exits
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
    Menu Exit.
    http://www.sappoint.com/abap/spmp.pdf
    http://www.sappoint.com/abap/userexit.pdf
    http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
    http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
    USER EXIT
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sapgenie.com/abap/code/abap26.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
    http://www.easymarketplace.de/userexit.php
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sappoint.com/abap/userexit.pdfUser-Exit
    http://www.sap-img.com/ab038.htm
    http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
    http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
    http://www.sap-img.com/abap/what-is-user-exits.htm
    http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
    Rewards if useful.........
    Minal

  • EXIT_SAPLMEREQ_003,006,008 FOR ME51N, ME52N,ME53N

    I have to add a custom  filed to EBAN table. Can anybody help me with the function exit_003,006,008 regarding code.
    Functional Design:
    Short description
    Please enter a new
    numeric field “Budget” (ZZ_BUDGET) on purchase requisition item level (EBAN) on
    writer Customer Data and on purchase
    order item level (EKPO) on writer Customer Data
    Please place it above field Project Name.
    Make sure that the description “Budget” is available in all languages.
    As an amount of money
    should be entered, please display field EBAN_WAERS in the Purchase requisition
    and EKPO_WAERS in the Purchase order behind the new Budget field and format the
    new field in the same way as NETPR (###.###,##).
    If somebody filled the budget field in the purchase requisition, it needs to be shown in the purchase order.

    In Include ''ZXM02TOP'.
      TABLES:ci_ebandb.
    In EXIT_SAPLMEREQ_001 ->    INCLUDE ZXM02U01
    DATA :  lw_preq    TYPE mereq_item,
          CALL METHOD IM_REQ_ITEM->GET_DATA
        RECEIVING
          RE_DATA = W_PREQ.
    * Here Populate the   ci_ebandb structure here with value from W_PREQ
    Example ci_ebandb-zzcustom_fld = W_PREQ-zzcustom_fld
    In Exit - EXIT_SAPLMEREQ_003 -> Include ZXM02U03
       DATA: w_preq TYPE mereq_item.
    * Assign value from ci_ebandb to W_PREQ
    Example W_PREQ-zzcustom_fld = ci_ebandb-zzcustom_fld.
       CALL METHOD im_req_item->set_data
          EXPORTING
            im_data = w_preq..
    EX_CHANGED =  'X'.
    Make sure your screen field should have the name with ci_ebandb.
    Additionally you can write PBO and PAI logic for screen 111..
    Let us know any further help.

  • Field in ALV for ME51N/ME52N/ME53N

    Hi.
    I want to include a field in the ALV of transactions for purchase requisitions. I have already enhanced the structure CI_EBANDB with the new fields, so the fields are already in MEREQ3211GRID.
    What else I have to do to have this fields available in the ALV with the "Change Layout" option.
    Thanks in advance.
    Joaquin.

    Hi.
    I want to include a field in the ALV of transactions for purchase requisitions. I have already enhanced the structure CI_EBANDB with the new fields, so the fields are already in MEREQ3211GRID.
    What else I have to do to have this fields available in the ALV with the "Change Layout" option.
    Thanks in advance.
    Joaquin.

  • Additional Data in Header Level for ME51N / ME52N / ME53N

    Dear Gurus,
    I have one requirement related to apply enhancement for additional fields in purchase requisition header level.
    After searching a lot , I dint found any solution for this.
    Does anybody have any solution for this.
    Regards,
    Shibashis.

    I need to add on Tabstrip "Account assignment" for fields
    CO Area and Cost Center text field description ( right side ) for each one.
    How can I do this? Thanks in advance.

Maybe you are looking for

  • Cisco ISE and WLC Access-List Design/Scalability

    Hi, I have a scenario whereby wireless clients are authenticated by the ISE and different ACLs are applied to it based on the rules on ISE. The problem I seems to be seeing is due to the limitation on the Cisco WLC which limit only 64 access-list ent

  • OLAP CUBES

    Hi I am a little confused. I am trying to build a cube with 3 dimensions COUNTRY,ORDER and PVPERIOD. I have mapped the dimensions to the tables . The country table is WD_AUTO_ORDER_GEO. The order table is WD_AUTO_ORDERS and PVPERIOD is WD_AUTO_ORDER_

  • Doubt in inserting Date and time into the table

    Hi i have created a table with two columns "Order_ID" and "Order_date" as create table test order_id integer, order_date date default sysdate Now i insert one row as insert into test(order_id) values(1); now i get the output as ORDER_ID ORDER_DAT 1 0

  • Code 101

    i have downloaded cs6 trial off the web site but after takeing 7 hours to download it has the error mesage 101  check disc space i have 85 gig free

  • Trial version of Adobe Acrobat Pro v9 requests serial number

    I have installed Adobe Acrobst Pro V9 a total of 3 times now, being careful to ensure that I select "Install Trial Version" each time. However, every time I open the programme it requests a serial number and I cannot get past this stage. I did also d