We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!

EXIT_RBDPROSE_001 -

EXIT_RBDPROSE_001 -

Vendor Master (General Section)   General Material Data  
This documentation is copyright by SAP AG.
SAP E-Book

Overview

This user exit allows the customer to convert those customer-specific tables which do not appear in the proposals list at the same time as the logical system name is converted.

The user must look through all the affected tables in the user exit to identify those which need to be converted. In the test mode just a list of the conversions which are necessary is output. If the test mode is not active, then the conversions need to be actually made. It is important to distinguish between key fields and normal table fields which need to be converted. A normal field is converted in an update. In the case of key fields, a new entry containing the changed key has to be made in the table (insert) and the old entry deleted. There are examples of program code further on in this document.

Input parameters

The TESTMODE parameter indicates whether the conversion takes place in test mode (value = 'X') or whether the conversion should actually be performed (value = ' ')

The T_SYSTEMS table with the BDILOGSYST structure contains the details of the assignments of the preproduction systems to the various production systems.

The logical system name of the preproduction system is held in the 'PRE' field in the structure of TBDLST-LOGSYS. The 'PROD' field contains the new logical system name of the corresponding production system, also in the structure of TBDLST-LOGSYS.

Output parameters

Rather than using parameters for the output, Write statements are used to write directly to the list displayed on the screen.

Example program:

tables: ZTAB1, "Table with LOGSYS in key ZTAB2. "Table with field LOGSYS

data: CHANGES like SY-TABIX.

write: / 'In Table ZTAB1:'.
loop at t_systems.
write: /5 'For Preproductive System ', T_SYSTEMS-PRE, ':'.
changes = 0.
select * from ZTAB1 where LOGSYS = T_SYSTEMS-PRE.
CHANGES = CHANGES + 1.
if TESTMODE = ' '. "not in test mode
ZTAB1-LOGSYS = T_SYSTEMS-PROD.
insert ZTAB1. "insert new entry
if sy-subrc = 0. "no error
ZTAB1-LOGSYS = T_SYSTEMS-PRE.
delete ZTAB1. "delete old entry
if sy-subrc <> 0. "error occured
format color 6.
write: /10 'Error at conversion'.
format color 1.
exit.
endif.
else.
format color 6.
write: /10 'Error at conversion'.
format color 1.
exit.
endif.
endif.
endselect.
if sy-subrc <> 0. "no change
write: /10 'No conversion necessary'.
elseif testmode = ' '.
write: /10 CHANGES, 'Conversions done to ',
T_SYSTEMS-PROD.
else.
write: /10 CHANGES, 'Conversions necessary to ',
T_SYSTEMS-PROD.
endif.
endloop.
write: /.



WRITE: / 'In Table ZTAB2:'.
LOOP AT T_SYSTEMS.
WRITE: /5 'For preproductive system ZTAB2:'. CHANGES = 0.
SELECT * FROM ZTAB2 WHERE LOGSYS = T_SYSTEMS-PRE.
CHANGES = CHANGES + 1.
IF TEST = ' '.
ZTAB2-LOGSYS = T_SYSTEMS-PROD.
UPDATE ZTAB2.
IF SY-SUBRC <> 0.
FORMAT COLOR 6.
WRITE: /10 'Error in conversion'.
FORMAT COLOR 1.
EXIT.
ENDIF.
ENDIF.
ENDSELECT.
IF SY-SUBRC <> 0.
WRITE: /10 'No conversion necessary'.
ELSEIF TEST = ' '.
WRITE: /10 CHANGES, 'Conversions done t0 '(T12),
T_SYSTEMS-PROD.
ELSE.
WRITE: /10 CHANGES, 'Conversions necessary t0 ', T_SYSTEMS-PROD.
ENDIF.
ENDLOOP.
WRITE: /.






Addresses (Business Address Services)   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 4172 Date: 20200919 Time: 013014     sap01-206 ( 53 ms )