Programming environment

(I am newbie to Arch) Recenly I realised how, in my opinion, should a perfect programming environment look like.
The system should be of course up to date and use the newest official packages. But it does not apply to the version of development tools. I am 100% sure that most of you (professional programmers) does not migrate to the newest tools every time they appear. Most of the time we are made to work on legacy releases. For instance I'm currenly using gcc 4.6 at work and the management has many concerns moving to version 4.7
So, perfect environment would allow me to install as many versions as possible and let me easily create "virtual" environments.
I hope that the Arch will be my perfect envrionment. But so far I can see few barriers:
1. I believe that most of the time there is only one version of the given tool (one gcc, clang, one version for Python 2.X and one for 3.X, etc.) and in the best case I would be forced to build tools from sources (AUX)
2. I do not know how could I use the pacman to install packages as a common user in my local directory, using my own installed packages database that uses the system-wide database as a secondary source of dependencies.
So, summing up. In the base system I want to have up to date packages (-> "newest" tools, like qtcreator, ninja-ide, etc.). But for the purpose of development I need older (and thus better testes [and sometimes buggy, I know]) versions.
The question is: How to achieve it as easy as possible and use system tools (pacman, makepkg) as much as possible.
I hope that you will be able to understand my message and help me it:)
Best regards,

I hope that the Arch will be my perfect envrionment. But so far I can see few barriers:
1. I believe that most of the time there is only one version of the given tool (one gcc, clang, one version for Python 2.X and one for 3.X, etc.) and in the best case I would be forced to build tools from sources (AUX)
A lot of older software versions are already packaged in the AUR and can safely be installed alongside existing packages. You just may have to tell your software where to find the correct version of the executable. You can also (typically) easy build your own versions using the existing PKGBUILD from the ABS and modifying it as necessary.
2. I do not know how could I use the pacman to install packages as a common user in my local directory, using my own installed packages database that uses the system-wide database as a secondary source of dependencies.
Probably something like docker or vagrant/virtualbox might be easier and cleaner. This way you can start from a clean environment without all your day-to-day cruft installed, thereby ensuring consistent builds and fewer dependency problems. You can also use another distro with the correct software versions quite easily this way (well, with vagrant, at least).

