300x250
728x90

SAP 데이터에 대한 버전관리 하기 


# 누가 언제 생성했는지 언제 변경했는지 체크를 하기 위해서는 원래 로직을 짜야한다.( ABAP )

# 하지만 SAP RAP에서는 @Semantics Annotation을 사용하면 버전관리를 할 수가 있다. 

 

 

바로 시작해 보자. 

 

 

RAP Table 생성/변경 사항 필드 추가


 

# 다음과 같은 테이블이 있다고 해보자. 

 

버전관리를 하기 위해서는 필드 추가를 해주자. 

  created_by            : syuname;
  created_at            : timestampl;
  last_changed_by       : syuname;
  last_changed_at       : abp_lastchange_tstmpl;
  local_last_changed_at : abp_locinst_lastchange_tstmpl;

 

 

RAP Table 생성/변경 사항 @Semantics 추가


# @Semantics Annotation을 통해서 업데이트를 추가해 보자.

1.  Root View로 들어가 보자.

 

2. 그럼 다음과 같은 화면이 나올 것이다. 

 

3. 여기서 각 필드에 맞게 Annotation 설정해 주자.

      @Semantics.user.createdBy: true
      created_by            as CreatedBy,
      @Semantics.systemDateTime.createdAt: true
      created_at            as CreatedAt,
      @Semantics.user.lastChangedBy: true
      last_changed_by       as LastChangedBy,
      @Semantics.systemDateTime.lastChangedAt: true
      last_changed_at       as LastChangedAt,
      @Semantics.systemDateTime.localInstanceLastChangedAt: true
      local_last_changed_at as LocalLastChangedAt

 

4. 그리고 실행해 보자. 

로직 없이 자동으로 들어가 있는 걸 볼 수 있다. 

 

 

# 3개만 보이는 이유ReandOnly을 사용했기 때문이다.

 

 

끝. 

 

 

 

 

도움이 되셨으면 클릭 한번 부탁드립니다!!

 

 

 

728x90

'.SAP > ..Cloud ABAP(RAP)' 카테고리의 다른 글

SAP RAP Excel Upload 정리 #2  (3) 2024.06.28
SAP RAP Excel Upload 정리 #1  (9) 2023.11.16
SAP RAP Generate ABAP Repository Objects 정리  (2) 2023.07.22
SAP RAP to BAS 연결 정리(BTP)  (0) 2023.07.21
SAP RAP Side effects 정리  (2) 2023.07.12