Wednesday, August 29, 2012

How to Transpose Internal Table in SAP ABAP?

Suppose you have one internal table with 12 rows and 15 columns, and you want to transpose it to become 15 rows and 12 columns, how to do it in ABAP? In Excel it can be done easily by simply copy the table and select Paste Special and tick Transpose option.
Will it be such easy in SAP? Things can be easier if you do it with your heart. I heart you, internal table.
So, you're gonna need field-symbols, of course. And loop (can't live without it!). And one magic elegant word like 'ASSIGN COMPONENT idxcol OF STRUCTURE itab TO thefieldsymbol'.

Here is the sample of the codes:

Tuesday, August 28, 2012

Never Thought that Adding Space in Text in Smartforms is That Easy!

Have you ever crossed loosing white space you add inside the texts on generating reports created in the SAP smartforms? I have. I was wondering why smartforms doesn't like space. What did space do wrong? Why smartforms swallow spaces whenever I add it in the text to make indent effect.

Don't get frustated. It's very easy to add space. Yeah, it's easy after you know it. Type the spaces inside the text variable with quotes like:
&' 'myvariable&

Never thought it's that easy? Neither have I!

Thursday, June 21, 2012

IT Department Role in a Company: as a Sales Promotion Girl or Customer Service?

There's no doubt (well, at least for me) if a company wants to move forward faster it should be supported by IT. Can you imagine a big company that does the whole things manually, in this information age? Reporting, accounting, calculating, monitoring, payroll processing with an Excel? I can't.

There's no doubt that when it comes to service, IT department in a company should provide service to other departments in the same company, and do the best to make they're fully satisfied. The service that fulfills all requirements from end users.

Now the question is, who should initiate the requirements?

Should IT department serve end users by agressively asking them, what you need, what you want, and also showing them this is what we have, what we achieve, do you want it, just like a Sales Promotion Girl?

Or should IT department serve end users by following up what end users report to IT, and provide services upon the reported matters, just like a Customer Service?

Sometimes people are mislead. They think IT department should be like Sales Promotion Girl. People think that they only need to wait, and taddaaa ... IT department will know what they need and organize things to make it happen. If you think that way, please oh please, brainwash your mind. IT department is not like an SPG. You don't want employees of IT dress up very sexy, stand up in front of your doors and offer IT products to you, right?

It's your call. If you need something, tell IT. Then start from there. You can't expect IT to know all you need without letting IT know. IT doesn't have that fortune-teller ball. But IT does have a Helpdesk where you can post everything you want. Everything you need. It's just a matter of clicking Send button. And if it's still too much for you, you can hire office boy to click that button for you!

Tuesday, May 8, 2012

How to Sort Data in Excel Pivot Table

I presume you already know how to create pivot table in Excel (Data>Pivot Table and Pivot Chart Report). So this posting is only to show you how to sort the data displayed in the pivot table, automatically. In other words, you don't have to sort them each time you refresh the pivot table.
This is how to do it. First, you right click the column header that you want to sort (on the left side of the table). Then click 'Field Settings'. Click 'Advanced'. Do you see 'AutoSort options' there? Yes, correct ... that's the place you can play around with. You can select 'Ascending' or 'Descending', depend on what you need. You can even select 'Top 10 AutoShow' there so that Excel will show you only the top 10!