Similar Messages

  • Install Acrobat Portfolio SDK and plugins in your Flash Builder programming environment

    Hello, Experts
        how would I go about introducing Acrobat Portfolio SDK and plugins to the Flash Builder programming environment ?

  • C++ programming environment

    I just upgraded my computer to a G5 dual processor mac. I have discovered that (1) my Metrowerks C++ doesn't work as well as it used to (some funky little problems mostly), and (2) Metrowerks no longer exists, and their attitude towards my compiler problems was "don't know, don't care".
    So, my question, is there a C++ programming environment available for the Mac?
    Note: I want an easy to work with environment. I use my programming to generate data sets, and never produces apps that anybody but I will use. Thus, the ability to make pretty windows, while nice, is strictly secondary to my main need for computing which is crunching big numbers.

    Another Xcode user here. Xcode also comes on the Tiger install DVD. Still, you should download the lastest 2.3 version from Apple as it has some good improvements.
    While you don't care much about pretty windwos, they will still be easier to use with Interface Builder and Xcode.
    Finally, you don't have to use the Xcode environment. Installing Xcode gives you the full development environment. You can then write command-line apps that do nothing but crunch numbers during the night and send you an e-mail with the results in the morning.

  • Programming environment for beginners?

    Years ago I wrote some very simple applications for personal use, using Future Basic.  It was a great environment for somebody with very little programming experience because much of the GUI was handled in a very easy fashion.  Basically you set up your windows and controls in a graphic interface and it then generated a shell with the necessary code to implement what you had created.  You didn't really need to know how code the GUI because that was handled for you, allowing you to just work on the meat of the program.  For someone who only occasionally writes anything, and simple stuff at that, it was a great environment. 
    Now I'm looking to do the same sort of thing, write a couple simple apps for personal use and I'd like to find something similar.  Is there anything on the market that will let a very unknowledgeable programmer like myself quickly throw together an interface like that?

    Does anybody know any site that provides programming
    problems in order for beginners to practice JAVA.
    I may get shot for saying this, but I just finished a VB.NET class and the textbook was Starting Out With Visual Basic .NET, by Tony Gaddis
    This is hands down, the best learning book I've ever read. The problems at the end of each chapter are challenging and realistic. Granted, many of the problems are GUI oriented, because it is a VB book, however, I have since tried many of the problems using Java and found them good for refining my Java coding more than my VB coding. A problem is a problem.. many languages can solve the same problem.. just some faster and more efficient than others.
    Other than that... the Deitel & Deitel, Java: How to Program was a good book also.
    Hope that helps.

  • DAQmx non-cumulative buffered edge counting (like the PMT TTL problem) with PCI6221 in C program environment

    I have a PCI-6221. I am programming in C/C++ and DAQmx. My application is much like the previous thread counting the number of asynchronous TTL pulses from a PMT in some user specified time interval. The time interval is typically around 1 msec and the signal rates are around 1-10 kHz. So I expect to count 0 to 10 pulses per timebin. In traditional DAQ this was called Non-cumulative buffered edge counting.
    To get a clock at about 1kHz, I first create an "analogue in" task that samples at 1kHz. The only thing I use this task for is to route its sample clock to the gate of the counter. This defines my time interval as 1 msec.
    I then create the counter task. I am using count edges. So I think counter0 gate = PFI9 and source = PFI8.
    where clockSource="/Dev1/ai/SampleClock"
    I apply my signal to PFI8.
    After starting the task, I read an array of values with
    I expect the array data to have values ranging from 0-10 for PMT input with an average rate of about 10 kHz. The trouble is that the array data does not seem to make sense. I get constantly increasing values. For very low input frequency, it just increments by one per array member.
    More troublesome, when I hold PFI8 at ground, so that I expect zero pulses to be counted at the source for each edge at the gate that occur 1 per msec, I get a timeout error. I really must be able to count zero events per bin.
    Am I doing something obviously wrong?

    The behavior of non-cumulative event counting is equivalent to period measurement. Additionally, the timeouts when no edges occur on your event counting terminal are the result of duplicate count prevention. In DAQ 7.4, the default behavior of duplicate count behavior should take care of this for you, but if you cannot upgrade to DAQ 7.4, I'd do a search of the discussion forums for "duplicate count prevention". There are a number of previous posts about this attribute, including this one.
    If you aren't using the second counter on your device, you should be able to use the Period Measurement 2 Counter High Frequency measurement method to get your desired values. The "Measurement Time" attribute in this case would be the "sample clock" (1 kHz in your example). Then just raed the data raw to get counts rather than scaled.
    If you'd like to do it using the AI timing engine. Configure a 1 counter period measurement task, use "clockSource" as your input terminal and use your PMT TTL pulses as the "Counter Timebase Source". Then read the data raw, since the scaling will not be appropriate for your needs.
    I hope this helps!

  • Re: 64 bit programming environment

    I'm a j2ee programmer, and im thinking of getting a 64bit vista machine,
    i was wondering, will i still able to use applications such as netbean, and so on within
    64bit or should i go with 32bit?
    If anyone having any issues with 64bit programming platform, pls let me know.

    Dear Frank,
    As you might understand, vitual memory is a seconday concept of memory mapping...I was primarily concerned about sap APIs being able to map into 64 bit RAM, which means the first 32 BIT are the address space as against the 32 bit add-ons in which the first 16 bit form the address space.  so the addressable memory locations in RAM would be drastically reduced.  As a result, if you are running a 32 bit API it can't map into memory space beyond 4GB, in which case, it will push some of the data from the first 4GB of RAM into virtual memory and load into the RAM, but not completely.  Only the active part of the add-on using a 32 bit API would load into the 4GB memory space and the rest would load into Virtual memory, which is nothing but a swap file sitting on the HDD.  Now the HDD retrieval and write speeds are highly cripled as compared to those of RAM.  Hence, my question.  So, with Roberto answering the required part of my question, it would be of no good use to have a 64 bit H/W and a 64 Bit OS if my APIs don't support 64 Bit execution as they will not load beyond 4 GB memory space.
    This is a bit of murky concept as this is a tradeoff between speed and possiblity...LIke you said, even if a 64 bit OS loads a 32 Bit API it will still load it into the virtual memory if the first 4GB of RAM are occupied by other processes, but this is a compromise of possible RAM speed if the API could access all the RAM space, which would have been possible only if it were a 64 BIT API....
    I was only hoping for a better world out there...

  • What is your programming environment?

    For those of you who are always using the latest sdk, what is your setup if u don't use flashbuilder  Just lookings for other options

    i use flash builder myself but the other popular options are FDT, Flash Develop and IntelliJ

  • Please answer a programming question for an admin

    I'm not a programmer (although my interest is growing), so I can't answer this question in a discussion regarding how Win32API w/OLE and COM is SO much better than programming for Unix/OS X applications.
    The original discussion was in regards to OS X's superior Unix based security, he devolved to this. Having only begun my venture into programming, his questions are a little above my head at this point. I'm also interested (as an amature programmer), how this would be accomplished in OS X/Unix.
    Thanks in advance.
    Here's his position:
    *(1st entry)*
    I have unsed Windows and many flavors of Unix and I have written programs in Assembler, Fortran, Pascal, Cobol, RPG, Smalltak, Basic, PowerBuilder, Delphi, C, C++, C#, Java, and Perl, and I have been programming for over 20 years, so I do have extensive knowledge about programming.
    So I have one question for you:
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    I make my living building complex customized business software, and Windows allow me to build these applications by myself in weeks, when it would take me and a team of programmers months to do these same things in Unix because of the lack of an the Win32 API, COM, and OLE, or I would have to BUY third party libraries that did these things, and deal with the licensing, versioning, and vendor problems that go with them, and none of those third party librabries would be close to Word, Excel, and IE in CAPABILITY!
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    Anyone who thinks a Unix has more CAPABILITIES than Windows, has never used Win32API/COM/OLE/.Net, and does not build customized complex business software for a living, because we people that do are the reason that you find some much customized business desktop software for Windows, and so little for any Unix.
    I have nothing against Unix, and it is great for simple business tasked server software, but for complex business tasked desktop software Windows with Win32API/COM/OLE/.Net wins hands down!
    *(2nd Entry)*
    A System administrators view of an operating system and an application developers view are entirely different, and the Win32API/COM/OLE/.NET simply make my job so much easier, and you simply don't understand because you do not have to deal with the "dirty' details of making what a user wants, which is why your definition of "integration" and mines are totally different!
    With the spell check you talked about, how will you keep in in synch with the dictionary in Word where the user is constantly adding and removing words?
    No, you would have the user to have to maintain two different spell check dictionaries, and you would totally ignore the grammer check requirement!
    Cutting and pasting data between applications is simple integration, and not the complex type that I am talking about.
    Can you make your application display and use the MacGourmet menus appear in its own window, and to access and use the MacGourmet functionality (ie. search for a recipe) in its own window?
    Give me one example of a Unix application that can display the menus of another application, yet alone control its features!
    Of course you can't, because you need COM and OLE!
    I am quite familiar with different flavors of Unix, but those operating systems do not have the rich API and program integration features namely COM and OLE that Windows has, because it violates the Unix idea of security by process isolation!
    Yes that idea of process isolation keeps the operating system safe from malicious code in applications and from one application taking the others down, but you lose the power of programs working together, and you simply cannot build the type of customized business applications that I build by myself, without reinventing the wheel over and over and without having a large team with lots of programmers.
    For example, my customers and millions of others spend all day working in Word and Excel, and the Windows idea that I can transparently integrate my complex business applications right in Word and Excel menu, and into their templates and macros, is why third party developers like me prefer Windows over Unix, regardless of how much better security in Unix is.
    Do not get me wrong, Java improves business application development on Unix, but unfortuantely it is not feasable to rewrite ever legacy application in Java, and Java does not integrate well with other programming languages.
    I used to code business application for both IBM MVS and Sun Solaris, and I never want to go back to those "bad" old days again, once I took the time to learn how to PROPERLY code using Win32API/COM/OLE/.NET!

    At risk of feeding the troll I'll wander in here:
    NOTE: Since this is an Apple programming boards and I have limited experience programming on traditional Unix systems (and most of that in college) I will confine my answers to the area I know.
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    Note that this scenario assumes the user has Microsoft office installed. The person argues that they don't have to purchase libraries to program but what they are effectively doing is simply transferring that cost to user. I don't have to purchase libraries but everyone of my users needs to. Good for you, very good for Microsoft but bad for your customer - IMHO. OK, I know "But all Windows business users have Office installed already." When it comes free with the system then I'll retract my objection.
    Under OS X and Cocoa many of these functions are intrinsic to the system layer and do not require any applications to be installed. Using Cocoa you can write a simple Word processor that has rulers, full font manipulation (including kerning, spacing and leading), Document Save and Load, Printing, Export to PDF as well as spell-checking in under 10 lines of actual code. Adding a custom file type and icon for full system integration will add another 5 minutes to your programing.
    In case you think I'm blowing smoke here is a tutorial from 2002 (yes, this has been possible for over 5 years) outlining the 8 line Word Processor build in Cocoa.
    And yes, Cocoa also includes Webkit so I can add full HTML rendering by dragging in a WebKit window to my user interface. For an experienced Cocoa programmer this certainly sounds like less than a day of programming - in fact it sounds like a good tutorial for a middle-experienced training day or 2 day class in Cocoa.
    I won't include the link to the 1 line web browser you can build in Cocoa using Webkit because it's shorter than the description. Feel free to search for it if you want to.
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    BUT this is all done from the stock system that is on every OS X computer not simply those with Office installed. Obviously you'd need to add some features that were more complicated than this - because any halfway decent programmer could turn this stuff out - and polish takes a while but to meet the requirements of the challenge it would take 2 days tops.
    Is every *nix programming environment like this? I don't know I can only answer for the system that I have experience with and is the concern of this board. If you really have questions regarding *nix programming then I suggest you find an appropriate board and troll^H^H^H^H^H ask there.
    If you're ever serious about programming on the Mac feel free to stop by and actually take a look at it. I think you'll be surprised.

  • Events in ABAP Programming

    Can anybody please list out the exact differences between the events 'LOAD-OF-PROGRAM', 'INITIALIZATION' and 'AT SELECTION-SCREEN OUTPUT'.
    Thanks in advance,

    <u><b>LOAD-OF-PROGRAM:</b></u> When an ABAP program is loaded in an internal session, the runtime environment triggers the LOAD-OF-PROGRAM event, and the corresponding event block is executed.
    The processing block LOAD-OF-PROGRAM has approximately the same function in an ABAP program with type 1, M, F, or S as the constructor method of a class in ABAP Objects.
    Programs wiht type 1, M, F, or S can be loaded into an internal session in two ways:
    Program calls
    Whenever you call a program using SUBMIT or a transaction code, a new internal session is opened. The LOAD-OF-PROGRAM event is therefore called in each program call.
    External procedure calls
    The first time you call an external procedure (subroutine or function module), the main program of the procedure that you called is loaded into the internal session of the calling program. The eventLOAD-OF-PROGRAM is triggered and the corresponding processing block is executed before the procedure that you called. However, subsequent calls from the same calling program to a procedure in the same subroutine pool or function group do not trigger the LOAD-OF-PROGRAM event.
    so it's before the program is loaded in the memory for execution.
    This event occurs before the standard selection screen is called. You can use it, for example, to initialize the input fields of the standard selection screen. This is the only possible way to change the default values of parameters or selection criteria defined in logical databases. To change a selection criterion, you must fill at least the components <seltab>-SIGN, <seltab>-OPTION, and <seltab>-LOW of the selection table <seltab>, otherwise it remains undefined.
    If you want to initialize input fields of the logical database, you need to find out the names of the fields. To do this for the logical database SAPDB<ldb>, use Transaction SLDB or choose Tools
    ABAP Workbench, followed by Development   Programming environ.   Logical databases. You
    can also display the technical information for the required field on the selection screen. To do
    this, call the F1 help for the required field and then choose Technical info. In the field Scrn Field
    of the following dialog box, you then see the name of the field used in the program.
    event is triggered. This event block allows you to modify the selection screen directly before it is displayed.

  • Regading getting data to and forth between 2 programs through SUBMIT

    Hi All,
    I have a issue regarding fetching internal table data from one program to another.
    Actually I have <b>Main Program</b> from that through SUBMIT statement i am calling another program and executing it for every 100 records - Actually this program is having BAPI running in it, By result i will get an internal table data. Now i want to get that internal table data back into my MAIN Program so that i can use it for next process.
    <b>EXPORT & IMPORT statements are working from MAIN Program to Other Program.</b>
    <b>EXPORT & IMPORT statements are not working from Other Program[SUBMIT'ed Program] to MAIN Program.</b>
    So can anybody tell me how can i get that data in other program into MAIN Program[Back].
    Thanks in advance.
    Thanks & Regards,

    When you submit the program is then running in parallel with the program which submitted it.  There is no mechism that you are using to stop the calling program and wait for the submitted program to finish and bring back some data.   Most likly program 1 ends before program 2 is finished updating the material master. You can do this kind of thing with Function modules.   You would put your call to the submitted program inside of a function module,  then call that function module saying STARTING IN NEW TASK,  then you can wait for it to be done and get the results using the RECIEVING statement.
    Here is the F1 Help.
    Variant 2
    CALL FUNCTION func ...STARTING NEW TASK task name.
    1. ... DESTINATION dest
    2. ... DESTINATION IN GROUP group name
    5. ... EXPORTING  p1 = f1    ... pn = fn
    6. ... TABLES     p1 = itab1 ... pn = itabn
    7. ... EXCEPTIONS syst_except = rc MESSAGE mess
    Starts the function module func asynchronously ina new session. In contrast to normal function module calls, the callingprogram resumes processing as soon as the function module is started inthe target system. It does not wait until the function module hasfinished. Through CALL SCREEN,the called function module can, for example, display a screen and thusinteract with the user.
    This variant applies only from R/3 Release 3.0, so boththe client system and the server system must have Release 3.0 orhigher.
    With this variant, the called function module must also be flagged inthe Function Builder as externally callable, even if it is executedlocally (without the addition DESTINATION).
    There can be no function call to the destination 'BACK' in thecalled function module (for more information about the destination 'BACK', see CALLFUNCTION func DESTINATION dest).
    This variant does not support the execution of externalprograms accessible via the destination of the TCP/IP type asasynchronous calls (see the Transaction Tools ¨Administration, Administration ¨ Network ¨ RFC destinations formaintaining destinations).
    You cannot display screens (screens or lists asamodal windows in RFC communication using SAP Router.
    From Release 4.0, you can check the load of each RFC destination moreclosely (in the RFC destination maintenance for an R/3 connection, choose Destination -> ARFC options). This checks whetherthe target host has sufficient resources before the function module isexecuted. If the target host is overloaded, the system delays executingthe function module. The algorithm for calculating the load on thetarget host is the same one used in an asynchronous RFC call using the DESTINATION IN GROUP addition. Note that this option can only beused with target hosts running Release 3.1H or higher. Note also thatit is the default setting.
    In principle, parallelization makes sense whenever applicationservers have the necessary resources. In this case, the applicationservers must be configured with at least 3 dialog work processes.
    A program that is run in the background and uses RFC parallelizationrequires at least 1 dialog work process per application server becausedialog processes use parallel execution.
    If the instance profile parameter 'auth/rfc_authority_check'is set (to 1), the system automatically performs an RFC authorizationcheck. The authorization check refers to the relevant function groupfor the function module to be called. If no authorization is found, aruntime error occurs. You can check the authorization in advance withthe function module AUTHORITY_CHECK_RFC. If the communication takes place in the same system with thesame user context (same client and user ID), there is no authorizationcheck. For further information, refer to the RFCAuthorization Concept.
    When you are using asynchronous RFC to implement parallel windows,all these windows are closed if the caller session is the only sessionand terminates.
    ... DESTINATION dest
    Executes the function module externally as a RemoteFunction Call (RFC); dest can be a literal or a variable.The R/3 System where the function module is executed depends on thespecified destination. Externally callable function modules must beflagged as such in the Function Builder (of the target system).
    If the destination is not explicitly specified, the systemuses the default destination 'NONE'.
    If, during a RemoteFunction Call, an error occurs in the target system, detailsof the error message are passed bac to the calling system in thefollowing system fields: SY-MSGNO, SY-MSGID, SY-MSGTY, SY-MSGV1,SY-MSGV2, SY-MSGV3, and SY-MSGV4. These fields areinitialized before every RFC. If a short dump or a type X messageoccurs, the short text of the dump is transferred to the caller, andthe contents of SY-MSGID, SY-MSGTY, SY-MSGNO, and SY-MSGV1 assigned by the system.
    In RFC-enabled function modules, no ABAP statements are allowed thatwould end the RFC connection (for example, LEAVE, SUBMIT or the ANDRETURN addition).
    Note that a database commit occurs at eachRemote Function Call (RFC). Consequently, you may not use RemoteFunction Calls between pairs of statements that open and close adatabase cursor (such as SELECT ... ENDSELECT).
    Addition 2
    ... DESTINATION IN GROUP group name
    Addition 3
    You use this addition to perform parallel execution offunction modules (asynchronous calls) on a predefined group of R/3System application servers.
    You use addition 2 (DESTINATION IN GROUP group name) toperform parallel execution of function modules on a predefined group ofapplication servers. To maintain the RFC groups, choose Tools ¨ Administration ¨ Administration ¨ Network ¨ RFCdestinations ¨ RFC ¨ RFC groups. The application programmer isresponsible for the availability of RFC groups in the productionsystem.
    You use addition 3 (DESTINATION IN GROUP DEFAULT) to performparallel execution of function modules (asynchronous calls) on all currently available R/3 System application servers. However,instead of this variant, you are recommended to use an RFC group withappropriate resources for parallel processing of asynchronous calls (atleast for performance reasons). Please note that the additionDESTINATION IN GROUP ' ' has the same effect as the additionDESTINATION IN GROUP DEFAULT.
    When you first call a function module with these additions, thesystem initializes the specified RFC group (provided no explicitinitialization has already been performed).
    To obtain current information about resources (that is, the number ofresources available to process function modules), you can alsoinitialize the RFC group explicitly in the program via the functionmodule SPBT_INITIALIZE. You must perform this actionbefore the first function module call.
    In both cases, the system first determines the number of currentlyavailable resources (work processes) on the available applicationservers (either a group of servers or all servers). By checking thecurrent system load of each application server, the system determineshow many work processes are available to execute asynchronous calls.
    After determining the available resources, the asynchronous call isexecuted at one of the destinations. If no resources are available atthat particular time, the system executes the exception routine RESOURCE_FAILURE (see the addition EXCEPTIONS). In thecase of an asynchronous function module call, this exception must be handled by the application program (see example).
    Parallel processing cannot take place if any of the resourcethresholds are exceeded.
    In order to be taken into consideration for RFC parallelprocessing, an application server must have at least 3 freedialog processes.
    The system triggers the exception RESOURCE_FAILURE only forasynchronous RFCs with the additions DESTINATION IN GROUP groupname and DESTINATION IN GROUP DEFAULT.
    At present, only one RFC group per program environment issupported for parallel execution of asynchronous calls. Using both theadditions DESTINATION IN GROUP group name and DESTINATION INGROUP DEFAULT in a program is thus not allowed.
    To find out which destination was automatically selected, call thefunction module SPBT_GET_PP_DESTINATION immediately after thefunction module call with the two additions. This returns the selectedRFC destination.
    If you want to delete an application server from the list of theconfigured RFC group at runtime (for example, when the applicationserver is not accessible for technical reasons), use the functionmodule SPBT_DO_NOT_USE_SERVER.
    Addition 4
    While the parameters for receiving results (i.e. IMPORTING andTABLES parameters) are specified directly as additions in thecase of "conventional" function modules (see variant 2), these arelogged in the FORM routine form when making anasynchronous call (see RECEIVE).
    If a function module returns no result, and you are notinterested in error messages that arise when executing the functionmodule, this addition (... PERFORMING form ON END OF TASK) canbe omitted.
    If you want to handle the error messages that arise when executingthe asynchronous function module call, you must use thisaddition. Also, when receiving the results in the FORM routine(see RECEIVE), you must reactaccordingly to the system exceptions SYSTEM_FAILURE andCOMMUNICATION_FAILURE.
    With asynchronous RFC, the task name uniquely identifies theasynchronous connection and thus the context called.
    If several asynchronous function modules are executed consecutivelyto the same destination, you must assign a different task name to each.
    A calling program that starts an asynchronous RFC with PERFORMINGform ON END OF TASK cannot switch roll areas or change to aninternal session. This is because the asynchronous function module callreply cannot be passed on to the relevant program. You can perform aroll area switch with SUBMIT or CALL TRANSACTION.
    If a calling program makes asynchronous calls, finishes, and thenexpects responses, these responses cannot be delivered.
    To wait for the reply to a started asynchronous function module, usethe WAIT command with the additionPERFORMING form ON END OF TASK. Here, WAIT must be in thesame program context (session).
    Note that the execution of the asynchronous calls involves a changeof roll area. This means that the FORM routines for receivingthe external calls can be processed while you are making furtherexternal calls. This means that the developer must ensure thatthe FORM routines can be executed at any time. You cannotmake any assumptions about the processing sequence.
    Addition 5
    ... EXPORTING p1 = f1 ... pn = fn
    EXPORTING passes values of fields and fieldstrings from the calling program to the function module. In thefunction module, the formal parameters are defined as importparameters.
    Addition 6
    ... TABLES p1 = itab1 ... pn = itabn
    TABLES passes the contents of internal tables.
    Addition 7
    ... EXCEPTIONS syst_except = rc MESSAGE mess
    While any exceptions arising in the called functionmodule are handled by the second addition (in the FORM routine),this addition can handle two special system exceptions, as withfunction module calls with the addition DESTINATION:
    is triggered, if a system crash occurs on the receiving side.
    is triggered if there is a connection or communication problem.
    In both cases, you can get a description of the error with theoptional addition
    ... MESSAGE msg
    In principle, you should always react to these twosystem exceptions, whether you are making an asynchronous functionmodule call or receiving results.
    Asynchronous call to a transaction and display in a separate session.
    DATA: MSG_TEXT(80) TYPE C. "Message text
    Asynchronous call to Transaction SM59 -->
    Create a new session
          TCODE = 'SM59'
      IF SY-SUBRC NE 0.
        WRITE: MSG_TEXT.
        WRITE: 'O.K.'.
    Using RFC groups to parallelize function module calls (RFC parallelprocessing)
           TASKNAME(4) TYPE C, "Task administration
    DATA: INFO LIKE RFCSI, C,  "Message text
          JOBS TYPE I VALUE 10,  "Number of parallel jobs
          SND_JOBS TYPE I VALUE 1,  "Sent jobs
          RCV_JOBS TYPE I VALUE 1,  "Received replies
          EXCP_FLAG(1) TYPE C,  "Number of RESOURCE_FAILUREs
          TASKNAME(4) TYPE N VALUE '0001',  "Task name administration
             SYSTEM_FAILURE        = 2
             RESOURCE_FAILURE      = 3.
        WHEN 0.
    Administration of asynchronous tasks
          WRITE: /  'Started task: ', WA_TASKLIST-TASKNAME COLOR 2.
          TASKNAME = TASKNAME + 1.
          SND_JOBS = SND_JOBS + 1.
          JOBS     = JOBS - 1.  "Number of existing jobs
          IF JOBS = 0.
            EXIT.  "Job processing finished
        WHEN 1 OR 2.
    Handling of communication and system failure
        WHEN 3.  "No resources available at present
    Receive reply to asynchronous RFC calls
          IF EXCP_FLAG = SPACE.
             EXCP_FLAG = 'X'.
    First attempt for RESOURCE_FAILURE handling
    Second attempt for RESOURCE_FAILURE handling
          IF SY-SUBRC = 0.
            CLEAR EXCP_FLAG.  "Reset flag
          ELSE.  "No replies
            "Endless loop handling
    Receive remaining asynchronous replies
      WRITE:/   'Received task:', WA_TASKLIST-TASKNAME COLOR 1,
            30  'Destination: ', WA_TASKLIST-RFCDEST COLOR 1.
          SYSTEM_FAILURE        = 2.
      RCV_JOBS = RCV_JOBS + 1.  "Receiving data
        IF SY-SUBRC NE 0.
    Handling of communication and system failure
                              INTO WA_TASKLIST
          IF SY-SUBRC = 0.  "Register data
    If you encounter problems, refer toTypical RFC problems and theirsolutions.
    Runtime errors:
    Runtime errors:
    Data received for an unknown CPI-C connection.
    Destination type not allowed.
    Specified destination does not exist.
    Specified destination (in load distribution mode) does not exist.
    Data error (info internal table) in a Remote Function Call.
    The called function module is not released for use in RFC.
    The function parameter that you passed is not recognized on therecipient side.
    The user does not have RFC authorization.
    No authorization to log on as a trusted system. The error codeshave the following meanings:
    0) Valid security key but wrong logon data 1) Calling system is not a trusted system, or security key is invalid 2) User either does not have RFC authorization (authorization object S_RFCACL), or logged on as one of the protected users 'DDIC' or 'SAP*' 3) Timestamp of the logon data is invalid
    Missing communication type (I for internal connection, 3 for R/3) in anasynchronous RFC
    The function module called is not flagged as "RFC supported"
    An error occurred during the Remote Function Call. This has been loggedin the target system.
    The logon data for the user is incomplete.
    You cannot log onto a target system using an internal call.
    External RFC without a valid user name.
    Attempt to log onto a target system without a valid user name. Theerror code can have the following meanings:
    1) Wrong password or invalid user ID
    2) User locked
    3) Too many logon attempts
    4) Error in authorization buffer (internal error)
    5) No external user check
    6) Invalid user type
    7) Validity period of user has expired
    RFC without a valid user name only allowed when calling system functionmodules. For the meaning of the error codes, refer toCALL_FUNCTION_SINGLE_LOGIN_REJ.
    No memory available for a table to be imported
    Asynchronous RFC only: Task name already in use.
    Asynchronous RFC only: The specified task is already open.
    Error reading the SNC information for the destination.
    No valid trusted system entry for the calling system.
    No trusted authorization for the RFC caller and trusted system.
    Rich Heilman

  • Best Drum program for logic???

    HI need help..which is the better drum program.for a non drummer..Idrum..ezdrummer..or bfd?...what i intend on using it for is for making my own beats..i need to know if these r loop sampled software or can i make my own beats...thank u..any and all information on these items is great apprecated!!!

    Ok, there;s two factors here. Drum sounds, and programming environment.
    In my view, you already have Logic, which offers a superb drum programming environment from the start. I have a screenset with the hyper editor, event editor, event float and various other bits on there, and I can do very sophisticated drum programming/editing there.
    Now, if you want a simpler approach to programming drums, more "drum machiney", then you want to use a grid-type approach. Here, you can either use Logic's matrix or hyper editors, or you can use the step sequencer within Ultrabeat, using acoustic drum sounds. You can do as sophisticated feel-type stuff here (you won't be convincing anyone you're using a real drummer!) but it's easier to work with patterns - you can always drag them to the arrange and work on them some more using Logic's more sophisticated tools.
    So - drum sounds. There are quite a lot of freebie good acoustic drum multisamples on the net - look out for NS Kit, the GSCW kit and the Bulldawg kits in particular.
    So, you can do all you want, without spending money at all.
    If you absolutely do want to get a new toy, then you mostly have a choice between drum "instruments", that have great sounds, but expect you to be playing/programming them with your host, and so don't really offer programming facilties (DKFHS, BFD, Stylus type things), or the more "virtual drum machine" type things like iDrum, Guru, Battery etc.
    Without knowing your working preferences, or exactly what you want, it's difficult to make a recommendation, but I would say you should start of with the tools you already have in Logic Pro, because you might find they suit you pefectly.
    Sometimes buying a new toy does make life easier, but often it's just an excuse (if I buy this, I'll be able to finally make the super-dope beats I have difficult doing now).
    Buying new stuff doesn't bypass the need to develop your musical skills (I wish that it did!
    As a coda, I'll just mention that Stylus RMX rocks hard, with the acoustic expanders and new Orleans benefit library.
    The EXS24 and a few drum sample libraries, and freebie net samples and a bit of work will give you much of what DKFHS & BFD give you, albeit in not as convenient a package. I loved the first DKFH, haven't heard the new ones, but I liked the character of their samples.
    I heard the first version of BFD and I thought it was fairly bland in character, it didn't immediately appeal to me, although they have a ton of addons for it now, so I'm sure there's stuff in there I'd think were superb - it certainly has a good reputation.
    But none of those, despite sounding potentially great, will give you drummer like beats if you don't know how to play/program drummer like beats (or you take the existing patterns/loops that some of those instrument contain and use/edit those), so I'd hate for you to be dissapointed.
    Did I say that Stylus RMX rocks hard? Good.

  • Java Programming @ SAP - the poor cousin?

    Recently I' ve started a kind of poll in the Java forums asking if someone knew any enhancement possibilities for java-side development at SAP mentioning the ABAP customer exits, BADIs, customer includes and enhancement spots as example.
    Guess how many answer I received - from WDJ, Java Programming, NWDI and NW Java from: None! All the gurus who usually bubble over with wisdom remained wondrous silent. I also run over help pages searching for some hints regarding this - in my opinion fundamental - questions, with the same result.
    Has really nobody at SAP spent a thought about one of the most precious features SAP offers its customers - the possibility to enhance delivered standard-programs and thereby adapt them to their needs without modification?
    How are we as Java programmers then supposed to stand the mistrustful glances of our ABAP collegues who wonder why there has been so much noise about this Java thing in the recent years. Thinking about the disadvantages a developer working with Java at SAP has to bear compared to his ABAP collegue - no direct data access, no comfortable debugging possibilities, lots of standalone tools with strange UIs (SDM Remote GUI, Visual Admin - only to name the least glorious ones - he to manage and - last, not least - no chance to enhance SAP Standard programs modification free I have to agree upon one ABAPers opinion on Java: "The hype is over!".
    Regards from a very pessimistic Java Developer
    PS: Does anybody know a way to unbureaucraticly swap a Java certification against an ABAP one?

    I get the question - should I do my development in ABAP or Java - quite often. My answer has become "It Depends."  I getting pretty good at those ambiguous consulting answers, aren't I.
    In all seriousness I really do think the answer depends upon several things.  As a company or development group you should analyze the skills that you already have in house.  As you have seen the two development environments are quite close.  The advantages of one over the other will continue to vary over time.  ABAP will add nice features from Java and vise versa.  In the end it is more important that companies leverage their skill sets and existing infrastructure (Software Lifecycle Landscape) to their maximum. 
    If you are already a java shop then it makes sense to continue down that development path because your developers will still be very efficient even if they have to access ERP and other SAP application logic and data via RFC or Web Services. 
    On the other hand, ABAP certainly isn't as dead as some people claimed it would be by now. Thanks to Web Services ABAP has more flexibility than ever before.  It isn't nearly the closed box that it used to be.  Also the workbench team isn't going to stop innovating either. 
    The next question I get is what does SAP do internally when deciding on a language to use.  To a large extent they use the same criteria - what existing skill sets do I have to work with.  They also look at where the data is located. 
    That means products like Portal aren't about to change from Java to ABAP.  On the other hand ERP suite development is still heavily ABAP.  The new UIs coming from ERP will primarily be done in Web Dynpro ABAP. 
    Even in some newer products that haven't been released yet - the UI was done in Java or Visual Composer and the backend business logic was done in ABAP. It is all about taking advantage of the unique strengths of each environment and the skill sets you have in each.
    In the end I don't think Java is the poor cousin any more than ABAP is going to die.  Look at NetWeaver CE and the huge investment SAP has made on top of Java Development there.  At the same time our investment in Java has not come at the cost of the ABAP environment.  Innovations will continue to take place there as well.  I can assure you that within SAP it is the hope and goal to have two top notch development environments within NetWeaver.
    Now let me share a little story with you.  My background is obviously ABAP and I doubt I will ever lose my particular passion for the environment.  At the same time I have done a fair bit of NetWeaver Java development in the last year and half or so.  I'm not a super deep expert, but I can hold my own. 
    I recently had a requirement to build an MDM Application.  I only had two days in which to build it.  My choices were to use the Java API or the ABAP API.  They are quite similar and both meet all my interface requirements.  I was building a Web Dynpro UI, so the end user wouldn't be able to tell the difference.  Interfacing capabilities being the same and UI output being identical - my decision came down to the environment where I personally could be most efficient.  I could have completed the project in either environment.  But because I knew the ABAP Programming Environment (you know the stuff that goes beyond the basic syntax - the real knowledge that lets you squeeze every last drop of performance out of an application) so well I personally could build the best application in the shorter time in ABAP. 
    Now someone with a different background might well have taken the Java path and done just as well.  This is the advantage that SAP provides by continuing to support both ABAP and Java development.  Does every feature and function of both environements line up exactly - of course not.  I'm sure they never will.  But do these differences keep experts in either environment from being able to make any application do amazing things - certainly not.  Personally I feel less constrained in either ABAP or Java today than I have ever felt programming before.

  • Programming Language

    This might sound like a wierd question. If i wanted to learn a programming language where should I start? Is it possible to learn Java or C++ or something like that on the Mac? What are your suggestions?

    If you plan on programming specifically for Mac I would definately recommend Cocoa (Obj-C) since it is the "native" programming environment for Mac OS X. I would also recommend you to check apple's developer site for info on how to get started. There are a couple of books you might want to look into.

  • Material on dialog programming

    Hi al,
    does anybody have good material on dialog programming.

    Go thru this docu
    Logical Unit of Work (LUW)     5
    DYNPRO concept     6
    Using Screen Painter     7
    Creating a new Screen     7
    Designing of Screen     8
    Selecting Screen Fields     9
    Attributes of Screen Elements     9
    Field List     10
    Screen Flow Logic     10
    Creation of Module Pool Program     12
    Communication between Dynpro and Module Program     12
    Steps involved to create a complete transaction     12
    Handling Function Code     13
    Automatic Field Checks     14
    About at Exit – Command     15
    In module pool program.     15
    Flow Logic Validations     16
    Module  assign.     16
    Module Pool Program Validations     17
    About Displaying Next Screen     19
    Set Screen     20
    Call Screen     20
    Leave to screen     21
    SUBSCREENS     22
    Features of Table Controls     23
    Declaring of Table Control in the Module Pool Program     24
    Designing Table Control on Screen     24
    Passing data to Table Control     24
    STEP LOOPS     27
    Types of Step Loops     27
    Switching To List Mode     28
    Returning back from LIST mode     28
    Process on HELP-REQUEST event     29
    Value Request     30
    Need To Change Screen     34
    Modifying the screen     34
    Field Name       Length  Description     34
    LOOP AT SCREEN.     35
    Creating Matchcode object     36
    Creating Matchcode ids.     37
    Using Matchcode     38
    Creating Lock Objects     39
    Activation of Lock Object     40
                                                                                    GENERAL INTRODUCTION TO TRANSACTION
    Transaction, in R/3 system is an operation that lets the user make necessary changes to the database. The entire R/3 system is nothing but set of business transaction. The data transfer from old system to SAP R/3 database, or modifying data, or deleting data, which is not required, is done through transaction.
    For SAP system, Transaction is nothing but sequence of steps called as dialog steps and for user it is sequence of screens that appears one after the other depending upon the option he selects. The special transaction monitor called the SAP dispatcher handles the sequence of steps that takes place in any transaction. The main task of transaction is to update database table. The database table is not updated until a transaction is completed. All changes can be rolled back if the transaction has not finished.
    The transaction contains two steps which are as following:
    •     Interactive phase: In this step, user enters the data, which needs to be inserted or deleted or modified on to the screen. There can be single screen or multiple screens depending upon the transaction. So this step can consist of single step or multiple steps.  In this phase you prepare database record.
    •     Update phase: This phase processes the database record and updates the database table. Actual updating of database table takes place in this phase.
    All the transactions are associated with transaction code. And all these codes are stored in a table TSTC.
    Logical Unit of Work (LUW)
    The R/3 system is multi user system and many users access the same information at the same time, which is mainly DATA. Consider the case where one user is modifying a record, and second user is trying to delete the same record. If the second user is successful in deleting the record then the first user will face problem for modifying the record that is already deleted. The avoid such situation, R/3 system has provided Logical Unit of Work, which is defined as a locking mechanism to protect transaction integrity. Of course, there are other measures, which ensures data integrity like check table i.e. foreign key relationship. Within SAP system there are three types of transaction and may be distinguished as:
    •     Database transaction known as LUW.  It can be defined as a period in which operation requested must be performed as a unit, i.e. all or nothing operation.  At the end of LUW, either of the database changes are committed or rolled back.
    •     Update transaction or SAP LUW.  One SAP LUW can have several databases LUW. So a set of a database is either committed or rolled back. The special ABAP/4 command COMMIT WORK, marks the end of a SAP LUW.
    •     ABAP/4 transaction. Is made up of a set of related task combined under one transaction code. ABAP/4 transactions are for programming environment, in which ABAP/4 transaction functions like one complete object containing screens, menus and transaction codes.
    R/3 system has provided in built locking mechanism, which defines the Logical Unit of Work. Also user can set his own locking mechanism. The LUW starts when a lock entry in the system table is created, and it ends when the lock is released.
    To provide the user the facility to communicate with the table in order to modify or delete or insert data, R/3 has provided tool called SCREEN PAINTER. This tool allows you to design screen, process screen through program and update the database table.  SAP has provided one and only one way to update the database table, i.e. transaction.  Though you can update database table by using open SQL statement through program, SAP usually doesn’t recommend this kind of updating.  Many standard transactions are available to update standard table but if the need arises, the developer should be able to develop new transaction, which allows the updating of database tables. This can be achieved by using various components of screen painter.
    Following are the few concepts and steps for creating entire new transaction.
    DYNPRO concept
    A dynpro refers to the screen + flow logic. With screen painter you can develop screen and flow logic. The relationship between screen, flow logic, and program can be shown as follows:
    Dynpro, as figure indicates consist of screen and flow logic and places exactly one call to module pool program. A transaction consists of many screens and for each screen flow logic is attached. When the transaction is executed, the screen places a call to flow logic and flow logic in turn places a call to module pool program.
    •     A module program is usual ABAP/4 program that consist of modules and data declaration.
    •     ABAP/4 is an event driven language. In module pool program too, events get triggered and these events are handled in flow logic. Flow logic editor is subset of ABAP/4 editor. The system automatically displays the two important events for the flow logic.
    •     Screen is the important component of dynpro and can be created, designed by screen painter.
    Screen Painter
    A screen painter can be started by
    Development workbench &#61664; Screen Painter
    SE51 transaction code.
    Using Screen Painter
    The process of creating a dynpro includes the creation and definition of all the needed screen components.
    The steps involved in creating the dynpro are as follows:
    •     Create screen and attributes by using screen attribute screen.
    •     Select and place the needed fields within the screen by using dict/program fields.
    •     Establish the field attributes to which the screen belongs by using field list.
    •     Define the flow logic respect to the transaction to which it belongs by using flow logic.
    Creating a new Screen
    Steps involved are as follows:
    •     Enter the name of program and number of the screen
    •     Click on Create
    •     On “screen attribute” screen enter short description
    •     Enter screen type. Normally, you select NORMAL option for usual R/3 screen. Other options available are SUBSCREEN & MODAL DIALOG BOX. Modal dialog box is used to establish independent and interactive dialog box while subscreen is screen within screen. 
    •     Next attribute to be passed is NEXT SCREEN. Here you need to specify the next screen number, which must be processed after the current one.
    Designing of Screen
    Screen can be designed by using FULL SCREEN EDITOR. You can go to full screen editor.
    From screen attribute screen
    By pressing full screen editor pushbutton
    From initial screen of screen painter.
    There are two modes available with full screen editor.
    •     Graphical mode. The graphical mode works similarly to typical window application.
    •     Alphanumeric mode (rarely used).
    Elements of screen
    •     Text – Standard text or field labels.
    •     Entry  - display field.
    •     Radiobutton – All radiobutton must be associated with one group.
    •     Checkbox – Normally used for YES/NO operations.
    •     Pushbutton – Used for activating particular function.
    •     Boxes – grouping together many screen elements.
    •     Subscreens – This is a screen area in which you can display another screen.
    •     Table controls – This area of screen is similar to table but should be treated as a loop.
    •     Status - Display output fields containing icon.
    All these elements are on the control bar of full screen editor and can be placed on the screen work area by clicking and placing them wherever needed.
    Selecting Screen Fields
    Screen field can be either dictionary objects or program fields. Steps involved in the placing of fields on the screen are as follows:
    Click the pushbutton Dict/program fields on the full screen editor
    Goto &#61664; dict/prog fields.
    •     Enter table name.
    •     Click Get from dictionary.
    •     Select fields.
    •     Click copy pushbutton.
    •     Position the cursor where you want those fields to be placed.
    To adjust various screen elements, you can use drag and drop facility for screen elements.
    Attributes of Screen Elements
    The entire element of a screen has some attributes, which determines their behavior.
    •     General – These attributes are directly managed by the screen painter like name of the element, or text of element or column width and various things associated with the screen.
    •     Dictionary – These attributes are applicable to fields, which are from dictionary. Various components of dictionary can be attached to this element like search help, foreign key.
    •     Program.
    •     Display – Behavior of the element with respect to their display feature.
    Attribute dialog box can be displayed by
    •     Clicking on the ATTRIBUTE push button on the application tool bar.
    •     Double clicking on the element.
    Field List
    This list displays a list of all screen elements together with their screen attributes.  One important element of Field list is OKCODE. Any pushbutton is associated with function code as in menu item in menu painter. When the user clicks the pushbutton this code is stored in OKCODE. This OKCODE is created by system without a name and is not visible on the screen. In ABAP/4 this field is work field and is nothing but an area wherein system stores the variable and is the last field of the field list and is invisible, hence user needs to give the name OKCODE. It is not mandatory to give the name OKCODE; developer can give any name to this field.
    Screen Flow Logic
    You can go to this screen either by
    Initial screen of Screen painter &#61664; Flow logic
    From Screen attribute screen &#61664; Flow logic
    When transaction is executed, the screen is displayed, user enters few fields, selects few functions. Later the screen is processed and processing of screen is done by flow logic.    The events that are associated with screen are as follows:
    •     Process before Output (PBO)
    •     Process after input (PAI)
    •     Process on value request (POV)
    •     Process on help request (POH)
    The system automatically displays two very important events or modules in flow logic i.e. PAI and PBO
    PBO event
    This event is triggered before the screen is displayed. The processing of screen before the display of screen is done in this event. For example, filling in default values in the screen fields. 
    PAI event
    This event is responsible for processing of screen after the user enters the data and clicks the pushbutton. The processing of screen can include displaying another screen, or just displaying list or quitting the transaction itself and many more things. Usually it is displaying another screen. These operations can be carried out in the PAI event. OKCODE plays an important role in this operation.
    POV event
    Process on value request is triggered when the user clicks F4 key. You can handle this event when the user presses F4 key by writing code for the same in module pool program. Normally when the user presses F4, list of possible values is displayed.  The standard list produced by system is adequate for applications you develop yourself.  However, you can also have the option of setting up your own documentation and lists of possible values that are more detailed.
    POH event
    Normally when the user places the cursor on the field and presses F1 function key, the system displays its own Help for that particular field. You can add your own functionality to the Help button by writing code for the same in the POH event.
    Module Pool Programming
    This component though is not attached to the screen painter, plays important role in transaction. Normally, for reports, on line executable programs are written but for transaction, Module Pool Programs are written. The module pool program contains only modules to handle various events associated with screen and data declaration statements.
    System divides the module pool program into several include program. These are global field, PBO modules, and PAI modules. It is entirely user’s decision whether to use these modules or write directly into main program.
    Creation of Module Pool Program
    You can create module pool program either through
    Object browser
    System automatically creates the module pool program and for these program which are created through object browser, system creates the include modules.
    ABAP/4 editor
    It is similar to normal program creation. Type of program should be given ‘M’ and is not created by system.
    Communication between Dynpro and Module Program
    For each screen, the system executes the flow logic, which contains corresponding events. The control is passed to Module Pool Program. Module Pool Program handles the code for these events and again passes back control to the flow logic and finally to screen. Unlike on line program, in this case, the control remains with flow logic. The switching of control between flow logic and module pool program and back is common process when user executes transaction.
    Creation of a Complete Transaction
    Steps involved to create a complete transaction
    •     Create module pool program.
    •     From screen painter create screens.
    •     Write flow logic for each screen.
    •     Write code for all the events in module pool program.
    •     Check for any error in screen and flow logic.
    •     Generate each and every component of screen i.e. flow logic and screen.
    •     Single screen can be tested using Screen Painter.
    •     Create transaction code through object browser.
    •     Generate the transaction code.
    •     User can execute the transaction by entering the transaction code in the command field.
    Handling Function Code
    The function code or OKCODE is the last field of Field list. Function code can be handled as follows:
    During the Designing of the screen, a function code is assigned to pushbutton.
    •     In field list, developer needs to specify OKCODE as last field.
    •     In module program it is a global field and can be evaluated in the PAI event.
    •     A function code is treated in the same way, regardless it comes from pushbutton, menu item or any other GUI element.
    A complete example for transaction is shown below:
    If you have a screen like the one below:
    When the user clicks on the Display button, you want to display details of sflight, with corresponding carrid and connid (which is entered by the user).
    Module pool program to handle this particular screen is as follows:
    Program YVTEST7.
    DATA: OKCODE (4).
       WHEN ‘DISP’.
                               CONNID = SFLIGHT – CONNID.
         LEAVE TO SCREEN 200.
    ENDMODULE.               “INPUT1 INPUT
    ENDMODULE.                    “USER_COMMAND_0200 INPUT
    When the user clicks on display, control is transferred to screen no. 200 on which you display sflight details & on the same screen, when user clicks on BACK button, he comes back to main screen.
    Flow logic for screen 100 is as follows:
    Flow logic for screen 200
    MODULES: Modules are handled in module pool program.
    You need to write flow logic for screen 200 and design screen 200.
    In case of transaction transfer of data from program to screen is automatic i.e. you need not transfer the data from program to screen explicitly. The fields, which you define in the screen receives the data from program and displays the same.
    The Field Checks
    As already mentioned Transaction is the only method, which SAP recommends to update the database tables. Data entered in the database table should be valid and correct. Data entered is validated at each and every point. ABAP/4 offers various methods to validate data and those are as follows:
    •     Automatic field checks
    •     Checks performed in the flow logic
    •     Checks performed in the ABAP/4 module pool program
    Automatic Field Checks
    These checks are based on the field information stored in the dictionary. These checks are performed by the system automatically when the user enters the data for the screen field. System performs these checks before PAI event is triggered. Types of field checks performed by system are as follows:
    •     Required input
    While designing the screen, for particular screen field if you click the Req. Entry checkbox, the field becomes mandatory. When the transaction is executed if user leaves this particular field blank, the system displays error message. User cannot proceed until the user enters some data.
    •     Proper Data Format
    Each field has its own data format whether it is table field or screen field. Whenever data is entered, system checks for the proper format of the data. For example date. Each user has its own format for date, which is defined in the user master record. If the date defined in the user master record is in the format DD/MM/YYYY, if the user enters the date, say, in YY/DD/MM, the user displays the error message. System also checks for the value of month or days. For example if month entered is greater than twelve then the error message is displayed.
    •     Valid Value for the Field
    In data dictionary two tables are related by Primary key-Foreign key relationship.  Whenever the user enters the data, the system checks for the check table values.   Also in Domain, if you have fixed values, then the system checks for these values.
    Automatic field checks are repeated each time the user enters the data.
    About at Exit – Command
    Automatic field checks can be avoided by AT EXIT-COMMAND, which works exactly the same way as Cancel works on application tools bar. In the R/3 screen, if you want to quit the processing of that particular screen without entering the mandatory fields, user can click the Cancel button. Same functionality can be incorporated in the user-defined transaction by using AT EXIT-COMMAND. This module can be called before the system executes the automatic field checks and it goes without saying that before PAI event. Code for AT EXIT-COMMAND in flow logic and in module pool program can be written as follows:
    In Flow Logic
    Process After Input.
    Module exit AT EXIT-COMMAND.
             In module pool program.
    Module exit.
    Case okcode.
    When ‘Exit’.
    Leave to screen 0.
    To achieve this kind of functionality a pushbutton or menu item should be assigned a function type ‘E’. It tells the system to process this particular module before carrying out any field checks.
    Flow Logic Validations
    Consider the case where you want user to enter only ‘LH’ and ‘SQ’ for sflight-carrid. In this case, you are restricting value of a screen field. This cannot be achieved by automatic field check. Hence there is a need of additional validation. It can be done in flow logic by using following statement:
    Field -
    Field sflight-carrid values (‘LH’).
    For multiple values
    Field sflight-carrid values (‘LH’ ‘SQ’).
    Field sflight-price values (between 1000 and 2000).
    In this case when the user enters the value, PAI is triggered  and field is checked for  that particular value. If the value entered happens to be wrong, that field is enabled for user to enter. If you have multiple Field statements in your flow logic, it is sequential execution.
    Consider the following case:
    Module  assign.
    Field sflight-carrid values (‘LH’ ‘SQ’).
    In ABAP/4
    Module  assign.
    Data: carrid1 like sflight-carrid.
    Carrid1 = sflight-carrid.
    In this case, Sflight-carrid is used in the flow logic before the field statement. The system will give invalid value or some previous value as the field sflight-carrid is used in module before it is checked i.e., field statement is after the module in which sflight-carrid is being used. The field is not available to the system unless it executes the field statement. Field statement transfers the values to the program and is done only once. If you don’t have Field statement in your flow logic, transfer of values takes place in PAI event.
    Consider one more case where you have multiple field statement.
    Field Sflight-carrid values (‘LH’).
    Field Sflight-connid values (‘0400’ ‘0500’).
    In this case if the user enters only carrid wrong, then this particular field is enabled and rest of the fields are disabled for user to input. Many times if the user enters wrong value for one field, then you might want to give option to user to enter all the fields, which is not possible by using Field statement only. This functionality can be achieved by CHAIN – ENDCHAIN.
    Field sflight-carrid value (‘LH’).
         Field sflight-connid values (between ‘200’ and ‘500’).
    Field sflight-price values (‘100’ ‘1000’).
    In this case, if the user enters wrong value only for carrid, both the fields i.e. carrid and connid are enabled as they are grouped together in the Chain statement. The field price will be disabled for input. Usually, logically related fields are grouped together with Chain-Endchain statement.
    Module Pool Program Validations
    Checking fields ABAP/4 program includes
    •     Field statement in flow logic.
    •     Module statement in ABAP/4 module pool Program.
    Field sflight-carrid module <name>.
    This module can be handled in the main program i.e. module pool program.
    In ABAP/4 program
    Module Check.
    Select single * from sflight where carrid = sflight-carrid.
    If sy-subrc ne 0.
         Message e001.
    In this case, field sflight-carrid is checked in the table for its existence.
    Dynamically Calling the Screens
    About Displaying Next Screen
    Transaction is a sequence of screens, which are displayed one after the other. The next screen displayed depends upon the attributes of first screen. In attributes you need to give Next Screen number i.e. if next screen displayed should be 200 screen, then this number should be given in next Screen attributes. These are static attributes of the screen. By default, if nothing is specified in the program, the system branches out to the screen number, which is specified in the attribute screen.
    But this doesn’t happen always. If you have many pushbuttons on the screen like the one in the following case:
    In this case, if user selects MARA pushbutton, then fields from Mara table are displayed. When the user clicks on the MARD, then the fields from MARD table are displayed. Depending upon users selection, the screen is branched out and this has to be done during runtime. This functionality can be achieved by dynamically calling the screen in module pool program.
    The screen can branch out to new screen depending upon user selection. Following command in module pool program can do this:
    •     SET SCREEM
    •     CALL SCREEN
    All these commands override the specifications given in the attributes. This overriding is temporary. The values stored in the attribute are not changed.
    Set Screen
    Set screen <number>.
    In module pool program
    Case okcode.
         When  ‘DISP’.
              Set screen 200.
         When ‘LIST’.
              Set screen 300.
    In this case, the entire processing of current screen takes place and then the system branches out to next screen. If you want to branch out to the next screen without processing the current screen, LEAVE SCREEN should be used along with the SET SCREEN.
    For Example:
    Case okcode..
         When  ‘DISP’.
              Set screen 200.
              Leave Screen.
         When ‘LIST’.
              Set screen 300.
              Leave Screen.
    When SET SCREEN is used, control cannot be transferred to the main screen or previous screen, unless you write code for the same.
    Call Screen
    Usually used for pop up screens. Many times, there is a need for user to enter additional information or secondary information on another screen or pop up screen. Once the user enters the data, he should be able to go back to main screen or to the screen where he started. This is not possible by using SET SCREEN. CALL SCREEN achieves this functionality.
    Call Screen 200.
    Will simply call a screen number 200 from a main screen. Once the screen is displayed the user can enter all the data and return to the main screen by clicking BACK button.
    To call screen as pop up screen the syntax is
    Call screen starting at <> <line no>
                         Ending at <col no> <line no>.
    In this case window will be popped as window and user can close it by using BACK button.
    Leave to screen
    To SET a new screen without processing current screen, you need to use the following two statements together:
    SET SCREEN 200.
    Or a Single statement
    A subscreen is a screen within screen. Consider the following case.
    If user clicks on FIRST pushbutton, you want to display details of MARA table and if user clicks on the SECOND pushbutton, you want to display details of MARD table.  You can do this by calling two different screens. But the information will be displayed on the next screen. Displaying data on the same screen is possible by using SUBSCREENS.
    Step to create a subscreen are as follows:
    •     Create a subscreen area on MAIN screen and name it.
    •     Create a separate screen of subscreen type.
    •     Arrange the fields on this screen so that they fit in subscreen area exactly. Only when it is larger, the part of the screen that fits in the main area will be visible.
    •     Write code for calling subscreen in flow logic.
    To call subscreen, from your flow logic, you need to include the statement both in PAI and PBO.
    Call subscreen <area> including <prg name> <’screen no’>.
    Call subscreen <area>.
    Area - is the name of the area on main screen.
    Prg. Name - is the name of the module pool program.
    Screen number - is subscreen screen number.
    Some of the don’ts with subscreen are:
    GUI status cannot be set to the subscreen
    •     OKCODE is not applicable to the subscreen.
    •     Subscreen cannot call another screen.
    •     It cannot contain AT EXIT-COMMAND.
    You can call multiple subscreen in the same area (at any given point of time, only one subscreen can be called in the subscreen area) and is done dynamically during runtime by using variable screen number.
    Table Controls
    A table can be created in transaction. These tables when designed on the screen are called as SCREEN TABLES. These screen tables are of two types viz.
    •     Table controls
    •     Step loops
    Though these are tables when code is written to handle them, the  tables are treated  as loops. 
    Features of Table Controls
    •     Data is displayed in the form of table when many records match the criteria.
    •     Table control gives user the feeling of an actual table.
    •     You can scroll through the table vertically and horizontally.
    •     You can select rows and columns
    •     Resize the width of a column
    •     You can have separator lines in between rows and columns
    •     Automatic resizing of the table when the user resizes the window.
    In general table control includes all the features of an actual table and user gets the feeling that he is actually working with table. You can update information in table control and it can be updated in the database table by writing code for it.
    Steps associated for creating complete screen table are as follows:
    •     Declaration of table control in module pool program.
    •     Designing of table control on the screen.
    •     Passing data to table in flow logic.
    Declaring of Table Control in the Module Pool Program
    Controls TCI type Tableview using screen <screen no.>
    When you use table control in a screen you must declare the structure in module pool program. Important fields of tableview are as follows:
    •     Lines – number of displayable rows in a table.
    •     Top_line – the row of table where the screen displays start.
    •     Current_line – The row currently being processed inside a loop.
    When you process the table control in flow logic depending upon where you want to start display of rows, you need to use these variables.
    Designing Table Control on Screen
    •     To design table control on the screen, you need to click on Table in control bar and place it on the screen. You can adjust the length and width of table control.
    •     Name the table control. (Here you need to use same name which you have used for declaration of table control in module pool program)
    •     From dictionary object, select table fields and place them in the table control.
    Passing data to Table Control
    As already mentioned, table controls are tables but are treated like loops. Usually transfer of data from program to screen is automatic. But in case of table control, transfer of data is not automatic. You need to explicitly transfer the data to table control. ABAP/4 provides loop statement, which is associated with flow logic to transfer the data. Because table control is treated like a loop, data from where it is transferred should be a loop. You cannot transfer the data by only select statement; you need to put the data into internal table. ABAP/4 provides the LOOP statement, which is associated with the flow logic and allows you to loop through the table control and internal tables. In between LOOP-ENDLOOP, you can use most of the flow logic keywords like field values.  Module etc.
    You need to code a LOOP statement in both PBO and PAI event of the screen. With LOOP statement, you can transfer the data from program to table control and vice versa.  That is, if user updates the value in the table control, you can update database table with its value. And this can be done in PAI event. So even if you are not updating database table through the table control, you need to put the LOOP statement in the PAI event also.
    LOOP AT <internal table> with control <table control name> cursor <scroll variable>
    Loop at itab.
    Proper usage of Table Control is as follows:
    In flow logic.
    Considering, we have following fields in table control and the screen looks like this:
    In module pool program
    CONTROL TC1 Type tableview using screen 200.
    Module assign.
    Sflight – carrid = itab – carrid.
    Sflight - connid= itab -  connid.
    Sflight - fldate= itab – fldate.
    The transfer of the data from program to table control takes place in steps and these steps are as follows:
    •     With LOOP AT statement the first row is picked up and placed in the header of the internal table.
    •     Whatever statements you have in between LOOP-ENDLOOP are executed.  In this case, you have Module statement. In Module statement, value of internal table is assigned to table control field.
    •     The row in internal table is transferred to the first line of the table control as stated in the LOOP AT statement.
    •     The system encounters the ENDLOOP statement and Control is passed to the next line of the internal table.
    •     In the same way, all the records of the internal table are passed to the table control.
    Step Loops are type of screen table as already mentioned. Step loops are repeated blocks of field in a screen. Each block contains one or more fields and these blocks are repeated. Step loops aren’t like actual table. You can scroll vertically but not horizontally. Three steps are associated with creation of step loops:
    •     Creation of step loops on screen, which includes declaring fields on the screen and then defining the step, loops for these fields.
    •     Passing data to the step loop is exactly similar to the passing of data to table controls.
    •     In step loop, you don’t need to define the step loop as such in the module pool program but the cursor needs to be defined in the program.
    Types of Step Loops
    •     Static – Static Step Loop (SSL) have fixed size that cannot be changed during the runtime. If user resizes the window, the size of the static step loop is not changed.
    •     Dynamic – Dynamic Step Loop (DSL) is variable in size. When the user resizes the window, the system increases or decreases the number of the step loop blocks. 
    You can have only one dynamic step loop and can have as many static loops in your    transaction.
    Programming with the Static and dynamic step loop is exactly same.  For the system or for the user it doesn’t make any difference whether it is static or dynamic step loop.  Only attribute, which you fix during designing of the step loop, is type attribute for step loop F for fixed i.e static and V for variable i.e. dynamic.
    Writing code for Step Loop in the flow logic.
              Loop at itab cursor cl.
              Module set.
              Loop at itab.
    Empty loop is must for both table control and step loop
    LOOP AT statement for step loops and Table controls is similar. Loop At statement transfers the data to screen table. You need to have the Module to assign the values for the screen table.
    In module pool program you need to define the cursor.
    Date:   CL TYPE   i.
    Cursor parameter tells which line of step loop display should start.
    “Module Set” in module pool program assigns the values to step loop fields, which is similar to table controls.               
    Branching to List Processing
    Switching To List Mode
    You can display a list within a transaction.
    You can produce a list from module pool program by using the command
    Leave to List-Processing.
    This statement switches the system from dialog mode to list mode. And from this point onwards until you return to dialog mode, you can use all the normal report statement like write, select or any other event.
    Returning back from LIST mode
    You can return back to dialog mode by clicking the BACK button.
    You can have your GUI status and write code for the same. You can include the command LEAVE LIST-PROCESSING. When the system reaches this command, it leaves the list mode and returns to the dialog mode.
    Help & Value Request
    In any transaction, When the user presses F1 or ? on a field, System provides the help  facility for that particular field. In dialog program, when F1 is pressed, help provided by R3 system is sourced from data element documentation. If this documentation is not present for that particular field or if user needs to display additional information for that particular field, then user defined help can be provided through PROCESS ON HELP REQUEST.
    In ABVP/4 help can be provided to the user by:
    Data element documentation: The F1 help can be enhanced, by adding an additional text for the data element in ABAP/4 dictionary.
    It can be done with the help of following steps:
    Place cursor on the screen field,
    You can now extend the existing help.
    If you don’t have this event in a program, then the documentation of the field in the ABAP/4 dictionary is taken into consideration. If this event exits in the program then it is executed.
    Process on HELP-REQUEST event
    This event is triggered when user presses F1 on a screen field. You need to handle this event in flow-logic by specifying the fields and attaching the module to it.
    In module pool program
    Write   : `This is field is from sflight table’
    Write   : /  ‘It is of four Character’.
    When the user presses F1 on this particular field, then this message will be displayed on the screen.
    Value Request
    Whenever the user presses F4 on the screen field list of possible values, particular fields are displayed. If the standard value-help is inadequate or if you want to display additional fields or with different combination of fields, developer can program this in PROCESS ON VALUE-REQUEST event in the flow-logic and subsequent module in the module pool program. When the user presses F4, list of possible values are displayed either from matchcode objects or check table or help view or domain. Each one of them is explained briefly.
    Matchcode objects: Are aggregated dictionary objects and detailed procedure to create these objects is explained in the later part of the material.
    Check Table:  If a check table is assigned to the table field and if the user presses F4 for that particular field, then all the key fields are displayed.
    Domain Values: The values defined in the domain are displayed. These values are set in domain when the domain is created in the dictionary.
    Help views:  In cases where the check table is not sufficient, you can create a help view with this check table, which gives additional information like explanatory text for the fields of the check table.
    Each time the user presses F4 on the screen field, following algorithm is called internally.
    When the user presses F4 on flight number, the following screen is displayed.
    The screen displayed is pop-up screen and code for the flow logic and module is written below:
    Flow-logic code

  • Problem: - 100% CPU is consuming because of an exe program

    Problem: -   100% CPU is consuming because of an exe program
    Environment: -
    Operating System           : - Windows Server 2008 R2 Datacenter
     Service Pack 1
    Processor                        :
    - Intel(R) Xenon(R) CPU E5-2670 v2 @ 2.50 GHz 2.50 GHz
    Installed memory (RAM): - 3.75 GB
    System type                   : - 64 – bit Operating
    Exe Description: - Exe belongs to OCR Engine. We are using Tesseract OCR engine
    for developing application. It is working for almost thousand machines properly. Exe is capable to OCR images (Using tiff).  We are using 32 bit Tesseract exe.
    Problem Description: - We have developed a component which can extract different kind of document ext and for tiff images, we
    have used Tesseract exe.  
    While processing through an application program we process a tiff file through Tesseract exe and it is taking more time to complete process as compare to any other
    machine and many times  or continuously; I have seen that CPU is reaching up to 100% and user is not able to do anything. Machine becomes in hang mode.
    Already Attempt: -
    I) – I tried to extract same series of document from another same kind of machine and I found that another machine is working absolutely fine.
    II) –I tried to debug program on problem machine; I found that it is taking more time to process a tiff file as compare to any other machine. Then I found that more than one exe
    is in Task Manager Program and each one is having 87 to 90 percent use of CPU.
    III) - It think, because exe is taking more  time to process and on that time CPU becomes 100 % and when it goes to extract again for  another tiff document system hang,
     because earlier exe is still in process.
    Because program is running successfully in many machines and problem is coming from a single machine, so we are not able to find out exact root cause. Maybe it relates to Windows Program/Windows Patch/
    Anything Else.
    As this issue is coming on client side and it has become critical to find the solution. So kindly let us know possible solution for the problem.
    For any kind of input which can assist us to resolve the issue.
    I will be really thankful.

    I) – I tried to extract same series of document from another same kind of machine and I found that another machine is working absolutely fine.
    II) –I tried to debug program on problem machine; I found that it is taking more time to process a tiff file as compare to any other machine. Then I found that more than one exe is in Task Manager Program
    and each one is having 87 to 90 percent use of CPU.
    III) - It think, because exe is taking more  time to process and on that time CPU becomes 100 % and when it goes to extract again for  another tiff document system hang,  because earlier
    exe is still in process.
    We have used all the way but not finding anything to resolve issue. Because it is occurring on only single machine over 1000. What can be possible cause and what should we check on machine for resolving it.

Maybe you are looking for

  • Deletion of  the Purchase order at the item level and header level

    Hi Gurus, We are using SRM 7.0 system. In standard SRM 7.0, the PO can be deleted at header level and at line item level. I need to know the differnce between these deletions. I found that if the PO is deleted at the line item level the  deletion ind

  • Alternative to Adobe Application Manager Download?

    I signed up for the monthly access to CS6.  It works fine at home, but I want to use my second license on my PC at work, which is on a government computer.  I can install and run AAM with my admin priviledges, but when it comes to downloading and ins

  • ASO MDX queries

    Hi, Is there any possibility that we can use semicolon at the end of MDX member formulas for ASO database? If yes please let me know how we can write and calculate member formulas with semicolon at the end? One thingI know for sure is we should not u

  • I ve got this page (Internal Server Error ) when try to open htmldb 2.0

    i install htmldb 2.0 sucssefully but when try to open with this path http://hostname:7777/pls/htmldb/htmldb it gives me this page Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your reque

  • Percentage of Grand Total Per Detailed Row.

    Hi All, New to BI Pub and I am trying to go through the blogs and forums. I have a question about how to insert % of grand total in a table. I have the following requirements.... Group by: State City | Sales | % of Grand Total Sales Albany 100,000 10