Max Titov IV @ TechSplice

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

Posts Tagged ‘code’

7 Apr 2010

SAP tp: return codes

For each step that takes place within the tp command there could be 8 different possible return codes [0, 4, 6, 8, 12, 13, 14, 16]. The meaning for each of those codes is as follows:

Transport imported successfully:

0: Transport successful

4: Warning occurred

Transport did not import successfully:

6: Post-processing is required

8: Transport carried out with an error [individual object could not be transported successfully]

ex: objects could not be overwritten

Transport termination:

12 and greater: transport was terminated

7 April, 2010 at 22:09 by Max

Tags: abap, code, return, sap, transports
Posted in Everyday stuff | No Comments »

21 Aug 2009

SAP: debugging in pop-up windows

Debugging in SAP is something that I do almost on a daily basis, most of the time I get by just by typing the /h command in the transaction window and executing the program but this is not always possible.

The scenario that I speak of occurs when you are debugging a pop-up window. When you are working with a pop-up window there is no convenient transaction window where you can turn on the debugger. So what do you do?

Simple.

Create a new file; lets call it debugger.txt and populate the contents of the file with the following lines:

[Function]

Title=Debugger Session

Command=/h

Type=SystemCommand

Save the file and leave it on your desktop.

Now when ever you get to a pop-up window that you want to debug simply drag the debugger.txt file in to the window and you will activate the debugging session.

Happy hunting!

21 August, 2009 at 18:38 by Max

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

4 Aug 2009

SAP – ABAP – gui – hiding selection components

If you want to make your reports more functional you can start controling the properties of different components based on selections that are performed by the user.

For instance in this post I’ll show you a quick example of how to hide a on-screen component based on user selection.

PARAMETER:  cb_a AS CHECKBOX DEFAULT 'X'
            USER-COMMAND batch MODIF ID ida,
            cb_bAS CHECKBOX DEFAULT 'X'
            USER-COMMAND batch MODIF ID idb.

AT SELECTION-SCREEN OUTPUT.

  LOOP AT SCREEN.
    IF screen-group1 = 'IDA' AND cb_b NE 'X'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.

    IF screen-group1 = 'IDB' AND cb_a NE 'X'.
      screen-active = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.

This example will hide each of the check boxes depending on the selection of the other check-box. If both are selected then both are visible, if one is un-checked then the other is hidden.

The active attribute controls the visibility of a particular screen component. Explicitly: 0 = hidden, 1 = visible.

4 August, 2009 at 13:52 by Max

Tags: abap, code, create, design, development, display, hide, programmer, sap, show, ui
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 Max

Tags: cancellation, code, function, invoice, 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 Max

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

9 Dec 2007

Cyrilic integration of Flex and PHP

A recent project involved integration between a PHP content management tool like Joomla and Adobe Flex 2. I wrote a PHP script that parsed a MySQL database creating an XML structure that was then picked up by a HTTPService in a Flex application.

The information in the database was stored in Cyrillic format, hence when ever I was loading the data in to the SWF compiled file the end result was a collection of garbage data.  Setting the actuall HTML to Windows-1251 encoding did not help the situation.

My following approach was to locate a native functionality within the Flex architecture to mediate the situation.  Unforchunately I wasn’t successful in aquiring sattisfying examples to solve the problem.  For that matter it became sadly obvious that I haven’t seen any flash pages using non/english alphabet [either I haven't been checking international sites that much or Adobe Flex isn't widely used overseas] .

My third approach was to look at the actual php code that was generating the XML structure.  I’ve discovered a useful function mb_convert_encoding that eventually solved my problems.  Using a simple snippet of code:

mb_convert_encoding($string_to_convert,'UTF-8','Windows-1251');

I was able to convert the data from UTF-8 in to Windows-1251 which allowed me to display the desired Cyrillic characters.

9 December, 2007 at 19:57 by Max

Tags: code, development, flash, Flex, php, sql
Posted in Flex, Web Development | 2 Comments »

  • Subscribe using FeedBurner
  • Cloud

    abap adobe animation basic beautiful builder camera code configuration contribution design development digital engineering fix flash Flex friends function images interesting lesson new paypal Photography php problem problems program programmer 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).
Podcast Powered by podPress (v8.8)