ABAP: Stay logged into SAPGUI indefinitely

Originally published at purrgatory. Please leave any comments there.

Sometimes you’re doing something midway on your system, and you’re interrupted for a meeting or lunch or whatever. You come back and you’ve been automatically logged out, losing whatever you were working on earlier.

Prior to our upgrade to ECC6, you can simply keep yourself logged in by making timed calls to function module SAPGUI_PROGRESS_INDICATOR. Once upgraded however, the code has changed, causing it to no longer extend your GUI session.

For those who missed out on the old code that does this, here it is:

FUNCTION Z_SAPGUI_PROGRESS_INDICATOR.
*”———————————————————————-
*”*”Local Interface:
*”  IMPORTING
*”     VALUE(PERCENTAGE) DEFAULT 0
*”     VALUE(TEXT) DEFAULT SPACE
*”———————————————————————-
DATA : OUT_TEXT LIKE SY-UCOMM,
PERC     TYPE I,
MODNO    TYPE I.

IF SY-BATCH <> SPACE.
EXIT.    “do nothing in batch
ENDIF.

IF PROG_INDI_CHECKED = SPACE.
GET PARAMETER ID ‘SIN’ FIELD PROG_INDI_MODE.
PROG_INDI_CHECKED = ‘X’.
ENDIF.
IF PROG_INDI_MODE = ’0′.
EXIT.    “do nothing if turned off via SPA/GPA
ENDIF.

OUT_TEXT = TEXT.
PERC     = PERCENTAGE.
MODNO    = SYST-MODNO.
IF PERC < 0.   PERC = 0.   ENDIF.
IF PERC > 100. PERC = 100. ENDIF.

CALL FUNCTION ‘SAPGUI_PROGRESS_INDICATOR’
DESTINATION ‘SAPGUI’
KEEPING LOGICAL UNIT OF WORK
EXPORTING TEXT       = OUT_TEXT
PERCENTAGE = PERC
MODN       = MODNO
EXCEPTIONS SYSTEM_FAILURE
COMMUNICATION_FAILURE.
SYST-SUBRC = 0.

ENDFUNCTION.

Upgrading my 3.1.3 Spirit iPhone 3GS jailbreak to 4.2.1 greenpois0n

Originally published at purrgatory. Please leave any comments there.

Just some notes for future reference.

Steps taken:

  1. Update stock firmware to 4.2.1
  2. Follow iClarified steps using greenp0is0n.
  3. Reinstalled Cydia apps, etc.

Encounters:

  • greenpois0n JB stopped at “firmware download etc etc 60000ms”. Waited 10 mins after that but it wouldn’t budge. Just reset the device and restart the whole JB process.
  • Old jailbreak files were not removed, particularly stuff in /var/stash. Will need to remove the old duplicate to get some space back.
  • Infinifolders is a good SBCategories replacement. :)

Wireless proxy configuration for your jailbroken iPhone

Originally published at purrgatory. Please leave any comments there.

You are on your company’s WiFi network. You’ve been able to access intranet sites so far, but now you’d like to access an external site via the company’s HTTP proxy. Your company, however, does not provide a proxy auto-configuration URL. You are therefore stuck with having to add or remove the proxy manually in your iPhone WiFi settings each time you’d like to access external or local sites, respectively.

So how can we make things easier? Simple, create your own proxy.pac file.

Create a text document on your computer. In this file, write the JavaScript code necessary to help Safari use your proxy only when needed. See this Wikipedia page for examples. Here’s what mine looks like:

function FindProxyForURL(url, host) {

proxy = “PROXY companyproxy.address.com:8080″;

// Next, we want to send all traffic to company.net browser direct
if (dnsDomainIs(host, “.my.intranet.domain.com”)) {
return “DIRECT”;
}

// Loopback and localhost goes browser direct always.
if ((host == “localhost”) ||
(shExpMatch(host, “localhost.*”)) ||
(host == “127.0.0.1″)) {
return “DIRECT”;
}

// Test to see if host is an IP address
reip = /^\d+\.\d+\.\d+\.\d+$/g;

if (reip.test(host)) {

// Check for local IP address
if (isInNet(host, “192.168.0.0″, “255.255.0.0″)) {
return “DIRECT”;
}

}

// Default return condition is the proxy, since itâ??s assumed that everything
// else is on the Internet.
return proxy;

} // End of function

Save and name the file as proxy.pac. One site recommended that the file encoding be set to UTF-8, which I followed and it seems fine. Take this file and copy it to anywhere on your iPhone using tools such as iFunbox or iFile or SSH. I put mine in /var/mobile/Documents.

Now go back to your iPhone WiFi Settings in Settings –> Wi-Fi. Tap on the > button of your WiFi network to view its settings. Swipe all the way down and change HTTP Proxy to Auto, and in the URL field type in the file location, e.g. file:///var/mobile/Documents/proxy.pac. Exit, and all your programs should now automatically detect whether a proxy should be used whenever you are on this WiFi network.

SPCA confusion

Originally published at purrgatory. Please leave any comments there.

The SPCA is great and all, taking in strays and whatnot, but seriously, their administration and ‘customer service’ could use some work. Love their doctors though.

As you may know, both our cats are formally adopted from SPCA.

