Tuesday, November 28, 2023

Extending/Increasing Key figure Length with custom Domain

 

In this Post, We will learn how to increase Key figure length with new domain or custom Domain.

 

Go to RSD1 Tcode and enter NOHDB Tcode to go to create/change Info object mode.



Then Give new Key figure name and click create and enter Description for the new Key figure.


Once New keyfigure name is given we need to set Unit/Currency based on our requirement.

By Default, we will be having Curr Length 17 and decimal place 2. If we want custom length we need to create new Domain in SE11 Tcode.




After creating New Domain and activating it. We need to change the domain in our new key figure.

In change mode of new key figure, Click on the data element and got to change mode and click on change sub object icon.









Then give the new custom Domain or any standard domain name to change the Domain of the key figure. Then activate the key figure. Now we can see the new Domain which is assigned to the new Key figure.


Wednesday, November 22, 2023

Triggering Process chain through Program based on TVARVC Flag or DSO/ADSO Data

 

In this Post ,We will create a program which triggers a process chain when Flag from TVARVC is X or based on DSO/ADSO value.

 

Let us consider a scenario where we have TVARV flag Variable which we can change in STVARV T-code. Based on that flag we need to trigger.

So, we are reading that flag and trigger the process chain in the program using the below Function Module.

*&---------------------------------------------------------------------*
*& Report ZPC_TRIGGER_FLAG
*&---------------------------------------------------------------------*
*& (PC Trigger) Program
*$ Created on 07/11/2023
*&---------------------------------------------------------------------*
REPORT ZPC_TRIGGER_FLAG.

DATAV_FLAG TYPE C.

SELECT SINGLE LOW FROM TVARVC INTO V_FLAG WHERE NAME 'ZV_PC_TRG_FLG' .

IF V_FLAG 'X' ).

  
CALL FUNCTION 'RSPC_CHAIN_START'
  
EXPORTING
    I_CHAIN             
'ZPC_TRIGGER'.

  
ENDIF.



 

 

Let us consider Another scenario where Process chain needs to be triggered if we have data loaded to any DSO/ADSO.

 

*&---------------------------------------------------------------------*
*& Report ZPC_TRIGGER_FLAG2
*&---------------------------------------------------------------------*
*&  (PC Trigger) Program
*$ Created on 07/11/2023 
*&---------------------------------------------------------------------*
REPORT ZPC_TRIGGER_FLAG2.

DATAV_COUNT TYPE I.

SELECT COUNT(*FROM /BIC/AZADSOX2 INTO V_COUNT WHERE /BIC/ZDATE SY-DATUM.

IF V_COUNT > ).

  
CALL FUNCTION 'RSPC_CHAIN_START'
  
EXPORTING
    I_CHAIN             
‘ZPC_TRIGGER'.

  
ENDIF.



Then after triggering the Program the process chain will gets triggered automatically.

Featured Post

Extending/Increasing Key figure Length with custom Domain

  In this Post, We will learn how to increase Key figure length with new domain or custom Domain.   Go to RSD1 Tcode and enter NOHDB Tcode...

Popular Posts