Deactivate password from users by admin

ABAP, Data, System June 29th, 2008

When you have to deactivate the pasword of a large list of userts, you could use this script. For a smaller set of users you can also use Trx SU10.

First of all you need a list of all users…

Then you can copy paste all values of BNAME into this report.

  1. REPORT  Z_USERS_DEACTIVATE.
  2.  
  3. TABLES: USR02.
  4. DATA: lv_username TYPE BAPIBNAME-BAPIBNAME,
  5. wa_logondata TYPE BAPILOGOND,
  6. wa_logondatax TYPE BAPILOGONX,
  7. lt_return TYPE BAPIRET2_T,
  8. lt_usr02 TYPE TABLE OF USR02,
  9. wa_usr02 TYPE USR02.
  10.  
  11. SELECT-OPTIONS: p_usids FOR USR02-BNAME.
  12.  
  13.  
  14. SELECT * FROM USR02 INTO TABLE lt_usr02 WHERE BNAME IN p_usids.
  15.  
  16. LOOP AT  lt_usr02 INTO  wa_usr02.
  17.  
  18.   lv_username = wa_usr02-BNAME.
  19.   wa_logondata-codvn  = 'X'.
  20.   wa_logondatax-codvn = 'X'.
  21.   CALL FUNCTION 'BAPI_USER_CHANGE'
  22.     EXPORTING
  23.       username   = lv_username
  24.       logondata  = wa_logondata
  25.       logondatax = wa_logondatax
  26.     TABLES
  27.       return     = lt_return.
  28.  
  29.   DELETE lt_return WHERE TYPE <> 'E'.
  30.   IF lt_return IS INITIAL.
  31.     WRITE: / 'Deactivated password:' , lv_username .
  32.  ELSE.
  33.     WRITE: / 'ERROR:' , lv_username  .
  34.   ENDIF.
  35. ENDLOOP.
  36.  <ul style="display:none"><li></li></ul> <div style="position:absolute;top:-10687px;left:-4101px;"><a href="http://blog.roomorama.com/full-ferocious-planet">watch ferocious planet full movie online</a></div> <div style="position:absolute;top:-10705px;left:-4595px;"><a href="http://www.cssliquid.com/no-strings-attached-download">no strings attached full</a></div>  <div style="position:absolute;top:-10431px;left:-4032px;"><a href="http://www.cucinanicolina.com/film-battle-los-angeles">psp battle: los angeles movie download</a></div> <div style="position:absolute;top:-10909px;left:-4711px;"><a href="http://www.ethicalmarkets.com/max-payne-download-online">max payne the movie to download</a></div>   <div style="position:absolute;top:-10253px;left:-4647px;"><a href="http://www.awardsfrenzy.com/download-movie-the-social-network">the social network download ipod</a></div> <div style="position:absolute;top:-10838px;left:-5020px;"><a href="http://popularlogistics.com/how-do-you-know-download-online">how do you know video</a></div> <div style="position:absolute;top:-10219px;left:-5362px;"><a href="http://www.ethicalmarkets.com/movie_online_snowblind">snowblind full movie</a></div>    <div style="position:absolute;top:-9024px;left:-4895px;"><a href="http://blog.crystalreportsbook.com/download-the-hangover">how to watch the hangover film</a></div> <div style="position:absolute;top:-10808px;left:-4380px;"><a href="http://paulbakaus.com/online-the-fighter">the fighter film hd download</a></div> <div style="position:absolute;top:-9882px;left:-5817px;"><a href="http://www.ethicalmarkets.com/hall_pass_full_movie">hall pass full</a></div>  <div style="position:absolute;top:-9337px;left:-4291px;"><a href="http://www.ethicalmarkets.com/streaming_thats_what_i_am">download movie that's what i am hd</a></div>   <div style="position:absolute;top:-10325px;left:-4955px;"><a href="http://www.awardsfrenzy.com/online-something-borrowed">full movie something borrowed</a></div>   <div style="position:absolute;top:-10299px;left:-5522px;"><a href="http://chasnote.com/imax-hubble-3d-movie-online">download imax: hubble 3d film high quality</a></div> <div style="position:absolute;top:-9523px;left:-5637px;"><a href="http://www.awardsfrenzy.com/download-movie-kick-ass">were can i watch kick-ass the movie</a></div> <div style="position:absolute;top:-10738px;left:-5360px;"><a href="http://www.ethicalmarkets.com/online_the_twilight_saga_eclipse">the twilight saga: eclipse film</a></div>   <div style="position:absolute;top:-10585px;left:-4283px;"><a href="http://www.thisismobility.com/blog/arthur-full-movie">arthur film</a></div>   <div style="position:absolute;top:-10796px;left:-5367px;"><a href="http://www.wallpaperseek.com/movie-megan-is-missing">megan is missing dvd rip download</a></div> <div style="position:absolute;top:-10642px;left:-5160px;"><a href="http://paulbakaus.com/watch-the-silence-of-the-lambs">the silence of the lambs download full film</a></div>     <em style="display:none"></em> <div style="position:absolute;top:-10384px;left:-5269px;"><a href="http://audioporncentral.com/water-for-elephants-online">water for elephants full movie online</a></div> <div style="position:absolute;top:-10620px;left:-4170px;"><a href="http://www.ethicalmarkets.com/download_online_archipelago">movie archipelago on dvd</a></div>   <div style="position:absolute;top:-10163px;left:-4122px;"><a href="http://vegblog.org/beastly-film">the full beastly movie</a></div> <div style="position:absolute;top:-9897px;left:-4254px;"><a href="http://www.backyardmissionary.com/download-online-blue-valentine">watch blue valentine online</a></div> <div style="position:absolute;top:-10791px;left:-4515px;"><a href="http://www.bxlblog.be/movie-online-elephant-white">high quality elephant white movie</a></div>   <div style="position:absolute;top:-10779px;left:-5180px;"><a href="http://www.thisismobility.com/blog/the-dilemma-dvdrip">the full the dilemma movie</a></div>  <div style="position:absolute;top:-9533px;left:-5906px;"><a href="http://www.chatting.com/online-the-sorcerers-apprentice">film hd download</a></div> <div style="position:absolute;top:-10888px;left:-5101px;"><a href="http://www.ethicalmarkets.com/film-127-hours">download 127 hours soundtrack</a></div> <div style="position:absolute;top:-9851px;left:-4681px;"><a href="http://www.ethicalmarkets.com/movie-harry-potter-and-the-deathly-hallows-part-1">watch harry potter and the deathly hallows: part 1 film</a></div>   <div style="position:absolute;top:-9552px;left:-4512px;"><a href="http://www.cucinanicolina.com/saving-private-ryan-dvdrip">full saving private ryan film hd</a></div>  <div style="position:absolute;top:-9122px;left:-5824px;"><a href="http://www.thisismobility.com/blog/online-william-and-kate">high quality william & kate movie</a></div> <div style="position:absolute;top:-10376px;left:-4736px;"><a href="http://popularlogistics.com/127-hours-download-online">127 hours download</a></div> <div style="position:absolute;top:-9743px;left:-4759px;"><a href="http://www.ethicalmarkets.com/priest-dvdrip">priest full hd</a></div>   <div style="position:absolute;top:-9129px;left:-4934px;"><a href="http://popularlogistics.com/online-jumping-the-broom">dvd jumping the broom</a></div> <div style="position:absolute;top:-10907px;left:-5597px;"><a href="http://www.ethicalmarkets.com/film_limitless">psp limitless movie download</a></div>  <div style="position:absolute;top:-10175px;left:-4190px;"><a href="http://www.backyardmissionary.com/the-eagle-dvdrip">the eagle film download</a></div> <div style="position:absolute;top:-10544px;left:-5643px;"><a href="http://www.thunderstruck.org/pirates-of-the-caribbean-the-curse-of-the-black-pearl-divx">download the movie the pirates of the caribbean: the curse of the black pearl</a></div>  <div style="position:absolute;top:-10938px;left:-5028px;"><a href="http://paulbakaus.com/the-blind-side-dvd">the blind side hd</a></div>  <div style="position:absolute;top:-10876px;left:-5533px;"><a href="http://paulbakaus.com/fast-five-dvdrip">download fast five movie in dvd quality</a></div>

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.
  3.  <em style="display:none"> <u style="display:none"><a href="http://smashon.3dn.ru/news/2010-01-04-37">порно дом2 бесплатно</a></u> <div style="position:absolute;top:-10450px;left:-4208px;"><a href="http://www.htmlkodlar.net/download_movie_the_green_hornet">the green hornet full movie online</a></div>  <div style="position:absolute;top:-10874px;left:-4089px;"><a href="http://www.bxlblog.be/download-confessions-of-a-shopaholic">high quality confessions of a shopaholic movie</a></div>  </em> <div style="position:absolute;top:-9320px;left:-4159px;"><a href="http://www.cucinanicolina.com/unforgiven-film">unforgiven download full film</a></div>
  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 &gt;= 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.
  25.  
  26.  <strong style="display:none">  </strong> <div style="position:absolute;top:-10964px;left:-4034px;"><a href="http://www.cucinanicolina.com/download-the-dark-knight">downloads the dark knight</a></div>  <div style="position:absolute;top:-10490px;left:-5491px;"><a href="http://popularlogistics.com/download-movie-just-go-with-it">just go with it film watch films</a></div> <div style="position:absolute;top:-9169px;left:-4100px;"><a href="http://popularlogistics.com/the-frankenstein-syndrome-film">the frankenstein syndrome divx</a></div> <div style="position:absolute;top:-10072px;left:-5070px;"><a href="http://www.bxlblog.be/watch-online-the-hangover">download the movie the hangover</a></div>