메뉴 건너뛰기

SAP 한국 커뮤니티

<img src=2.gif>BDC FBV1 임시전표 생성하는데...

파이냥 2010.04.12 20:54 조회 수 : 4049

안녕하세요 질문할께 하나 있어서 이렇게 글을 올려봅니다.


 


다름이 아니라 BDC 테워서 FBV1 임시전표 생성하려하는데 PAGE DOWN이부분에서 '=P+'이렇게 코딩을 해주는걸로


 


알고 해줬는데..이부분에서만 계속 멈춰서 다음부분을 안타네요.. 아바퍼님들 좀 도와주세요 ㅜ.ㅜ


 


  PERFORM bdc_dynpro      USING 'SAPLF040'             '0100' 'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'           'RF05V-NEWKO'.
  PERFORM bdc_field       USING 'BDC_OKCODE'           '/00'.
  PERFORM bdc_field       USING 'BKPF-BLDAT'           gv_endda.                      "Document Date
  PERFORM bdc_field       USING 'BKPF-BLART'           'IC'.                          "Document Type
  PERFORM bdc_field       USING 'BKPF-BUKRS'           p_gt_monthly-bukrs_b.          "Company Code
  PERFORM bdc_field       USING 'BKPF-BUDAT'           gv_endda.                      "Posting Date
  PERFORM bdc_field       USING 'BKPF-MONAT'           p_gt_monthly-yearmon+4(2).     "Period
  PERFORM bdc_field       USING 'BKPF-WAERS'           p_gt_monthly-currency_b.       "Currency
  PERFORM bdc_field       USING 'VBKPF-XBWAE'          'X'.
  PERFORM bdc_field       USING 'FS006-DOCID'          '*'.
  PERFORM bdc_field       USING 'RF05V-NEWBS'          p_gt_monthly-b_bschl_d.        "Posting Key 차변"
  PERFORM bdc_field       USING 'RF05V-NEWKO'          p_gt_monthly-b_saknr_d.          "40 일 땐 계정이 들어감



  PERFORM bdc_dynpro      USING 'SAPLF040'           '0300' 'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'         'BSEG-WRBTR'.
  PERFORM bdc_field       USING 'BDC_OKCODE'         '/00'.


* 해당통화에 맞는 금액으로 변경


  IF p_gt_monthly-s_bschl_d = '01'.


*{ billing company인 경우 환율 곱해줌
    p_gt_monthly-icsales = p_gt_monthly-icsales * p_gt_monthly-rate1.
*}


    CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_IDOC'
      EXPORTING
        currency    = p_gt_monthly-currency_b
        sap_amount  = p_gt_monthly-icsales
      IMPORTING
        idoc_amount = p_gt_monthly-conicsales1.
  ELSE.


