오타가 다섯개 정도 있네요.
다음 소스를 복사해서 활성화 해보세요.
REPORT Z01 .
TYPES:
BEGIN OF st_flight_c,
mandt(3) TYPE c,
carrid(3) TYPE c,
connid(3) TYPE c,
fldate(8) TYPE c,
price(20) TYPE c,
currency(5) TYPE c,
planetype(10) TYPE c,
seatsmax(10) type c,
seatsmas(10) TYPE c,
seatsocc(10) TYPE c,
paymentsum(22) TYPE c,
seatsmax_b(10) TYPE c,
seatmax_b(10) type c,
seatsocc_b(10) TYPE c,
seatsmax_f(10) TYPE c,
seatsocc_f(10) TYPE c,
END OF st_flight_c,
BEGIN OF st_flight,
carrid(3) TYPE c,
connid(4) TYPE n,
fldate TYPE d,
price(9) TYPE p DECIMALS 2,
currency(5) TYPE c,
planetype(10) TYPE c,
seatmax TYPE i,
seatsocc TYPE i,
END OF st_flight.
DATA : set_string type string,
datastring TYPE string,
wa_flight_c TYPE st_flight_c,
wa_flight TYPE st_flight.
START-OF-SELECTION.
CALL FUNCTION 'BC401_GET_SEP_STRING'
* EXPORTING
* im_number ='1'
* im_table_name = 'SFLGHT'
* im_separator = '#'
* im_unique = 'X'
IMPORTING
ex_string = datastring
EXCEPTIONS
no_data = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE a038(bc401).
ENDIF.
SHIFT datastring BY 2 PLACES.
find '##' in datastring.
IF sy-subrc <> 0.
MESSAGE a702(bc401).
ENDIF.
SPLIT datastring AT '##' INTO set_string datastring.
SPLIT set_string AT '#' INTO
wa_flight_c-mandt
wa_flight_c-carrid
wa_flight_c-fldate
wa_flight_c-price
wa_flight_c-currency
wa_flight_c-planetype
wa_flight_c-seatsmax
wa_flight_c-seatsocc
wa_flight_c-paymentsum
wa_flight_c-seatmax_b
wa_flight_c-seatsocc_b
wa_flight_c-seatsmax_f
wa_flight_c-seatsocc_f.
MOVE-CORRESPONDING wa_flight_c TO wa_flight.
WRITE: /
wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate DD/MM/YYYY,
wa_flight-price, " CURRENCY wa_flight-crurrency,
* wa_flight-currency,
wa_flight-planetype,
wa_flight-seatmax,
wa_flight-seatsocc.
>저도 방금 전에 글을 올리신 분과 같이 abap certi를 준비하고 있는 학생입니다.
>형한테도 많은 도움을 받고 있지만 ..형 소개로 이 싸이트를 알게 되었고
>더 많은것을 얻어 가고자 이렇게 글을 올려 봅니다.
>
>저도 .. 실습 부분중에 막히 부분이 있어서요. ㅋ
>syntax error check에서... 자꾸 에러가 나네요..!!!
>에러가 난 부분은 캡쳐화면을 파일로 첨부 해 놓았습니다.
>아주 기초적인 에러 같은데 .. 아직 공부를 하고 있는터라 잘 모르겠네요 ㅜㅜ..
>그럼 선배님들의 조언 부탁 드릴ㄲㅔ요 ^^
>
>
>소스 코드 입니다.
>
>REPORT zbc401_23_split_string .
>
>TYPES:
>
> BEGIN OF st_flight_c,
>
> mandt(3) TYPE c,
> carrid(3) TYPE c,
> connid(3) TYPE c,
> fldate(8) TYPE c,
> price(20) TYPE c,
> currency(5) TYPE c,
> planetype(10) TYPE c,
> seatsmas(10) TYPE c,
> seatsocc(10) TYPE c,
> paymentsum(22) TYPE c,
> seatsmax_b(10) TYPE c,
> seatsocc_b(10) TYPE c,
> seatsmax_f(10) TYPE c,
> seatsocc_f(10) TYPE c,
> END OF st_flight_c,
>
>BEGIN OF st_flight,
> carrid(3) TYPE c,
> connidn(4) TYPE n,
> fldate TYPE d,
> price(9) TYPE p DECIMALS 2,
> currency(5) TYPE c,
> planetype(10) TYPE c,
> seatsmax TYPE i,
> seatsocc TYPE i,
>END OF st_flight.
>
>DATA :
> datastring TYPE string,
> wa_flight_c TYPE st_flight_c,
> wa_flight TYPE st_flight.
>
>START-OF-SELECTION.
>
> CALL FUNCTION 'BC401_GET_SEP_STRING'
>* EXPORTING
>* im_number ='1'
>* im_table_name = 'SFLGHT'
>* im_separator = '#'
>* im_unique = 'X'
> IMPORTING
> ex_string = datastring
> EXCEPTIONS
> no_data = 1
> OTHERS = 2.
> IF sy-subrc <> 0.
> MESSAGE a038(bc401).
> ENDIF.
>
>
> SHIFT datastring BY 2 PLACES.
> find '##' in datastring.
> IF sy-subrc <> 0.
> MESSAGE a702(bc401).
> ENDIF.
>
> SPLIT datastring AT '##' INTO set_string datastring.
>
> SPLIT set_string AT '#' INTO
> wa_flight_c-mandt
> wa_flight_c-carrid
> wa_flight_c-fldate
> wa_flight_c-price
> wa_flight_c-currency
> wa_flight_c-planetype
> wa_flight_c-seatsmax
> wa_flight_c-seatsocc
> wa_flight_c-paymentsum
> wa_flight_c-seatmax_b
> wa_flight_c-seatsocc_b
> wa_flight_c-seatsmax_f
> wa_flight_c-seatsocc_f.
>
> MOVE-CORRESPONDING wa_flight_c TO wa_flight.
>
> WRITE: /
> wa_flight-carrid,
> wa_flight-connid,
> wa_flight-fldata DD/MM/YYYY,
> wa_flight-price CURRENCY wa_flight-crurrency,
> wa_flight-currency,
> wa_flight-planetype,
> wa_flight-seatmax,
> wa_flight-seatsocc.
>
>
>
>
다음 소스를 복사해서 활성화 해보세요.
REPORT Z01 .
TYPES:
BEGIN OF st_flight_c,
mandt(3) TYPE c,
carrid(3) TYPE c,
connid(3) TYPE c,
fldate(8) TYPE c,
price(20) TYPE c,
currency(5) TYPE c,
planetype(10) TYPE c,
seatsmax(10) type c,
seatsmas(10) TYPE c,
seatsocc(10) TYPE c,
paymentsum(22) TYPE c,
seatsmax_b(10) TYPE c,
seatmax_b(10) type c,
seatsocc_b(10) TYPE c,
seatsmax_f(10) TYPE c,
seatsocc_f(10) TYPE c,
END OF st_flight_c,
BEGIN OF st_flight,
carrid(3) TYPE c,
connid(4) TYPE n,
fldate TYPE d,
price(9) TYPE p DECIMALS 2,
currency(5) TYPE c,
planetype(10) TYPE c,
seatmax TYPE i,
seatsocc TYPE i,
END OF st_flight.
DATA : set_string type string,
datastring TYPE string,
wa_flight_c TYPE st_flight_c,
wa_flight TYPE st_flight.
START-OF-SELECTION.
CALL FUNCTION 'BC401_GET_SEP_STRING'
* EXPORTING
* im_number ='1'
* im_table_name = 'SFLGHT'
* im_separator = '#'
* im_unique = 'X'
IMPORTING
ex_string = datastring
EXCEPTIONS
no_data = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE a038(bc401).
ENDIF.
SHIFT datastring BY 2 PLACES.
find '##' in datastring.
IF sy-subrc <> 0.
MESSAGE a702(bc401).
ENDIF.
SPLIT datastring AT '##' INTO set_string datastring.
SPLIT set_string AT '#' INTO
wa_flight_c-mandt
wa_flight_c-carrid
wa_flight_c-fldate
wa_flight_c-price
wa_flight_c-currency
wa_flight_c-planetype
wa_flight_c-seatsmax
wa_flight_c-seatsocc
wa_flight_c-paymentsum
wa_flight_c-seatmax_b
wa_flight_c-seatsocc_b
wa_flight_c-seatsmax_f
wa_flight_c-seatsocc_f.
MOVE-CORRESPONDING wa_flight_c TO wa_flight.
WRITE: /
wa_flight-carrid,
wa_flight-connid,
wa_flight-fldate DD/MM/YYYY,
wa_flight-price, " CURRENCY wa_flight-crurrency,
* wa_flight-currency,
wa_flight-planetype,
wa_flight-seatmax,
wa_flight-seatsocc.
>저도 방금 전에 글을 올리신 분과 같이 abap certi를 준비하고 있는 학생입니다.
>형한테도 많은 도움을 받고 있지만 ..형 소개로 이 싸이트를 알게 되었고
>더 많은것을 얻어 가고자 이렇게 글을 올려 봅니다.
>
>저도 .. 실습 부분중에 막히 부분이 있어서요. ㅋ
>syntax error check에서... 자꾸 에러가 나네요..!!!
>에러가 난 부분은 캡쳐화면을 파일로 첨부 해 놓았습니다.
>아주 기초적인 에러 같은데 .. 아직 공부를 하고 있는터라 잘 모르겠네요 ㅜㅜ..
>그럼 선배님들의 조언 부탁 드릴ㄲㅔ요 ^^
>
>
>소스 코드 입니다.
>
>REPORT zbc401_23_split_string .
>
>TYPES:
>
> BEGIN OF st_flight_c,
>
> mandt(3) TYPE c,
> carrid(3) TYPE c,
> connid(3) TYPE c,
> fldate(8) TYPE c,
> price(20) TYPE c,
> currency(5) TYPE c,
> planetype(10) TYPE c,
> seatsmas(10) TYPE c,
> seatsocc(10) TYPE c,
> paymentsum(22) TYPE c,
> seatsmax_b(10) TYPE c,
> seatsocc_b(10) TYPE c,
> seatsmax_f(10) TYPE c,
> seatsocc_f(10) TYPE c,
> END OF st_flight_c,
>
>BEGIN OF st_flight,
> carrid(3) TYPE c,
> connidn(4) TYPE n,
> fldate TYPE d,
> price(9) TYPE p DECIMALS 2,
> currency(5) TYPE c,
> planetype(10) TYPE c,
> seatsmax TYPE i,
> seatsocc TYPE i,
>END OF st_flight.
>
>DATA :
> datastring TYPE string,
> wa_flight_c TYPE st_flight_c,
> wa_flight TYPE st_flight.
>
>START-OF-SELECTION.
>
> CALL FUNCTION 'BC401_GET_SEP_STRING'
>* EXPORTING
>* im_number ='1'
>* im_table_name = 'SFLGHT'
>* im_separator = '#'
>* im_unique = 'X'
> IMPORTING
> ex_string = datastring
> EXCEPTIONS
> no_data = 1
> OTHERS = 2.
> IF sy-subrc <> 0.
> MESSAGE a038(bc401).
> ENDIF.
>
>
> SHIFT datastring BY 2 PLACES.
> find '##' in datastring.
> IF sy-subrc <> 0.
> MESSAGE a702(bc401).
> ENDIF.
>
> SPLIT datastring AT '##' INTO set_string datastring.
>
> SPLIT set_string AT '#' INTO
> wa_flight_c-mandt
> wa_flight_c-carrid
> wa_flight_c-fldate
> wa_flight_c-price
> wa_flight_c-currency
> wa_flight_c-planetype
> wa_flight_c-seatsmax
> wa_flight_c-seatsocc
> wa_flight_c-paymentsum
> wa_flight_c-seatmax_b
> wa_flight_c-seatsocc_b
> wa_flight_c-seatsmax_f
> wa_flight_c-seatsocc_f.
>
> MOVE-CORRESPONDING wa_flight_c TO wa_flight.
>
> WRITE: /
> wa_flight-carrid,
> wa_flight-connid,
> wa_flight-fldata DD/MM/YYYY,
> wa_flight-price CURRENCY wa_flight-crurrency,
> wa_flight-currency,
> wa_flight-planetype,
> wa_flight-seatmax,
> wa_flight-seatsocc.
>
>
>
>