12
8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 1/12 SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com © 2010 SAP AG 1 Display PO Item Confirmation Date in SC Follow-on Documents in History Applies to: Standard SRM Server 5.5 and R/3 4.7 Enterprise For more information, visit the Supplier Relationship Management homepage. Summary Standard SRM-EBP don’t display the PO item Confirmation Date in the PO item history under the Follow-on documents but displays the Delivery date of the PO item, in the Shopping Cart status screen. The content of this document is an attempt to present and guide all SRM technical Consultants, how to display PO Item Confirmation Date in the PO Item history in follow-on documents Author: Ankur Goyal Company: Larsen and Toubro Infotech Limited Created on: 05 June 2010 Author Bio Ankur Goyal is a SAP Technical Consultant working with Larsen and Toubro Infotech Limited. He has 11 months of SAP experience. He is currently working on SAP SRM 5.0 Enhancements. He has extensive experience in ABAP, Enhancement Framework which includes User Exits, BADI and Enhancement Spots, External Debugging for ITS and SAPGUI.

Display PO Item Confirmation Date in SC Follow-On Documents in History

Embed Size (px)

Citation preview

Page 1: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 1/12

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 1

Display PO Item Confirmation Datein SC Follow-on Documents inHistory

Applies to:Standard SRM Server 5.5 and R/3 4.7 Enterprise

For more information, visit the Supplier Relationship Management homepage.

SummaryStandard SRM-EBP don’t display the PO item Confirmation Date in the PO item history under the Follow-ondocuments but displays the Delivery date of the PO item, in the Shopping Cart status screen. The content ofthis document is an attempt to present and guide all SRM technical Consultants, how to display PO ItemConfirmation Date in the PO Item history in follow-on documents

Author: Ankur Goyal

Company: Larsen and Toubro Infotech Limited

Created on: 05 June 2010

Author Bio Ankur Goyal is a SAP Technical Consultant working with Larsen and Toubro Infotech Limited.He has 11 months of SAP experience. He is currently working on SAP SRM 5.0 Enhancements.He has extensive experience in ABAP, Enhancement Framework which includes User Exits,BADI and Enhancement Spots, External Debugging for ITS and SAPGUI.

Page 2: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 2/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 2

Table of ContentsBackground ......................................................................................................................................................... 3

Business Requirement ................. ................. ................. .................. ................. ................. .................. ............... 3

Landscape Details .............................................................................................................................................. 4 Classic Scenario ............................................................................................................................................. 4

Problem Description ........................................................................................................................................... 5

Problem details ............................................................................................................................................... 5

SAP SRM Standard Functionality ....................................................................................................................... 6 LBBP_PDH_HISTORYF13 ............................................................................................................................. 6

Solution Implementation ..................................................................................................................................... 7 Steps. .............................................................................................................................................................. 7

Source code ................................................................................................................................................................. 7

Related Content .................. ................. .................. ................. .................. ................. .................. ................. .... 11

Disclaimer and Liability Notice .......................................................................................................................... 12

Page 3: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 3/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 3

BackgroundThe purpose of this document is to serve as a ready reference for all the SRM technical consultants workingin the Classic Scenario. If there is such requirement where there is the need to display the PO itemConfirmation Date maintained in the backend R/3 in the shopping cart status screen, instead of PO itemDelivery date, this article can be used. This article describes the SRM-EBP Standard functionality anddetailed steps for the solution implementation. This article can be referred by SRM functional consultant alsoas this could help them understand one more functionality possible in the SRM-EBP.

Business RequirementSometimes few clients which have Classic scenario of SRM implemented in their organizations can have thebusiness requirement wherein after implementation of SRM-SUS and their major chunk of vendors will usethe Confirmation control Functionality. So there will be single or multiple confirmation date available in thePurchase order which can be different from the Delivery date of the Purchase Order.