*{ billing company인 경우 환율 곱해줌
*    p_gt_monthly-iccos = p_gt_monthly-iccos * p_gt_monthly-rate1.
*}


    CALL FUNCTION 'CURRENCY_AMOUNT_SAP_TO_IDOC'
      EXPORTING
        currency    = p_gt_monthly-currency_b
        sap_amount  = p_gt_monthly-conicsales    "환율이 곱해진 값
      IMPORTING
        idoc_amount = p_gt_monthly-conicsales1.
  ENDIF.


  CONDENSE p_gt_monthly-conicsales1.


  CHECK p_gt_monthly-conicsales1 <> '0'.


 


  PERFORM bdc_field       USING 'BSEG-WRBTR'           p_gt_monthly-conicsales1.      "금액
  PERFORM bdc_field       USING 'BSEG-MWSKZ'           p_gt_monthly-taxcode_b.         "세금코드
  PERFORM bdc_field       USING 'BSEG-VALUT'           gv_endda.



  PERFORM bdc_dynpro      USING 'SAPLKACB'             '0002' 'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'           'COBL-KOSTL'.
  PERFORM bdc_field       USING 'BDC_OKCODE'           '=ENTE'.
  PERFORM bdc_field       USING 'COBL-GSBER'            p_gt_monthly-bukrs_b.         "Business Area.
  PERFORM bdc_field       USING 'COBL-KOSTL'            p_gt_monthly-b_kostl_d.       "Kostl



  PERFORM bdc_dynpro      USING 'SAPLF040'              '0300'    'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'            'BSEG-WRBTR'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '/00'.
  PERFORM bdc_field       USING 'BSEG-WRBTR'            p_gt_monthly-conicsales1.      "금액
  PERFORM bdc_field       USING 'BSEG-MWSKZ'            p_gt_monthly-taxcode_b.         "세금코드
  PERFORM bdc_field       USING 'BSEG-VALUT'            gv_endda.
  PERFORM bdc_field       USING 'DKACB-FMORE'           'X'.



  PERFORM bdc_dynpro      USING 'SAPLKACB'             '0002' 'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'           'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'           '=COBL_XERGO'.
  PERFORM bdc_field       USING 'COBL-GSBER'            p_gt_monthly-bukrs_b.         "Business Area.
  PERFORM bdc_field       USING 'COBL-KOSTL'            p_gt_monthly-b_kostl_d.       "Kostl


  PERFORM bdc_dynpro      USING 'SAPLKEAK'             '0300' 'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'           'RKEAK-FIELD(05)'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '=WEIT'.


  IF p_gt_monthly-b_cont_d IS NOT INITIAL.                                          "Contract 가 선택된 경우
    PERFORM bdc_field       USING 'RKEAK-FIELD(02)'      p_gt_monthly-matnr.


    IF p_gt_monthly-vbeln <= '0040000000'.                                            "Contract 가 선택된 경우
      PERFORM bdc_field       USING 'RKEAK-FIELD(04)'    p_gt_monthly-vbeln.
      PERFORM bdc_field       USING 'RKEAK-FIELD(05)'    p_gt_monthly-posnr.
    ELSE.
      PERFORM bdc_dynpro      USING 'SAPLKEAK'            '0300' 'X'.
      PERFORM bdc_field       USING 'BDC_CURSOR'          'RKEAK-FIELD(08)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'          '=P+'.                        <----이부분 입니다.


      PERFORM bdc_dynpro      USING 'SAPLKEAK'            '0300' 'X'.
      PERFORM bdc_field       USING 'BDC_CURSOR'          'RKEAK-FIELD(12)'.
      PERFORM bdc_field       USING 'BDC_OKCODE'          '=WEIT'.
      PERFORM bdc_field       USING 'RKEAK-FIELD(12)'    p_gt_monthly-vbeln.
    ENDIF.
  ENDIF.
  PERFORM bdc_field       USING 'RKEAK-FIELD(08)'        p_gt_monthly-bukrs_b.



  PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'       'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'            'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '=ENTE'.
  PERFORM bdc_field       USING 'COBL-GSBER'            p_gt_monthly-bukrs_b.
  PERFORM bdc_field       USING 'COBL-KOSTL'            p_gt_monthly-b_kostl_d.



  PERFORM bdc_dynpro      USING 'SAPLF040' '0300'        'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'             'RF05V-NEWKO'.
  PERFORM bdc_field       USING 'BDC_OKCODE'             '/00'.
  PERFORM bdc_field       USING 'BSEG-WRBTR'             p_gt_monthly-conicsales1.
  PERFORM bdc_field       USING 'BSEG-VALUT'             gv_endda.
  PERFORM bdc_field       USING 'RF05V-NEWBS'            p_gt_monthly-b_bschl_c.        "Posting Key 대변
  PERFORM bdc_field       USING 'RF05V-NEWKO'            p_gt_monthly-b_vendor_c.        "Vendor
  PERFORM bdc_field       USING 'DKACB-FMORE'            'X'.



  PERFORM bdc_dynpro      USING 'SAPLKACB'              '0002'  'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'            'COBL-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '=ENTE'.
  PERFORM bdc_field       USING 'COBL-GSBER'            p_gt_monthly-bukrs_b.
  PERFORM bdc_field       USING 'COBL-KOSTL'            p_gt_monthly-b_kostl_d.        "Kostl_sales_credit



  PERFORM bdc_dynpro      USING 'SAPLF040' '0302'       'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'            'BSEG-GSBER'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '/00'.
  PERFORM bdc_field       USING 'BSEG-HKONT'            p_gt_monthly-b_saknr_c.          "Kostl_sales_credit
  PERFORM bdc_field       USING 'BSEG-WRBTR'            p_gt_monthly-conicsales1.
