메뉴 건너뛰기

SAP 한국 커뮤니티

<b>[완료]</b>cursor 프로그램 관련 질문입니다.

order001 2007.12.04 15:42 조회 수 : 9467 추천:30

data: c type cursor,
      wa type sbook.


open cursor c for
     select carrid connid fldate bookid smoker
     from   sbook
     where carrid = 'LH'
     order by carrid connid fldate smoker bookid.


 fetch next cursor c into corresponding fields of wa.

 while sy-subrc = 0.
   if  wa-smoker = ' '.       ==> '  ' 의 의미는 null값인가요?
     perform nonsmoker using c.
    
   elseif  wa-smoker = 'X'.
     perform smoker using c.
     skip.
    
   else.
     exit.
  


endif.
  
  endwhile.
 


  form nonsmoker using n_cur type cursor.
   while wa-smoker = ' ' and sy-subrc = 0.
     format color = 5.
      write: / wa-carrid, wa-connid, wa-fldate, wa-bookid.
      fetch next cursor n_cur into corresponding fields of wa.
  endwhile.
  endform.


  form smoker using s_cur type cursor.
   while wa-smoker = 'X' and sy-subrc = 0.
     format color = 6.
     write: / wa-carrid, wa-connid, wa-fldate, wa-bookid.
     fetch next cursor s_cur into corresponding fields of wa.
   endwhile.
  endform.


 


 


 

번호 제목 글쓴이 날짜 조회 수
5627 [요청]에러에 대해서 문의 드립니다. [1] 풍뎅이 2007.12.03 1743
5626 [요청]Internal Table의 내용을 피벗해서 ALV 출력 할 수 있는 방법이 있을까요? [1] kms 2007.12.03 2121
5625 [요청][초보자]WEB에서 파라메터로 던진 데이터 ABAP에서 받아을수 있나요?? [2] chitar 2007.12.04 1914
5624 [요청]Leading Zero와 Conversion Exit그리고 NO_zero 필드의 관계 [1] SAP폐인 2007.12.04 2634
5623 <b>[완료]</b>미니 SAP data elemental 활성오류 [2] file rain 2007.12.04 1760
5622 <b>[완료]</b>[완료]InfoType의 함수를 사용하는 간단한 예가 있을까요? [2] 혀나미 2007.12.04 2283
5621 [요청]class method 질문 드림니다. [3] bd 2007.12.04 1773
5620 <b>[완료]</b>ALV DRAG&DROP 질문입니다. [5] 백수대장 2007.12.04 2042
5619 <b>[완료]</b>smartform에서 새로운 page로 찍으려면 [7] file w 2007.12.04 3844
5618 [요청]인터널 테이블 선언에 대한 질문입니다.. [1] BEST!! 2007.12.04 1758
5617 <b>[완료]</b>collect [6] 풍뎅이 2007.12.04 2712
5616 <b>[완료]</b>Mark field달기 [6] SAP폐인 2007.12.04 20607
5615 <b>[완료]</b>dataset에 관한 질문입니다. [5] FIFIFI 2007.12.04 12823
5614 <b>[완료]</b>[질문] sap서버에 있는 shell script를 실행시키기.. [3] 해처리 2007.12.04 14599
» <b>[완료]</b>cursor 프로그램 관련 질문입니다. [4] order001 2007.12.04 9467
5612 <b>[완료]</b>Range 테이블에 대해서 [8] SAP폐인 2007.12.04 2662
5611 <b>[완료]</b>DATASET으로 SAP DB에 저장하는 문제입니다. [6] FIFIFI 2007.12.04 2150
5610 <b>[완료]</b>AT NEW f에 대한 질문입니다. [10] 제도스 2007.12.04 1773
5609 [요청]급질문이요ㅠ_ㅠ 특정 필드 비활성화 또는 활성화 [3] 미적분의神 2007.12.04 3233
5608 [완료][질문] 변수사용을 많이 할수 있는 popup 메세지 함수 추천해주세요. [3] Wowking 2007.12.05 2411