Need BAPI for Purchasing Order Reject through Workflow

David Martínez González dmg at iie.org.mx
Wed Aug 6 11:13:07 EDT 2008


HI,
 
I recently had the same problem and found this FM. I think it help you.
 
Greetings.
 
FUNCTION zmfmm_requisition_reject .
*"----------------------------------------------------------------------
""Interfase local
*" IMPORTING
*" VALUE(NUMBER) TYPE BAPI2009OB-PREQ_NO
*" VALUE(REL_CODE) TYPE BAPIMMPARA-REL_CODE
*" VALUE(ITEM) TYPE BAPI2009OB-PREQ_ITEM
*" TABLES
*" MESSAGE_LINES STRUCTURE SWR_MESSAG OPTIONAL
*" MESSAGE_STRUCT STRUCTURE SWR_MSTRUC OPTIONAL
*"----------------------------------------------------------------------

DATA: container LIKE TABLE OF swr_cont WITH HEADER LINE,
xeban LIKE TABLE OF ueban WITH HEADER LINE,
xebkn LIKE TABLE OF uebkn WITH HEADER LINE,
yeban LIKE TABLE OF ueban WITH HEADER LINE,
yebkn LIKE TABLE OF uebkn WITH HEADER LINE,
object_key TYPE swr_struct-object_key,
item_numc TYPE numc05.

SELECT *
INTO CORRESPONDING FIELDS OF TABLE xeban
FROM eban
WHERE banfn = number
AND bnfpo = item.

SELECT *
INTO CORRESPONDING FIELDS OF TABLE xebkn
FROM ebkn
WHERE banfn = number
AND bnfpo = item.

yeban] = xeban[ <https://forums.sdn.sap.com/> .
yebkn] = xebkn[ <https://forums.sdn.sap.com/> .

READ TABLE xeban INDEX 1.
xeban-kz = 'U'.
xeban-banpr = '08'.
MODIFY xeban INDEX 1.

CALL FUNCTION 'ME_UPDATE_REQUISITION'
TABLES
xeban = xeban
xebkn = xebkn
yeban = yeban
yebkn = yebkn.

CALL FUNCTION 'ME_UPDATE_REQUISITION_CHNGDOC'
TABLES
xeban = xeban
xebkn = xebkn
yeban = yeban





yebkn = yebkn.

container-element = 'RELEASECODE'.
container-value = REL_CODE.
APPEND container.

item_numc = item.
CONCATENATE number item_numc INTO object_key.

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT'
EXPORTING
object_type = 'BUS2009'
object_key = object_key
event = 'REJECTED'
TABLES
input_container = container
message_lines = message_lines
message_struct = message_struct.

ENDFUNCTION.

 


________________________________

De: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] En nombre de Schmidinger, Heinz (Oerlikon BZ)
Enviado el: Miércoles, 06 de Agosto de 2008 04:51 a.m.
Para: SAP Workflow Users' Group
Asunto: AW: Need BAPI for Purchasing Order Reject through Workflow



Hi Mani,

 

I am with you; this BAPI (and one for undo) whould be fine, but does not exists.

I needed it to when I have implement our Purchase Release System, but at least I have wrote one by myself.

 

Greetings

Heinz

 

_______________________________________

Heinz Schmidinger 
Certified Senior Application Consultant 

Oerlikon IT Solutions AG, Pfäffikon 
Churerstrasse 120 
8808 Pfäffikon SZ 
Switzerland 

P +41 58 356 8626 
F +41 58 356 8826 
heinz.schmidinger at oerlikon.com 

www.oerlikon.com <http://www.oerlikon.com/ecomaXL/index.php?site=OERLIKON_EN_HOME>  

________________________________

Von: sap-wug-bounces at mit.edu [mailto:sap-wug-bounces at mit.edu] Im Auftrag von Manikandan Subburaj
Gesendet: Dienstag, 5. August 2008 01:28
An: sap-wug at mit.edu
Betreff: Need BAPI for Purchasing Order Reject through Workflow

 

Hi All,

     I need a bapi to reject Purchase Order(PO) through Workflow. i've found some to release but not to reject, ('08' status Code). Can anybody help me please.

Thanks & Regards,
Mani.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/sap-wug/attachments/20080806/08d03099/attachment.htm


More information about the SAP-WUG mailing list