Friday, March 23, 2018

Standard Functions / Programs

Standard Programs

PSA Check and Repair Reports : Link

Program

Description

CHANGEDOCU_READDisplays the change document information
RSSCD100
RSDG_TRFN_ACTIVATEActivates transformation and DTP
RSBTCDEL2Cleaning background jobs in the system
RSDS_DATASOURCE_ACTIVATE_ALLActivate datasource
RSDG_ODSO_ACTIVATEActivate DSO
Class:CL_RSTRAN_STAT Method:DELETE_VERSION_FROM_DB() Delete transformation from system ( including production ) - Run the method and give i_transid = transformation id ; i_objvers = 'M' and leave others blank and execute
RSBKDTPDELETEDelete DTPs
RS_DELETE_TLOGODelete Objects from BW
RSSM_OLTP_INIT_DELTA_UPDATEupdate the init conditions back in the source system - If inits are failing/ dumping - run the program and it will create an entry in RSA7. Then try running init and it will fail. Delete the init and run it again and it should be fine. This is when there is problem with initializations or want to delete entries in RSSDLINIT
RSDG_IOBJ_DELETEDelete InfoObjects - It gives error message if the infoobject is being used anywhere else, it would delete them. No transport request asked
COMPONENT_REORG / Tcode : RSZDELETE Delete various BEx query related objects. The deletions can be collected in a transport request
RSDMD_CHECKPRG_ALLConsistency check of Master data infoobjects
RS_ABAP_SOURCE_SCANChecks ABAP Code for infoobjects tables and DSO RSAABAP
RSDG_MPRO_ACTIVATEActivate Multiprovider
RSAR_PSA_CLEANUP_DIRECTORYClean PSA : Adjusts the PSA Tables
RSAN_PROCESS_EXECUTEAPD standard Program : Variant would be APD name
RSWATCH0Access AL11 tcode
RSFUNCTIONBUILDERAccess SE37
RSIMPCURRUpdate Currency from ECC
RSIMPCUSTUpdate Currency Units
RSDDTREX_INDEX_DELETEDelete BIA indexes
RSDDTREX_BIA_ACTIVATE_FILLCreate BIA indexes
RSDMD_MD_ACTIVATE Activate Master Data
RSC1_QUEUE_DELETE_ALL Delete RSA7 delta queue pointers
RSDG_IOBJ_ACTIVATE Activate Infoobjects
RSODSACT1 DSO Activation of Data
RSPC_LOG_DELETE Delete process chain logs
RSVARDOC_610 Correction of program variants - Variant of program Z is not the current version - Run this program with the errored program and variant names and SYSVAR = 'X'. the variant will be corrected
RSSM_DELETE_INITSEL_OLTPDelete initialization for all datasources
RS_B4HANA_CHECK_ENABLEStandard Program to check If wish to BW/4HANA can be enabled
RS_TRANSTRU_ACTIVATE_ALLActivate InfoStructures
RBDLSMAPRunning BDLS - Logical System Name Conversion . More Notes : LINK
BS_ANLY_DS_RELEASE_ODPReleases datasources to ODP : SAP Notes 2232584 
RODPS_OS_EXPOSERelease Z Datasources to ODP
RSARFCERDelete TRfC IDocs
RSARFCEXExecute IDocs TRfc 
Process Chain Monitoring/SSA/BWT
BTC_EVENT_RAISETrigger / Raise event
ADBC_TEST_CONNECTIONTesting DBConnect
RMCEXCHKCheck report for locating open data extraction tasks - MCEX queues
CRM_ORDER_READFor any information in CRM
GNBILLDLBill Plans / Maintaining Billing Due List

Function Modules


Function Modules/BAPIs

Descriptions

Reference

