05-09-2006 9:32 AM
Hi,
I'm using bapi BAPI_BUSPROCESSND_CREATE(CHANGE)MULTI for creating Repair Orders. With the SERVICE_OS you can maniputlate: Results, Reasons, Subjects.
What I want to do is to add Objects too (Material).
I don't know how to provide the bapi with the data to create this Object-Material ? When checking the bapi I see FM CRM_ORDER_MAINTAIN is called which needs the SERVICE_OS table, which contains possible Subjects and Objects (OSSET structure). The Subjects are correctly filled in the bapi ... but I can't find where the Objects are filled (if they are!) ?
Any help is welcome. Thanx.
Jan
05-09-2006 9:38 AM
Hi Jan,
You can pass the Objects in OBJECTS table in the FM
BAPI_BUSPROCESSND_CREATEMULTI like this.
Bapi to create the Contract Header and Line Item along with the MPRN
details
CALL FUNCTION 'BAPI_BUSPROCESSND_CREATEMULTI'
TABLES
header = lit_header
item = lit_orderadm_i
partner = lit_partner
organisation = lit_organisation
status = lit_status
appointment = lit_appointment
input_fields = lit_inputfields
return = lit_ret
product = lit_product
scheduleline = lit_schline
customer_head = lit_customer_h
customer_item = lit_customer_i
pricing = lit_pricing
condition_create = lit_condition
billing = lit_billing
config_cfg = lit_config_cfg
config_ins = lit_config_ins
config_val = lit_config
<b> OBJECTS = lit_object.</b>
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra
05-09-2006 3:38 PM
Hi,
I already tried that (maybe still doing wrong!).
I'm in fact creation a repair order (Service process). The object(material) I want to create is on header level.
"Fast entry screen-Product ID" or "Trans.Data-Objects-Product ID".
In FM CRM_ORDER_MAINTAIN this data is passed via:
*" REFERENCE(IT_REFOBJ) TYPE CRMT_REFOBJ_COMT OPTIONAL
but I don't see how I can pas this data to the BAPI, which calls the FM !?
Could you give some more info about you build lit_objects ?
Thanks.
Jan
05-09-2006 3:44 PM
Hi Jan,
I am populating IBASE components in lit_objects. An IBASE contains Connection Object and POD in CRM.
I am passing the POD in the above table.
Are you working on SAP CRM module. IF yes, just explain me your problem in little detail.
I am using the same BAPI in CRM to create Service Contracts, Activity etc. I may help you in giving some idea how do we populate these tables and pass the same to the BAPI.
Regards,
Amit Mishra
05-09-2006 7:33 PM
Hi Amit,
1st of all thank for spending your time on this !
I'll try to explain in more detail.
I'm on CRM and start tx. crmd_order to create a Service Order. It's possible to enter data on the Fast-entry screen or on the Transaction Data screen. Let's go via the Transaction Data screen. Than go to the Objects tab witch has to parts: Objects & Subjects. I add a subject on the Subject subscreen and I fill in the Product Id on the Objects subscreen. NO IBase/Component !! This data might be visible on the Fast-entry screen too. This is what I want to create with the bapi ! The Subject part is ok, but the Object part doesn't seem possible to me !? All this data has to be entered using the SERVICE_OS internal table of the bapi. Tip: you can check all the data if you debug tx. crmd_order: enter a subject and an object-material_id without pressing enter, switch on debugging (/h) and now press enter. You should be in debugging. Press shift-F7 and enter 'crm_order_maintain'. Press F8. You will stop at FM crm_order_maintain where you can check all itabs this FM uses ... have a look in itab IT_SERVICE_OS-OSSET-SUBJECT or IT_SERVICE_OS-OSSET-OBJECT which are filled an look at it_object which is empty.
Now back to my question : how to create it_service_os to be able to use it with the bapi ? I think it's not possible because it doesn't get processed in the bapi. Have a look at perform 'map_into_service_os_com_ins' in the bapi, also have a look at the FM which are called in this form. They don't use all parameters ...
Your opinion about this ?
Many thanks,
Jan
05-10-2006 9:10 AM
Hi Jan,
You can directly use CRM_ORDER_MAINTAIN.
Check out IT_SERVICE_OS, it's TYPE is CRMT_SRV_OSSET_COMT. Just double click on it, you will see the line type CRMT_SRV_OSSET_COM. Double click on the line type you will see the structure CRMT_SRV_OSSET_COM. This struture has OSSET which is again a table type CRMT_SRV_OSSET_COMT1. Double click on it, again double click on the Line Type CRMT_SRV_OSSET_COM1, here you will see REFOBJECT and SUBJECT both are again a table type. Drill down to CRMT_SRV_REFOBJ_COMT, now here you will see the required fields that you want to populate like TYPE_OBJECT, GUID_OBJECT, PRODUCT_ID etc.
Now the question is how to populate this.
Refer the Code below.
Data : git_osset TYPE crmt_srv_osset_wrkt1,
wa_osset like line of git_osset,
git_subject TYPE crmt_srv_subject_wrkt,
wa_subject like line of git_subject,
git_REFOBJECT Type CRMT_SRV_REFOBJ_COMT,
wa_REFOBJECT like line of git_refobject,
git_service_os TYPE TABLE OF crmt_srv_osset_wrk,
wa_service_os like line of git_service_os.
*Populate the subject fields in git_subject.
wa_subject-GUID = '*******'.
wa_subject-KATALOGART = '******'.
append wa_subject to git_subject.
wa_osset-subject = git_subject[].
*Populate the Object fields
wa_refobject-TYPE_OBJECT = '*****'.
wa_refobject-GUID_OBJECT = '*****'.
wa_refobject-PRODUCT_ID = '*****'.
append wa_refobject to git_refobject.
wa_osset-refobject = git_refobject[].
append wa_osset to git_osset.
wa_service_os-osset = git_osset.
append wa_service_os to git_service_os.
Now pass this internal table to CRM_ORDER_MAINTAIN.
<b>Please reward points if it helps.</b>
Regards,
Amit Mishra
05-10-2006 6:56 PM
Amit,
Yes, I know.
But the bapi should be able to create all Business Transactions ! We might escalate it to SAP, just to know.
I solved it by using the bapi and afterwards use fm CRM_SERVICE_OS_MAINTAIN_OW before the save. There exist quite a few crm_maintainow fm's.
Thanks,
Jan
06-28-2006 1:08 PM
Hi Jan,
I'm dealing the same problem. Is the only solution to use fm CRM_SERVICE_OS_MAINTAIN_OW after using the BAPI?
Can you pleae inform me about you experiences?
Thanks, Angelo
04-12-2007 9:41 AM
Hi,
BAPI_BUSPROCESSND_CREATEMULTI can not solve everything (answer from SAP Note) !
So indeed use other FM CRM_MAINTAIN_ORDER or CRM_SERVICE_OS_MAINTAIN_OW or any other CRM_...._OW.
I'm now starting doing updates using the BOL ! Nice, try it, examples to be found in cookbook and forums.
Regards,
Jan