2013 Jul 24 9:41 AM
Hi,
I am going to use this FM CRM_ORDER_READ_OW in my transformation routine in SAP BI to calculate the SLA Duration.
SLA Duration = Time case confirmed/report generated - Case creation
I am referring to table SCAPPTSEG to get the time from (TST_FROM) and time to (TST_TO) of the APPT_TYPE = Z_DT_CREATED (case creation) & Z_DT_CONFIRM (case confirmed) by passing in the GUID value to the field APPL_GUID as shown below.
Before I use this FM, I would like to do a test run (test/execute F8) on the FM.
I want to pass the GUID/APPL_GUID = 00505605000903D0BBB625D2F08147D7 into the internal table IT_HEADER_GUID and pass the values Z_DT_CREATED & Z_DT_CONFIRM into the internal table IT_REQUESTED_OBJECTS so that the SLA Times will be exported into the parameter ET_APPOINTMENT.
Can someone guide me on how to do this test run? I am not sure on how to pass the values.
Please help. Let me know if you have any further questions.
Thank you very much!
Kind regards,
Rebekah
2013 Jul 24 11:44 AM
Hi Rebekah,
CRM_ORDER_READ is a function module which can be used to get the details of any business transaction based on the Header GUID, Item GUID or both.
You can use the report program CRM_ORDER_READ in SE38 to test along with Requested Objects to optimize performance.
Regards
Jagathshree
Hi,
I am going to use this FM CRM_ORDER_READ_OW in my transformation routine in SAP BI to calculate the SLA Duration.
SLA Duration = Time case confirmed/report generated - Case creation
I am referring to table SCAPPTSEG to get the time from (TST_FROM) and time to (TST_TO) of the APPT_TYPE = Z_DT_CREATED (case creation) & Z_DT_CONFIRM (case confirmed) by passing in the GUID value to the field APPL_GUID as shown below.
Before I use this FM, I would like to do a test run (test/execute F8) on the FM.
I want to pass the GUID/APPL_GUID = 00505605000903D0BBB625D2F08147D7 into the internal table IT_HEADER_GUID and pass the values Z_DT_CREATED & Z_DT_CONFIRM into the internal table IT_REQUESTED_OBJECTS so that the SLA Times will be exported into the parameter ET_APPOINTMENT.
Can someone guide me on how to do this test run? I am not sure on how to pass the values.
Please help. Let me know if you have any further questions.
Thank you very much!
Kind regards,
Rebekah
2013 Jul 24 9:52 AM
Hi Rebekah,
Just click the icon adjacent to the internal table and you can enter the values for testing.
Regards.
2013 Jul 24 9:58 AM
Hi,
I am not able to enter any values. Pls see screen attached.
Thank you!
Rebekah
2013 Jul 24 10:28 AM
Rebekah,
Seems like missing authorization.Contact your BASIS team.
Regards.
2013 Jul 24 10:30 AM
Two things :
1. In IT_REQUESTED_OBJECTS pass APPOINTMENT, so that it reads only the dates in the transaction.
2. You can use the report CRM_ORDER_READ to test .
/Hasan
2013 Jul 24 11:44 AM
Hi Rebekah,
CRM_ORDER_READ is a function module which can be used to get the details of any business transaction based on the Header GUID, Item GUID or both.
You can use the report program CRM_ORDER_READ in SE38 to test along with Requested Objects to optimize performance.
Regards
Jagathshree
2013 Jul 25 2:51 AM
Hi,
I know the input for Header GUID which is 00505605000903D0BBB625D2F08147D7 but what do I input for the Item GUID? Where do I state the Appointment Type which is Z_DT_CREATED & Z_DT_CONFIRM?
Please advice.
Thank you!
Rebekah
2013 Jul 25 4:25 AM
Hi sunil,
You just have to pass the header guid( transaction guid ) in IT_HEADER_GUID and APPOINTMENT in IT_REQUESTED_OBJECTS .
In return you will get the table IT_APPOINTMENT where you will get an entry for APPT_TYPE = Z_DT_CREATED and Z_DT_CONFIRM .
Please check using the report CRM_ORDER_READ as I explained in my previous comment as well.
/Hasan
2013 Jul 25 9:22 AM
Hi Hasan,
I think I managed to figure it out. I ONLY passed in the
ITEM GUID = 00505605000903D0BBB625D2751A07D3 which I obtained from the table CRMD_ORDERADM_I into the report and below is the results that I got.
Therefore Z_DT_CREATED = 19.11.2012 18:09:33 CET and
Z_DT_CONFIRM = 26.11.2012 18:09:33 CET.
Is this all that the FM does? Because my main aim is to calculate the duration in HOURS between these 2 timestamps.
Please advice how I can achieve this.
Thank you very much!
Rebekah
2013 Jul 25 2:11 PM
Hi Sunil,
Try using the FM : CCU_TIMESTAMP_DIFFERENCE. That should help .
/Hasan
2013 Jul 26 1:36 PM
you can use the report CRM_ORDER_READ but cannot use the fm for testing.. it wont work that way
2013 Jul 25 5:11 AM
Hi Rebekah,
Copy this report and and run it with break points to test the function module
If you want to get the document flow information only, you can use FM CRM_DOC_FLOW_READ_DB.
With FM CRM_DOC_FLOW_READ_DB, only the current document's GUID (IV_HEADER_GUID) is required to get its linked document's GUID.
2013 Jul 25 5:47 AM
Hi Rebekah,
You can't populate Import Table with GUIDs...or better: with RAW (Hex) Fields
And CRMT_OBJECT_GUID_TAB contains only RAW GUIDs. Only way to do this is to create a Dummy test Report.
Regards,
Adithi
2013 Jul 25 5:55 AM
Hi,
Strange but not a single word in your response is different to what Former Member said(even the smiley matches ) in the below thread no wonder we are in the age of Copy-Paste and guess what problem is also similar...
http://scn.sap.com/thread/3395980
Cheers,
Arindam
2013 Jul 25 6:10 AM
2013 Jul 25 6:12 AM
Hello,
The question made me wonder how to test IMPORT parameters with TABLE TYPES and wanted to see if I am seeing it all wrong. And hence started the discussion.
My bad for pasting the same. 😛
Regards,
Adithi
2013 Jul 25 6:57 AM
Hi,
i dont have CRM functions in our current system but
to test table types import parameters
you can use F8 to test and enter values but better to write it i think
saves you time if you do need to change many times.
The key here is to know the table type you are passing, check the subroutine test..
here is some code snippet:
FUNCTION Z_TEST.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" REFERENCE(IT_MARA) TYPE MARA_TT
*" EXPORTING
*" REFERENCE(ET_MARC) TYPE MARC_TT
*" EXCEPTIONS
*" NO_DATA_FOUND
*"----------------------------------------------------------------------
BREAK-POINT.
CHECK IT_MARA IS NOT INITIAL.
**do a
SELECT
* FROM MARC INTO TABLE ET_MARC
FOR ALL ENTRIES IN
IT_MARA
WHERE
MATNR = IT_MARA-MATNR.
IF SY-SUBRC NE 0 .
RAISE NO_DATA_FOUND.
ENDIF.
ENDFUNCTION.
test with the code below
*&---------------------------------------------------------------------*
*& Form test
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM TEST.
DATA: LT_MARA TYPE TABLE OF MARA,
LT_MARC TYPE TABLE OF MARC
.
FIELD-SYMBOLS: <lfs_mara> like LINE OF lt_mara.
APPEND INITIAL LINE TO LT_MARA ASSIGNING <LFS_MARA>.
<LFS_MARA>-MATNR = '10000000'.
CALL FUNCTION 'Z_TEST'
EXPORTING
IT_MARA = LT_MARA
IMPORTING
ET_MARC = LT_MARC
EXCEPTIONS
NO_DATA_FOUND = 1.
ENDFORM. "test