FI_document_read_single

SAP/ABAP 2013. 7. 5. 08:50

Have you tried with this,

FI_DOCUMENT_READ1,

FI_DOCUMENT_READ



출처: http://scn.sap.com/thread/1268147

Posted by KindKay
,

SOAP channel exception


- 체크 Abap Source or Data




The error is purely data related. Please try to debug the ABAP funtion module or program with the values what you are passing from SAP PI .



'SAP > ABAP' 카테고리의 다른 글

Table to read PO Header text and item text  (0) 2013.07.19
BAPI_CURRENCY_CONV_TO_EXTERNAL  (0) 2013.07.05
FI_document_read_single  (0) 2013.07.05
SMW0 양식 다운로드  (0) 2013.05.14
download data into excel using fm  (0) 2013.05.08
Posted by KindKay
,

SMW0 양식 다운로드

SAP/ABAP 2013. 5. 14. 17:56

Code listing for: YRTEST00012
Description: 양식 다운로드
*&---------------------------------------------------------------------*
*& Report  YRTEST00012
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

report  yrtest00012 message-id z00mmm.

  include yrtest00012_top.
  include yrtest00012_sel.
  include yrtest00012_f01.


*----------------------------------------------------------------------*
initialization.
*----------------------------------------------------------------------*
  p_fname = 'C:\Upload\MaterialMaster_ROH.xls'.

  concatenate icon_xls '양식다운로드'
         into sscrfields-functxt_01.



*----------------------------------------------------------------------*
at selection-screen.
*----------------------------------------------------------------------*
  case sscrfields-ucomm.
    when 'FC01'.
      perform pop_up using '양식을 다운로드 하시겠습니까?'
                           '양식다운로드 확인'.
      check g_answer eq 'J'.

      perform download_excel_file using p_fname
                                        sy-cprog
                               changing g_rtncod.
  endcase.


*Selection texts
*----------------------------------------------------------
* P_FNAME D       .


*Messages
*----------------------------------------------------------
*
* Message class: Z00MMM
*015   등록된 Excel양식이 없습니다.
*016   & 으로 저장되었습니다.
*020   자료를 OPEN 하였는지 확인하세요.

Extracted by Direct Download Enterprise version 1.3.1 - E.G.Mellodew. 1998-2005 UK. Sap Release 701


Code listing for: YRTEST00012_TOP
Description: Include YRTEST00012_TOP
*&---------------------------------------------------------------------*
*&  Include           YRTEST00012_TOP
*&---------------------------------------------------------------------*

  type-pools: icon.

  tables: sscrfields.

  data: g_answer,
        g_rtncod.

Extracted by Direct Download Enterprise version 1.3.1 - E.G.Mellodew. 1998-2005 UK. Sap Release 701



Code listing for: YRTEST00012_SEL
Description: Include YRTEST00012_SEL
*&---------------------------------------------------------------------*
*&  Include           YRTEST00012_SEL
*&---------------------------------------------------------------------*

  selection-screen: function key 1.

  selection-screen begin of block b1 with frame title text-001.

    parameters: p_fname like rlgrap-filename default 'C:\' obligatory.

  selection-screen end of block b1.

Extracted by Direct Download Enterprise version 1.3.1 - E.G.Mellodew. 1998-2005 UK. Sap Release 701



Code listing for: YRTEST00012_F01
Description: Include YRTEST00012_F01
*&---------------------------------------------------------------------*
*&  Include           YRTEST00012_F01
*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*&      Form  pop_up
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form pop_up  using  p_1 p_2.

  clear: g_answer.

  call function 'POPUP_TO_CONFIRM_STEP'
    exporting
      textline1      = p_1
      titel          = p_2
      cancel_display = ''
    importing
      answer         = g_answer.

endform.                    " pop_up



*&---------------------------------------------------------------------*
*&      Form  DOWNLOAD_EXCEL_FILE
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
form download_excel_file using p_file
                               p_cprog
                      changing p_rtncod.

  data: lv_dfname       like  rlgrap-filename,
        lv_objid        like  wwwdata-objid,
        lv_fname        like  rlgrap-filename,
        lv_tail         type  string,
        ls_wwwdatatab   like  wwwdatatab,
        lv_subrc        type  i.

  clear : lv_fname, ls_wwwdatatab, lv_subrc.
  p_rtncod = 'E'.

  lv_dfname = p_file. "file name.

  lv_objid = 'Z00MMC001_UPD'.

* Pc 파일 삭제
  call function 'WS_FILE_DELETE'
    exporting
        file  = lv_dfname
    importing
      return = lv_subrc.

  if  lv_subrc <> 0   and   lv_subrc <> 1.
    message s020  display like 'E'.
    exit.
  endif.

  select single  *
    into corresponding fields of ls_wwwdatatab
    from wwwdata                 " WWW 오브젝트 저장에 대한 INDX-유형 테이블
   where objid = lv_objid.       " SAP WWW 게이트웨이 오브젝트 이름

  if sy-subrc ne 0.
    message s015 display like 'E'.
    exit.
  endif.

* Web 템플레이트(Excel Form) 다운로드
  call function 'DOWNLOAD_WEB_OBJECT'
    exporting
      key         = ls_wwwdatatab
      destination = lv_dfname.

  clear : lv_fname, lv_tail.
  split  lv_dfname  at  ' '  into  lv_fname  lv_tail.

  if  lv_dfname <> lv_fname.
    message  s016  with  lv_dfname.
  else.
*   Download 파일명에 공백이 없는 경우 Excel 실행
    call function 'WS_EXECUTE'
      exporting
        commandline = lv_dfname
        program     = 'EXCEL.EXE'.
    message  s016  with  lv_dfname.
  endif.

  clear: p_rtncod.
endform.                    " DOWNLOAD_EXCEL_FILE

Extracted by Direct Download Enterprise version 1.3.1 - E.G.Mellodew. 1998-2005 UK. Sap Release 701
Posted by KindKay
,