메뉴 건너뛰기

SAP 한국 커뮤니티

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

order001 2007.12.05 00:42 조회 수 : 9526 추천: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.


 


 


 

번호 제목 글쓴이 날짜 조회 수
906 <b>[완료]</b>테이블 유지보수 뷰 관련 질문 입니다. [4] 안면도 2007.12.06 14479
905 <b>[완료]</b>오라클 DB와 SAP의 연동에 대한 궁금사항입니다. [4] 혀나미 2007.12.06 1767
904 <b>[완료]</b>[완료]InfoType의 함수를 사용하는 간단한 예가 있을까요? [2] 혀나미 2007.12.04 2291
903 <b>[완료]</b>오라클의 CASE WHEN과 같은 기능.. [8] 풍뎅이 2007.12.06 10036
902 [요청]스크린페인터가 되질 않습니다.. alphanumeric editor가 나와요..ㅜㅜ [15] file 피크민 2007.12.06 71494
901 <b>[완료]</b>Sorting시 Internal Table 이름이 가변적일때 Field symbol 사용 방법좀 가르쳐 주세요. [4] SkyDream 2007.12.05 28801
900 [요청]CTS를 하면서 생긴 궁금증이 있습니다. [2] SAP폐인 2007.12.06 2740
899 <b>[완료]</b>메시지가 잘립니다. [3] 김지성 2007.12.06 24620
898 <b>[완료]</b>BOM 관련 펑션 좀 알려주세요. [4] 행복한외계인 2007.12.05 1772
897 [요청]read table [3] 풍뎅이 2007.12.05 8861
896 [요청]급질문이요ㅠ_ㅠ 특정 필드 비활성화 또는 활성화 [3] 미적분의神 2007.12.05 3298
895 <b>[완료]</b>AT NEW f에 대한 질문입니다. [10] 제도스 2007.12.05 1773
894 <b>[완료]</b>DATASET으로 SAP DB에 저장하는 문제입니다. [6] FIFIFI 2007.12.05 2155
893 [요청]Leading Zero와 Conversion Exit그리고 NO_zero 필드의 관계 [1] SAP폐인 2007.12.04 2683
892 <b>[완료]</b>Range 테이블에 대해서 [8] SAP폐인 2007.12.05 2687
» <b>[완료]</b>cursor 프로그램 관련 질문입니다. [4] order001 2007.12.05 9526
890 <b>[완료]</b>[질문] sap서버에 있는 shell script를 실행시키기.. [3] 해처리 2007.12.05 14740
889 <b>[완료]</b>dataset에 관한 질문입니다. [5] FIFIFI 2007.12.04 12997
888 <b>[완료]</b>Mark field달기 [6] SAP폐인 2007.12.04 20719
887 <b>[완료]</b>collect [6] 풍뎅이 2007.12.04 2718