How to Reverse Goods Issue

WS_REVERSE_GOODS_ISSUE function module is used to reverse goods issue. Here is an example of function module.

  lv_tcode = 'VL09'.
  lv_vbtyp = 'J'.

  CALL FUNCTION 'WS_REVERSE_GOODS_ISSUE'
    EXPORTING
      i_vbeln                         = p_vbeln
      i_budat                         = p_budat
      i_tcode                         = lv_tcode
      i_vbtyp                         = lv_vbtyp
    TABLES
      t_mesg                          = lt_mesg
      T_VBAPF                         = lt_vbapf
      T_VBFA                          = lt_vbfavb
   EXCEPTIONS
     error_reverse_goods_issue       = 1
     error_message                   = 2
     OTHERS                          = 3
            .
  IF sy-subrc <> 0.
    CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
  ELSE.    
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.
  ENDIF.

 

When we execute function module from se37, it works fine. But it's not working when you write code with the same parameters.

As a solution we can write a different report and write the code in this program. calling this program will do the job.

You can send the parameters as mentioned below.

    lv_vbeln = " delivery number
    lv_budat = " reverse date
  
    SUBMIT ZREVERSE_GOODS_ISSUE  WITH P_VBELN EQ lv_vbeln_vl
                                 WITH p_budat eq lv_budat

 

ABOUT Ekrem Güngörmez

https://tr.linkedin.com/in/ekremgungormez

COMMENTS

comments powered by Disqus