How to disable a custom designed Tx code for multiple user at a time

Hii ,
I have designed a screen in module pool for end user to make entries in the screen and when he saves the data is saving in standard table and ztable. the main field in the screen is Batch number..from that batch  number bag number will be generated. and consumed quantity will be saved in that bag no.Bag number will be generated like first 5 digits of batch number and bag number series of that batch number. for example if batch number is 12345 and already 5 times packing is done for same batch..last bag number in the ztable will be 123450005.so next time when user tries to pack using same batch number the new bag number will be 123450006 for batch 12345.Problem here is when user tries to make enrties in that Tx code and at the same time if another user opens same Tx code to make packing for same batch both of them are getting same bag numbers before saving.
I have called Enqueue and Dequeue FM's but still at a time for same batch user is able to do the packing.now my issue is i want to restrict 2 user to use same batch while packing in that Tx code.
I have written following code for enqueue and dequeue technics
data: B_matnr type mara-matnr,
       B_charg type mchb-charg.
data : i_temp type TABLE OF zpackhdr WITH HEADER LINE,
       i_temp1 type TABLE OF zpackhdr WITH HEADER LINE.
move : 1110 to WA_BCH-werks,
       chk_matnr1 to WA_BCH-matnr,
       v_bcharg to WA_BCH-charg,
       vgrade to WA_BCH-grade,
       new_batch to WA_BCH-bagno,
       m_baleno to WA_BCH-baleno,
       b_date to WA_BCH-indat.
APPEND wa_bch to i_bch.
clear b_date.
READ TABLE i_bch INTO wa_bch INDEX 1.
    B_MATNR = WA_BCH-matnr.
    B_CHARG = WA_BCH-bagno.
concatenate  B_matnr B_charg  into
    WA_BCH-objek respecting blanks .
   modify I_BCH from WA_BCH index sy-tabix.
CLEAR: B_MATNR,
           B_CHARG.
call function 'ENQUEUE_EMMCH1E'
EXPORTING
   MODE_MCH1            = 'E'
   MANDT                = SY-MANDT
   MATNR                = WA_BCH-MATNR
   CHARG                = WA_BCH-BAGNO
if sy-subrc <> 0.
endif.
call function 'DEQUEUE_EMMCH1E'
EXPORTING
   MODE_MCH1       = 'E'
   MANDT           = SY-MANDT
   MATNR           = WA_BCH-MATNR
   CHARG           = WA_BCH-CHARG

I do understand what u say...mine is a custom designed screen...when i open that screen i have around 15 input fields in which batch is obligatroy...when i give batch and hit enter all the other fields will be filled automatically picking from the table which are relevant for that batch..for example..material,order etc are picked from table...and bag number field will be generated taking first 5 digits of batch and followed by 0001 if its afirst time entry for that batch....so when a user is opening that screen in 2 different windows and giving details without saving any of the screens...in both screens bag number is generating as 001...and when saving it ..its saving 2 entries with same bag number...so i have created a lock entry for afpo table taking order field...so when a user opens 2 screens with same batch...and giving entries in those 2 screens without saving..he is getting same bag numbers as 001.....now when user saving the first screen and coming to second screen to save...he is gettimg message 'ORDER CURRENTLY BEING PROCESSED'..but after the data gettng saved in first screen,then when he saves the second screen it is getting saved...with same bag numbers as 001.so my issue is here...when he saves first screen and comes to second screen to save it the user should get that error message and should come out of the screen....so that he can make a fresh entry for that batch and bag number will be generated as 002 for that batch...
Regards,
venkat.

