Problem solve Get help with specific problems with your technologies, process and projects.

Update USR05 parameters

Ever had the need to change every users' GJR parameter to the new year? Rather than go through all users one at a time, use this code.

Ever had the need to change every users' GJR parameter to the new year? Rather than go through all users one at...

a time, use this code. The code was written in R/3 4.5B and has been successfully used on 4.7.

*&--------------------------------------------------------------------* *& Report Z_ANNUAL_GJR_UPDATE * *& * *& This program will change the value associated to the user05 * *&--------------------------------------------------------------------* *& table field 'PARVA' for every 'PARID' equal to 'GJR'. The * *& new value will be the current year, as defined in SY-DATUM. * *& * *&--------------------------------------------------------------------* *&--------------------------------------------------------------------* *& Programmer : George Saprito / The Seattle Times * *& Date written : August 22, 2003 * *& Transport request: DEVK900010/DEVK900011 * *&--------------------------------------------------------------------* *& Maintenance History * *&------------------+----------+------------+-------------------------* *& User Name | Date | Trnsprt# | Description * *&------------------+----------+------------+-------------------------* *& | | | * *& | | | * *&------------------+----------+------------+-------------------------* *&--------------------------------------------------------------------* *& Part 1: Report declaration * *&--------------------------------------------------------------------* REPORT Z_ANNUAL_GJR_UPDATE. *&--------------------------------------------------------------------* *& Part 2: Variable declaration * *&--------------------------------------------------------------------* * No variables necessary. * *&--------------------------------------------------------------------* *& Part 3: Table declaration * *&--------------------------------------------------------------------* TABLES USR05. "this table holds user parameteter info DATA ITAB LIKE USR05 OCCURS 100 WITH HEADER LINE. "internal table *Populate internal table with GJR contents of usr05 table SELECT * FROM USR05 INTO TABLE ITAB WHERE PARID = 'GJR'. *Update internal table's parva to the current year. LOOP AT ITAB. ITAB-PARVA = SY-DATUM(4). "Current Year. MODIFY ITAB. ENDLOOP. *Repopulate usr05 table with contents of internal table's changed data. UPDATE USR05 FROM TABLE ITAB. WRITE SY-DATUM(4). "Just a little screen output to indicate program end. " end of program.

This was last published in September 2003

Dig Deeper on SAP ABAP

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchManufacturingERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchCRM

SearchContentManagement

SearchFinancialApplications

Close