메뉴 건너뛰기

SAP 한국 커뮤니티

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

order001 2007.12.04 15:42 조회 수 : 9473 추천: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.


 


 


 

번호 제목 글쓴이 날짜 조회 수
912 <b>[완료]</b>SAP 로그인이 안됩니다.. [2] lunar 2007.12.07 1686
911 [요청]BC관련질문입니다. ECC,BW와같은 2개의 시스템이 한 서버의 data를 바라볼수 있는지.. 윤군친구(bsp개발자) 2007.12.07 1809
910 <b>[완료]</b>BDC에서 CATT 모드는 무엇을 의미하나요? [1] SARA 2007.12.07 3262
909 [요청]로그인시..please logon with a dialog user이게 뜹니다..ㅜㅜ [1] 피크민 2007.12.07 2443
908 <b>[완료]</b>checkbox를 쓰다가 궁금한게 떠올라서 질문올립니다. [3] SAP폐인 2007.12.06 2310
907 [요청]SUM [6] 풍뎅이 2007.12.06 8570
906 <b>[완료]</b>테이블 유지보수 뷰 관련 질문 입니다. [4] 안면도 2007.12.06 14287
905 <b>[완료]</b>오라클 DB와 SAP의 연동에 대한 궁금사항입니다. [4] 혀나미 2007.12.06 1765
904 <b>[완료]</b>[완료]InfoType의 함수를 사용하는 간단한 예가 있을까요? [2] 혀나미 2007.12.04 2284
903 <b>[완료]</b>오라클의 CASE WHEN과 같은 기능.. [8] 풍뎅이 2007.12.06 10002
902 [요청]스크린페인터가 되질 않습니다.. alphanumeric editor가 나와요..ㅜㅜ [15] file 피크민 2007.12.06 71148
901 <b>[완료]</b>Sorting시 Internal Table 이름이 가변적일때 Field symbol 사용 방법좀 가르쳐 주세요. [4] SkyDream 2007.12.05 27701
900 [요청]CTS를 하면서 생긴 궁금증이 있습니다. [2] SAP폐인 2007.12.05 2699
899 <b>[완료]</b>메시지가 잘립니다. [3] 김지성 2007.12.05 24473
898 <b>[완료]</b>BOM 관련 펑션 좀 알려주세요. [4] 행복한외계인 2007.12.05 1768
897 [요청]read table [3] 풍뎅이 2007.12.05 8791
896 [요청]급질문이요ㅠ_ㅠ 특정 필드 비활성화 또는 활성화 [3] 미적분의神 2007.12.04 3254
895 <b>[완료]</b>AT NEW f에 대한 질문입니다. [10] 제도스 2007.12.04 1773
894 <b>[완료]</b>DATASET으로 SAP DB에 저장하는 문제입니다. [6] FIFIFI 2007.12.04 2151
893 [요청]Leading Zero와 Conversion Exit그리고 NO_zero 필드의 관계 [1] SAP폐인 2007.12.04 2641