*  PERFORM bdc_field       USING 'BSEG-MWSKZ'            '**'.
  PERFORM bdc_field       USING 'BSEG-GSBER'             p_gt_monthly-bukrs_b.



  PERFORM bdc_dynpro      USING 'SAPLF040' '0302'       'X'.
  PERFORM bdc_field       USING 'BDC_CURSOR'            'BSEG-WRBTR'.
  PERFORM bdc_field       USING 'BDC_OKCODE'            '=BP'.
  PERFORM bdc_field       USING 'BSEG-HKONT'            p_gt_monthly-b_saknr_c.          "Kostl_sales_credit
  PERFORM bdc_field       USING 'BSEG-WRBTR'            p_gt_monthly-conicsales1.
*  PERFORM bdc_field       USING 'BSEG-MWSKZ'            '**'.
  PERFORM bdc_field       USING 'BSEG-GSBER'             p_gt_monthly-bukrs_b.

번호 제목 글쓴이 날짜 조회 수
4692 <img src=2.gif>Web Dynpro ALV & Table 에 관하여... [1] file im 해성 2010.04.15 1790
4691 <img src=3.gif>ALV 합계,소계 기능에 대해서 질문이 있습니다. [3] rune 2010.04.15 5970
4690 <img src=3.gif>collect시 값이 더블로 나올 때... [6] 맨날초보 2010.04.14 2007
4689 <img src=3.gif>ALV SPLIT한 것 중에 더블클릭 이벤트 관련하여 질문드립니다. [3] 고담 2010.04.14 2194
4688 <img src=3.gif>모듈풀 프로그램에서 select-option 구현. [2] 초밥 2010.04.14 1758
4687 <img src=3.gif>For all entries 사용하여 채워넣는 법? [5] Abap consultant 2010.04.14 2019
4686 <img src=2.gif>CTS 삭제가 안되네요. 정렬 및 압축을 했는데 압축도 안되고... [4] happy~ 2010.04.14 3673
» <img src=2.gif>BDC FBV1 임시전표 생성하는데... [1] 파이냥 2010.04.12 4049
4684 <img src=2.gif>시간 Unit 체크 Function & 시간 단위 Conversion Function [2] 찬호사랑 2010.04.12 1435
4683 <img src=2.gif>ALV 펑션으로 구현시 F4(Possible Entry)를 어떻게 구현하는 건가요?ㅜㅜ [5] 삐지미 2010.04.12 2576
4682 <img src=2.gif>node명 변경되도록 하려는데요..NODE REFRESH. [1] 피크민 2010.04.10 1438
4681 <img src=1.gif>Order Operation confirmation - Activity 단위 Conversion 문의 찬호사랑 2010.04.09 1533
4680 <img src=1.gif>엑세일 데이타 읽을때 수자의 천의 자리에 ','이 있을시... [2] Bizzard.Chul 2010.04.09 1237
4679 <img src=3.gif>조회화면에서 Back 버튼 클릭시 초기화면으로 안갈 때? [8] 맨날초보 2010.04.09 2854
4678 <img src=2.gif>BDC 프로그램에서 옵션에 대해 질문 드립니다. [2] 아밥 2010.04.09 2272
4677 <img src=2.gif>SAP 외의 DB에서 자료를 읽어올수 있는방법? [2] 덜익은~밥 2010.04.08 1764
4676 <img src=2.gif>Material Document ( MSEG , MKPF ) Query 속도 Enhance 문의 [3] 찬호사랑 2010.04.08 2255
4675 <img src=3.gif>트랜잭션이 따지지 않을 때 해결 방법 있나요?? [6] 츄리닝 2010.04.08 1258
4674 <img src=3.gif>펑션에서 임폴트 탭에 스트링을 이용한 구조를 설정 시 [4] happy~ 2010.04.08 1293
4673 <img src=3.gif>Select 구문 문의드립니다. 질문은 자세히.... [2] 버미! 2010.04.08 1120