Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

call transaction

Former Member
0 Likes
661

Hi All,

How to call the transaction which has different tabs like locator program?

How to pass the parameter to such transaction. for ex. CRMD_ORDER in crm.

Thanks and Regards,

Swapna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
557

Usually you will have BAPI's for these kinds of transactions. Did you look into that?

If its a enjoy transaction and has ALV controls, you cannot write a BDC on that screens.

Regards,

Ravi

Note - Please mark all the helpful answers

4 REPLIES 4
Read only

Former Member
0 Likes
558

Usually you will have BAPI's for these kinds of transactions. Did you look into that?

If its a enjoy transaction and has ALV controls, you cannot write a BDC on that screens.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
557

Call transaction is not working properly in the case of cmrd_order directly if u'll like to do , transaction varirant will be created & the it would be call but not sure it'll work.

Read only

Clemenss
Active Contributor
0 Likes
557

Hi Swapna,

Call Transaction using bdc table is out of date. CRM as a new SAP module should not and in most cases cannot be used like this.

For some functions, BAPI functions are available, for most processes not or not useful.

There is a (as fas as I remember) quite-well-documented central function called

CRM_ORDER_MAINTAIN for maintenance and CRM_ORDER_READ to READ the order. When creating or maintaining orders not via BADI extension of standard process, you need CRM_ORDER_SAVE.

Best is, first do your process manually. Set a breakpoint for function module CRM_ORDER_MAINTAIN and check the parameters contents. There is a customizing table with the names of the possible objects - this may help you. Also a small test program to call CRM_ORDER_READ with all parameters:


*&---------------------------------------------------------------------*
*&      Form  order_read
*&---------------------------------------------------------------------*
FORM order_read  USING    pv_guid         TYPE crmt_object_guid
                          pv_object       TYPE crmt_object_id.
  DATA:
    lt_ac_assign                          TYPE crmt_ac_assign_wrkt,
    lt_activity_h                         TYPE crmt_activity_h_wrkt,
    lt_activity_i                         TYPE crmt_activity_i_wrkt,
    lt_appointment                        TYPE crmt_appointment_wrkt,
    lt_batch                              TYPE crmt_batch_wrkt,
    lt_billing                            TYPE crmt_billing_wrkt,
    lt_billplan                           TYPE crmt_billplan_wrkt,
    lt_cancel                             TYPE crmt_cancel_wrkt,
    lt_cancel_cr                          TYPE crmt_cancel_rules_tab,
    lt_cancel_ir                          TYPE crmt_cancel_ir_wrkt,
    lt_config                             TYPE crmt_config_wrkt,
    lt_config_filter                      TYPE crmt_config_filter_wrkt,
    lt_creditvalues                       TYPE crmt_creditvalues_wrkt,
    lt_cumulat_h                          TYPE crmt_cumulat_h_wrkt,
    lt_cumulated_i                        TYPE crmt_cumulated_i_wrkt,
    lt_customer_h                         TYPE crmt_customer_h_wrkt,
    lt_customer_i                         TYPE crmt_customer_i_wrkt,
    lt_doc_flow                           TYPE crmt_doc_flow_wrkt,
    lt_exception                          TYPE crmt_exception_t,
    lt_extension                          TYPE crmt_extension_wrkt,
    lt_finprod_i                          TYPE crmt_finprod_i_wrkt,
    lt_guid                               TYPE crmt_object_guid_tab,
    lt_lead_h                             TYPE crmt_lead_h_wrkt,
    lt_opport_h                           TYPE crmt_opport_h_wrkt,
    lt_orderadm_h                         TYPE crmt_orderadm_h_wrkt,
    lt_orderadm_i                         TYPE crmt_orderadm_i_wrkt,
    lt_ordprp_i                           TYPE crmt_ordprp_i_wrkt,
    lt_ordprp_i_d                         TYPE crmt_ordprp_i_d_wrkt,
    lt_ordprp_objl_i_d                    TYPE crmt_ordprp_objl_i_d_wrkt,
    lt_orgman                             TYPE crmt_orgman_wrkt,
    lt_partner                            TYPE crmt_partner_external_wrkt,
    lt_payplan                            TYPE crmt_payplan_wrkt,
    lt_payplan_d                          TYPE crmt_payplan_d_wrkt,
    lt_price_agreements_bbp               TYPE crmt_price_agreements_bbp_wrkt,
    lt_price_agreements_crm               TYPE crmt_price_agreements_crm_wrkt,
    lt_pricing                            TYPE crmt_pricing_wrkt,
    lt_pricing_i                          TYPE crmt_pricing_i_wrkt,
    lt_pridoc                             TYPE crmt_pric_cond_t,
    lt_product_i                          TYPE crmt_product_i_wrkt,
    lt_qualif                             TYPE crmt_qualif_external_wrkt,
    lt_refobj                             TYPE crmt_refobj_wrkt,
    lt_requested_objects                  TYPE crmt_object_name_tab,"table of CRMC_OBJECTS(-,
    lt_sales                              TYPE crmt_sales_wrkt,
    lt_schedlin                           TYPE crmt_schedlin_wrkt,
    lt_schedlin_i                         TYPE crmt_schedlin_i_wrkt,
    lt_service_assign                     TYPE crmt_service_assign_wrkt,
    lt_service_h                          TYPE crmt_service_h_wrkt,
    lt_service_i                          TYPE crmt_service_i_wrkt,
    lt_service_os                         TYPE crmt_srv_osset_wrkt,
    lt_serviceplan_i                      TYPE crmt_serviceplan_i_wrkt,
    lt_serviceplan_ie                     TYPE crmt_serviceplan_ie_wrkt,
    lt_shipping                           TYPE crmt_shipping_wrkt,
    lt_status                             TYPE crmt_status_wrkt,
    lt_status_h                           TYPE crmt_status_h_wrkt,
    lt_struct_i                           TYPE crmt_struct_i_wrkt,
    lt_subject                            TYPE crmt_subject_wrkt,
    lt_survey                             TYPE crmt_survey_wrkt,
    lt_text                               TYPE crmt_text_wrkt.

  SELECT guid
    INTO TABLE lt_guid
    FROM crmd_orderadm_h
    WHERE guid = pv_guid
      OR  object_id = pv_object.
  CHECK lt_guid IS NOT INITIAL.
