[英]How to use CRM_ORDER_READ function module in SAP CRM?
I am a fresher.我是一个新鲜人。 Just 2 months of experience in SAP ABAP.
仅 2 个月的 SAP ABAP 经验。
I am asked to get the quotation date for list of contracts.我被要求获取合同清单的报价日期。 For that I need to get the crm business transaction number from everh table.
为此,我需要从 everh 表中获取 crm 业务交易编号。
Now I need to use this transaction number in the program crm_order_read and get the export parameter et_orderadm_i in which GUID will be available and also the creation date and time(quotation date).现在,我需要在程序 crm_order_read 中使用此交易编号,并获取导出参数 et_orderadm_i,其中 GUID 可用以及创建日期和时间(报价日期)。
Now I am not able to understand that how to pass the transaction number(object_id) in the program crm_order_read?现在我无法理解如何在程序 crm_order_read 中传递交易编号(object_id)? There is also a function module crm_order_id available, but there is no import parameter which is a transaction number.
还有一个功能模块 crm_order_id 可用,但没有导入参数是交易号。
Again, how the export parameter et_orderadm_i will contain the quotation date?同样,导出参数 et_orderadm_i 将如何包含报价日期? I am not able to find a way to write the piece of code.
我无法找到编写这段代码的方法。
Usually you don't pass IDs to CRM_ORDER_READ, but GUIDs.通常您不会将 ID 传递给 CRM_ORDER_READ,而是将 GUID。
If you have anyhow only IDs available, you first might want to change the approach.无论如何,如果您只有可用的 ID,您可能首先需要更改方法。 Or make a select on table CRMD_ORDERADM_H.
或者对表 CRMD_ORDERADM_H 进行选择。
Which object has which guid can be seen in SE16 => CRMD_ORDERADM_H => F8.在 SE16 => CRMD_ORDERADM_H => F8 中可以看到哪个对象具有哪个 guid。
However you can test the function module CRM_ORDER_READ in the program SE38=>CRM_ORDER_READ also with IDs.但是,您也可以使用 ID 测试程序 SE38=>CRM_ORDER_READ 中的功能模块 CRM_ORDER_READ。
Here's some basic coding that you can use as template.下面是一些可以用作模板的基本编码。
INCLUDE crm_object_names_con.
data:
lv_guid TYPE crmt_object_guid,
lt_guid TYPE crmt_object_guid_tab,
lt_req_obj TYPE crmt_object_name_tab,
lt_orderadm_i TYPE crmt_orderadm_i_wrkt,
ls_orderadm_i TYPE crmt_orderadm_i_wrk,
lt_orderadm_h TYPE crmt_orderadm_h_wrkt,
ls_orderadm_h TYPE crmt_orderadm_h_wrk.
CLEAR lt_guid.
INSERT lv_guid INTO TABLE lt_guid.
INSERT gc_object_name-orderadm_h INTO TABLE lt_req_obj.
INSERT gc_object_name-orderadm_i INTO TABLE lt_req_obj.
CALL FUNCTION 'CRM_ORDER_READ'
EXPORTING
it_header_guid = lt_guid
it_requested_objects = lt_req_obj
IMPORTING
et_orderadm_h = lt_orderadm_h.
et_orderadm_i = lt_orderadm_i.
READ TABLE lt_orderadm_i INTO ls_orderadm_i INDEX 1.
LOOP AT lt_orderadm_i INTO ls_orderadm_i .
ENDLOOP.
Tipps:小贴士:
Double-click on CRM_ORDER_READ to navigate into it and get the exported data-types from there if you need different ones.如果您需要不同的数据类型,双击 CRM_ORDER_READ 导航到它并从那里获取导出的数据类型。
In CRM_ORDER_READ click on the where-used-list to see how it is implemented at other locations.在 CRM_ORDER_READ 单击 where-used-list 以查看它是如何在其他位置实施的。
The date can be found in ORDERADM_H-POSTING_DATE.日期可以在 ORDERADM_H-POSTING_DATE 中找到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.