메뉴 건너뛰기

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.


 


 


 

번호 제목 글쓴이 날짜 조회 수
910 [요청]SUM [6] 풍뎅이 2007.12.06 8569
909 <b>[완료]</b>테이블 유지보수 뷰 관련 질문 입니다. [4] 안면도 2007.12.06 14283
908 <b>[완료]</b>오라클 DB와 SAP의 연동에 대한 궁금사항입니다. [4] 혀나미 2007.12.06 1765
907 <b>[완료]</b>오라클의 CASE WHEN과 같은 기능.. [8] 풍뎅이 2007.12.06 10000
906 [요청]스크린페인터가 되질 않습니다.. alphanumeric editor가 나와요..ㅜㅜ [15] file 피크민 2007.12.06 71136
905 [요청]CTS를 하면서 생긴 궁금증이 있습니다. [2] SAP폐인 2007.12.05 2696
904 <b>[완료]</b>메시지가 잘립니다. [3] 김지성 2007.12.05 24469
903 <b>[완료]</b>BOM 관련 펑션 좀 알려주세요. [4] 행복한외계인 2007.12.05 1768
902 [요청]read table [3] 풍뎅이 2007.12.05 8789
901 <b>[완료]</b>Sorting시 Internal Table 이름이 가변적일때 Field symbol 사용 방법좀 가르쳐 주세요. [4] SkyDream 2007.12.05 27659
900 [완료][질문] 변수사용을 많이 할수 있는 popup 메세지 함수 추천해주세요. [3] Wowking 2007.12.05 2411
899 [요청]급질문이요ㅠ_ㅠ 특정 필드 비활성화 또는 활성화 [3] 미적분의神 2007.12.04 3251
898 <b>[완료]</b>AT NEW f에 대한 질문입니다. [10] 제도스 2007.12.04 1773
897 <b>[완료]</b>DATASET으로 SAP DB에 저장하는 문제입니다. [6] FIFIFI 2007.12.04 2150
896 <b>[완료]</b>Range 테이블에 대해서 [8] SAP폐인 2007.12.04 2667
» <b>[완료]</b>cursor 프로그램 관련 질문입니다. [4] order001 2007.12.04 9473
894 <b>[완료]</b>[질문] sap서버에 있는 shell script를 실행시키기.. [3] 해처리 2007.12.04 14622
893 <b>[완료]</b>dataset에 관한 질문입니다. [5] FIFIFI 2007.12.04 12831
892 <b>[완료]</b>Mark field달기 [6] SAP폐인 2007.12.04 20620
891 <b>[완료]</b>collect [6] 풍뎅이 2007.12.04 2713