**  APPEND pv_guid TO lt_guid.
* all objects 2brequested
  SELECT name INTO TABLE lt_requested_objects
    FROM crmc_objects.
  CALL FUNCTION 'CRM_ORDER_READ'
    EXPORTING
      it_header_guid                      = lt_guid
*   IT_ITEM_GUID                          =
*   IV_MODE                               =
*   IV_ONLY_SPEC_ITEMS                    =
    it_requested_objects                  = lt_requested_objects
*   IV_NO_AUTH_CHECK                      =
*   IT_ITEM_USAGE_RANGE                   =
*   IV_SUBITEM_DEPTH                      = -1
*   IT_OBJECT_FILTER                      =
*   IV_ONLY_CHANGED_OBJ                   = FALSE
    IMPORTING

    et_ac_assign                          = lt_ac_assign
    et_activity_h                         = lt_activity_h
    et_activity_i                         = lt_activity_i
    et_appointment                        = lt_appointment
    et_batch                              = lt_batch
    et_billing                            = lt_billing
    et_billplan                           = lt_billplan
    et_cancel                             = lt_cancel
    et_cancel_cr                          = lt_cancel_cr
    et_cancel_ir                          = lt_cancel_ir
    et_config                             = lt_config
    et_config_filter                      = lt_config_filter
    et_creditvalues                       = lt_creditvalues
    et_cumulat_h                          = lt_cumulat_h
    et_cumulated_i                        = lt_cumulated_i
    et_customer_h                         = lt_customer_h
    et_customer_i                         = lt_customer_i
    et_doc_flow                           = lt_doc_flow
    et_exception                          = lt_exception
    et_extension                          = lt_extension
    et_finprod_i                          = lt_finprod_i
    et_lead_h                             = lt_lead_h
    et_opport_h                           = lt_opport_h
    et_orderadm_h                         = lt_orderadm_h
    et_orderadm_i                         = lt_orderadm_i
    et_ordprp_i                           = lt_ordprp_i
    et_ordprp_i_d                         = lt_ordprp_i_d
    et_ordprp_objl_i_d                    = lt_ordprp_objl_i_d
    et_orgman                             = lt_orgman
    et_partner                            = lt_partner
    et_payplan                            = lt_payplan
    et_payplan_d                          = lt_payplan_d
    et_price_agreements_bbp               = lt_price_agreements_bbp
    et_price_agreements_crm               = lt_price_agreements_crm
    et_pricing                            = lt_pricing
    et_pricing_i                          = lt_pricing_i
    et_pridoc                             = lt_pridoc
    et_product_i                          = lt_product_i
    et_qualif                             = lt_qualif
    et_refobj                             = lt_refobj
    et_sales                              = lt_sales
    et_schedlin                           = lt_schedlin
    et_schedlin_i                         = lt_schedlin_i
    et_service_assign                     = lt_service_assign
    et_service_h                          = lt_service_h
    et_service_i                          = lt_service_i
    et_service_os                         = lt_service_os
    et_serviceplan_i                      = lt_serviceplan_i
    et_serviceplan_ie                     = lt_serviceplan_ie
    et_shipping                           = lt_shipping
    et_status                             = lt_status
    et_status_h                           = lt_status_h
    et_struct_i                           = lt_struct_i
    et_subject                            = lt_subject
    et_survey                             = lt_survey
    et_text                               = lt_text
* CHANGING
*   CV_LOG_HANDLE                         =
    EXCEPTIONS
      document_not_found                    = 1
      error_occurred                        = 2
      document_locked                       = 3
      no_change_authority                   = 4
      no_display_authority                  = 5
      no_change_allowed                     = 6
      OTHERS                                = 7
            .
  IF sy-subrc                             <> 0.
    MESSAGE ID sy-msgid                   TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.

  break li.

ENDFORM.                    " order_read

Note: parameters ordered alphabeticvally to find them faster - SAP did not invent the alphabet so they don't use it

Use this to get an idea what the parameters may look like but be aware that the structures in READ and MAINTAIN are similar but different.

Let me know what else you want to know.

Regards,

Clemens

added the alphabet note:

Clemens Li

Read only

Former Member
0 Likes
557

Hi All,

Thanks for the replies. Actually I have to display this transaction from other system(non crm) for some transaction no let's say contract no 5001234. I should display all the details without going to the locator program and search.

Eveif I developed the ITS webgui parameter, i need to pass some parameters to that.

I hope my problem is more clear to you now.

Thanks and Regards,

Swapna