KK~SAP

KK's Blog

  博客中心 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 登录 ::
  39 随笔 :: 1 文章 :: 4 评论 :: 1 Trackbacks
Cached @ 2025/6/14 11:56:42Control ASP.skins_cogitation_controls_blogstats_ascx
<2007年10月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

留言簿(0)

随笔档案

文章档案

搜索

最新评论

  • 1. SAP资料下载
  • SAP下载网,
    SAP资料共享网站,完全免费
    资料全由网友共享,大家共享,大家下载
  • --SAP99
  • 2. re: 信用管理理论及其在SAP中的应用
  • Yeah. My MSN is nyf425@hotmail.com.
  • --nyf425
  • 3. about bapi
  • 1BAPI鐨勪紭鐐? bapi鏄潰鍚戝璞$殑璁捐; bapi鏄浐瀹氱殑,涓鑸笉鑳戒慨鏀? bapi鍙互琚玸ap鍐呴儴閮ㄤ欢鍜岄潪sap绋嬪簭浣跨敤; bapi鐨勬垚鍔熷拰閿欒淇℃伅濮嬬粓閫氳繃RETURN杩斿洖; ...
  • --Neosun.Digger.SAP
  • 4. re: 信用管理理论及其在SAP中的应用
  • That's great. It's really hard to accept the Credit Management concept and map with the SAP System in the detail. You gave me a big help. Do you have any IM account, such as MSN?
  • --Dave
  • 5. re: SAP名词解释
  • Clearly help to understand my confuse.
    Great
  • --柚子Nan

阅读排行榜

评论排行榜

Cached @ 2025/6/14 11:56:42Control ASP.skins_cogitation_controls_singlecolumn_ascx

*&---------------------------------------------------------------------*
*& Report  ZZWASTOR                                                    *
*&                                                                     *
*&---------------------------------------------------------------------*
*&                                                                     *
*&                                                                     *
*&---------------------------------------------------------------------*
REPORT ZZWASTOR .

*********************************************************************
* If you do not know the material document of the goods issue any   *
* more you can use transaction SE16.                                *
* - Type in table name MKPF                                         *
* - Type in the delivery note number in field XBLNR (always with    *
*   leading zeroes)                                                 *
* - Execute                                                         *
* - The Material document number of the goods issue for the deleted *
*   delivery will be shown.                                         *
*                                                                   *
*                                                                   *
*                                                                   *
* LF_BUDAT  =>  Posting date for the reversal                       *
* LF_MJAHR  =>  Posting year of the material document to reverse    *
* LF_MBLNR  =>  Goods issue document (with leading zeroes)          *
* LF_VBELN  =>  Delivery note number (with leading zeroes)          *
* LF_TEST   =>  When 'X' it is test mode only, otherwise GI will be *
*               cancelled                                           *
*********************************************************************

TABLES: MKPF, IMKPF, EMKPF, LIKP.

DATA:   BEGIN OF IMSEG OCCURS 0.
        INCLUDE STRUCTURE IMSEG.
DATA:   END OF IMSEG.

DATA:   BEGIN OF EMSEG OCCURS 0.
        INCLUDE STRUCTURE EMSEG.
DATA:   END OF EMSEG.


PARAMETERS: LF_BUDAT  LIKE SY-DATLO DEFAULT SY-DATLO OBLIGATORY,
            LF_MJAHR  LIKE MKPF-MJAHR DEFAULT SY-DATLO(4) OBLIGATORY,
            LF_MBLNR  LIKE MKPF-MBLNR OBLIGATORY,
            LF_VBELN  LIKE LIKP-VBELN OBLIGATORY,
            LF_TEST   TYPE C DEFAULT 'X'.

DATA:   MBLPO LIKE MSEG-ZEILE.

SELECT SINGLE * FROM MKPF WHERE MBLNR = LF_MBLNR
                          AND   MJAHR = LF_MJAHR
                          AND   XBLNR = LF_VBELN.

IF SY-SUBRC IS INITIAL.
  CALL FUNCTION 'MB_CANCEL_GOODS_MOVEMENT'
    EXPORTING
      BUDAT     = LF_BUDAT
      MBLNR     = LF_MBLNR
      MBLPO     = MBLPO
      MJAHR     = LF_MJAHR
      TCODE     = 'VL09'
      CALLED_BY = 'VL09'
    IMPORTING
      EMKPF     = EMKPF
    TABLES
      EMSEG     = EMSEG
      IMSEG     = IMSEG
    EXCEPTIONS
      OTHERS    = 1.

*... No error found, then it will be posted
  IF EMKPF-SUBRC EQ 1.
    IF LF_TEST IS INITIAL.
      CALL FUNCTION 'MB_POST_GOODS_MOVEMENT'
        EXPORTING
          XBLNR_SD = LF_VBELN
        IMPORTING
          EMKPF    = EMKPF
        EXCEPTIONS
          OTHERS   = 0.

      COMMIT WORK.
    WRITE: / 'Goods movement was cancelled successfully with document:',
            EMKPF-MBLNR.
    ELSE.
      WRITE: / 'Testmode: Goods movement could be cancelled !'.
    ENDIF.
  ELSE.
*... otherwise write an error-log
    LOOP AT EMSEG.
      WRITE: /
                EMSEG-MSGID,
                EMSEG-MSGNO,
                EMSEG-MSGTY,
                EMSEG-MSGV1,
               EMSEG-MSGV2,
               EMSEG-MSGV3,
               EMSEG-MSGV4.
    ENDLOOP.
    WRITE: / EMKPF-MSGID,
             EMKPF-MSGNO,
             EMKPF-MSGTY,
             EMKPF-MSGV1,
             EMKPF-MSGV2,
             EMKPF-MSGV3,
             EMKPF-MSGV4.

  ENDIF.
ELSE.
  WRITE: / 'Material document to reverse does not exsist'.
ENDIF.
                                              .
 



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1806383

分享按钮发布于: 2007-10-22 16:23 nyf425 阅读(557) 评论(0)  编辑 收藏

评论

标题
姓名
主页
内容 
  登录  使用高级评论  Top 订阅回复  取消订阅
[使用Ctrl+Enter键可以直接提交]