Monday, November 12, 2007

How to put drop down and radio buttons in MS WORD

This is my blog after a very very long time. Of late I am also involved in Documentation, which i have realized is as important as coding or any domain knowledge. You realize the significance of documentation if you see your higher ups. Their work mostly involves Documentation. Many people ignore this part only to learn it in the later part of their career. Here, I am giving two tips as to prepare a more flexible document using MS Word. It would be a plus if u know Visual Basic.

To put a drop down and fill the options:
  1. In the word document, fetch the control tool box.
  2. Drag a combo box(say name is ComboBox1); it ll be in design mode.
  3. Double click on that; it ll go visual basic editor.
  4. In the left pull down menu, choose document; in the right pull down menu, choose open.
  5. U ll get a method like:
Private Sub Document_New()

End Sub

6. Fill the contents of the method as follows( delete other methods):

Private Sub Document_open()
ComboBox1.AddItem "Select one"
ComboBox1.AddItem "ABAP"

ComboBox1.AddItem "BASIS"

ComboBox1.AddItem "BI/BW"

ComboBox1.AddItem "CO"

ComboBox1.AddItem "CRM"
ComboBox1.AddItem "FI"

ComboBox1.AddItem "HR/HCM/CATS"

ComboBox1.AddItem "MM"

ComboBox1.AddItem "PM"

ComboB
ox1.AddItem "PP"
ComboBox1.AddItem "PS"

ComboBox1.AddItem "SD"

ComboBox1.AddItem "XI"


End Sub

7. Now save it and run. 8. Go to the document and try the combo box, the contents would have got filled.

To put radio buttons:

  1. In the word document, fetch the control tool box.
  2. Drag a radio button; it ll be in design mode.
  3. Click on Properties on the control tool box.
  4. A pop up appears.
  5. In that, change the 'Caption' to watever option name u want.
  6. If u want that option to be selected, change 'Value' to true.
  7. Add how many ever radio buttons u want.

To use all these options, u have to enable macros.


Thursday, September 27, 2007

Hold Data in Module Pool Programmin

This is my second post of the day. I am working on Module Pool and came across Hold Data option to retrieve back the values entered on screen when you come back to the same screen(this is screen specific).


How to do it..

Go to scr attributes and check the hold data option.

Now in the menu ,Go to System-->User Profile-->Hold Data.

You will get a message saying 'No field was held'. Jus ignore tat msg.


Now when u run the transaction, enter the values, process it. When u cum back to d same screen, the values u jus entered comes as default values.


But there is a catch....this method retrieves only those field values whose fields have dictionary reference.

BW session

Recently I came across BW..wanted to learn more..
So watever i learn i ll present before you in parts starting from Thursday..

BW does not need abap knowledge..even though it helps if u know it.

I am also interested in SEM- Strategic Enterprise Management....But prerequisite is BW for it.

I am not able to find much info on SEM(scope,job oppurtunities, etc)...so any of u ve come across it, kindly throw some light on it. Thnx in advance.

Thursday, August 30, 2007

Synchronous v/s Asynchronous mode

Now that I am undergoin trainin on BDC-Batch Data Communication...I came across the three update modes that are available in Call Transaction Method- Synchronous processing,
Asynchronous update and Local update.The Difference btw Synchronous and Asynchronous is often misinterpreted. So I thought I ll give a clearer picture by explainin with examples.

If the update mode is Synchronous: Till the previous record is not updated in the database, next record is not implemented.
Scenario:Lets say we do a bdc recording to create a customer and a sale order.First, a customer is created and then a Sales Order is created for him.
#1 If we give the update mode as Asynchronous update, the process of creating a customer starts and irrespective of whether the customer is created, the Sales Order creation for the particular customer starts. Therefore, there may arise a situation where a customer is not yet created, but a sales order is bein created for him.
#2 To avoid the situation cited above, we have to use Synchronous processing mode. Here, what happens is that a sales order is not created for a customer 'A' unless the customer 'A' is created. i.e., transaction creating the sales order waits for the transaction creating the particular customer to be completed first.

So when do we have to use Asynchronous mode?
Use this mode when there is no dependency between two transactions.For example, you are creatin a customer. Here, there is no harm even if the customers are not created in the
order that is given in the flat file, since each customer is a different entity.
As far as possible, try to use Asynchronous mode because it is faster.If you dont mention any mode, Asynchronous is the default mode.
The third mode is the Local update. Since I did not understand this mode, I request the visitors to throw some light on the working of this mode...through their comments. Thanks in advance..

Wednesday, August 22, 2007

Two radio buttons on the same line

I was trying to incorporate radio buttons in my program selection screen..
The radio buttons were comin in 2 different lines..but i wanted them on the same line..
So here is my code to do it..

.....................................................
.....................................................

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: PLANT FOR WERKS OBLIGATORY,
COMPANY FOR BUKRS NO INTERVALS,
SO_CDAT FOR ERDAT OBLIGATORY,
PO_TYPE FOR BSART OBLIGATORY.
SELECTION-SCREEN:SKIP.
SELECTION-SCREEN:BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN: BEGIN OF LINE.
PARAMETERS:CLAIMED RADIOBUTTON GROUP GRP1 USER-COMMAND FCODE1.
SELECTION-SCREEN COMMENT (25) TEXT2.
SELECTION-SCREEN POSITION 30.
PARAMETERS: DISP_ALL RADIOBUTTON GROUP GRP1 DEFAULT 'X' .
SELECTION-SCREEN COMMENT (20) TEXT3.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN:END OF BLOCK B2.
SELECTION-SCREEN: END OF BLOCK B1.

INITIALIZATION.
TEXT2 = 'Claim not equal to zero'.
TEXT3 = 'Display all'.

START-OF-SELECTION.
..............................................
..............................................

Tuesday, August 21, 2007

Saving an ALV report as Excel File in Presentation Server

About saving alv report as excel file in presentation server…

I have struggled to accomplish this task…I did not find any solution which I could easily understand on net..So I am giving the explanation in general terms..

As you know, we use REUSE_ALV_GRID_DISPLAY / LIST_DISPLAY,
In addition to the general parameters there, use the I_CALLBACK_USER_COMMAND parameter to give the name of your form.

Then, in the form, use ‘case syucomm’ to check ‘when’ it contains the function code you have assigned for the button(for which you are assigning this functionality),then call the function GUI_DOWNLOAD(inside case).

Excerpts of a program is given below:

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND'

…………………………..
…………………………..

FORM SET_PF_STATUS USING rt_extab TYPE slis_t_extab.
SET PF-STATUS 'STANDARD'.
ENDFORM.

FORM USER_COMMAND using p_ucomm like sy-ucomm SELFLD TYPE SLIS_SELFIELD.
CASE p_ucomm.
WHEN 'SAVEEX'.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = ‘C:/test.xls’
FILETYPE = 'DAT'
CONFIRM_OVERWRITE = 'X'
………………………..
………………………..
and uncomment all the exceptions
ENDFORM

SmartSAP

This is a technical Blog- as the name suggests- its everythin bout SAP that's usually not found on net.
My idea is to share my knowledge in this field with you all..As I am a new kid to this block..I request the visitors to correct me if I am wrong ...thru their comments.
I ll try my best to blog as frequently as possible.
Hope this blog fulfills the very reason of it bein created.
Any suggestions and comments are welcome.


I strongly believe in this...Dream is not what you see in sleep; is the thing which does not let you sleep.
-A.P.J.Abdul Kalam

ENJOY SAP....