Currently as per the standard SRM-EBP functionality, even if the confirmation date for the Purchase orderitem is available in the backend R/3 system (table EKES) for that PO item , still the delivery date will bedisplayed under follow-on document of the Shopping cart. So to get the clear picture of when the Goods willbe delivered by the supplier as confirmed by them, the PO item confirmation date should be displayed notthe Delivery date of the Purchase Order.

Page 4: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 4/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 4

Landscape Details

System Type SP Details Purpose

SAP_APPL 4.7 SAPKH47016 SAP R/3 backend system

SAP SRM 5.0 SAPKIBKT14 SAP SRM EBP

Classic Scenario

The choice of a (primary) technical scenario is a key early decision on any SAP SRM project. This decisionimpacts many solution aspects, including available functionality, configuration, development, testing, trainingand support.

Generally, the Classic scenario is suitable for organizations that:

have a large user base in the SAP ERP system; and/or

have their professional purchasers using SAP MM Purchasing application and want to continue

using it; and/or

Have established supplier document collaboration mechanisms in SAP ERP (e.g. EDI or IDOC) andwant to continue using them.

In this scenario, only the shopping cart is created in the SAP Supplier Relationship Management (SAP SRM)system. All other procurement documents, such as purchase orders, goods receipts, and invoices, arelocated in the back-end R/3 system.

Page 5: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 5/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 5

Problem DescriptionTo display the PO confirmation date (promise date of delivery of Goods/Services) in shopping cart follow ondocument for buyer to have clarity on delivery of goods.

When user clicks on the Purchase Order in the history section under Follow-on document section in theCheck Shopping Cart status screen, the Purchase Order item history details opens up. Now how we candisplay the PO confirmation date of delivery of Goods/ Services fetched from the backend R/3 in the PO itemhistory details sub screen.

Problem details

Once the Shopping cart of created, approved and the follow-on documents are created in the backend R/3system, Report BBP_GET_STATUS_2 updates the status of all the follow-on documents in the SRM side. Inthe Check Shopping Cart Status screen when user checks for the SC, in the History segment, systemdisplays the History of all the Follow-on documents for that Shopping Cart.

When user clicks on the Purchase Order link under the Follow-on documents, the PO item history detailsopens up. In the details screen, system displays the PO item Delivery date, though for the same PO item theconfirmation date might also exists

Page 6: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 6/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 6

SAP SRM Standard FunctionalityUnder the Classic scenario as only the Shopping Cart is created on the EBP side and rest of the follow-ondocuments like PR, PO, GR or Invoice etc, are created on the Backend R/3 side. On SRM side,BBP_GET_STATUS_2 reports is scheduled which updates the status of all the follow-on documents. Sowhen user enters the check status screen on the portal, under follow-on document and in the History tableuser can see the entire updated follow-on document for that Shopping cart Item.

When user clicks on the Purchase Order link, Standard Form GET_BACKEND_PO i.e. IncludeLBBP_PDH_HISTORYF13 is called. Backend PO details are not stored in the SRM side in any table.Whenever the user clicks on the Purchase Order, it is fetched from the Backend R/3 and displayed in thedetails screen.

LBBP_PDH_HISTORYF13

This include is responsible to Get detail information of backend purchase order and update the fields POitem History details screen . In this include one META BAPI is called i.e. ‘ META_PO_GETDETAIL ’, as theexporting parameter this BAPI requires Purchase order number, logical system and details which is requiredis marked as ‘X’.

In the standard code, system is fetching the Item details, Account Assignment details, PO item Scheduledetails, Services details. System takes that delivery date from PO item Schedule details and moves into thefield LS_FOLONDOC-DELIV_DATE and displays on the PO item history details screen.

Note: SAP does not support such functionality. This is not a bug in the standard code so there is no SAP OSS noteavailable for such requirement.

Page 7: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 7/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 7

Solution ImplementationImplementation of this solution for this requires the SRM 5.0 and Support pack SAPKIBKT13 or abovebecause SP below 13 does not support Enhancement Spot for modifying the standard code.