Cat #1: Shcamper. Not yet neutered since he was still a ‘teenage’ kitten when we picked him up. The neutering fee should be free as part of the RM100 adoption fee. Called them to see if we can walk-in or schedule an appointment and the lady on the phone flat out said that they don’t do neutering. Told us to go to the Kembiri clinic instead. And we did, but the guy told us that actually SPCA cats should be neutered by SPCA back at Jalan Kerja Ayer Lama. Since we were already there we might as well proceed, with an additional RM50 donation for the procedure.

Cat #2: Chewmil. Spayed by SPCA but still shows signs of heat. Called SPCA to get her checked out but the girl on the phone said they don’t tend to adopted cats after one month of adoption. Like lepas tangan only right? Will most likely have to spend another RM100 for another procedure at Kembiri. Poor girl.

It would have been great if these people behind their desks would take the trouble to explain to people exactly how and what the process is. If there’s going to be just one month of support, at least say so in the beginning. I don’t know if these people are there just for the job or for the cats, but please lah, be more emphatic with the people you deal with.

why the hate?

Originally published at purrgatory. Please leave any comments there.

Last month, while we’re on our way to Bali, some guy decides to post a comment on a 2-year old post:

http://www.bangsar.net/blog/2007/07/12/windows-automatic-update-annoyance

Okay, you don’t like the post. It’s 2 sentences and piggybacks a reputable site. So? I don’t see why I must give my own thoughts to every single thing that happens in the world. I don’t see why I have to try to improve on something even when I don’t have anything to add. But if it’s useful, why can’t I just forward it and make it known? It’s a reputable site after all, so shouldn’t we link to reputable sites? Would you rather I link to your site instead, if you would have cared to share it with us?

Just because you can’t find anything of useful value here, doesn’t make this site useless. You might be the god of {insert subject matter here}, but what gives you the right to be so aloof and condescending to others? Everyone has something they’re good at, but not everyone needs to show off and be a prick. Before you even try to point out other peoples’ faults, why don’t you look at yourself in the mirror first and do something about that attitude of yours.

Oh, and Donald, why don’t you add me on Facebook so that we can compare friends? Maybe even Friendster? If you’re anything the smart guy you put out to be, you should be able to find me easily. Regardless of that outcome, go fuck yourself.

it’s been real quiet down here

Originally published at purrgatory. Please leave any comments there.

Not really quiet per se. Been just too busy with stuff at work and by the time we get home we’re just mush. Thankfully, we’re finally going on our honeymoon for a week in Bali. It’d definitely help us unwind and not think about work. Please wish us a safe passage. :)

the last 40 days…

Originally published at purrgatory. Please leave any comments there.

…might be a good title for a zombie movie. :)

I hate Apple. Wife has a Powebook G4 that’s eligible for a 2006 battery recall, but Apple Malaysia won’t honour it as it is out of warranty. After making calls and making a query on Apple Discussions, I decided to just pass my battery to a colleague going for a vacation in the UK. New battery was delivered no questions asked.

I hate Citibank. When you talk to their customer service people they sound like all they want to do is get rid of you. You know, not in language but in the tone of their voice. Their collections department is so hard to reach.

I hate Streamyx. As usual. Been having sporadic network issues over the weekend since Saturday; download speeds would fall to shit without affecting my uploads. Couldn’t even access Streamyx or TM’s own website. I hate calling for tech support because it usually ends up making things worse.

Customer service is a failboat in this country.

I love Ip-Man. Such an awesome movie.

Upgraded some cables to CAT 6 in the hope that it’ll improve my HD streaming to the PS3. Somehow or rather my Aztech Homeplugs got fried in the process. Such delicate things.

avisynth/mencoder transcoding for ps3 media server on windows 7

Originally published at purrgatory. Please leave any comments there.

Finally managed to get CoreAVC + Subtitles + Avisynth/Mencoder working for the PS3 Media Server on Windows 7 RC.

By right, the default usage of just Mencoder for transcoding with subtitles is just fine. However, I have some anime files that don’t size/zoom just right on the TV (i.e. there is no Zoom screen mode on the PS3, instead Normal mode displays like Zoom mode). AviSynth/Mencoder displays them fine though, with all 3 screen modes available, but of course, no subtitles. And since I have CoreAVC with CUDA acceleration, might as well make use of it for the other 1080p files.

So yes, follow the instructions for CoreAVC in PS3 Media Server’s README/FAQ files.

Then implement this hack to stop Windows 7 from using its built in DTV-DVD filter:
Replacing the Default DTV/DVD Decoder without Breaking Live TV Playback
(Take note of the different registry path for 64-bit in the comments)

Now, you should be set. I’ve tested this so far with MKV files that have built in subtitles. With vsfilter.dll in the Avisynth plugins folder, I’m expecting double subs to appear for movies with external subs (this is my assumption by logic, but might not be the case), so removing vsfilter.dll from the plugins dir might help with that.

MAP 1562

Originally published at purrgatory. Please leave any comments there.

So this old Proton decides to roll back into my mom’s car at a traffic light. My mom tried to get it to pull over, but it ran off. Just scratches, but still.
So if you see any MAP 1562 on the road, please send the driver my regards with a slap to the face. Thanks.