Skip to Content

How to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM (ABAP Programming)

Hi All,

I have to Get Each line item Create and Approval dates for a SHOPPING CART in SAP SRM. Either a table, or any Function module, Method, please let me know ASAP. Same i can use in my Program.

Thank you Very much.

Regards,

Ramesh J.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 16, 2016 at 10:01 AM

    I also need to fetch the approval dates for Shopping Cart items. Any resolution?

    Add a comment
    10|10000 characters needed characters exceeded

    • The Tables used for this data retrieval:

      USR02,TJ02T,CRMC_PROC_TYPE,CRMD_ORDERADM_H,CRMD_ORDERADM_I,
      USER_ADDR,BBP_PDHGP,BBP_PDIGP,CRM_JEST,BBP_PDBEI,BBP_LOCMAP,
      BUT000,CRMC_PROC_TYPE_T,BBPC_SUBOB_CAT_T.

      The Below function modules are used for retrieving appropriate data to the internal Table

      Shopping cart Details

      CALL FUNCTION 'BBP_PD_SC_GETDETAIL'
      EXPORTING
      i_guid = wa_crmd_orderadm_h-guid
      i_object_id = wa_crmd_orderadm_h-object_id
      TABLES
      e_header_rel = t_header_rel.

      RFx Details

      CALL FUNCTION 'BBP_PD_BID_GETDETAIL'

      EXPORTING
      i_guid = wa_header_rel-guid_b
      IMPORTING
      e_header = l_header_bid
      TABLES
      e_header_rel = t_header_rel
      e_status = t_status.

      Contract details

      CALL FUNCTION 'BBP_PD_CTR_GETDETAIL'
      EXPORTING
      i_guid = wa_header_rel-guid_b
      IMPORTING
      e_header = l_header_ctr
      TABLES
      e_status = t_status.

      PO Details

      CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
      EXPORTING
      i_guid = wa_header_rel-guid_b
      IMPORTING
      e_header = l_header_po
      TABLES
      e_status = t_status.

      Getting each version

      CALL FUNCTION 'BBP_PROCDOC_VERSION_GETLIST'
      EXPORTING
      iv_header_guid = wa_header_rel-guid_b
      iv_read_all_change_versions = 'X'
      TABLES
      et_pdlist = t_version.

      Getting Status of Each document

      CALL FUNCTION 'BBP_GET_STATUS'
      EXPORTING
      iv_guid = p_guid
      iv_object_type = p_object_type
      IMPORTING
      es_status = ls_status

      Method which is used for Process history of each document

      CALL METHOD /sapsrm/cl_wf_apv_facade=>retrieve_process_history
      EXPORTING
      iv_document_guid = p_wa_header_rel_guid_b
      iv_agent_id = lv_agent_id
      iv_language = sy-langu
      IMPORTING
      es_process = ls_wf_process.

      UNASSIGN: <fs_tab>, <fs_wa>.
      lt_process_lvl_list = ls_wf_process-process_level_list[].



      READ TABLE lt_process_lvl_list INTO wa_process_lvl_list

      WITH KEY level_status = 'COMPLETED'.

      ASSIGN COMPONENT 'DECISIONSET_LIST' OF STRUCTURE

      wa_process_lvl_list TO <fs_tab>.
      IF sy-subrc EQ 0.
      READ TABLE <fs_tab> INTO wa_decisionset INDEX 1.
      IF sy-subrc EQ 0.
      UNASSIGN <fs_tab>.
      ASSIGN COMPONENT 'WORKITEM_LIST' OF STRUCTURE wa_decisionset TO <fs_tab>.
      IF sy-subrc EQ 0.
      READ TABLE <fs_tab> INTO ls_workitem_list INDEX 1.
      p_appr_name = ls_workitem_list-agent. "Approver Name

      CONVERT TIME STAMP ls_workitem_list-etime
      TIME ZONE c_tzone
      INTO DATE lv_date TIME lv_time.

      p_end_date = lv_date . "Date Complete

      CLEAR : lv_date,lv_time.
      CONVERT TIME STAMP ls_workitem_list-ctime "stime
      TIME ZONE c_tzone
      INTO DATE lv_date TIME lv_time.

      p_strt_date = lv_date.

      ENDIF.
      ENDIF.
      ENDIF.

      Custom function module had been created for calculating number of working days between two dates based on the Calendar: Z_SELECT_FACTDAYS_FOR_PERIOD

      CALL FUNCTION 'Z_SELECT_FACTDAYS_FOR_PERIOD' DESTINATION 'ECC_BACKEND'
      EXPORTING
      i_indat = p_lv_sdate
      i_outdat = p_lv_edate
      IMPORTING
      no_of_working_days = p_lv_days
      EXCEPTIONS
      date_conversion_error = 1
      OTHERS = 2.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.