04-27-2009 5:38 AM
Hi Dudes,
In my customized program I am displaying a list of PR with checkboxes for all line items, and Reject button in Application Bar.
When user selects PR and press the Reject button there should be rejected as is like in ME52.
So could please let me know how to do this and can tell the FM to reject the selected PR.
Regards,
Suneel G
04-27-2009 5:42 AM
04-27-2009 5:46 AM
Hi Gayathri,
Thanks for the FM's given, Could you please let me know what is field and in which table we can differentiate, whether this PR and Rejected PR.
Regards,
Suneel G
04-27-2009 5:42 AM
Hello,
At the click of the BUtoon you can send the control to transaction ME52 by:
SET PARAMETER ID 'abc' FIELD V_FIELD1.
CALL TRANSACTION 'ME52' .
04-27-2009 5:48 AM
Hi SAPUSER,
The control should not go to ME52 it have to Reject when I click my customized button itself.
Regards,
Suneel G
04-27-2009 5:48 AM
hi these are the FM available for purchase requisition
i guess u can use MASS_CHANGE_PURCHASE_REQ Change Purchasing requests
for this purpose
but i am afraid if you delete this or not.
can u pls tell me where u find the reject button in ME52
i.e., exactly inw hich screen
so that we can debug that
ACC4 FI/CO: BAPIs for UPDATE
ALE_ACC_PURCHASE_REQUI_POST
BAPI_ACC_PURCHASE_REQUI_CHECK Accounting: Check Purchase Requisition
BAPI_ACC_PURCHASE_REQUI_POST Accounting: Post Purchase Requisition
IDOC_INPUT_ACC_PURCHASE_REQUI
BBPU
BBP_ACC_PURCHASE_REQUI_CHECK
CIFT
CATT_CIF_PURCHASEREQ_CHECK
CKEX2
CKEX2_REPORT_PURCHASE_REQ
CNM2
CNM2_PURCHASE_REQ
CO2O
CO2O_ACT_SET_PURCHASE_REQ
MASSPURCHREQ Mass Maintenance of Purchasing requests
MASS_CHANGE_PURCHASE_REQ Change Purchasing requests
WLB3
WLB3_SELECT_PURCHASE_REQ
cheers
s.janagar
04-27-2009 5:53 AM
Hi Janagar Sundaramoorthy Nadar,
Thanks for reply, In ME52 once your are into change mode of a particular PR, in Menu bar .. Edit -> Release -> Reject.
And if I want to debug the Reject button is grayed out.
As I am working on R/3 4.0 version, I am not sure whether I have this all FM's.
I check them first...
Regards,
Suneel G
04-27-2009 6:05 AM
hi
i consulted my Functional he said that
there is no way to reject purchase requisition
but b4 which u need to check for approval of the requistion
and we can reject the approval through work flow
this is for upto my knowledge
cheers
s.janagar
04-27-2009 6:15 AM
Hi s.janagar,
Thanks for the reply, let me tell the process how we are doing it... when its is rejected from approval using workflow that PR will be in our Inbox, then we double click it and then it will go to ME52 and then we need to goto Edit->Release-> and then reject it this is proceess happeing now with user but the requirement is now that process should happend when they click Reject button in my Customized prg.
Regards,
Suneel G.
04-27-2009 6:52 AM
Hi Suneel,
As you said the program should not call ME52n,
but you can still use 'BAPI_PR_CHANGE' FM to update the status I think so,
Here is a sample code you can check out.
DATA: I_AC LIKE BAPIMEREQACCOUNT OCCURS 0 WITH HEADER LINE,
I_ACX LIKE BAPIMEREQACCOUNTX OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF I_EBAN,
BANFN LIKE EBAN-BANFN,
BNFPO LIKE EBAN-BNFPO,
WEMPF LIKE EBKN-WEMPF,
END OF I_EBAN.
I_EBAN-BANFN = '0010008176'.
I_EBAN-BNFPO = '00040'.
I_EBAN-WEMPF = 'KYSH'.
I_AC-PREQ_ITEM = I_EBAN-BNFPO.
I_AC-SERIAL_NO = '01'.
I_AC-GR_RCPT = I_EBAN-WEMPF.
APPEND I_AC. CLEAR I_AC.
I_ACX-PREQ_ITEM = I_EBAN-BNFPO.
I_ACX-SERIAL_NO = '01'.
I_ACX-PREQ_ITEMX = 'X'.
I_ACX-SERIAL_NOX = 'X'.
I_ACX-GR_RCPT = 'X'.
APPEND I_ACX. CLEAR I_ACX.
CALL FUNCTION 'BAPI_PR_CHANGE'
EXPORTING
PRNUMBER = I_EBAN-BANFN
TABLES
RETURN = I_RET2
PRACCOUNT = I_AC
PRACCOUNTX = I_ACX.
IF SY-SUBRC = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
ENDIF.
Also Do check the two Tutorial Programs about PO/PR release strategies in SAP Technical Tutorials Business Workflow.
Thanks & regrads,
Dileep .C
04-27-2009 5:53 AM
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.
yebkn = xebkn.
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.
04-27-2009 6:10 AM
Hi Gayathri,
In your code I could not find
read table xeban index 1.
xeban-kz = 'U'. " what is KZ field there no field
xeban-banpr = '08'. " And process status here is Release Refused.
modify xeban index 1.
and I am still with blank mind.
Regards,
Suneel G
04-28-2009 8:06 AM
Hi Gayathri,
As I am working on R/3 4.0 there is no field BANPR in UEBAN Structure and EBAN Table too.
But there is 'ME_UPDATE_REQUISITION' FM in R/3 4.0
So what we need to do now ??? Could you please let me know is there any other field.
Any idea abt EBAN table fields in SAP R/3 4.0.
Regards,
Suneel G
04-27-2009 6:59 AM
hey suneel
here are some of the links
http://www.sap-abap4.com/how-to-decide-if-my-workflow-fit-for-duet-workflow-template-180/
hope it will be usefull for you
cheers
s.janagar
04-28-2009 9:32 AM
you try these FMs,
ME_UPDATE_REQUISITION
ME_UPDATE_REQUISITION_CHNGDOC
Regards,
Joan
04-28-2009 9:59 AM
Hi Joan Jesudasan,
As I am working on SAP R/3 4.0, I need to reject the PR using ME_UPDATE_REQUISITION FM, but
problem with this FM as we are passing UEBAN there is no field called BANPR in 4.0.
So need help regarding.
Regards,
Suneel G