Creating a BP for each organisational unit by admin

Data May 16th, 2008

If you want to create a business partner for each organisational unit you must specify this in customising.
After defining this setting, a BP will be created automatically when you create an OU.

You can find the menu in customizing:

In the first item you can define wether you want to create a BP for each organisation unit.

If you have already units in you organisational plan, you can use the second item in the menu to synchronise them. You can do this one by one or in bulk.

When you execute the query you can see all the units in your plan when a status(red/green). For the ones with a red light there is no BP defined. If you select the record and use the “start repair” button, a new business partner will be created for that ou.

How to empty a table and repopulate it using a locking mechanisme by admin

ABAP May 15th, 2008

Sometimes it’s just easier and more performant to delete all rows from a table and repopulate it.

I used this scenario for a weekly sheduled job to refresh a custom table,containing all the email adresses from our employes.

In the first step, i populate an internal table with the type of the database table.

  1. LOOP AT INPUT-MT_adusers_CRM-RECORD-ROW into ls_adusers_data.
  2.     IF ls_adusers_data-email CA '@'.
  3.       MOVE sy-mandt TO wa_admails_data-mandt.
  4.       MOVE ls_adusers_data-userid TO wa_admails_data-userid.
  5.       MOVE ls_adusers_data-fullname TO wa_admails_data-fullname.
  6.       MOVE ls_adusers_data-email TO wa_admails_data-email.
  7.       APPEND wa_admails_data TO it_admails_data.
  8.    ENDIF.
  9. ENDLOOP.
  1. *enqueue table
  2.     CALL FUNCTION 'ENQUEUE_E_TABLEE'
  3.     EXPORTING
  4.     mode_rstable = 'E'
  5.     tabname = '/G/ADMAILS'
  6.     EXCEPTIONS
  7.     foreign_lock = 1
  8.     system_failure = 2
  9.     OTHERS = 3.
  1. *delete all mails
  2.     DELETE FROM /G/ADMAILS.
  1. *insert
  2.     insert /G/ADMAILS from table it_admails_data.
  1. *dequeue table
  2.    CALL FUNCTION 'DEQUEUE_E_TABLEE'
  3.    EXPORTING
  4.      mode_rstable = 'E'
  5.      tabname = '/G/ADMAILS'.
  1.  

the relation between a business partner and the organisational unit by admin

Data May 14th, 2008

In SAP CRM we made a reflection of company devisions into organisational units. You can define this with transaction PPOMW.

If you want to find out to wich position a BP belongs to, you can query the table HRP1001.

HRP1001

How to unlock objects in the Integration Builder by admin

XI May 9th, 2008

A short reminder of how u can unlock object in XI.
 

I had some objects locked in XI when my computer crashed while i was working in the Integration directory.

U can unlock them by going to the following the directory. As you can see it's a different url for the directory and repository.

Directory:
http://server:port/dir/support/public/LockAdminService

Repository:
http://server:port/rep/support/public/LockAdminService

 

A preview of the unlock tool:

How to unlock objects in the Integration Builder

Installation of the sapgui 640 client by admin

System May 9th, 2008

This article will describe how you can install the sapgui 640 client on a windows machine.
 

SAP GUI is an abbreviation for "SAP Graphical User Interface".

Before you begin:
  • Make sure you are logged into your windows computer with administrator rights so u can install software;
  • It's also better to remove any previous installation of the sapgui client from your system. This can be done using the  "Add/Remove Programs" from the configuration screen;
  • Check if you have enough diskspace available, between 100-150MB;
  • If u have to download the installation files use Internet Explorer 5.0 or later.

 

Files: 

installation file:  http://service.sap.com/installations

patches: http://service.sap.com/patches/

 

Installation process: 

sapgui netweaver 640 splash screen

 

step1

 

step 2

 

step 3

sapgui

SAP GUI

r3 addon

 R/3 Add-on

general add-on

 General Add-on

development tools

 Development Tools

legacy components

 Legacy components

BW add-on

 BW Add-on

Bi add-on

 BI Add-on

CRM add-on

 CRM Add-on

KW add-on

 KW Add-on

SCM add-on

 SCM Add-on

SEM add-on

 SEM Add-on

 

 

Installing sapgui

 

Completed installation

 

 

 

 

 

SAP GUI tips ands tricks by admin

System May 9th, 2008

Remove the annoying click sound and copy the server logon to other computers.

 

Sound

When i first logged into SAP GUI is was really annoyed by the click-click-click sound. You can disable it by toggling the “audio - off” option in the visual design.  You can access this screen by choosing following menuitem.

 

new visual design

 

 

Logon file

In your sap logon screen you can have a lot of servers defined. If you want to replicate them to another client you just have to copy the following .ini file.

 

C:\WINDOWS\saplogon.ini

 