/SAPDMC/LSM_F4_SERVER_FILE Getting HELP for list of folders ZTRANSIT_HIER_IP..etc
ADDR_CONVERT_TIMESTAMP_TO_DATE Getting Date from Timestamp
ALINK_CALL_TRANSACTION USed to run to Tcodes when no access
ARCHIVFILE_SERVER_TO_SERVER Copy files from one Directory to another
BAPI_CLASS_SELECT_OBJECTSList of objects which have classification definedhttp://learningsapbw1.blogspot.com/2015/08/classification-datasources.html
BAPI_CURRENCY_CONV_TO_EXTERNAL Converting Currency to External format Once the FM in row 3 is used, this is used for getting the original values
BAPI_IOBJ_CREATECreate InfoObjectsstrucuture BAPI6108 has all the input parameters needed for creating Infoobjects. For ignoring Master Data - Use NOVALFL = 'X'
BAPI_IOBJ_ACTIVATE_MULTIPLEActivate Multiple InfoObjects
BAPI_IOBJ_CHANGEChange details of InfoObject
BAPI_IOBJ_GETDETAILGet details of InfoObject
BAPI_IPAK_CHANGE Infopackage change details
BAPI_IPAK_GETDETAIL Infopackage get details
BAPI_IPAK_START Trigger Infopackage
CCU_TIMESTAMP_DIFFERENCE Difference of two timestamps
CONVERSION_EXIT_ALPHA_INPUT Adding Leading zeroes depending on Dataelement F4 help ZDATA_ACTIVETAB_UPLOAD
DATE_CHECK_PLAUSIBILITY Validatting Date
DATE_TO_PERIOD_CONVERT Calender Day to Fiscal Period Pass date to i_date and fiscal variant (V3/K4.. depends on the company) to i_periv which gives fiscal period e_buper and fiscal year e_gjahr
DD_NAMETAB_TO_DDFIELDS List of fields in a database table
F4IF_INT_TABLE_VALUE_REQUEST Help for Selection Screen
FTI_FISCAL_YEAR_MONTH_GET Get the fiscal year, month based on company code
GUI_UPLOAD Upload file from desktop/server to program Use the declaration as follows for output table.
DATA : lw_data      TYPE string,
l_t_data       TYPE rstt_t_string, (table)

