6/24/2019 0 Comments Sap Use Set Gs01As usual, you created the set using transaction GS01 and used it in a validation or substitution step. To move your set to another client or system, you have a choice of options. This option allows you to move the content of your set via a file that you move manually between the systems. GS01 - creating a hierarchy of accounts. Create a set without copying an existing set: Launch GS01 and insert the data: Set Name: ZTEST Name of a table: GLPCT Indicator: a single-Set dimensions Field: RACCT 2. Create a set by copying an existing set: Launch GS01 and insert the data: Set Name: ZTEST Set reference: TEST (with the EC-PCA GLPCT table. Intro: There's always an issue that SAP users by mistake post some GL accounts to cost centers although according to company policy these accounts should only post to internal orders or production orders. The same approach provided below can also be manipulated to allow specific cost centers for specific GL Accounts The best way to prevent this mistake is to use Validation Rules (Trx GGB0) and specify the GL accounts that are not allowed on a cost center so the user gets an error whenever SAP is posting these GLs to a Cost Center. Since validation rules are part of system config, it's a lot of headache to change the GLs in the rule later in case a new GL is created or an exception is needed. To be able to edit the rule's GLs without doing any configuration, we can maintain an Account Set in the validation rule instead of specific GL accounts, in this case the Set can be edited freely in Production environment (by authorized users). This will involve creating a user exit and editing a copy of a standard SAP program Steps: 1) Trx GS01 > Create the Account set 2) Trx SE38 > Copy program RGGBR000 to ZRGGBR000 and add the below code at the end of the standard code ----------------------------------------------------- exits-name = 'ZCC'. exits-param = c_exit_param_none. exits-title = text-103. APPEND exits. FORM ZCC USING b_result. RANGES: GLS FOR BSEG-HKONT. Select VALSIGN AS SIGN VALOPTION AS OPTION VALFROM AS LOW VALTO AS HIGH FROM SETLEAF INTO CORRESPONDING FIELDS OF TABLE GLS WHERE SETNAME = 'GL_CC_BLOCK'. if SY-SUBRC = 0. IF BSEG-HKONT IN GLS. b_result = b_true. else. b_result = b_false. ENDIF. endif. ENDFORM. ------------------------------------------------ 3) Trx GCX2 >> Assign program ZRGGBR000 to Validation Rule Exits 4)Trx GGB0 >> Create Validation 5) Trx OB28 >> Activate Validation on the company code level Now test the validation using any transaction, try FB50 Thank you for reading. Best regards, Abdullah Galal SAP Finance and Integration Consultant
0 Comments
Leave a Reply. |