Max Titov IV @ TechSplice

The most beautiful music of all is the music of what happens.
  • Home
  • About

Posts Tagged ‘SAP/ABAP’

20 Nov 2010

SAP: Generating a Class Actor – CREATE_PERSISTENT

Been playing with the persistent objects and finally figured a part that involves generating a CREATE_PERSISTENT method in the Base agent class.

To do this

  1. Go to Persistence Representation
  2. Select Utilities – Generate – Class Agent – Class
  3. Click the Yes button

That’s all.

20 November, 2010 at 11:29 by maxtmax

Tags: abap, programming, SAP/ABAP
Posted in SAP/ABAP | No Comments »

8 Nov 2010

ABAP Runtime Analysis – variant setup

Runtime analysis can be used to quickly get to the bottom of which tables are referenced during a transaction/program/function-module call.

I like running SM30 over ST22 because you get a nicer presentation of what tables were hit.  ST22 tends to bee too detailed in majority of my scenarios.

By default the report is initialized with the DEFAULT variant.  This is limiting and will not give you as much information as you might want.  Typically on a new system I set up my own variant that allows me to access more information.

Steps to set up your own variant:

  1. Select the drop down option in the Variant selector panel
  2. Click the green check-box on the next screen without changing the parameters of the Selection Criteria for Variants pop-up
  3. You will be presented with two default Variants – DEFAULT and TMP; ignore those and click on the Create button
  4. Type in the name and continue
  5. Here’s the most important part of this trick.  When you get to the main configuration page of the variant go to the third tab [Duratn/type] and in the Aggregation pick the None option.
  6. Once done click Save as… button and you are ready to run your Analysis.
8 November, 2010 at 13:25 by maxtmax

Tags: configuration, debugging, sap, SAP/ABAP
Posted in Everyday stuff | No Comments »

23 Dec 2009

SAP: STMS transport stuck

When coming across a situation where thetransprts are stalling/hanging in the STMS queue there are a few things that you can do:

The fist and most obvious course of action is to contact your Basis support team.

Given that you are reading this article you probably wanted or were forced to figure this one out on your own so here are a few helpful actions that you can take to narrow down the problem:

TP processes:
Go to the SM51 and check if any of the TP processes are still running, you might be required to kill these before proceeding haulted imports.

Check the TP System Log:
You can do this by STMS – Overview – Imports – Select Queue System – Goto – tp system log – F5
This will show you a step by step log of what has occured in the system, you would be able to see which transports are being processed and what has completed.

Check the Import Monitor:
You can do this by STMS – Overview – Imports – Select Queue System – Goto – Import Monitor
This will show you the queue of active transports [if any], if you see that there is a collection of unprocessed imports then you need to flush the queue.

Check TMS background job:
You can also check if the background job RDDIMPDP is running.

From tim to time it happens that the import queue becomes inconsistent and the system stalls, as a result you can be stranded without any of your transports moving ot he next system.

Tables:
TMSTLOCKR: will unlock a given transport from the transport queue [the transport truck will dissapear after deleting of the entry int he table]
TRBAT: will contain values correspondign to active imports, if you have a stuck transport that is haulting a collection of other transports a simple delete from this table will re-initialize the queue and push the backed up imports forward.
TRJOB: should also be cleared in order to continue the regular flow of backe up transports

For any additonal information please refer to the following notes:
818065, 302859, 556941, 556946, 71353, 49242, 323726, 56311, 24800, 486991, 506771, 138200

23 December, 2009 at 8:51 by maxtmax

Tags: configuration, SAP/ABAP, stms, transports
Posted in SAP/ABAP | No Comments »

29 Oct 2009

SAP: Check the Passwords of Standard Users in All Clients

A quick way to check the status of all the standard users in your SAP system is to run a program RSUSR003.

29 October, 2009 at 12:22 by maxtmax

Tags: basis, program, SAP/ABAP, security, users
Posted in SAP/ABAP | No Comments »

23 Apr 2009

ABAP cancelling an SD Billing Document

If you have access to a billing document number try executing the following function:

DATA: l_rtrn TYPE bapireturn1 OCCURS 0.
DATA: l_succ TYPE bapivbrksuccess OCCURS 0.

CALL FUNCTION 'BAPI_BILLINGDOC_CANCEL1'
              EXPORTING
                billingdocument       =
*               testrun               =
*               no_commit             =
                billingdate           = sy-datum
              TABLES
                return                = l_rtrn
                success               = l_succ.

This should create a cancellation document.

23 April, 2009 at 10:49 by maxtmax

Tags: cancellation, code, function, invoice, SAP/ABAP
Posted in SAP/ABAP | No Comments »

25 Mar 2009

ABAP: execute OS level command

There are many things that one can do to execute a command in an Operating System from an ABAP report.  I’ll explain one method that one can take to accomplish this.

  1. Using transactions SM49 and SM69 set up and test a new OS command that you wish to execute.  For the purposes of this post I’ve set up an executable command ZSAPCAR32.
  2. When I was setting up the new command I’ve selected the option to add additional parameters to the command.
  3. Once tested and satisfied you can add a new function module [SXPG_COMMAND_EXECUTE] to your report that will call preset executable command.
data: g_rlog                TYPE btcxpm OCCURS 0.

CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
       EXPORTING
            commandname                   = 'ZSAPCAR32'
            additional_parameters         = <additional parameters>
            operatingsystem               = <system you specified in SM69>
       TABLES
            exec_protocol                 = g_rlog
       EXCEPTIONS
            no_permission                 = 1
            command_not_found             = 2
            parameters_too_long           = 3
            security_risk                 = 4
            wrong_check_call_interface    = 5
            program_start_error           = 6
            program_termination_error     = 7
            x_error                       = 8
            parameter_expected            = 9
            too_many_parameters           = 10
            illegal_command               = 11
            wrong_asynchronous_parameters = 12
            cant_enq_tbtco_entry          = 13
            jobcount_generation_error     = 14
            OTHERS                        = 15.

if sy-subrc eq 0.
    LOOP AT g_rlog INTO g_warlog.
*     display command output
      write g_warlog.
    ENDLOOP.
endif.

The above code will execute your OS command and display the results.

25 March, 2009 at 9:13 by maxtmax

Tags: function, programmer, sap, SAP/ABAP
Posted in SAP/ABAP | 1 Comment »

25 Mar 2009

ABAP: load file using pop-up window

When writing a program the simplest way to load a file from your client PC in to the server SAP syste is through a use of a regular text box.  But if you want to get a little fancier try using the following function:

data: l_select TYPE sapb-sappfad.

CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            def_filename     = l_select
            def_path         = ' '
            mask             = ',*.*,*.*.'
            mode             = 'O'
            title            = 'Select filename to OPEN'(f05)
       IMPORTING
            filename         = l_select
       EXCEPTIONS
            selection_cancel = 1
            selection_error  = 2
            OTHERS           = 3.

This function will open up a pop-up window [standard to windows] allowing the user to select a file somewhere on their local comptuer.

25 March, 2009 at 7:00 by maxtmax

Tags: function, programmer, sap, SAP/ABAP
Posted in SAP/ABAP | No Comments »

17 Mar 2009

SAPGUI_PROGRESS_INDICATOR

A usefull little function that will allow you to display a status update on the bottom left corner of the screen when running your reports.

call function 'SAPGUI_PROGRESS_INDICATOR'
       EXPORTING
            percentage = 0
            text = STATUS_TEXT.

Note: anything lower then 0 will be rounded up to 0 and anything greater then 100 will be rounded down to 100.

17 March, 2009 at 9:36 by maxtmax

Tags: code, sap, SAP/ABAP
Posted in Everyday stuff | No Comments »

18 Nov 2008

The sales order … is currently being processed by user …

An inbound IDOC was failing due to the error [described in the title].  Some research resulted in the following results:

TR: SM12 displayed a list of locked elements in the system.

TR: SM04 displayed a list of logged in users in the local system.

TR: SM08 displayed a list of logged in users in all the app-servers [not just the current system].

Unfortunately in my case non of the mentioned transactions above helped me narrow down where the user was locking the system – in the end I’ve requested for the user to log back in and kill his session with a TR: /nex.

18 November, 2008 at 8:59 by maxtmax

Tags: fix, order, problem, process, sales, sap, SAP/ABAP, solution, user
Posted in SAP/ABAP | No Comments »

23 Nov 2007

Get a list of all transactino in SAP.

Transactions, transactions, transactions. One of many things that make programming in SAP so much more complicated. Quite often I find my self in a situation when I need to do a particular task and have no idea which transaction to use. Trivially one could ask a fellow co worker who’ve worked with sap for over ten years, but what do you do when you are all alone in the office and there’s no one to ask?

Don’t frown you can find the right transaction by referencing the SAP itself, and here’s how:

  1. Use transaction SE11 [Abap Dictionary - or in other words a list to tables in SAP].  If you don’t have permissions to use SE11 try SE16 which is a watered down version of Abap Dictionary.
  2. Look up one of the following tables:
    1. TSTC – transaction codes.
    2. TSTCT – transaction codes with descriptions.
  3. Set the maximum number of records to 99,999 and the width to 500.  There’s quite a few transactions to go through [50K+].
  4. Finally you can export the data to a separate file[xml/txt/xls formats] using the Edit >> Download function.

After all of that is that you can use your favourite editing tool to find a particular transaction, look at the descriptions and try not to get overwhelmed.

PS: Make sure you pick the language that applies to you.

23 November, 2007 at 6:57 by maxtmax

Tags: list, procedure, sap, SAP/ABAP, transaction
Posted in SAP/ABAP | No Comments »

« Older Entries
Newer Entries »
  • Subscribe using FeedBurner
  • Cloud Data

    abap adobe animation basic beautiful builder camera code configuration contribution design development digital engineering fix flash Flex function images interesting lesson new paypal Photography php problem problems program programmer programming review sap SAP/ABAP sdk setup soap software solution story system tables transaction transports user video

    WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.

  • My Links

    • Cooking
    • Gallery
    • Resume
  • Online Tools

    • Airline Ticket Search
    • Estimate Shipping Cost [from US]
    • Link your Blog
  • Software Engineering Blogs

    • Adam Goucher
    • Joel on Software
    • The Third Bit
    • Wide Awake Developers
  • Categories

    • Everyday stuff
    • Flex
    • Photography
    • SAP/ABAP
    • Short Stories
    • Software Engineering
    • Web Development
  • Gallery

    Roy Tanck's Flickr Widget requires Flash Player 9 or better.

Max Titov IV @ TechSplice is proudly powered by WordPress
Design & code by Jonk
Entries (RSS) and Comments (RSS).