Purchase Requisition(PR) release related
Hi ,
We have in our system PR release strategy - Release strategy without classification.
For releasing PR's at the moment we have roles assigned at different levels.
For example a person having role z_release_lvl_1 will have access to release codes 01 ;
z_release_lvl_2 will have access to release codes 01 and 02.
z_release_lvl_3 will have access to release codes 01 , 02 and 03....and so on till
z_release_lvl_6 will have access to release codes 01 , 02 , 03 , 04 , 05 and 06.
Requirement - We want that anyone who creates a PR should not be able to release his own PR to reduce the risk of fraud.
Release level 6 role would be with senior management. So at the moment they can create PR's and also release then because they have access to all release codes from 01 till 06.
Main concern is for people who have access to z_release_lvl_1 because these people can raise requisitions and also approve them on their own.
Any ideas of how to restrict users who themselves raise PR's can be stopped from releasing also ?
Thanks in advance.
Regards,
Vinayak
Hi Vinayak,
As far as your Scenario is concern,
1) why the person who is creating the PR, is having ME54 Authorization.
2) you can control the same via Roles and Authorization.
3)
You Said
For releasing PR's at the moment we have roles assigned at different levels.
For example a person having role z_release_lvl_1 will have access to release codes 01 ;
z_release_lvl_2 will have access to release codes 01 and 02.
z_release_lvl_3 will have access to release codes 01 , 02 and 03....and so on till
z_release_lvl_6 will have access to release codes 01 , 02 , 03 , 04 , 05 and 06.
why is it that the person with role Z_release_M_2 is having the Authorization for releas e code 02.
if the person with the with the role is Z_RELEASE_M_6 is having the authorization of all the release codes 01-06 then there is no point of having any junior level.
they can create the PR themselve and release it and the procure the material.
apart from this as the business says that the Creator of PR shoild not have the Approval Authorization and the PR approval Authority should not have the releasing Authority.
Hope I have helped you out.
Regards,
Yawra Khan
Similar Messages
-
Purchase requisition create/release
Hi
I am creating purchase requisition. And i want to release this requisition.
But in my created purchase requisition there is no tab such as release strategy
And i want to keep my purchase requisition as blocked initially and later i want to release it. Can u please tell me what are the configuration or release procedure i've to do to make this happen.
I know purchase requisition can be released be me54n. But my created purchase requisition is not release relevant.
I hope u understood.
with regards
mandeepHi Mandeep,
For release strategy cstomising u need to go spro
Matl mgmt>Purchasing>Purchase requisition>Release procedure with classification
there u maintain, characteristics, class, create release strategy and maintain, release group, release code and indicator etc. Once u do all this then u will get the tab in PR
hope this helps
regards
Anand.c -
Purchase Requisition Overall Release problem with several CostCenter
Hello Gurus!!
I need your comments!!!
I define the Purchase requisition as Overall Release, and woks !! but I have a Issue.
I have an entry in the CL24N txn as follow:
AccAssgCat = K
Plant = CC01
CostCenters = 10001
10002
10003
totalAmt = 1USD to 1000US
So when I create my purchase requisition with only 1 Cost Center the release strategy is called and PR can be released.
But When I create the purchase requisition with CC 10001 and 10003, the requisition is not subjet to release!!! (note TotalAmt = 15usd)
I assume that as both are into the release strategy the system will take both CC and ask for release!!
What I can do to fix this situation??Dear Marco Antonio,
I have never faced your issue, but have an idea of what you can do.
Activate Enhancement M06B0005 EXIT_SAPLEBND_004
Then in the program zxm06u31 put the following code line:
e_ceban = i_ceban.
and also a breakpoint so that it stops automatically upon PR verification or saving.
Activate and then create a PR with the problem you are facing. On saving the program will stop in your breakpoint.
Look at structure i_ceban there you will find the values that your release strategy is getting from the document and with which it will try to determine the strategy based on your classification.
I the standar logic is not what you want maybe you can put some logic of your own based on account assignments in structure C_EBKN.
Well, tell me what happens
Best Regards,
Sebastián Ligueros -
User exit/BADI for Purchase requisition through release of Process order
Hi ,
i need to add some text to the Pur Req.
The Pur Req will be created THROUGH the release of PROCESS order. Please let me know any exits are available for the same.
regardsHi
Check the following Exits and BADI for Pur Requisition
Enhancement
MEVME001 WE default quantity calc. and over/ underdelivery tolerance
MM06E001 User exits for EDI inbound and outbound purchasing documents
MM06E003 Number range and document number
MM06E004 Control import data screens in purchase order
MM06E005 Customer fields in purchasing document
MM06E007 Change document for requisitions upon conversion into PO
MM06E008 Monitoring of contr. target value in case of release orders
MM06E009 Relevant texts for "Texts exist" indicator
MM06E010 Field selection for vendor address
MM06E011 Activate PReq Block
MMAL0001 ALE source list distribution: Outbound processing
MMAL0002 ALE source list distribution: Inbound processing
MMAL0003 ALE purcasing info record distribution: Outbound processing
MMAL0004 ALE purchasing info record distribution: Inbound processing
MMDA0001 Default delivery addresses
MMFAB001 User exit for generation of release order
MRFLB001 Control Items for Contract Release Order
AMPL0001 User subscreen for additional data on AMPL
LMEDR001 Enhancements to print program
LMELA002 Adopt batch no. from shipping notification when posting a GR
LMELA010 Inbound shipping notification: Transfer item data from IDOC
LMEQR001 User exit for source determination
LMEXF001 Conditions in Purchasing Documents Without Invoice Receipt
LWSUS001 Customer-Specific Source Determination in Retail
M06B0001 Role determination for purchase requisition release
M06B0002 Changes to comm. structure for purchase requisition release
M06B0003 Number range and document number
MEQUERY1 Enhancement to Document Overview ME21N/ME51N
MELAB001 Gen. forecast delivery schedules: Transfer schedule implem.
MEFLD004 Determine earliest delivery date f. check w. GR (only PO)
MEETA001 Define schedule line type (backlog, immed. req., preview)
ME590001 Grouping of requsitions for PO split in ME59
M06E0005 Role determination for release of purchasing documents
M06E0004 Changes to communication structure for release purch. doc.
M06B0005 Changes to comm. structure for overall release of requisn.
M06B0004 Number range and document number
Business Add-in
ME_PROCESS_REQ_CUST Enhancements for Processing Enjoy PReqs: Customer
ME_PROCESS_REQ Enhancements for Processing Enjoy PReqs: Internal
ME_PROCESS_PO_CUST Enhancements for Processing Enjoy Purchase Order: Customer
ME_PROCESS_PO Enhancements for Processing Enjoy Purchase Order: Intern.
ME_PROCESS_COMP Processing of Component Default Data at Time of GR: Custome
ME_PO_SC_SRV BAdI: Service Tab Page for Subcontracting
ME_PO_PRICING_CUST Enhancements to Price Determination: Customer
ME_PO_PRICING Enhancements to Price Determination: Internal
ME_INFOREC_SEND Capture/Send Purchase Info Record Changes - Internal Use
ME_HOLD_PO Hold Enjoy Purchase Orders: Activation/Deactivation
ME_GUI_PO_CUST Customer's Own Screens in Enjoy Purchase Order
ME_FIELDSTATUS_STOCK FM Account Assignment Behavior for Stock PR/PO
ME_DP_CLEARING Clearing (Offsetting) of Down Payments and Payment Requests
ME_PURCHDOC_POSTED Purchasing Document Posted
SMOD_MRFLB001 Control Items for Contract Release Order
EXTENSION_US_TAXES Extended Tax Calculation with Additional Data
ARC_MM_EKKO_WRITE BAdI: Enhancement of Scope of Archiving (MM_EKKO)
ARC_MM_EKKO_CHECK BAdI: Enhancement of Archivability Check (MM_EKKO)
MM_EDI_DESADV_IN Supplementation of Delivery Interface from Purchase Order
MM_DELIVERY_ADDR_SAP Determination of Delivery Address
ME_WRF_STD_DNG PO Controlling Reminder: Extension to Standard Reminder
ME_TRIGGER_ATP Triggers New ATP for Changes in EKKO, EKPO, EKPV
ME_TRF_RULE_CUST_OFF BADI for Deactivation of Field T161V-REVFE
ME_TAX_FROM_ADDRESS Tax jurisdiction code taken from address
ME_REQ_POSTED Purchase Requisition Posted
ME_REQ_OI_EXT Commitment Update in the Case of External Requisitions
ME_RELEASE_CREATE BAdI: Release Creation for Sched.Agrmts with Release Docu.
ME_DEFINE_CALCTYPE Control of Pricing Type: Additional Fields
ME_CHANGE_OUTTAB Enrich ALV Output Table in Purchasing
ME_CHANGE_CHARACTER Customer-Specific Characteristics for Product Allocation
ME_CCP_DEL_DURATION Calc. of Delivery Duration in CCP Process (Not in Standard)
ME_CCP_BESWK_AUTH_CH BAdI for authorization checks for procuring plant
ME_CCP_ACTIVE_CHECK BAdI to check whether CCP process is active
ME_BSART_DET Change document type for automatically generated POs
ME_BAPI_PR_CREATE_02
ME_BAPI_PR_CREATE_01
ME_BAPI_PO_CREATE_02
ME_BAPI_PO_CREATE_01
ME_BADI_DISPLAY_DOC BAdI for Internal Control of Transaction to be Invoked
ME_ACTV_CANCEL_PO BAdI for Activating the Cancel Function at Header Level
MEGUI_LAYOUT BAdI for Enjoy Purchasing GUI
ME_CHECK_ALL_ITEMS Run Through Items Again in the Event of Changes in EKKO
ME_COMMTMNT_REQ_RE_C Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_REQ_RELE Check of Commitment Relevance of Purchase Requisitions
ME_COMMTMNT_PO_REL_C Check for Commitment-Relevance of Purchase Orders
ME_COMMTMNT_PO_RELEV Check for Commitment-Relevance of Purchase Orders
ME_COMMITMENT_STO_CH BadI for checking if commitments for STOs are active
ME_COMMITMENT_RETURN Commitment for return item
ME_CIP_REF_CHAR Enables Reference Characteristics in Purchasing
ME_CIP_ALLOW_CHANGE Configuration in Purchasing: Changeability Control
ME_CIN_MM06EFKO Copy PO data for use by Country version India
ME_CIN_LEINRF2V BADI for LEINRF03 excise_invoice_details
ME_CIN_LEINRF2R BADI for CIN India - Delivery charges
ME_CHECK_SOURCES Additional Checks in Source Determination/Checking
ME_CHECK_OA Check BAdI for Contracts
Reward points if useful
Regards
Anji -
Creating purchase Requisition and release Overview
Hello,
We have some User which have the authorization to create a purchase Requisition and also to release it by themselves.
We have to Monitor this cases and I' looking for a possibility to check this on a easy way.
I found the Report "Changedocu_read". There I can check several changes in the PR and see who released it. But there I can not see which User created the PR.
The table EBAN has the informations about the User who created the PR and if it had to be released and some more informations. But the informations who released the PR is missing.
I tryed a table-join of the tables EBAN and CDHDR. But it was not possible, because the PR Number (Filed "BANFN" in the EBAN) has not the same format as the number in the Filed "object value" in the table CDHDR.
Perhaps someone has an idea ?
Or there is an Standard Transaction which I did not found to have an overview of the PR and the releases
It would be enough to see following informations with one Join or Transaction:
-PR Number
-Creation Date
- Transaction code
-Change Date
-Release Status
-Released date
-Released by User
I have the same Topic also by purchase orders and the release of them.
Thank you in advance
Regards
DirkThanks both for the quick reply.
@AKPT
The Transaction is nice and helpful to Display some informations. But similar results I also receive when I use the Programm : "changedoc_read". I also had the idea to join the informations of the 2 sources in Excel. For me this Workaround would be ok.
But unfortunately I' m looking for an simply way (for the Enduser). To get this informations mentioned above in one overview directly in SAP.
They have to use this check regularly, to Monitor if there were some wrong Releases.
If there is not such a way then we have to join it in Excel.
But if you have some other suggestions I'm happy to hear them.
Regards
Dirk -
User exit/BADI to for Purchase requisition through release of Process order
Hi ,
i need to add some text to the Pur Req. The Pur Req will be created through the release of PROCESS order. Please let me know any exits are available for the same.
regardsHi,
check the below enhancements in transaction SMOD.
CCOWB001 Customer exit for modifying menu entries
COIB0001 Customer Exit for As-Built Assignment Tool
COZF0001 Change purchase req. for externally processed operation
COZF0002 Change purchase req. for externally procured component
PPCO0001 Application development: PP orders
PPCO0002 Check exit for setting delete mark / deletion indicator
PPCO0003 Check exit for order changes from sales order
PPCO0004 Sort and processing exit: Mass processing orders
PPCO0005 Storage location/backflushing when order is created
PPCO0006 Enhancement to specify defaults for fields in order header
PPCO0007 Exit when saving production order
PPCO0008 Enhancement in the adding and changing of components
PPCO0009 Enhancement in goods movements for prod. process order
PPCO0010 Enhancement in make-to-order production - Unit of measure
PPCO0012 Production Order: Display/Change Order Header Data
PPCO0013 Change priorities of selection crit. for batch determination
PPCO0015 Additional check for document links from BOMs
PPCO0016 Additional check for document links from master data
PPCO0017 Additional check for online processing of document links
PPCO0018 Check for changes to production order header
PPCO0019 Checks for changes to order operations
Thanks
Sandeep
Reward if helpful -
Purchase Requisition Item release not in the change log of the item
Hello Experts,
I have developed a report that displays when purchase requistions have been relesased. To do that, I have used the change table to track the time and date.
However, a lot of the requistions do not have the release as a change. I am not able to recreate it, and I am not able to point at anything special with the ones that does not have a change log.
Have anybody else experienced this? I am a bit stuck
rgds
GARhas there been a change in the release strategy cusotmizing. maybe the PR was not subject to a release as it was created, but new PRs of the same kind are subject because of this change in customizing?
There are not many possibilities:
a) PR was not subject to release strategy
b) release indicator got cleared by own program or table maintenance
c) program bug (never saw one for change history of PRs)
do you use workflow for releasing? if yes then you can check the log of the workflow item and proof the evidence for a program bug. -
Purchase Requisition Overall release amount
Hi,
I am working on PR overall release amount workflow.
How can i find the overall release amount in the tables of PR while entering into the workflow.
Depending on this amount we need to further proceed for approval process.
Regards,
Gopinath Addepalli.Dear Marco Antonio,
I have never faced your issue, but have an idea of what you can do.
Activate Enhancement M06B0005 EXIT_SAPLEBND_004
Then in the program zxm06u31 put the following code line:
e_ceban = i_ceban.
and also a breakpoint so that it stops automatically upon PR verification or saving.
Activate and then create a PR with the problem you are facing. On saving the program will stop in your breakpoint.
Look at structure i_ceban there you will find the values that your release strategy is getting from the document and with which it will try to determine the strategy based on your classification.
I the standar logic is not what you want maybe you can put some logic of your own based on account assignments in structure C_EBKN.
Well, tell me what happens
Best Regards,
Sebastián Ligueros -
Purchase Requisition, overall release
Hi All,
I am using the overall release for my release groups. The releasing strategy depends on the cost center.
The releasing is workling fine so far, after I created a PR, the release tab appears in the header. BUT if I enter several items in one PR with different cost centers, the release tab does not appear. This also happens, if I enter 2 items with different cost centers in the PR and both of them are assigned to the same release strategy.
Are there any configuration in SAP to prevent this or do I have to use the itemwise release for that?
Thank you!Use userexit
Enhancement : M06B0005
Component : EXIT_SAPLEBND_004
CR : RDAK903063 SPOREDDY 04/05/07 changes to pick the release
strategy if all the cost centers are same for all
line items. Since the user Exit is activated the
program is forcing the data to go through import and*
field I_CEBAN-KOSTL is not blank the user exit is
filling blank values to E_CEBAN during export. -
Custom field update in Purchase Requisition Final Release
Hi,
We have PR release strategy at Item level.
In PR table EBAN include I have added new field as ZZREL_DT (for final release date), This Field I want to update when final release will get triggred for the PR item.
For updating this custom field I have try with Enhancement 'M06B0002' but system is not updating the value in new field , and as in BADI 'ME_REQ_POSTED', the IM_EBAN is an importing structure ,system is not allowing to change the value if we implement this BADI.
Is there any user exit or BADI, to update this custom field, I want to update the system date when user releasing the PR item with ME54N or ME55 transaction.
Regards,
ZafarHi ,
Try with create new tab in PR item level, add field in custom tab example Final release Tab.
Try to fetch data from EBAN table when final release happened ( based on status ) the date will update in this table. I hope this is helpful.
Use user exit to create custom tab and custom field
enhancement MEREQ001 : check this enhancement.
user exit EXIT_SAPLMEREQ_0*
I hope it is helpful -
Report on list of purchase requisitions and related POs..
Hi,
I have a requirement to generate a simple abap report to display a list of purchase requisitions and its related POs. If my understanding is correct, for a single purchase requisition, multiple POs can exist, right ? Can someone help me with the select query for this ? also can you let me know typically what can be the basic fields displayd in such a report ?
I need to understand the relationship between the tables involved for pur req and Pur orders.
thanksHi check this code... to get PO and PR related to SO..
REPORT z_so_info.
TABLES: vbak, vbap, afko, afpo.
*Field catalog
TYPE-POOLS: slis.
DATA: lv_repid TYPE sy-repid VALUE sy-repid,
xfield TYPE slis_t_fieldcat_alv,
afield TYPE slis_fieldcat_alv.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(25) text-002.
SELECT-OPTIONS: so_so FOR vbak-vbeln OBLIGATORY.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-003.
PARAMETERS:
p_kunnr LIKE vbak-kunnr, " sold-to
p_kunwe LIKE vbak-kunnr. " ship-to
SELECTION-SCREEN END OF BLOCK b2.
*Constants
CONSTANTS: c_zor TYPE vbak-auart VALUE 'ZOR',
c_we TYPE vbpa-parvw VALUE 'WE',
c_ag TYPE vbpa-parvw VALUE 'AG'.
c_space TYPE space.
*Ranges
RANGES: ra_parvw FOR vbpa-parvw,
ra_kunnr FOR vbpa-kunnr.
*Tables
DATA: BEGIN OF gt_output OCCURS 0,
vbeln LIKE vbak-vbeln, " sales order number
posnr LIKE vbap-posnr, " SO item number
matnr LIKE vbap-matnr, " material number
sh LIKE vbpa-kunnr, " Ship-to
sp LIKE vbpa-kunnr, " Sold-to
lifnr LIKE ekko-lifnr, " Vendor
bstnk LIKE vbak-bstnk, " PO number
banfn LIKE vbep-banfn, " Purchase requi
po_st TYPE char30, " PO status text
pstyv TYPE vbap-pstyv, " Item catagory
aufnr LIKE afpo-aufnr, " Production Order
prd_stat TYPE string, " Prd order status
END OF gt_output.
DATA: wa_output LIKE gt_output.
FIELD-SYMBOLS: <fs_output> LIKE gt_output.
*Table for sales order and PO
TYPES : BEGIN OF gs_data,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
pstyv TYPE vbap-pstyv,
matnr TYPE vbap-matnr,
END OF gs_data.
DATA: gt_data TYPE STANDARD TABLE OF gs_data,
wa_data TYPE gs_data.
*Table for Production Orders
TYPES: BEGIN OF gs_prd,
aufnr TYPE afpo-aufnr,
posnr TYPE afpo-posnr,
kdauf TYPE afpo-kdauf,
kdpos TYPE afpo-kdpos,
wepos TYPE afpo-wepos, "Goods Receipt Indicator
elikz TYPE afpo-elikz, "Delivery Completed Indicator
objnr TYPE aufk-objnr, "Object number
getri TYPE afko-getri, "Confirmed Order Finish Date
gltri TYPE afko-gltri, "Actual finish date
END OF gs_prd.
DATA: gt_prd TYPE STANDARD TABLE OF gs_prd,
wa_prd TYPE gs_prd.
*Table for partner data
TYPES: BEGIN OF gs_partner,
vbeln TYPE vbak-vbeln,
posnr TYPE vbap-posnr,
parvw TYPE vbpa-parvw,
kunnr TYPE vbpa-kunnr,
END OF gs_partner.
DATA: gt_partner TYPE STANDARD TABLE OF gs_partner,
wa_partner TYPE gs_partner.
TYPES: BEGIN OF gs_po,
ebeln TYPE ekkn-ebeln,
ebelp TYPE ekkn-ebelp,
vbeln TYPE ekkn-vbeln,
vbelp TYPE ekkn-vbelp,
END OF gs_po.
DATA: gt_po TYPE STANDARD TABLE OF gs_po,
wa_po TYPE gs_po.
TYPES: BEGIN OF gs_preq,
vbeln TYPE vbep-vbeln,
posnr TYPE vbep-posnr,
banfn TYPE vbep-banfn,
END OF gs_preq.
DATA: gt_preq TYPE STANDARD TABLE OF gs_preq,
wa_preq TYPE gs_preq.
TYPES: BEGIN OF gs_po_stat,
ebeln TYPE ekko-ebeln,
procstat TYPE ekko-procstat,
lifnr TYPE ekko-lifnr,
END OF gs_po_stat.
DATA: gt_po_stat TYPE STANDARD TABLE OF gs_po_stat,
wa_po_stat TYPE gs_po_stat.
*Field symbols
FIELD-SYMBOLS: <fs> TYPE tj02t-txt04,
<fs_temp> TYPE tj02t-txt04,
<fs_stat> TYPE char30.
START-OF-SELECTION.
PERFORM fr_build_range.
PERFORM fr_get_data.
PERFORM fr_build_fc.
PERFORM fr_output.
*& Form fr_get_data
text
--> p1 text
<-- p2 text
FORM fr_get_data.
*Get SO
SELECT avbeln aposnr apstyv amatnr
FROM vbap AS a
JOIN vbak AS b
ON avbeln = bvbeln
JOIN vbpa AS c
ON bvbeln = cvbeln
INTO TABLE gt_data
WHERE b~vbeln IN so_so
AND b~auart EQ c_zor "Only Sales Orders
AND c~kunnr IN ra_kunnr. "from selection screen
DELETE ADJACENT DUPLICATES FROM gt_data COMPARING vbeln posnr.
*get data of the production order
IF NOT gt_data[] IS INITIAL.
SELECT aaufnr aposnr akdauf akdpos awepos aelikz
b~objnr
FROM afpo AS a
JOIN aufk AS b
ON aaufnr = baufnr
INTO TABLE gt_prd
FOR ALL ENTRIES IN gt_data
WHERE a~kdauf EQ gt_data-vbeln
AND a~kdpos EQ gt_data-posnr.
ENDIF.
*Get partner data
IF NOT gt_data[] IS INITIAL.
SELECT vbeln posnr parvw kunnr
FROM vbpa
INTO TABLE gt_partner
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln.
ENDIF.
*Get Purchase Order
IF NOT gt_data[] IS INITIAL.
SELECT ebeln ebelp vbeln vbelp
FROM ekkn
INTO TABLE gt_po
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln
AND vbelp EQ gt_data-posnr.
SELECT vbeln posnr banfn
FROM vbep
INTO TABLE gt_preq
FOR ALL ENTRIES IN gt_data
WHERE vbeln EQ gt_data-vbeln
AND posnr EQ gt_data-posnr.
ENDIF.
IF NOT gt_po[] IS INITIAL.
SELECT aebeln aprocstat a~lifnr
FROM ekko AS a
JOIN ekpo AS b
ON aebeln = bebeln
INTO TABLE gt_po_stat
FOR ALL ENTRIES IN gt_po
WHERE b~ebeln EQ gt_po-ebeln
AND b~ebelp EQ gt_po-ebelp.
ENDIF.
*Move data to output table
LOOP AT gt_data INTO wa_data.
wa_output-vbeln = wa_data-vbeln.
wa_output-posnr = wa_data-posnr.
wa_output-pstyv = wa_data-pstyv.
wa_output-matnr = wa_data-matnr.
READ TABLE gt_po INTO wa_po WITH KEY vbeln = wa_data-vbeln
vbelp = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-bstnk = wa_po-ebeln.
READ TABLE gt_po_stat INTO wa_po_stat WITH KEY ebeln = wa_po-ebeln.
IF sy-subrc EQ 0.
wa_output-lifnr = wa_po_stat-lifnr.
CASE wa_po_stat-procstat.
WHEN '01'.
wa_output-po_st = 'Version in process'.
WHEN '02'.
wa_output-po_st = 'Active'.
WHEN '03'.
wa_output-po_st = 'In release'.
WHEN '04'.
wa_output-po_st = 'Partially released'.
WHEN '05'.
wa_output-po_st = 'Released Completely'.
WHEN '08'.
wa_output-po_st = 'Rejected'.
ENDCASE.
ENDIF. "inner read subrc
ENDIF. "outer read subrc
READ TABLE gt_preq INTO wa_preq WITH KEY vbeln = wa_data-vbeln
posnr = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-banfn = wa_preq-banfn.
ENDIF.
READ TABLE gt_prd INTO wa_prd WITH KEY kdauf = wa_data-vbeln
kdpos = wa_data-posnr.
IF sy-subrc EQ 0.
wa_output-aufnr = wa_prd-aufnr.
*get the purchase requisition for production order as well
SELECT SINGLE banfn
FROM ebkn
INTO wa_output-banfn
WHERE aufnr EQ wa_prd-aufnr.
*Get the status of the production order
PERFORM fr_get_prd_stat USING wa_prd-objnr
CHANGING wa_output-prd_stat.
ENDIF. " sy-subrc
READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
parvw = c_we.
IF sy-subrc EQ 0.
wa_output-sh = wa_partner-kunnr.
ENDIF.
READ TABLE gt_partner INTO wa_partner WITH KEY vbeln = wa_data-vbeln
parvw = c_ag.
IF sy-subrc EQ 0.
wa_output-sp = wa_partner-kunnr.
ENDIF.
APPEND wa_output TO gt_output.
CLEAR: wa_data, wa_prd,wa_partner,wa_output.
ENDLOOP.
ENDFORM. " fr_get_data
*& Form fr_build_range
text
--> p1 text
<-- p2 text
FORM fr_build_range .
*Range for partner function
MOVE 'I' TO ra_parvw-sign.
MOVE 'EQ' TO ra_parvw-option.
MOVE 'SH' TO ra_parvw-low. " we
APPEND ra_parvw.
CLEAR ra_parvw.
MOVE 'I' TO ra_parvw-sign.
MOVE 'EQ' TO ra_parvw-option.
MOVE 'SP' TO ra_parvw-low. " ag
APPEND ra_parvw.
CLEAR ra_parvw.
*Range for ship-to and sold-to
MOVE 'I' TO ra_kunnr-sign.
MOVE 'EQ' TO ra_kunnr-option.
MOVE p_kunnr TO ra_kunnr-low.
APPEND ra_kunnr.
CLEAR ra_kunnr.
MOVE 'I' TO ra_kunnr-sign.
MOVE 'EQ' TO ra_kunnr-option.
MOVE p_kunwe TO ra_kunnr-low.
APPEND ra_kunnr.
CLEAR ra_kunnr.
ENDFORM. " fr_build_range
*& Form fr_build_fc
text
--> p1 text
<-- p2 text
FORM fr_build_fc .
sales order number
afield-fieldname = 'VBELN'.
afield-seltext_s = 'Sales #'.
afield-ref_tabname = 'VBAK'.
APPEND afield TO xfield. CLEAR afield.
sales ITEM number
afield-fieldname = 'POSNR'.
afield-seltext_s = 'Item #'.
afield-ref_tabname = 'VBAP'.
APPEND afield TO xfield. CLEAR afield.
Material Number
afield-fieldname = 'MATNR'.
afield-seltext_s = 'Material #'.
afield-ref_tabname = 'VBAP'.
afield-outputlen = 10.
APPEND afield TO xfield. CLEAR afield.
*Vendor Number
afield-fieldname = 'LIFNR'.
afield-seltext_s = 'Vendor Num.'.
afield-ref_tabname = 'EKKO'.
APPEND afield TO xfield. CLEAR afield.
ship-to-party
afield-fieldname = 'SH'.
afield-seltext_s = 'Ship-to'.
afield-ref_tabname = 'VBPA'.
APPEND afield TO xfield. CLEAR afield.
sold-to-party
afield-fieldname = 'SP'.
afield-seltext_s = 'Sold-to'.
afield-ref_tabname = 'VBPA'.
APPEND afield TO xfield. CLEAR afield.
*PO number
afield-fieldname = 'BSTNK'.
afield-seltext_s = 'PO NUM'.
afield-ref_tabname = 'EKKO'.
APPEND afield TO xfield. CLEAR afield.
*PO status
afield-fieldname = 'PO_STAT'.
afield-seltext_s = 'Step'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
*PO step status
afield-fieldname = 'PO_ST'.
afield-seltext_s = 'PO.Status'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
*Purchase requisition
afield-fieldname = 'BANFN'.
afield-seltext_s = 'Pur. Req.'.
afield-ref_tabname = 'VBEP'.
APPEND afield TO xfield. CLEAR afield.
*Item catagory
afield-fieldname = 'PSTYV'.
afield-seltext_s = 'Itm. Catg'.
afield-ref_tabname = 'VBAP'.
APPEND afield TO xfield. CLEAR afield.
*Prodcution Order number
afield-fieldname = 'AUFNR'.
afield-seltext_m = 'Prod.Order'.
afield-ref_tabname = 'AFKO'.
APPEND afield TO xfield. CLEAR afield.
*PRODCUTION status
afield-fieldname = 'PRD_STAT'.
afield-seltext_s = 'Prd. Step'.
afield-ref_tabname = 'zbacklog_v2'.
afield-outputlen = 20.
APPEND afield TO xfield. CLEAR afield.
*PRODUCTION step status
afield-fieldname = 'PRD_ST'.
afield-seltext_s = 'Prd. Status'.
afield-ref_tabname = 'zbacklog_v2'.
APPEND afield TO xfield. CLEAR afield.
ENDFORM. " fr_build_fc
*& Form fr_output
text
--> p1 text
<-- p2 text
FORM fr_output .
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_STRUCTURE_NAME =
IS_LAYOUT =
it_fieldcat = xfield[]
i_default = 'X'
i_save = 'A'
TABLES
t_outtab = gt_output
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " fr_output
*& Form fr_get_prd_stat
text
-->P_WA_PRD_OBJNR text
FORM fr_get_prd_stat USING p_objnr CHANGING p_prd_stat.
DATA: lt_status TYPE STANDARD TABLE OF jstat,
wa_status TYPE jstat,
lv_status TYPE tj02t-txt04,
lv_temp2 TYPE char5,
lv_buff TYPE string.
CALL FUNCTION 'STATUS_READ'
EXPORTING
client = sy-mandt
objnr = p_objnr
only_active = 'X'
TABLES
status = lt_status
EXCEPTIONS
object_not_found = 1
OTHERS = 2.
LOOP AT lt_status INTO wa_status.
IF wa_status-stat(1) EQ 'I'.
SELECT txt04 FROM tj02t
INTO lv_status
WHERE istat EQ wa_status-stat
AND spras EQ 'E'.
ENDSELECT.
lv_temp2 = lv_status.
CONCATENATE lv_temp2 p_prd_stat INTO p_prd_stat
SEPARATED BY ','.
ENDIF.
CLEAR: wa_status, lv_status, lv_temp2.
ENDLOOP.
lv_buff = p_prd_stat.
*Status of Production Order
IF lv_buff CS 'CRTD'.
p_prd_stat = 'Not Active'.
ENDIF.
IF lv_buff CS 'REL'.
IF lv_buff CS 'GMPS'.
p_prd_stat = 'Printed In Prod'.
ELSE.
p_prd_stat = 'Printed'.
ENDIF.
ENDIF.
IF lv_buff CS 'TECO'.
p_prd_stat = 'Technically Compt.'.
ENDIF.
ENDFORM. " fr_get_prd_stat -
Release strategy for purchase requisition does not kick in
Hi Gurus!
I've been struggling with this issue for some weeks now.
I have set up the release strategy configuration for purchase requisitions with classifications.
However, if I create a purchase requisition the release functionality is not taken into account by the system.
See below some more information regarding my configuration:
1. I've created a new characteristic "REL_PR_GROUP". Status: released, Multiple values, Number of Chars 3, 7 values (TR1, TR2, TR3....TR7), Table name: CEBAN, Field name: EKGRP, Procedure for value assignment set to not ready for input.
2. I've created a new class: "REL_PR_ANPC". Class type 032, Status: released, Same classification: do not check, Char: "REL_PR_GROUP"
3. I have one release group "T1", Rel. object 1, OverReqRel is marked, Class: "REL_PR_ANPC"
4. I have 5 release codes. Grp: T1, Code: 01....05
5. I have 2 release indicators:
"R = Released", Rel. for ordering is marked, Changeabil: 4, Value chgs. 100,0
"X = Blocked", Changeabil: 4, Value chgs. 100,0
6. I have 1 release strategy:
"T1 with Grp T1"
- one release group, 01 Manager
- release prerequisites not applicable because of only one release group
- release status, nothing marked = blocked, 01 marked = released
- classification, purchasing group is TR1 or TR2 or TR3 or TR4 or TR5 or TR6 or TR7
I intentionally kept the configuration as simple as possible so I can try to get it working first.
Now if I create a purchase requisition for an item with release group T1, I would expect the release strategy to be activated. However, this is not the case. I don't see the "release status" tab in the PR, and if I try to relase via ME54 the system says the PR is not relevant for release.
Could you please assist in getting this working?Hi,
Have you checked in CL30/CL30N if your release strategy is derived successfully?
See section 3 of Note 365604. A small section of it:
You can use transaction CL30 search for an object using the data
of the purchase requisition/purchase order. Here, it is important
that the object search determines exactly one strategy. If this
is not the case, this indicates that there are overlapping
strategies in the system or that the release strategies in
Customizing do not correspond with those from transaction CL24.
See the previous point. If the object search returns more than
one result, the system subsequently determines an incorrect
release strategy or no release strategy at all.
If it is derived successfully, next, check the user exit EXIT_SAPLEBND_001 as per Note 371667:
The following assignment statement has to exist within activated SAP
enhancements M06B0002 (include zxm06u13) and M06B0005 (include zxm06u31)
for purchase requisitions:
E_CEBAN = I_CEBAN.
Regards,
Purnima. -
Purchase Requisition Attachement Should not be Modified when it is released
Hi Experts,
I've a requirement that, In ME52N, if the Purchase Requisition is Released then, the user should not add or delete or change the Attachments. Pl help me in this how to do.
Regards
Rajiv.Thanks giri.
For the following reasons, the billing documents are not released to accounting.
1. If the user wrongly chosen the billing type for the delivery.
2. After creating condition type, it has to be assigned in COPA. If we forgot to do it, billing doc will not released.
Our requirement is that if the billing document is not able create accounting document, the billing document itself should not be generated.
Hope this will be suffice to understand my issue and suggest a suitable solution.
Points will be rewarded.
Regards,
Kumar. -
Purchase Requisition Release Problem
Hi All,
I have a release procedure set up, and the strategy pulls up correctly when a PR is made. When I view collective release from ME55, the PR's show up, and I am able to release line items from that screen. However, when viewing the PR from ME53N, in the Release Procedure tab there is no green check next to the release code with which to release the line. Also, if I do release the PR from ME55, I cannot go to ME53N and cancel the release from the Release Procedure tab.
I am a user with all security access, so it is not an authorization role problem. The release group is also configured to release by line item, so that is not the problem. I have set up other release procedures which allow the release/cancel release function from ME53N before... what could be the problem this time?
Thanks,
Jhi.
There are two ways of releasing purchase requisitions:
Individual release (Tcode - ME54)
You release items of an individual purchase requisition or - if the requisition has to be released in total - by releasing one item you simultaneously release all the others.
Collective release (Tcode- ME55)
You release all requisition items or complete requisitions that are awaiting processing by your release code. This is the preferred method if you frequently have to effect release.
Display PR -with release status (Tcode-ME53N)
One can only see release status in ME53N & can not change release.
hope it helps to you.
Regards,
Rahul -
Purchase order referencing released purchase requisition change
Hello everybody
When we create a purchase order making reference to a released purchase requisition, I can still make changes on the item such as changes on the quantity, value, etc.
We would like to know how to restrict changes of purchase orders when they reference purchase requisitions already released.
Thank you in advance and regards,
Alejandra Álamo B.Hi,
For meeting this requirement, you will have to create a new document type (If the same requirement exists for all the Purchase Orders, do not create additional document types).
Next create a new Field selection where the fields that are copied from PR are made non editable (display). Assign this field selection to the new document type.
Normally, PO fields are editable because the quantity and values may change based on the negotiation with vendor, or to club requirements.
Hope this helps
Priyadarshi
Maybe you are looking for
-
i bought some ringtones on my iPhone, later on i sync my iphone to my old computer now i have a new mac pro desktop and i only have 2 ringtones on my phone but not the rest of them how can i get them back without having to pay for them again?
-
How to generate a class automatically in JDev
Suppose from OS side, I create a new empty Java file in the src directory of a project in JDev. Then in JDev, I click on the "refresh"/reload button for that project. Now I see the new java file. Double click it to open it; it is blank. In this case,
-
Transfer ongoing call to a third part is not working
Merge calls and conference call are working fine, but there is no function for transfer call to another person. And that function is crucial to me as I planned to use the Iphone as a work phone. When will Apple release an update that will fix this pr
-
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source) at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source) at java.awt.AWTEventMultica
-
How to edit address contacts on .mac
I just got .mac and I want to edit my contacts online, but when I go to sync back to my computer the updates don't show up in my address book. Changes only show up when I make changes in the address book itself. Is there a way to do this?