Similar Messages

  • How to add a custom PL/SQL code for a button event handler

    Hi All,
    I am a toddler in using Oracle Portal. So please forgive me for my ignorance.
    Q : How do I add a custom PL/SQL code for a button event handler?
    Basically, I would like to write MY PL/SQL function and call it. I could see that we can write "CUSTOM" code as "PL/SQL button event handler" in the form design window. But the question is that it expects only a "call" to procedure. But where do I define the procedure then? If I insert the procedure from the backend, it gets flushed the next time I compile my form.
    Hope I am able to explain my point.
    Thanks in advance,
    Abbas.

    Hi All,
    I am a toddler in using Oracle Portal. So please forgive me for my ignorance.
    Q : How do I add a custom PL/SQL code for a button event handler?
    Basically, I would like to write MY PL/SQL function and call it. I could see that we can write "CUSTOM" code as "PL/SQL button event handler" in the form design window. But the question is that it expects only a "call" to procedure. But where do I define the procedure then? If I insert the procedure from the backend, it gets flushed the next time I compile my form.
    Hope I am able to explain my point.
    Thanks in advance,
    Abbas.

  • How to set a customized search results template for all users

    Hi.
    I know the customized search results views are stored in a file called pne_portal.hda that resides on every user's subfolder in data/users/profiles/...
    Is there a way to set a customized search results template for all users? If it's impossible, is there a way to modify the Headline view? I'm not able to find the resource or template where this view is.
    Thanks in advance.

    I wasn't able to understand what was meant by this post. Therefore, I modified the standard template HeadLine View.
    Columns for this template are defined in the include slim_search_result_table_header_setup (in std_page.htm).
    Here is the modification of the code:
    <$if customTemplateId and not (baseTemplateId like customTemplateId)$>
              <$columnsString = utGetValue("customlisttemplates/" & strLower(customTemplateId), "columns")$>          
              <!-- Modify START by Oracle-->
         <$else$>
    <!-- here add default fields -->
              <$columnsString="dDocName,dDocTitle,dInDate,dDocAuthor"$>
    <!-- here add your custom fields -->
              <$columnsString=columnsString&",xComment"$>
              <!-- Modify END by Oracle-->
         <$endif$>

  • How can I create a folders of apps for multiple users?

    I use several iPads with my students and would like to set up a folder for each student. I want to place "an alias" of each app the student uses in their folder. On my Mac, I can "make alias" and place aliases in seperate folders. How can I do that on my iPad? Thanks!

    You can drag one app on top of another and make a folder. However the limit to this is, for your situation, there can be no sharing of apps....the app Fred can only be in one folder because it's only on the device once.  (so it may not work for what you need)
    and I cannot recall if you can edit the name of the folder.
    Unfortunately, for situations like yours, the iPad was created to be a single user device, so there's really not support for multiple users or multiple levels of access.

  • Applescript: How to run a script once upon logon for multiple users

    I'm deploying a NetRestore image to about 150 Macs which will be using Active Directory and I've designed a custom default user for each new user. However, our system requires a specialized certificate that has to be installed on the local login.keychain for each user otherwise network connectivity is impacted.
    I've tried to use the security command through Terminal to install the certificate, but no matter what combination of commands, I cannot seem to get that to work properly even with an already-created user. While it will often say it's installed, the cert will not actually show up in the login keychain in Keychain Access. And the network connectivity is still impacted.
    So instead, I created a brief AppleScript that just gives the user brief instructions to click "Add" on the prompt for which Keychain to add the cert and then "Always Trust" for the "This cert is not verified" prompt. Then it launches Keychain Access. Originally, I was going to have it actually click the buttons for the user, but I realized trying to get the whole Accessibility apps and assitive devices to work on every new user would be a nightmare.
    I created the script on another 10.9 Mac using Automator to make it an actual application. I've used the instructions in OS X: Using AppleScript with Accessibility and Security features in Mavericks to sign it and I'm using root to move it from its network location into the Applications folder. I've adjusted the permissions to allow all Admin users to r/w (along with everyone else). To the root user, it shows as a usable application, but every other user on the Mac sees it as damaged/incomplete.
    What I want to do is add it to the default Login Items, so I can run the final AppleScript command to simply remove the login items listing. That way I don't need to worry about it running again, but it's still available for the next user to sign onto the deployed Mac.
    I know it's a little convoluted, but this is the final piece to the NetRestore deployment I've been working on for months. Any suggestions on how to make this work (or even a completely different solution) would be greatly appreciated.
    Here was the original shell script in case you're curious.
    #!/bin/bash
    ## Prompt for current user admin for use in Certificate Install
    while :; do # Loop until valid input is entered or Cancel is pressed.
        localpass=$(osascript -e 'Tell application "System Events" to display dialog "Enter your password for Lync Setup:" default answer "" with hidden answer' -e 'text returned of result' 2>/dev/null)
        if (( $? )); then exit 1; fi  # Abort, if user pressed Cancel.
        localpass=$(echo -n "$localpass" | sed 's/^ *//' | sed 's/ *$//')  # Trim leading and trailing whitespace.
        if [[ -z "$localpass" ]]; then
            # The user left the password field blank.
            osascript -e 'Tell application "System Events" to display alert "You must enter the local user password; please try again." as warning' >/dev/null
            # Continue loop to prompt again.
        else
            # Valid input: exit loop and continue.
            break
        fi
    done
    echo $localpass | sudo security import /'StartupFiles'/bn-virtual.crt ~/Library/Keychain/login.keychain
    osascript -e 'tell Application "System Events" to delete every login item whose name is "LyncCert"
    And this is the AppleScript itself. (I used the \ to make it easier to read. The first line is actually one complete command)
    display dialog "Click OK to start installing Mac Network Certificate." & return & return & \
    "In the following prompts, click the 'Add' then 'Always Trust'." & return & return & \
    After you have clicked 'Always Trust', quit Keychain Access." default button 1 with title \
    "Mac Network Certificate Install"
    activate application "Keychain Access"
    tell application "Finder" to open POSIX file "/StartupFiles/bn-virtualcar.crt"
    tell application "System Events" to delete login item "Lync-AppleScript"
    end
    Thank you for your help!

    I have run into this same issue. Are you trying to run the script one time as a new  user logs in or everytime a user logs in?

  • How do I setup a MIT-Magic Cookie for multiple users?

    I need to be able to use TTauthority to allow mutliple users to have access to one main MIT-Magic Cookie random sequence. Currently, we have multiple cookies being created each time a user logs in. However, we cannot see each others processes. This is a huge drawback we are having with depending on Tooltalk. Any suggestions to setup ttauth to allow multiple users to share the same cookie?

    It might work if you don't leave mails on the server.
    In IMAP are the mails from the other accounts showing up at that accounts inbox on the server (webmail) If so you could as well redirect it on server level and not download and then upload.
    What happen if you want to un-delete a message?
    A solution would be send it to a local folder. That way it will be deleted on the mail server and you still have the opportunity to '''move''' it into one of the inboxes

  • Remove the info message "Customizing missing: No code for category"

    Hi Experts,
                  I am getting the information message i.e "Customizing missing: No code for category" while entering into the repair web ui screen in service. I want to remove this information message. Please suggest me how to avoid this info. message. Thank you in advance.
    Regards,
    Santhosh

    I installed this VB script and still get the same error message. I have also installed all the install scripts from InstallShield. I sent an email to InstallShield a week ago explaining my problem but have had no reply. Their Website says to contact the software vendor directly - that would be Apple. I have an Apple 800 number but have never been able to get through. I have installed other Windows software in the last week and have not had a problem. Any more suggestions?
    Home built Windows XP Pro
    Home built Windows XP Pro

  • How to create a custom task in SRM for the standard task

    Hi Gurus,
    How to create a custom task in SRM for the standard task  eg: TS10407929
    regards,
    George.

    from PFTC itself. Same.

  • How to find the customer ledger account display for profit centerwise

    Dear All,
    how to find the customer ledger account display for profit centerwise
    Pleas give your valuable suggestion
    Regards
    Vishwajeet Sharma

    Hi
    check the tables
    A959
    A962
    A997
    The assignment depends on so many things
    with respect to which transaction you wants the PRCTR field for KUNNR?
    Regards
    Anji

  • How can I download the full source code for the Java 3D package

    how can I download the full source code for javax.media.j3d
    especially I need the Transform3D.java class.
    thanks a lot
    Meir

    thank you guys I'll try to do so, I suggest you to
    join me.From the one of the (ex-!)Java3D team:
    "I'm glad to see that Sun has decided to officially support an
    open source Java/OpenGL binding, JOGL. Perhaps they will
    eventually decide to make Java 3D open source. However, be
    careful what you wish for. The Java 3D source is huge and
    complex. There are native sections for Solaris, Windows/OpenGL,
    and Windows/Direct3D, plus common code. I don't know how you'd
    open source a build process that requires different pieces of
    the code be built on different machines running different
    operating systems."
    Sounds scary - I hope we're ready for it :)

  • How to set an screen variant as default for my user?

    Hello,
    For example in t-code FB50 we have 4 screen variants.  The default screen variant is 1.  How can I change the default sreen variant for my user only ?
    Thanks,
    Alexandre

    Hi
    Use T.code FB00 and in the document entry tab in screen templates and line layout variant for doc entry enter necassary details
    For further details, the following link may be useful:
    http://www.r3.duke.edu/stepbystep/journal/3.pdf
    Regards
    Aravind
    Assign points if useful

  • Remove transaction codes from multiple roles at a time

    Hello,
    how to remove transaction codes from multiple roles at at time?
    Thank you in Advance.

    Hi Vanita,
             Why do you want to remove a t-code from all the roles. Are you no longer going to use the t-code. If this is the case then you can lock the transaction code in T-code SM01 so that no one can use it. But this would effect other users as well, it should only be locked if no one should use the particular T-code.
    Another alternative is to write a program to remove the particular T-Code from the table AGR_TCODES where the relation ship between the role and t-code is stored.
    Thanks.

  • ITunes keeps prompting me to reenter the security code for my credit card each time I make a purchase

    ITunes keeps prompting me to reenter the security code for my credit card each time I make a purchase, saying my Windows 7 PC is a new device. However, the PC is on iTune's list of authorized devices for downloads. What's causing this? I do block cookies etc on browsers.

    I don't know. No, it doesn't use your browser. Perhaps you should call and find out what the problem is.
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support: Contacting Apple for support and service - this includes
    international calling numbers..
    For Mac App Store: Apple - Support - Mac App Store.
    For iTunes: Apple - Support - iTunes.

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • How do I set Firefox to be usable for all users on one computer?

    How do I set Firefox to be usable for all users on one computer?

    I would think the about:config entries discussed are ex-factory set to values each user has to change individually, after the installation has run its course. The solution could be to have patched files ready to install post factum:
    [https://developer.mozilla.org/en-US/docs/Mozilla/Preferences/A_brief_guide_to_Mozilla_preferences A Brief Guide to Mozilla Preferences - MDN]

Maybe you are looking for