본문 바로가기
SAP

Sales Order Doc Status Text Function Module

by Hkun 2014. 1. 13.
반응형

Sales Order 문서 조회 하다 보면 테이블 값과 실제 문서조회 화면과는 

상이한 출력 Text가 보이는데 이건 따로 펑션이 존재 하더라~~


*&---------------------------------------------------------------------*
*&      Form  RV_DOCUMENT_STATUS_TEXTS
*&---------------------------------------------------------------------*
*       text
*----------------------------------------------------------------------*
*      -->P_SY_MANDT  text
*      -->P_SY_LANGU  text
*      -->P_0341   text
*      -->P_0342   text
*      -->P_LT_SO_LIST_GBSTK  text
*      <--P_ET_SO_LIST_GBSTK  text
*----------------------------------------------------------------------*
FORM RV_DOCUMENT_STATUS_TEXTS  USING    PV_MANDT
                                        PV_LANGU
                                        PV_TABNAME
                                        PV_FIELDNAME
                                        PV_VALUE
                               CHANGING PV_TEXT.

  DATA LS_INPUT TYPE TVBST.
  DATA LV_TEXT  TYPE TVBST-BEZEI.

  CLEAR LS_INPUT.
  LS_INPUT-MANDT PV_MANDT.      "CLIENT
  LS_INPUT-SPRAS PV_LANGU.       "LANGU
  LS_INPUT-TBNAM PV_TABNAME.  "Table Name (VBUK)
  LS_INPUT-FDNAM PV_FIELDNAME.
  LS_INPUT-STATU PV_VALUE.

  CALL FUNCTION 'RV_DOCUMENT_STATUS_TEXTS'
    EXPORTING
      TVBST_WA LS_INPUT
    IMPORTING
      TEXT     LV_TEXT.

  PV_TEXT LV_TEXT.

ENDFORM.                    " RV_DOCUMENT_STATUS_TEXTS

반응형

댓글