Steps

Now for displaying PO Item confirmation date in the item history, LBBP_PDH_HISTORYF13 includeprogram can be enhanced by creating one Implicit Enhancement spot.

Once the Enhancement spot is ready then the custom code for fetching the PO item confirmation detailsfrom the Backend R/3 system can be written.

In the enhancement spot again call the BAPI META_PO_GETDETAIL for fetching only the Item details andConfirmation details by marking the exporting parameter as ‘X’ and by passing the Purchase order no andLogical system. The confirmation details in the backend system is stored in the EKES table and theSchedules data of the PO item is stored in EKET table.

Once the details are fetched into the SRM system and then PO item Confirmation date as per the businessprocess requirements of client can be read and populate into LS_FOLONDOC-DELIV_DATE field. Overwritethe value there in the field LS_FOLONDOC-DELIV_DATE only when the Confirmation date exists.

The scenario can be like:

If there is no confirmation date then delivery date will be displayed as per standard code, If there is single confirmation date then replace the delivery date with that confirmation date

If there are multiple confirmation dates then as per business process relevant date can be read anddisplayed

Source code

DATA: lt_2012_confirmations LIKE bbps_bapiekes OCCURS 0 WITH HEADER LINE.

REFRESH lt_2012_confirmations.

** Check for Backend R/3 system availablity

IF ld_core_available = 'X'.ev_error = c_off.

*Get PO Confirmation detail information from Backend R/3

CALL FUNCTION 'META_PO_GETDETAIL'EXPORTING

purchaseorder = ls_2012_key-refnumberitems = 'X'confirmations = 'X'logical_system = iv_logsys

TABLES

po_items = lt_2012_itemspo_item_confirmations = lt_2012_confirmationsreturn = returncontrol_record = lt_control_record.

CALL FUNCTION 'CONTROL_RECORD_GET_COMM_ERROR'IMPORTING

commerror = ld_commerrorTABLES

Page 8: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 8/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 8

control_record = lt_control_record.

IF NOT ld_commerror IS INITIAL.MESSAGE s001.ev_error = c_on.

ELSE.READ TABLE return WITH KEY type = c_msgty_e

code = 'W5107'.IF sy-subrc EQ 0.

MESSAGE s300(bbp_archiving).ev_error = c_on.

ELSE.READ TABLE lt_2012_items WITH KEY ls_2012_key.IF sy-subrc EQ 0.

* For soonest confirmation dateSORT lt_2012_confirmations BY deliv_date.

READ TABLE lt_2012_confirmations WITH KEY po_item = lt_2012_items-po_itemconf_type = 'LA'.

IF sy-subrc = 0.ls_folondoc-deliv_date = lt_2012_confirmations-deliv_date.ELSE.

READ TABLE lt_2012_confirmations WITH KEY po_item = lt_2012_items-po_itemconf_type = 'AB'.

IF sy-subrc = 0.ls_folondoc-deliv_date = lt_2012_confirmations-deliv_date.

ENDIF.ENDIF.

ENDIF.ENDIF.

ENDIF.

ENDIF.

Once the Enhancement spot is activated then after when the user will click on the Purchase Order link in theSC follow-on document, system will display the PO item Confirmation date instead of PO item Delivery dateand User can get more clarity on delivery of the goods.

Page 9: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 9/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 9

Page 10: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 10/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 10

Page 11: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 11/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com© 2010 SAP AG 11

Related ContentIncoterms on help.sap.com

For more information, visit the Supplier Relationship Management homepage .

Page 12: Display PO Item Confirmation Date in SC Follow-On Documents in History

8/13/2019 Display PO Item Confirmation Date in SC Follow-On Documents in History

http://slidepdf.com/reader/full/display-po-item-confirmation-date-in-sc-follow-on-documents-in-history 12/12

Display PO Item Confirmation Date in SC Follow-on Documents in History

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

Disclaimer and Liability NoticeThis document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.