[9기 SAP방] 환율입력시 에러나서 챗지피티에 물어봤습니다(ABAP실습 소스코드 포함)

OB08에서 환율입력하는데 에러가나서 어떻게 해야하는지 질문드립니다




ABAP실습 소스코드

테이블 만들기


ABAP실습 소스코드

*&---------------------------------------------------------------------*
*& Report ZIT35_003
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZIT35_003.


PARAMETERS : p_zname TYPE Zgpters_v_h-zname.
PARAMETERS : p_ztitle TYPE Zgpters_v_h-ztitle.
PARAMETERS : p_zlink TYPE Zgpters_v_h-zlink.


PARAMETERS : P_INSERT RADIOBUTTON GROUP RR DEFAULT 'X'.
PARAMETERS : P_MODIFY RADIOBUTTON GROUP RR .
PARAMETERS : P_DELETE RADIOBUTTON GROUP RR .
PARAMETERS : P_DISPLY RADIOBUTTON GROUP RR .

* 테이블 정의
*DATA: BEGIN OF LT_ZFAGLFLEXT OCCURS 0,
*        zname TYPE Zgpters_v_h-zname,
*        ztitle TYPE Zgpters_v_h-ztitle,
*        zlink TYPE Zgpters_v_h-zlink,
*      END OF LT_ZFAGLFLEXT.

" 테이블 생성
data : lt_zfaglflext LIKE table of Zgpters_v_h.
DATA : LS_ZFAGLFLEXT LIKE Zgpters_v_h.

* 필드값 설정


CASE ABAP_TRUE .
  WHEN P_INSERT.


    LS_ZFAGLFLEXT-zname = p_zname.
    LS_ZFAGLFLEXT-ztitle = p_ztitle.
    LS_ZFAGLFLEXT-zlink = p_zlink.

    INSERT Zgpters_v_h FROM LS_ZFAGLFLEXT.

    IF  SY-SUBRC EQ 0.

      MESSAGE S000(ZABAP) WITH ' SAVEDE(DISPLY)'.

      ELSE.
        MESSAGE E000(ZABAP) WITH 'NOT SAVED'.

    ENDIF.
when p_modify.

    LS_ZFAGLFLEXT-zname = p_zname.
    LS_ZFAGLFLEXT-ztitle = p_ztitle.
    LS_ZFAGLFLEXT-zlink = p_zlink.

    modify Zgpters_v_h FROM LS_ZFAGLFLEXT.

    IF  SY-SUBRC EQ 0.

      MESSAGE S000(ZABAP) WITH ' SAVEDE(DISPLY)'.

      ELSE.
        MESSAGE E000(ZABAP) WITH 'NOT SAVED'.

    ENDIF.

when p_delete.

    LS_ZFAGLFLEXT-zname = p_zname.
    LS_ZFAGLFLEXT-ztitle = p_ztitle.
    LS_ZFAGLFLEXT-zlink = p_zlink.

    delete Zgpters_v_h FROM LS_ZFAGLFLEXT.

    IF  SY-SUBRC EQ 0.

      MESSAGE S000(ZABAP) WITH ' SAVEDE(DISPLY)'.

      ELSE.
        MESSAGE E000(ZABAP) WITH 'NOT SAVED'.

    ENDIF.
*
when p_disply.




* 데이터 조회
    SELECT * FROM Zgpters_v_h INTO TABLE @LT_ZFAGLFLEXT.

* 조회된 데이터 출력

    LOOP AT LT_ZFAGLFLEXT INTO LS_ZFAGLFLEXT.

      WRITE: / 'zname:', LS_ZFAGLFLEXT-zname.
      WRITE: / 'ztitle:', LS_ZFAGLFLEXT-ztitle.
      WRITE: / 'zlink:', LS_ZFAGLFLEXT-zlink.
    ENDLOOP.

        IF  SY-SUBRC EQ 0.

      MESSAGE S000(ZABAP) WITH ' SAVEDE(DISPLY)'.

      ELSE.
        MESSAGE E000(ZABAP) WITH 'NOT SAVED'.

    ENDIF.

  WHEN OTHERS.
ENDCASE.


#9기 SAP방

4

👉 이 게시글도 읽어보세요

모집 중인 AI 스터디