Monitoring work processes by admin

System May 9th, 2008

In this article we are going to cover Work processes in more detail.

 

Work processes are unix tasks that can be identified by using following unix command.

 ps -ef|grep dw

There are 5 type of processes and 4 types of status : 

Type's 

DIA   Dialog Interactive dialogs 
 BTC  Batch  Background tasks
 UPD  Update  Database updates (critical)
 UP2 UPDATE   Database updates(non-critical)
 ENQ  Enqueue  locking/releasing SAP objects
 SPO Spools   Data formatting and printer spools

Status

Running   executing a request
 Waiting  idle
 Hold a WP can only serve a single user. If there are many work processes on "hold" then the system performance will suffer
 Ended aborted

 

Transactions SM50  gives a process overview for a particular application* server. If you want view the processes of another server go to SM51 and choose the server u want.

work processes with sm50

And if u would like to see all the processes running accros your systems (inlcuding all application servers) use the SM66 Global Work process overview.

 

 * SAP uses the generic term application server to define a computer that receives connections from SAP clients, but the actual connections are managed by SAP dialog servers.

Compare data between environments by admin

Data May 9th, 2008

This article explains how u can compare data between clients (mandants) and how u can synchronise the data.

 

You should log into the target system.

If u want to transfer data from system 200 to system 100  you should login into system 100.

 

You can achieve this in transaction sm30 “Maintain table views”.

After u choose the table u wanted to synchronise you choose “Utilities” – “Comparison”, if u are in “edit mode” you have  “Utilities” – “Adjustments”,

 

enter r3 connection

After login into the source system you can see the data.

What’s important about this is the collor and the code. You can find more information in the legend.

legend comparison result

 

example

If you changed the data from a record in a mandant the record will be filled with a yellow background collor.  If it already exists in the logon/target system it will have a repectivily orange/green background collor. Infront of every record you can find more information on the data with the code value.

To synchronise the  date, just select the records and click the “adjust” button.

 

In the following screen you can navigate trough your data and delete/copy/update it.

adjust toolbar

 

create a report using a group by query in sql by aRo

ABAP May 9th, 2008

To make sure we have the right syntax in our WHERE variable we create it as a reference to a data table field and make it obligatory.

We will group our results using a group by function and print them as plain text on our screen.

  1.  parameters: p_dat like SCMG_T_CASE_ATTR-CREATE_TIME obligatory.
  2.             .
  3. TYPES:            BEGIN OF mytext,
  4.                                    PRODUCT     TYPE SCMG_T_CASE_ATTR-CASE_TYPE,
  5.                                    TOTAL  TYPE I,
  6.                        END OF mytext.
  7.  
  8. TYPES mytab TYPE STANDARD TABLE OF mytext WITH DEFAULT KEY.
  9.  
  10. DATA text TYPE mytext.
  11. DATA itab TYPE mytab.
  12.  
  13.  
  14.  
  15. select  CASE_TYPE count(*)
  16.                  from ( SCMG_T_CASE_ATTR as a INNER JOIN CRMD_CMG_CASE_AT as b ON  a~CASE_GUID  =  b~CASE_GUID ) INTO  text WHERE  CREATE_TIME >= p_dat GROUP BY  CASE_TYPE ORDER BY CASE_TYPE.
  17.                  APPEND text to itab.
  18.                 ENDSELECT.
  19.  
  20.  
  21. WRITE: / 'product','Total'.
  22. LOOP AT itab INTO text.
  23.   WRITE: / text-product, text-totaal.
  24. ENDLOOP.

declaration of variables in abap by aRo

ABAP May 9th, 2008

 

declaration of variables: 

DATA:  time TYPE T. 

A variable can be from the following data types:

 

Data Type

Initial

field length

Valid

field length

Initial value

Meaning

Numeric types

I

4

4

0

Integer (whole number)

F

8

8

0

Floating point number

P

8

1 - 16

0

Packed number

Character types

C

1

1 - 65535

'     '

Text field

(alphanumeric characters)

D

8

8

'00000000'

Date field

(Format: YYYYMMDD)

N

1

1 - 65535

'0 … 0'

Numeric text field

(numeric characters)

T

6

6

'000000'

Time field

(format: HHMMSS)

Hexadecimal type

X

1

1 - 65535

X'0 … 0'

Hexadecimal field

 

declaration of constants:

CONSTANTS: pi TYPE P DECIMALS 10 VALUE '3.1415926536'.

 

declaration of parameters: 

This is when you create a parameter field onscreen. The variable is checked for the right syntax.

It's also possible to refer to a field by using "tablename-field". If that field is a date then u can select the date using a standard SAP popup.

PARAMETERS: x as checkbox.

PARAMETERS DATUM LIKE SY-DATUM DEFAULT '19931224' .