Other eg : ZDATA_ACTIVETAB_UPLOAD
KD_GET_FILENAME_ON_F4 Getting the file name in F4 help ZDATA_ACTIVETAB_UPLOAD
JOB_OPEN Opening a job ZEDW_BATCH_FF_EXTRACT_START
READ_TEXTBase Table STXH / Text Objects SE75 ( Double click on the Object and it will give list of all Text IDs assosiated / TextID text table TTXTITThis FM is used to read texts which are not saved directly in the tables. Using STXH table to get the Text Object ID , Text Id helps to run the FM.
For more information , Click HERE
RSA1_SINGLE_OLTPSOURCE_GET Datasource Information
RSA8_GENDELTA_ZDD_REPLAY_GETThis is used to change the delta pointer value in table ROOSGENDLM for zdatasourcesEnter OLTPSOURCE, LOGSYS and Delta ID as the timestamp from which you want delta to flow in,
After successful delta, when the delta is called again, This Delta ID becomes Repeat ID and the new delta timestamp is the DeltaID.
RSAOS_OLTPSOURCE_GET OLTP source details
RSAR_ODS_GET Get PSA details Need to pass datasource name in  I_ISOURCE and  I_OLTPSOURCE ;  I_LOGSYS is the logical system name
RSAR_CURRENCY_CONVERT Getting currency converted to Input format Transformations : for example : JPY currency
RSAR_TRANSTRUCTURE_GET Getting the Structure of Transfer strucutres
RSATREE_PSA_DELETE_BATCH Delete PSA
RSC1_TRFC_QUEUE_WRITE Write to the BW Delta Q
RSD_IOBJ_GETGet InfoObject Details
RSD_IOBJ_USAGEGet InfoObject Usage
RSDDS_AGGR_MOD_CLOSERemoving Master Data LocksAttribute Change Run .When process chains fail in Prod due to locks /
In Tcode : CHANGERUNMONI, you can see the status of the change run . Get the ID from there and run this FM to close/cancel the run
RSDU_TABLE_TRUNCATE Delete data from Fact Table of Cube
RSKC_CHAVL_CHECK Valid Characters check / Maintain
RSNDI_MD_XXL_ATTR_UPDATE_4XXL Attribute Fm
RST_TOBJ_SHIFT Add/Subtract years from Fiscal Period
RSPC_API_CHAIN_STARTRun the process chain when Metachain or APIStart using Meta Chain or API
RSW_CURRENCY_TRANSLATION Currency translation from One Currency to anothere
RSZ_I_BASIC_CHA_WHERE_USEDGet Characteristic InfoObject usage
RSZ_I_BASIC_KEYFIG_WHERE_USEDGet Keyfigure InfoObject usage
SO_DOCUMENT_SEND_API1 Seding email with Documents
SCMS_DOWNLOAD Uploading the file to server ZTRANSIT_FILE_UPLOAD
SCMS_UPLOAD Download files (Used in conjunction with Call method 1) ZTRANSIT_FILE_UPLOAD
SLS_MISC_GET_LAST_DAY_OF_MONTH Last day of the month ZFX_FILE_CHANGE
SXPG_CALL_SYSTEM ZEDW_BATCH_FF_TRANSMIT
TIME_CHECK_PLAUSIBILITY Validating Time
TMP_GUI_DIRECTORY_LIST_FILES Count of files in a folder on Presentation Server
UJD_ADD_MONTH_TO_DATE Add/Subtract Months from date Dates
RKE_TIMESTAMP_CONVERT_OUTPUT Timestamps conversion This can be used to convert timestamps FI tables like BWOM2_TIMEST
RSSM_GET_TIME Get Date Timestamp UTC Local This is used to get Local and UTC date and time and timestamps
RSODSO_CLEANUP_RSODSACTUPDTYPE Clean up unwanted entries in table RSODSACTUPDTYPE
TMS_TP_IMPORTTransport ImportSystem name and Request number are mandatory. This job is generally scheduled in the systems to run at regular intervals ( 15 minutes ) to import transports. TMS_00000000XXTMS_TP_IMPORT.
Extra Notes : Link
RSAR_NEWDS_PSA_USEROBJ_CHECKUsed to cross check the field USEROBJ in RSTSODS with the fields - PSA Correction
OWN_LOGICAL_SYSTEM_GET Get Logical system LOGSYS name
RSPC_CHAIN_ACTIVATE_REMOTERemote activation of a process chainOn the top,
RFC target sys: give the system name where you want to activate the chain;
I_CHAIN = Chain name
 I_NO_AUTHORITY = 'X'
This should activate the chain in a different system, given there is a connection.
RSPC_LOG_DELETEDelete individual logs for process chainThis one need only the LOGID. I_force = 'X' ( Ignore errors, always delete )
CRM_ORDER_READRead any data in CRMThe FM does not run. Use standard program with the same name - CRM_ORDER_READ
RVSCD100        Displaying Document Changes    Sales Document Changes and Deletions
 

Class / Methods


Methods

Descriptions

Reference

call method cl_gui_frontend_services=>directory_list_files Getting list of files from Desktop ZTRANSIT_FILE_UPLOAD
CALL METHOD cl_gui_frontend_services=>gui_download Downloading files to Desktop ZTRANSIT_FILE_DOWNLOAD
cl_gui_frontend_services=>executecl_gui_frontend_services=>execute(EXPORTING application = lv_path parameter = lv_url). lv_app - Google Chrome/Internet Browser path in the system, lv_url - URL of the website
 

BADIs


BADI

Descriptions

Reference

RSAR_CONNECTOR Badi for Custom formula
RSR_OLAP_BADI Virtual Characteristics and Key Figures in Rep
RSU5_SAPI_BADI Custom enhancements for data and hierarchy data
CRM_BWA_MFLOW CRM BADI for standard datasources. Custom datasources can use RSU5_SAPI_BADI
RSROA_VARIABLES_EXIT_BADI New BADI for Query variables
 

User Exits


User Exits

Descriptions

Reference

EXIT_SAPMRSRU_001 Virtual characteristic and key figure
EXIT_SAPLRRS0_001 Global variables in reporting
EXIT_SAPLRSAP_001 Transactional Data enhancements
EXIT_SAPLRSAP_002 Master Data ATTR enhancements
EXIT_SAPLRSAP_003 Master Data TEXT enhancements
EXIT_SAPLRSAP_004 Hierarchies enhancements

SAP TCodes

T-Codes Description T-Codes Description
FILE Logical File Path Definition AL11Files on server path
FIBF Business Event Transactions SU01User Role Assignment and Information
LBWG Deletion of setup tables SU53Authorization Object Errors
NPRT Log for setup of statistical data SP01Spool Requests
RSANWB APD Tcode SM62Creating Events
RSA1 Dataware house SQVICreating Joins / Dynamic Reports / SQL Query
RSA2 Display datasources RS_LOGSYS_CHECKCheck Source Systems
RSA3 Extract Checker RSODSO_SETTINGSDSO Settings
RSA5 Installing Data Source ST02 / 06Tune Summary ( CPU Utilization )
RSA6 Activated Datasources RSECADMINManagement of Analysis Authorizations - Roles
RSA7 BW Delta Queue LINK /ASU/STARTUpgrade Tool
RSBBS Jump Queries BD22Delete Change Pointers
RSBO InfoSpoke CHANGERUNMONIMonitor for Attribute Change Runs
RSDS Datasource Repository (replicate ds) BPHCRM Display BP Group Hierarchy
RSECAUTH Maintain Authorizations RSTMSAMOTMS Alert Viewer ( can be used for authorization checks )
RSKC Maintainance of Permitted characters STMSTransport Management System
RSPC Process Chain WE20EDI Partner Profiles ( Base table : EDPP1)
RSPC1 Single Process Chain SO23Creating email distribution Lists
RSRT Running the query SMQSqRfc Monitor / QOUT Scheduler / List of all systems connected 
RSRV Analysis and Repair of BI Objects SM59Configuration of RfC Connections
SCC1 Client transfer of changed : transfer individual transport requests directly out for the source client into the the current client ( * Check the checkbox for Tasks ) SCMASchedule Manager: Scheduler - Charm - Process failed transports manually
SE01 Transportation Organizer (Display Logs) SCOTEmail Communications
SE03 Transport Organization Tools SMICMInternet Communication Monitor - web services related
SE09 List of User Transports STRUSTTrust Manager - Webservices related
SE11 Tables (Create, Display,Change) CRM_UIOpen UI for CRM ( Might ask for login )
SE12 Tables (Display) CRMD_ORDERCRM Transactions 
SE13 Dictionary : Technical Settings DBACOCKPIT DBA Cockpit System Storage Space
SE14 ABAP Dictionary : Database utility
SE16 Tables Maintainance
SE18 BADI Builders (C,D,C)
SE19 BADI Implementations
SE24 Class Builders
SE37 Function Modules
SE38 Report Programs
SE80 Module pool Program
SE91 Message Classes
SE93 T-Codes Creation
SM12 Lock Objects
SM13 Queue
SM37 Backgound Jobs
SM50 Back Ground Processess
SM51 SAP Server information
SM69 External Commands Maintainance
SO01 Inbox
SU53 User Authorizations
TBE01 Library of the Publish&Subscribe Business Transaction Event
TBE24 Customer Products
TRFCQOUT tRFC Queue Description (Outbound Queue)

Functional TCodes


T-CodeFunctionalityAssociated Tables
ME23NPurchase Order DisplayEKKO,EKPO,EKET Etc
MB55List of GR / IR BalanacesGives the POs which are still open - Goods Received Not Equal to Invoiced, EKKN, 2LIS_06_INV
ME2LPurchasing Document Number Per Vendor EKKO, EKPO etc. 2LIS_02 Datasources
MB03Material Document DisplayMSEG
VA01-02-03Sales DocumentVBAP,VBPA Etc
MSKUSpecial Stocks with Customer
IW12Display Document Flow - flow of Service, Orders,Confirmations, Sales Doc, Billing Doc etc.
SCDOChange Documents CDHDR,CDPOS,TCDOB
VK13Display Condition Records - Material Pricing ConditionsKONH, KONP, A Tables
MB51Material Document ListMSEG
UKM_BP_DISPLAY
Credit ExposureDatasource : 0FSCM_CM_4
VF04 / VF08    Bill Plans    SE38 Program : GNBILLDL

Running LIS Setup for single values in documents

Trick for running setup tables for individual documents

2LIS setup table program does not have ability to give individual or range of order numbers. So we either have to run open or create multiple jobs with multiple ranges.
BUT,
There is a way to run setup tables for individual values or ranges - but the thing is we can run it only in foreground - but again, if runs pretty fast and can be used for smaller loads.

Go to the setup program - and in the SD document range, give a greater value in the From and smaller value in To as shown below and Execute in Foreground.


System will give a pop up saying " Start of order processing " and take you to the next page as below.


Here, go to select options  and give the values in single values or ranges and execute it.
The setup will run for the values.
You can enter around 500-1000 individual entries here ( that is the number i tried. may be you can enter more values )

RODPS_REPL_TEST

This should be used instead of RSA3 for ODP datasources.

Note:
In my experience, it did not act like RSA3.
So, when we want to check if there are delta entries for a datasource, we can run the datasource in RSA3 in  'D' mode and we can see data for the next delta.
For say, 0FI_AR_4 has 120 entries in RSA3 for 'D'. When we pull delta from BW, we do get those 120 entries.

Same is not the case when using this program.
There should already be a subsctiption with delta init for us to check the delta entries.
Like, For checking delta entries for datasource 0FI_AR_4, directly running the program with "Replication Mode :  Extraction of Last Delta" created a new subscription in ODQMON and did a Init with Data -> A full load.
After that, re-running the program again, created a new queue time stamps from last load to the new time and pulled delta entries.
But, I am not sure if there is another way to check delta entries with out doing the Init with Data load.


Online Resources
Replication Test with RODPS_REPL_TEST : Click HERE

ODQ_CLEANUP

As the name suggests , this is used to perform the clean up activities for ODP related processes.

Program Name : ODQ_CLEANUP
This job will be automatically triggered when the datasources are initialized the first time.

Default Job :  ODQ_CLEANUP_CLIENT_100

Reorganizing Delta Queues
ODQMON --> Goto --> Reorganize Delta Queues


The default values can be changed.
This is how I did - Cancel the scheduled job in SM37.
Change the selection screen parameters - Save it as variant and then schedule a new job with the new variant in it.

Check below links for more information